Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 ¶
NewEventBus creates an EventBus, with optional GCP connection settings.
func (*EventBus) AddHandler ¶
func (b *EventBus) AddHandler(ctx context.Context, m eh.EventMatcher, h eh.EventHandler) error
AddHandler implements the AddHandler 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.
func (*EventBus) HandleEvent ¶ added in v0.7.0
HandleEvent implements the HandleEvent method of the eventhorizon.EventHandler interface.
func (*EventBus) HandlerType ¶ added in v0.7.0
func (b *EventBus) HandlerType() eh.EventHandlerType
HandlerType implements the HandlerType method of the eventhorizon.EventHandler interface.
type Option ¶ added in v0.11.0
Option is an option setter used to configure creation.
func WithCodec ¶ added in v0.11.0
func WithCodec(codec eh.EventCodec) Option
WithCodec uses the specified codec for encoding events.
func WithPubSubOptions ¶ added in v0.11.0
func WithPubSubOptions(opts ...option.ClientOption) Option
WithPubSubOptions adds the GCP pubsub options to the underlying client.