Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Publish ¶
func Publish(topic string, args ...interface{})
Publish executes callback defined for a topic. Any additional argument will be transferred to the callback.
func SubscribeAsync ¶
func SubscribeAsync(topic string, fn interface{})
SubscribeAsync subscribes to a topic with an asynchronous callback Subsequent callbacks for a topic are run concurrently Does nothing if fn is not a function.
func SubscribeOnceAsync ¶
func SubscribeOnceAsync(topic string, fn interface{})
SubscribeOnceAsync subscribes to a topic once with an asynchronous callback Handler will be removed after executing. Does nothing if fn is not a function.
func Unsubscribe ¶
func Unsubscribe(topic string, handler interface{})
Unsubscribe removes callback defined for a topic if it exists.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.