Documentation ¶
Index ¶
- Constants
- type Event
- type EventCallBack
- type EventHandler
- type EventProcessor
- func (slf *EventProcessor) EventHandler(ev *Event)
- func (slf *EventProcessor) GetEventChan() chan *Event
- func (slf *EventProcessor) RegEventReciverFunc(eventType EventType, reciver IEventHandler, callback EventCallBack)
- func (slf *EventProcessor) SetEventChannel(channelNum int) bool
- func (slf *EventProcessor) UnRegEventReciverFun(eventType EventType, reciver IEventHandler)
- type EventType
- type IEventHandler
- type IEventProcessor
Constants ¶
View Source
const Default_EventChannelLen = 10000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
func (*EventHandler) Desctory ¶
func (slf *EventHandler) Desctory()
func (*EventHandler) GetEventProcessor ¶
func (slf *EventHandler) GetEventProcessor() IEventProcessor
func (*EventHandler) Init ¶
func (slf *EventHandler) Init(processor IEventProcessor)
func (*EventHandler) NotifyEvent ¶
func (slf *EventHandler) NotifyEvent(ev *Event)
type EventProcessor ¶
type EventProcessor struct {
// contains filtered or unexported fields
}
func (*EventProcessor) EventHandler ¶
func (slf *EventProcessor) EventHandler(ev *Event)
func (*EventProcessor) GetEventChan ¶
func (slf *EventProcessor) GetEventChan() chan *Event
func (*EventProcessor) RegEventReciverFunc ¶
func (slf *EventProcessor) RegEventReciverFunc(eventType EventType, reciver IEventHandler, callback EventCallBack)
func (*EventProcessor) SetEventChannel ¶
func (slf *EventProcessor) SetEventChannel(channelNum int) bool
func (*EventProcessor) UnRegEventReciverFun ¶
func (slf *EventProcessor) UnRegEventReciverFun(eventType EventType, reciver IEventHandler)
type IEventHandler ¶
type IEventHandler interface { GetEventProcessor() IEventProcessor //获得事件 NotifyEvent(*Event) Desctory() // contains filtered or unexported methods }
type IEventProcessor ¶
type IEventProcessor interface { //同一个IEventHandler,只能接受一个EventType类型回调 RegEventReciverFunc(eventType EventType, reciver IEventHandler, callback EventCallBack) UnRegEventReciverFun(eventType EventType, reciver IEventHandler) SetEventChannel(channelNum int) bool // contains filtered or unexported methods }
Click to show internal directories.
Click to hide internal directories.