Documentation ¶
Index ¶
- Constants
- type Message
- func (m *Message) JsonBytes() []byte
- func (m *Message) JsonLoad(data []byte) error
- func (z *Message) MarshalMsg(b []byte) (o []byte, err error)
- func (m *Message) MsgpackBytes() []byte
- func (m *Message) MsgpackLoad(data []byte) error
- func (z *Message) Msgsize() (s int)
- func (z *Message) UnmarshalMsg(bts []byte) (o []byte, err error)
Constants ¶
View Source
const ( // 0~20 corresponds to mqtt control package types MqttPublish = 3 // 21~ Reserved byte = iota + 21 RaftJoin RaftApply )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Type byte `json:"type" msg:"type"` NodeID string `json:"node-id" msg:"node-id"` ClientID string `json:"client-id" msg:"client-id"` ProtocolVersion byte `json:"protocol-version" msg:"protocol-version"` Payload []byte `json:"payload" msg:"payload"` }
func (*Message) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*Message) MsgpackBytes ¶
func (*Message) MsgpackLoad ¶
Click to show internal directories.
Click to hide internal directories.