Documentation
¶
Index ¶
- type AsyncCtx
- type AsyncR
- type CallCtx
- type Mux
- func (c *Mux) Call(ctx context.Context, callCtx *CallCtx) (interface{}, error)
- func (c *Mux) CallSlot(ctx context.Context, sIndex int, callCtx *SlotCallCtx) (interface{}, error)
- func (c *Mux) NormalizeSlotIndex(index int) int
- func (c *Mux) QSize() int
- func (c *Mux) Run()
- func (c *Mux) SlotSize() int
- func (c *Mux) Stop()
- func (c *Mux) WaitStop(ctx context.Context) error
- type SlotAble
- type SlotCallCtx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncCtx ¶
type AsyncCtx struct {
// contains filtered or unexported fields
}
AsyncCtx : async call context
func NewAsyncCtx ¶
func NewAsyncCtx(ctx context.Context, sIndex int, callCtx *SlotCallCtx) *AsyncCtx
NewAsyncCtx : new async call context ctx -- context sIndex -- slot index callCtx -- SlotCallCtx, including call function and param
type AsyncR ¶
type AsyncR struct {
// contains filtered or unexported fields
}
AsyncR : async call result.
type CallCtx ¶
type CallCtx struct {
Call func(ctx context.Context, sIndex int, req interface{}) (rsp interface{}, err error)
Param SlotAble
}
CallCtx : call context, function and param
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
Mux : multi-queue mux
func (*Mux) CallSlot ¶
CallSlot : wrap slot call ctx -- context.Context sIndex -- slot index callCtx -- call context
func (*Mux) NormalizeSlotIndex ¶
NormalizeSlotIndex slot index
Click to show internal directories.
Click to hide internal directories.