Documentation ¶
Index ¶
Constants ¶
View Source
const ( MessageTypeUnknown = MessageType("__message_type_unknown") TypeUnknown = Type("__protocol_type_unknown") )
Variables ¶
This section is empty.
Functions ¶
func Identify ¶
func Identify(msg *protocolpb.Message) (Type, MessageType, error)
Identify is a function that given a protocol message gives the specific message type of the body and the type of the protocol to which this message belongs.
func IdentifyOrUnknown ¶
func IdentifyOrUnknown(msg *protocolpb.Message) (Type, MessageType)
IdentifyOrUnknown wraps Identify to return TypeUnknown and/or MessageTypeUnknown in the case where either one cannot be determined due to an error.
Types ¶
type MessageType ¶
type MessageType string
MessageType is the type of a message within a protocol.
func (MessageType) String ¶
func (mt MessageType) String() string
String transforms a MessageType into a string
Click to show internal directories.
Click to hide internal directories.