Documentation
¶
Index ¶
- type MsgHandler
- type MsgProc
- type OutPutMsg
- type ProcMsgFn
- type ProcMsgInfo
- type Shunt
- func (s *Shunt) AddMsg(ctx context.Context, slotIndex int, fnIndex int, inputMsg proto.Message) (*MsgProc, error)
- func (s *Shunt) AddPriorMsg(ctx context.Context, slotIndex int, fnIndex int, inputMsg proto.Message) (*MsgProc, error)
- func (s *Shunt) RegisterMsgHandler(name string, fnIndex int, fn ProcMsgFn)
- func (s *Shunt) Run()
- func (s *Shunt) SizeOfQInSlot() int
- func (s *Shunt) SizeOfSlot() int
- func (s *Shunt) Stop()
- func (s *Shunt) WaitStop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MsgHandler ¶
type MsgHandler struct {
// contains filtered or unexported fields
}
MsgHandler : msg handler
func NewMsgHandler ¶
func NewMsgHandler() *MsgHandler
func (*MsgHandler) GetFn ¶
func (h *MsgHandler) GetFn(fnIndex int) ProcMsgFn
GetFn -- get function by fn index
func (*MsgHandler) GetFunctionName ¶
func (h *MsgHandler) GetFunctionName(fnIndex int) string
GetFunctionName -- get function name by fn index
func (*MsgHandler) RegisterFn ¶
func (h *MsgHandler) RegisterFn(name string, fnIndex int, fn ProcMsgFn)
RegisterFn -- register function
type ProcMsgFn ¶
type ProcMsgFn func(ctx context.Context, index int, inputMsg proto.Message) (outputMsg proto.Message, err error)
ProcMsgFn function
type ProcMsgInfo ¶
type ProcMsgInfo struct {
// contains filtered or unexported fields
}
ProcMsgInfo -- name and function
type Shunt ¶
type Shunt struct {
// contains filtered or unexported fields
}
Shunt multi-queue: like shunt
func NewShuntWithSize ¶
NewShuntWithSize : new shunt with size
func (*Shunt) AddMsg ¶
func (s *Shunt) AddMsg(ctx context.Context, slotIndex int, fnIndex int, inputMsg proto.Message) (*MsgProc, error)
AddMsg : add msg
func (*Shunt) AddPriorMsg ¶
func (s *Shunt) AddPriorMsg(ctx context.Context, slotIndex int, fnIndex int, inputMsg proto.Message) (*MsgProc, error)
AddPriorMsg : add prior msg
func (*Shunt) RegisterMsgHandler ¶
RegisterMsgHandler : register msg handler
func (*Shunt) SizeOfQInSlot ¶
SizeOfQInSlot : get queue size in each slot
Click to show internal directories.
Click to hide internal directories.