# StatifierRouter v0.1.0 - Table of Contents

> A Broadway front and a binding, addressing and delivery layer that routes external events to durable statifier executions, creating them when absent

## Pages

- [StatifierRouter](readme.md)
- [Changelog](changelog.md)

## Modules

- [StatifierRouter](StatifierRouter.md): Routes external events to durable statifier executions, creating them when
absent.
- [StatifierRouter.Addresses](StatifierRouter.Addresses.md): The address reaper: `reap/2`, the plain function that removes address
rows whose execution finished longer ago than their horizon (ADR-0002,
sections 5 and 6).
- [StatifierRouter.Binding](StatifierRouter.Binding.md): A binding: the declaration that routes an event from a source to one
execution of one document, as ADR-0001 fixes it.
- [StatifierRouter.Broadway](StatifierRouter.Broadway.md): The Broadway front: a pipeline that hands every message its producer
emits to `StatifierRouter.route/3`.
- [StatifierRouter.Config](StatifierRouter.Config.md): The router's resolved configuration: the host's repo, where this
package's tables live in it, the bindings events are routed by, the
module each delivery is handed to, and what that module needs to reach
statifier_persistence.
- [StatifierRouter.Dedupe](StatifierRouter.Dedupe.md): Dedupe on `(binding_id, message_id)`, with a row expiry (ADR-0003,
section 6).
- [StatifierRouter.Delivery](StatifierRouter.Delivery.md): The delivery module `StatifierRouter.Config` names by default: one
binding's delivery of one event, as one transaction on the host's repo
(ADR-0003, section 1).
- [StatifierRouter.Migrations](StatifierRouter.Migrations.md): Versioned migrations for this package's tables, in the shape
statifier_persistence's `StatifierPersistence.Ecto.Migrations` uses: the
host writes one ordinary migration that delegates here, and later
package versions ship higher-numbered migration modules the same call
picks up.
- [StatifierRouter.Migrations.V01](StatifierRouter.Migrations.V01.md): V01 of the package DDL: the three tables the decision records fix, each
named by `StatifierRouter.Config.table/2` under the host's table prefix
and created in the host's Postgres schema when one is set.
- [StatifierRouter.Resolver](StatifierRouter.Resolver.md): The host's answer to which chart a new execution of a document starts on
(ADR-0002, section 4).
- [StatifierRouter.Resolver.Static](StatifierRouter.Resolver.Static.md): A resolver over a fixed map of compiled charts, for tests and for a host
whose charts are compiled at boot.
- [StatifierRouter.Schema](StatifierRouter.Schema.md): The Ecto schemas over this package's three tables, one per table
`StatifierRouter.Migrations.V01` creates
- [StatifierRouter.Schema.Address](StatifierRouter.Schema.Address.md): A row of the address table: `(scope, document, key)` -> `execution_id`
(ADR-0002, section 1). `terminal_seen_at` is empty until this package
first sees the execution terminal (ADR-0002, section 5).
- [StatifierRouter.Schema.Dedupe](StatifierRouter.Schema.Dedupe.md): A row of the dedupe table: one `(binding_id, message_id)` pair and the
time it stops counting, `expires_at` (ADR-0003, section 6). A row whose
`expires_at` has passed counts as absent even before it is removed.
- [StatifierRouter.Schema.Ledger](StatifierRouter.Schema.Ledger.md): A row of the routing ledger: one recorded outcome of one routing attempt
for one binding (ADR-0004, section 4). The ledger is append-only.

