Documentation ¶
Index ¶
Constants ¶
View Source
const ( MAGICLength = 4 TypeLength = 2 )
View Source
const ( Call = iota + 1 Reply Oneway )
View Source
const (
MAGIC = 76698383
)
Variables ¶
This section is empty.
Functions ¶
func NewLessMsgPayloadCodec ¶
func NewLessMsgPayloadCodec(c codec.PayloadCodec) codec.PayloadCodec
Types ¶
type LessMessage ¶
type LessMessage struct { Magic uint32 `json:"magic"` MsgType uint16 `json:"msg_type"` Body []byte `json:"body"` }
func NewMessage ¶
func NewMessage(msgType uint16, body string) *LessMessage
type LessMessagePayloadCodec ¶
type LessMessagePayloadCodec struct {
// contains filtered or unexported fields
}
func (*LessMessagePayloadCodec) Marshal ¶
func (lc *LessMessagePayloadCodec) Marshal(message interface{}, writer io.Writer) (err error)
func (*LessMessagePayloadCodec) Name ¶
func (*LessMessagePayloadCodec) Name() string
Click to show internal directories.
Click to hide internal directories.