Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus interface { BusSubscriber BusPublisher }
Bus englobes global (subscribe, publish) bus behavior
type BusPublisher ¶
type BusPublisher interface {
Publish(topic string, args ...interface{})
}
BusPublisher defines publishing-related bus behavior
type BusSubscriber ¶
type BusSubscriber interface { Subscribe(topic string, fn interface{}) error SubscribeAsync(topic string, fn interface{}, transactional bool) error Unsubscribe(topic string, handler interface{}) error }
BusSubscriber defines subscription-related bus behavior
type EventContext ¶
type EventHandler ¶
type EventHandler func(ctx EventContext)
type Subscriber ¶
type Subscriber struct { Topic string Fn EventHandler }
Click to show internal directories.
Click to hide internal directories.