Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MessageKeys = []string{
"type",
"connectionID",
"subjects",
"subject",
"uri",
"inbox",
"payload",
}
MessageKeys is a list of all possible keys in a protocol message
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Type MessageType `json:"type"` ConnectionID string `json:"connectionID"` Subjects []string `json:"subjects"` Subject string `json:"subject"` URI string `json:"uri"` Inbox string `json:"inbox"` Payload []byte `json:"payload"` }
Message represents a message for Mantil's lambda streaming protocol.
func ParseMessage ¶
ParseMessage parses a protocol message and returns a Message struct if successful
type MessageType ¶
type MessageType string
MessageType represents the type of the procol message
const ( // Subscribe represents a subscription message type. Clients use these to indicate // that they want to subscribe to a set of topics. Subscribe MessageType = "SUB" // Unsubscribe represents a unsubscribe message type. Clients use these to indicate // that they want to unsubscribe from a set of topics. Unsubscribe MessageType = "UNSUB" // Request represents a request message type. These are used for request/response // type communication. Request MessageType = "REQ" // Response represents a response message type. These are used for request/response // type communication. Response MessageType = "RSP" // Publish represents a publish message type. These are used server-side // to publish a message to a given topic, sending it to all subscribers of that topic. Publish MessageType = "PUB" )
Click to show internal directories.
Click to hide internal directories.