Versions in this module Expand all Collapse all v2 v2.7.1 Jan 15, 2024 v2.7.0 Jan 12, 2024 Changes in this version + var ErrInvalidMessage = errors.New("invalid message") + var ErrRouteInfoNotFound = errors.New("route info not found in dictionary") + var ErrWrongMessageType = errors.New("wrong message type") + func GetDictionary() map[string]uint16 + func SetDictionary(dict map[string]uint16) error + type Encoder interface + Encode func(message *Message) ([]byte, error) + IsCompressionEnabled func() bool + type Message struct + Data []byte + Err bool + ID uint + Route string + Type Type + func Decode(data []byte) (*Message, error) + func New(err ...bool) *Message + func (m *Message) String() string + type MessagesEncoder struct + DataCompression bool + func NewMessagesEncoder(dataCompression bool) *MessagesEncoder + func (me *MessagesEncoder) Decode(data []byte) (*Message, error) + func (me *MessagesEncoder) Encode(message *Message) ([]byte, error) + func (me *MessagesEncoder) IsCompressionEnabled() bool + type Type byte + const Notify + const Push + const Request + const Response + func (t *Type) String() string