Documentation ¶
Index ¶
- type DefaultEventReactor
- func (d DefaultEventReactor) OnAfterHandle(id int32, evCmd int64, extras []interface{})
- func (d DefaultEventReactor) OnBeforeHandle(id int32, evCmd int64, extras []interface{})
- func (d DefaultEventReactor) OnBeginEventLoop(id int32)
- func (d DefaultEventReactor) OnCmdHandle(id int32, evCmd int64, extras []interface{})
- func (d DefaultEventReactor) OnFinishEventLoop(id int32)
- type EventCommand
- type EventLoop
- func (self *EventLoop) InitCmdQueueSize(queSize uint32)
- func (self *EventLoop) Launch() int32
- func (self *EventLoop) PostCmd(cmd *EventCommand)
- func (self *EventLoop) PostMsg(evCmd int64, extras ...interface{})
- func (self *EventLoop) Stop()
- func (self *EventLoop) StopAndWait()
- func (self *EventLoop) Wait()
- type IEventReactor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultEventReactor ¶
type DefaultEventReactor struct { }
func (DefaultEventReactor) OnAfterHandle ¶
func (d DefaultEventReactor) OnAfterHandle(id int32, evCmd int64, extras []interface{})
func (DefaultEventReactor) OnBeforeHandle ¶
func (d DefaultEventReactor) OnBeforeHandle(id int32, evCmd int64, extras []interface{})
func (DefaultEventReactor) OnBeginEventLoop ¶
func (d DefaultEventReactor) OnBeginEventLoop(id int32)
func (DefaultEventReactor) OnCmdHandle ¶
func (d DefaultEventReactor) OnCmdHandle(id int32, evCmd int64, extras []interface{})
func (DefaultEventReactor) OnFinishEventLoop ¶
func (d DefaultEventReactor) OnFinishEventLoop(id int32)
type EventCommand ¶
type EventCommand struct { EvCmd int64 Extras []interface{} }
EventCommand 事件指令载体
type EventLoop ¶
type EventLoop struct {
// contains filtered or unexported fields
}
func NewEventLoop ¶
func NewEventLoop(cxt context.Context, reactor IEventReactor) *EventLoop
func (*EventLoop) InitCmdQueueSize ¶
func (*EventLoop) PostCmd ¶
func (self *EventLoop) PostCmd(cmd *EventCommand)
func (*EventLoop) StopAndWait ¶
func (self *EventLoop) StopAndWait()
Click to show internal directories.
Click to hide internal directories.