| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Eventful.ProcessManager
- data ProcessManager state event command = ProcessManager {
- processManagerProjection :: Projection state event
- processManagerPendingCommands :: state -> [ProcessManagerCommand event command]
- processManagerPendingEvents :: state -> [ProcessManagerEvent event]
- data ProcessManagerCommand event command = ProcessManagerCommand {
- processManagerCommandAggregateId :: UUID
- processManagerCommandAggregate :: Aggregate state event command
- processManagerCommandCommand :: command
- data ProcessManagerEvent event = ProcessManagerEvent {}
- data ProcessManagerRouter state event command = ProcessManagerRouter {
- processManagerRouterGetManagerId :: UUID -> event -> Maybe UUID
- processManagerRouterManager :: ProcessManager state event command
- processManagerHandler :: Monad m => ProcessManagerRouter state event command -> EventStore event m -> UUID -> event -> m ()
Documentation
data ProcessManager state event command Source #
A ProcessManager manages interaction between aggregates. It works by
listening to events on an event bus (see processManagerHandler) and
applying events to its internal Projection. Then, pending commands and
events are plucked off of that Projection and applied to the appropriate
Aggregates or Projections in other streams.
Constructors
| ProcessManager | |
Fields
| |
data ProcessManagerCommand event command Source #
This is a command along with the UUID of the target Aggregate, and
well as the Aggregate instance. Note that this uses an existential type to
hide the state type parameter on the Aggregate.
Constructors
| ProcessManagerCommand | |
Fields
| |
data ProcessManagerEvent event Source #
This is an event paired with the UUID of the stream to which the event
will be applied.
Constructors
| ProcessManagerEvent | |
Fields | |
Instances
| Eq event => Eq (ProcessManagerEvent event) Source # | |
| Show event => Show (ProcessManagerEvent event) Source # | |
data ProcessManagerRouter state event command Source #
A ProcessManagerRouter decides which process manager projection ID to
use for a given event.
Constructors
| ProcessManagerRouter | |
Fields
| |
processManagerHandler :: Monad m => ProcessManagerRouter state event command -> EventStore event m -> UUID -> event -> m () Source #
This is an event handler for a ProcessManager that applies all events to
the ProcessManagerRouter, and then applied any pending commands or events
to the appropriate places.