Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultQueueSize = 10
DefaultQueueSize is the default queue size per handler for publishing events.
Functions ¶
This section is empty.
Types ¶
type EventBus ¶
type EventBus struct {
// contains filtered or unexported fields
}
EventBus is a local event bus that delegates handling of published events to all matching registered handlers, in order of registration.
func NewEventBus ¶
func NewEventBus(projectID, appID string, opts ...option.ClientOption) (*EventBus, error)
NewEventBus creates an EventBus, with optional GCP connection settings.
func (*EventBus) AddHandler ¶
func (b *EventBus) AddHandler(m eh.EventMatcher, h eh.EventHandler)
AddHandler implements the AddHandler method of the eventhorizon.EventBus interface.
func (*EventBus) AddObserver ¶
func (b *EventBus) AddObserver(m eh.EventMatcher, h eh.EventHandler)
AddObserver implements the AddObserver method of the eventhorizon.EventBus interface.
func (*EventBus) Errors ¶
func (b *EventBus) Errors() <-chan eh.EventBusError
Errors implements the Errors method of the eventhorizon.EventBus interface.
Click to show internal directories.
Click to hide internal directories.