API Reference sourced v#0.2.0

Copy Markdown View Source

Modules

Sourced is a library for Event Sourcing using the Dynamic Context Boundary (DCB).

Runs a decision: read the slice, decide on it, append under the condition that it is still current — and when it is not, fold in whatever beat you and decide again.

The state a decision is made on, and the condition that keeps it valid.

An event store: an adapter, the options it runs with, and a middleware pipeline.

Behaviour defining the contract for a Dynamic Context Boundary (DCB) event store.

An in-memory implementation of Sourced.EventStore backed by a GenServer.

Append error when more events that match the append query than the caller expects.

Describes which events a store should match.

Module for storing subscription information for an Event Store adapter.

A composable transformation wrapped around an event store's adapter call.

Converts domain event structs into event maps and back again.

Behaviour for domain event structs registered in a Sourced.Middleware.Domain.

Wraps the pipeline in a :telemetry.span/3, one span per operation.

The value threaded through an event store's middleware pipeline.

A reducer over stored events to build the current state.

An event that has been persisted to an event store.