Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Subscribe ¶
func Subscribe(topic string, fn SubscribeFunc)
Types ¶
type GoEvent ¶ added in v1.1.8
type GoEvent struct { DefaultTopic string // contains filtered or unexported fields }
func (*GoEvent) Subscribe ¶ added in v1.1.8
func (ev *GoEvent) Subscribe(topic string, fn SubscribeFunc)
订阅:一个topic可以对应多个处理器,(topic->handler 的关系是1:n),一次添加一个订阅者
func (*GoEvent) UnSubscribe ¶ added in v1.1.8
func (*GoEvent) UnSubscribeDefault ¶ added in v1.2.34
func (ev *GoEvent) UnSubscribeDefault()
type MessageChan ¶
type MessageChan chan Message
type SubscribeFunc ¶
type SubscribeFunc func(msg Message)
Click to show internal directories.
Click to hide internal directories.