package
0.0.0-20230102091508-02d5eeac7d74
Repository: https://github.com/golang-boy/watermill.git
Documentation: pkg.go.dev
# Functions
FullyQualifiedStructName name returns object name in format [package].[type name].
NamedStruct returns the name from a message implementing the following interface: type namedStruct interface { Name() string } It ignores if the value is a pointer or not.
No description provided by the author
NewCommandProcessor creates a new CommandProcessor.
No description provided by the author
No description provided by the author
No description provided by the author
StructName name returns struct name in format [type name].
# Structs
CommandBus transports commands to command handlers.
CommandProcessor determines which CommandHandler should handle the command received from the command bus.
DuplicateCommandHandlerError occurs when a handler with the same name already exists.
EventBus transports events to event handlers.
EventProcessor determines which EventHandler should handle event received from event bus.
Facade is a facade for creating the Command and Event buses and processors.
No description provided by the author
No description provided by the author
No description provided by the author
NoProtoMessageError is returned when the given value does not implement proto.Message.
ProtobufMarshaler is the default Protocol Buffers marshaler.
# Interfaces
CommandEventMarshaler marshals Commands and Events to Watermill's messages and vice versa.
CommandHandler receives a command defined by NewCommand and handles it with the Handle method.
EventHandler receives events defined by NewEvent and handles them with its Handle method.
# Type aliases
CommandsSubscriberConstructor creates subscriber for CommandHandler.
EventsSubscriberConstructor creates a subscriber for EventHandler.