Decree (decree v0.1.0)

Copy Markdown View Source

Use Decree to build your own Elixir applications following the CQRS/ES pattern.

Provides support for:

Events persist in Decree.Store, the Postgres event store, which an application reaches through Decree.EventStore.

Summary

Functions

aggregate_state(application, aggregate_module, aggregate_uuid, timeout \\ 5000)

@spec aggregate_state(
  application :: Decree.Application.t(),
  aggregate_module :: module(),
  aggregate_uuid :: Decree.Aggregates.Aggregate.uuid(),
  timeout :: integer()
) :: Decree.Aggregates.Aggregate.state()

Retrieve aggregate state of an aggregate.

Retrieving aggregate state is done by calling to the opened aggregate, or querying the event store for an optional state snapshot and then replaying the aggregate's event stream.