Documentation
¶
Overview ¶
Package eventbus provides interfaces along with helper functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventBus ¶
type EventBus interface {
Publish(ctx context.Context, event *domain.Event) error
Subscribe(ctx context.Context, eventType string, fn EventHandler) error
Unsubscribe(ctx context.Context, eventType string, fn EventHandler) error
// PublishAndAcknowledge blocks and returns grouped error after all handlers are executed
PublishAndAcknowledge(parentCtx context.Context, event *domain.Event) error
}
EventBus interface event bus is different to command bus by allowing multiple handlers to the same topic
Click to show internal directories.
Click to hide internal directories.