Documentation ¶
Index ¶
- type EventBus
- func (b *EventBus) AddHandler(handler eh.EventHandler, eventType eh.EventType)
- func (b *EventBus) HandleEvent(ctx context.Context, event eh.Event) error
- func (b *EventBus) HandlerType() eh.EventHandlerType
- func (b *EventBus) SetHandlingStrategy(strategy eh.EventHandlingStrategy)
- func (b *EventBus) SetPublisher(publisher eh.EventPublisher)
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 an event bus that notifies registered EventHandlers of published events. It will use the SimpleEventHandlingStrategy by default.
func (*EventBus) AddHandler ¶
func (b *EventBus) AddHandler(handler eh.EventHandler, eventType eh.EventType)
AddHandler implements the AddHandler method of the eventhorizon.EventBus interface.
func (*EventBus) HandleEvent ¶
HandleEvent implements the HandleEvent method of the eventhorizon.EventBus interface.
func (*EventBus) HandlerType ¶
func (b *EventBus) HandlerType() eh.EventHandlerType
HandlerType implements the HandlerType method of the eventhorizon.EventBus interface.
func (*EventBus) SetHandlingStrategy ¶
func (b *EventBus) SetHandlingStrategy(strategy eh.EventHandlingStrategy)
SetHandlingStrategy implements the SetHandlingStrategy method of the eventhorizon.EventBus interface.
func (*EventBus) SetPublisher ¶
func (b *EventBus) SetPublisher(publisher eh.EventPublisher)
SetPublisher implements the SetPublisher method of the eventhorizon.EventBus interface.
Click to show internal directories.
Click to hide internal directories.