Documentation ¶
Overview ¶
Package commandbus provides interfaces along with helper functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandBus ¶
type CommandBus interface { Publish(ctx context.Context, command domain.Command) error Subscribe(ctx context.Context, commandName string, fn CommandHandler) error Unsubscribe(ctx context.Context, commandName string) error }
CommandBus allows to subscribe/dispatch commands Subscribing to the same command twice will unsubscribe previous handler command handler should be one to one
Click to show internal directories.
Click to hide internal directories.