Documentation ¶
Overview ¶
eventbus
eventhub
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandler ¶
func RegisterHandler(fn interface{})
Types ¶
type TypeEventHub ¶
type TypeEventHub struct {
// contains filtered or unexported fields
}
使用反射+入参类型实现的eventhub
func (*TypeEventHub) GetHandlers ¶
func (hub *TypeEventHub) GetHandlers(event interface{}) ([]*typeInvoker, bool)
获取处理函数
func (*TypeEventHub) RegisterHandler ¶
func (hub *TypeEventHub) RegisterHandler(fn interface{})
注册一个监听
Click to show internal directories.
Click to hide internal directories.