Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher 事件分发器
func (*Dispatcher) DispatchSync ¶
func (d *Dispatcher) DispatchSync(event Event)
DispatchSync 同步分发事件
func (*Dispatcher) HasListeners ¶
func (d *Dispatcher) HasListeners(eventName string) bool
HasListeners 检查是否有监听器
func (*Dispatcher) Listen ¶
func (d *Dispatcher) Listen(eventName string, listener Listener)
Listen 注册事件监听器
Click to show internal directories.
Click to hide internal directories.