Maestro v0.3.1 API Reference

Modules

Simple behaviour for properly implementing command handlers the way that maestro expects. Its use is not required but is encouraged.

Minimal behaviour for a proper event handler. Like the CommandHandler, the use of the behaviour is not strictly required.

ProjectionHandlers are used to manage alternate representations of an aggregate.

Core behaviour and functionality provided by Maestro for processing commands and managing aggregate state.

Supervisor for Maestro.Aggregate.Roots across any/all domains.

Concise API for events and snapshots.

Defines the minimal API for a well-behaved storage implementation.

Agent-based implementation of the event/snapshot storage mechanism

Ecto+Postgres implementation of the storage mechanism.

Commands are the primary way clients express a desire to change the system. In Maestro, commands are always executed within the context of an aggregate in a consistent manner.

Events are the key component from which state changes are made and projections can be built.

Maestro.Aggregate.Roots can commit state that has been computed from events.

Exceptions

The preferred exception for informing the client that their command was rejected for any reason.

An exception that will be raised by Maestro.Aggregate.Root.lookup_module/2 if it fails to find the module implied by the prefix and type provided.

Mix Tasks

Using the work already done in Mix.Ecto, generate a migration that creates the event_log and snapshot tables with HLC constraints.