Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefault ¶
func SetDefault(evbus EventBus)
Types ¶
type EventBus ¶
type EventBus interface { // Publish publishes arguments to the given topic subscribers // Publish block only when the buffer of one of the subscribers is full. Publish(topic string, args ...interface{}) // Close unsubscribe all handlers from given topic Close(topic string) // Subscribe subscribes to the given topic Subscribe(topic string, fn interface{}) error // Unsubscribe unsubscribe handler from the given topic Unsubscribe(topic string, fn interface{}) error }
EventBus is event bus interface
func NewEventBus ¶
New creates new MessageBus handlerQueueSize sets buffered channel length per subscriber
Click to show internal directories.
Click to hide internal directories.