Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EventBus ¶
type EventBus interface { Publisher Subscriber }
EventBus allows subscribing and publishing data by topic
type Publisher ¶
type Publisher interface {
Publish(topic string, data interface{})
}
Publisher publishes events
type Subscriber ¶
type Subscriber interface { Subscribe(topic string, fn interface{}) error SubscribeAsync(topic string, fn interface{}) error Unsubscribe(topic string, fn interface{}) error UnsubscribeWithUID(topic, uid string, fn interface{}) error SubscribeWithUID(topic, uid string, fn interface{}) error }
Subscriber subscribes to events.
Click to show internal directories.
Click to hide internal directories.