Documentation
¶
Index ¶
- type MsgHandler
- type MsgInfo
- type MsgRaw
- type Processor
- func (p *Processor) Marshal(msg any) ([][]byte, error)
- func (p *Processor) Range(f func(id uint16, t reflect.Type))
- func (p *Processor) Register(msg any) uint16
- func (p *Processor) Route(msg any, userData any) error
- func (p *Processor) SetByteOrder(littleEndian bool)
- func (p *Processor) SetHandler(msg any, msgHandler MsgHandler)
- func (p *Processor) SetRawHandler(id uint16, msgRawHandler MsgHandler)
- func (p *Processor) SetRouter(msg any, msgRouter *chanrpc.Server)
- func (p *Processor) Unmarshal(data []byte) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MsgHandler ¶
type MsgHandler func([]any)
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
------------------------- | id | protobuf message | -------------------------
func NewProcessor ¶
func NewProcessor() *Processor
func (*Processor) Register ¶
It's dangerous to call the method on routing or marshaling (unmarshaling)
func (*Processor) SetByteOrder ¶
It's dangerous to call the method on routing or marshaling (unmarshaling)
func (*Processor) SetHandler ¶
func (p *Processor) SetHandler(msg any, msgHandler MsgHandler)
It's dangerous to call the method on routing or marshaling (unmarshaling)
func (*Processor) SetRawHandler ¶
func (p *Processor) SetRawHandler(id uint16, msgRawHandler MsgHandler)
It's dangerous to call the method on routing or marshaling (unmarshaling)
Click to show internal directories.
Click to hide internal directories.