Maestro v0.2.0 Maestro.Aggregate.ProjectionHandler behaviour View Source

ProjectionHandlers are used to manage alternate representations of an aggregate.

This defines a minimal behaviour for use within the aggregate command/event lifecycle. For projections that should be updated immediately iff the relevant events are committed, the relevant ProjectionHandler should by included in the list of :projections on the aggregate root.

Link to this section Summary

Callbacks

Projections registered with an aggregate root are invoked for every event, so they should ignore unrelated events explicitly

Link to this section Types

Link to this section Callbacks

Link to this callback project(event) View Source
project(event()) :: value :: any()

Projections registered with an aggregate root are invoked for every event, so they should ignore unrelated events explicitly.