Raxol.Architecture.CQRS.CommandDispatcher (Raxol v2.0.1)
View SourceCommand dispatcher for CQRS pattern implementation.
Handles command routing, middleware processing, and handler management in a functional programming style.
Summary
Functions
Add middleware to the dispatcher.
Returns a specification to start this module under a supervisor.
Dispatch a command through the middleware chain to its handler.
Get dispatcher statistics.
List all registered handlers.
Register a command handler.
Remove middleware from the dispatcher.
Starts the command dispatcher.
Remove a handler for a command.
Types
@type command() :: any()
@type handler() :: module()
@type middleware() :: module()
@type statistics() :: %{ commands_processed: non_neg_integer(), commands_failed: non_neg_integer(), handlers_registered: non_neg_integer(), middleware_count: non_neg_integer() }
Functions
Add middleware to the dispatcher.
Returns a specification to start this module under a supervisor.
See Supervisor.
Dispatch a command through the middleware chain to its handler.
Get dispatcher statistics.
List all registered handlers.
Register a command handler.
Remove middleware from the dispatcher.
Starts the command dispatcher.
Remove a handler for a command.