# sourced v0.1.0 - Table of Contents

> Event sourcing for Elixir on the Dynamic Context Boundary (DCB) model: one flat event stream, events tagged with the domain concepts they concern, and consistency enforced by optimistic locking scoped to the slice of the stream a decision actually read.

## Pages

- [Sourced](readme.md)

## Modules

- [Sourced](Sourced.md): `Sourced` is a library for Event Sourcing using the Dynamic Context Boundary (DCB).
- [Sourced.Decider](Sourced.Decider.md): 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.
- [Sourced.DecisionModel](Sourced.DecisionModel.md): The state a decision is made on, and the condition that keeps it valid.
- [Sourced.EventStore](Sourced.EventStore.md): An event store: an adapter, the options it runs with, and a middleware
pipeline.
- [Sourced.EventStore.Behaviour](Sourced.EventStore.Behaviour.md): Behaviour defining the contract for a Dynamic Context Boundary (DCB) event store.
- [Sourced.EventStore.InMemory](Sourced.EventStore.InMemory.md): An in-memory implementation of `Sourced.EventStore` backed by a GenServer.
- [Sourced.EventStore.Query](Sourced.EventStore.Query.md): Describes which events a store should match.
- [Sourced.EventStore.Subscription](Sourced.EventStore.Subscription.md): Module for storing subscription information for an Event Store adapter.
- [Sourced.Middleware](Sourced.Middleware.md): A composable transformation wrapped around an event store's adapter call.
- [Sourced.Middleware.Domain](Sourced.Middleware.Domain.md): Converts domain event structs into event maps and back again.
- [Sourced.Middleware.Domain.Event](Sourced.Middleware.Domain.Event.md): Behaviour for domain event structs registered in a
`Sourced.Middleware.Domain`.
- [Sourced.Middleware.Telemetry](Sourced.Middleware.Telemetry.md): Wraps the pipeline in a `:telemetry.span/3`, one span per operation.
- [Sourced.Operation](Sourced.Operation.md): The value threaded through an event store's middleware pipeline.
- [Sourced.Projection](Sourced.Projection.md): A reducer over stored events to build the current state.
- [Sourced.StoredEvent](Sourced.StoredEvent.md): An event that has been persisted to an event store.

- Exceptions
  - [Sourced.EventStore.OptimisticConcurrencyError](Sourced.EventStore.OptimisticConcurrencyError.md): Append error when more events that match the append query than the caller expects.

