Documentation ¶
Index ¶
- Constants
- func OlsAlloc() uint
- func OlsFree(slot uint)
- func OlsInstallSlotCleanHandler(slot uint, handler OlsSlotCleanHandler)
- func SendOwn(p *Object, c *Object) bool
- func SendTerm(o *Object) bool
- func SendTermAck(p *Object) bool
- func SendTermReq(p *Object, c *Object) bool
- type CmdStats
- type Command
- type CommandWrapper
- type Cond
- type IStatsWatch
- type IStatsWatchMgr
- type Object
- func (o *Object) Active()
- func (o *Object) GetChildById(id int) *Object
- func (o *Object) GetPendingCommandCnt() int
- func (o *Object) GetStats() map[string]CmdStats
- func (o *Object) GetTreeName() string
- func (o *Object) IsTermiated() bool
- func (o *Object) LaunchChild(c *Object)
- func (o *Object) OlsClrValue()
- func (o *Object) OlsGetValue(slot uint) interface{}
- func (o *Object) OlsSetValue(slot uint, val interface{})
- func (o *Object) ProcessCommand()
- func (o *Object) ProcessSeqnum()
- func (o *Object) SendCommand(c Command, incseq bool) bool
- func (o *Object) StatsSelf() (stats CmdStats)
- func (o *Object) Terminate(s *Object)
- type ObjectMonitor
- type OlsSlotCleanHandler
- type Options
- type Sinker
Constants ¶
View Source
const ( QueueType_List int = iota QueueType_Chan )
View Source
const (
DefaultQueueBacklog int = 4
)
View Source
const OLS_INVALID_SLOT = math.MaxUint32
View Source
const OLS_MAX_SLOT uint = 64
Variables ¶
This section is empty.
Functions ¶
func OlsInstallSlotCleanHandler ¶
func OlsInstallSlotCleanHandler(slot uint, handler OlsSlotCleanHandler)
func SendTermAck ¶
func SendTermReq ¶
Types ¶
type CommandWrapper ¶
func (CommandWrapper) Done ¶
func (cw CommandWrapper) Done(o *Object) error
type IStatsWatch ¶
type IStatsWatch interface {
Stop()
}
type IStatsWatchMgr ¶
type IStatsWatchMgr interface {
WatchStart(name string, elementype int) IStatsWatch
}
var StatsWatchMgr IStatsWatchMgr
type Object ¶
type Object struct { *utils.Waitor sync.RWMutex // Identify Id int // Name Name string // UserData UserData interface{} // contains filtered or unexported fields }
Base class for need alone goroutine objects that easy to start and when to exit the unified management Feature. establish a tree structure between objects asynchronous message queue
func (*Object) GetPendingCommandCnt ¶
func (*Object) GetTreeName ¶
func (*Object) IsTermiated ¶
func (*Object) LaunchChild ¶
Launch the supplied object and become its owner.
func (*Object) OlsClrValue ¶
func (o *Object) OlsClrValue()
func (*Object) OlsGetValue ¶
func (*Object) OlsSetValue ¶
func (*Object) ProcessSeqnum ¶
func (o *Object) ProcessSeqnum()
Special handler called after a command that requires a seqnum was processed. The implementation should catch up with its counter of processed commands here.
func (*Object) SendCommand ¶
Enqueue command
type ObjectMonitor ¶
type ObjectMonitor struct { }
func (*ObjectMonitor) OnStart ¶
func (om *ObjectMonitor) OnStart(o *Object)
func (*ObjectMonitor) OnStop ¶
func (om *ObjectMonitor) OnStop(o *Object)
func (*ObjectMonitor) OnTick ¶
func (om *ObjectMonitor) OnTick(o *Object)
type OlsSlotCleanHandler ¶
type OlsSlotCleanHandler func(interface{})
Click to show internal directories.
Click to hide internal directories.