msg

package
v0.0.0-...-3d82958 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2022 License: MIT Imports: 3 Imported by: 0

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) UnMarshal

func (lc *LessMessagePayloadCodec) UnMarshal(reader io.Reader) (message interface{}, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL