Documentation ¶
Index ¶
Constants ¶
View Source
const ( CodePreprocessorErr = "PreprocessorErr" CodeEventLoadErr = "EventLoadErr" CodeAggregateNotCommandHandler = "AggregateNotCommandHandler" CodeHandlerErr = "HandlerErr" CodeSaveErr = "SaveErr" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constructor ¶
type Constructor interface {
New() bool
}
Constructor is an interface that a Command may implement to indicate the Command is the "constructor"
type Dispatcher ¶
type Dispatcher interface { // Dispatch retrieves the Aggregate from the Repository, applies the Handler, and saves the result to the Repository Dispatch(ctx context.Context, cmd Interface) error }
Dispatcher manages the execution of a command
func New ¶
func New(repo eventsource.Repository, preprocessors ...Preprocessor) Dispatcher
New instantiates a new Dispatcher using the Repository and optional Preprocessors provided
Click to show internal directories.
Click to hide internal directories.