diff options
Diffstat (limited to 'internal/protocol')
| -rw-r--r-- | internal/protocol/capabilities.go | 12 | ||||
| -rw-r--r-- | internal/protocol/protocol.go | 6 | ||||
| -rw-r--r-- | internal/protocol/session.go | 10 |
3 files changed, 28 insertions, 0 deletions
diff --git a/internal/protocol/capabilities.go b/internal/protocol/capabilities.go new file mode 100644 index 0000000..e5412c7 --- /dev/null +++ b/internal/protocol/capabilities.go @@ -0,0 +1,12 @@ +package protocol + +const ( + // HiddenCapabilitiesPrefix identifies server capability advertisements sent over the hidden control channel. + HiddenCapabilitiesPrefix = ".syn capabilities " + + // CapabilityQueryUpdateV1 marks support for in-flight query replacement over an existing session. + CapabilityQueryUpdateV1 = "query-update-v1" + + // CapabilityJournalV1 marks support for journal protocol operations over an existing session. + CapabilityJournalV1 = "journal-v1" +) diff --git a/internal/protocol/protocol.go b/internal/protocol/protocol.go index d53d07e..13b7fb9 100644 --- a/internal/protocol/protocol.go +++ b/internal/protocol/protocol.go @@ -7,6 +7,12 @@ const ( MessageDelimiter byte = '¬' // FieldDelimiter delimits messagefields. FieldDelimiter string = "|" + // AggregateMessageID is the leading field of a mapreduce aggregate-data + // message on the wire (AGGREGATE|hostname|serialized-data). It is the + // single source of truth used by the server to tag such messages and by + // the mapr client to recognise them, so protocol acks like "AUTHKEY OK" + // (which merely start with the letter 'A') are not mistaken for data. + AggregateMessageID string = "AGGREGATE" // CSVDelimiter delimits CSV file fields.kj:w CSVDelimiter string = "," // AggregateKVDelimiter delimits key-values of an aggregation message. diff --git a/internal/protocol/session.go b/internal/protocol/session.go new file mode 100644 index 0000000..ec6433c --- /dev/null +++ b/internal/protocol/session.go @@ -0,0 +1,10 @@ +package protocol + +const ( + // HiddenSessionStartOKPrefix acknowledges a successful SESSION START request. + HiddenSessionStartOKPrefix = ".syn session start ok" + // HiddenSessionUpdateOKPrefix acknowledges a successful SESSION UPDATE request. + HiddenSessionUpdateOKPrefix = ".syn session update ok" + // HiddenSessionErrorPrefix reports a rejected SESSION request. + HiddenSessionErrorPrefix = ".syn session err " +) |
