Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bus ¶ added in v1.5.4
Bus represents an Event Bus.
func NewBus ¶ added in v1.5.4
func NewBus() *Bus
NewBus returns a new empty Bus. This is simply a nicer wrapper around the system.SinkPool implementation that allows for more simplistic usage within the codebase.
All of the events emitted out of this bus are byte slices that can be decoded back into an events.Event interface.
type Event ¶
type Event struct { Topic string Data interface{} }
Event represents an Event sent over a Bus.
func MustDecode ¶ added in v1.6.1
MustDecode decodes the event byte slice back into an events.Event struct or panics if an error is encountered during this process.
Click to show internal directories.
Click to hide internal directories.