Expand description
Shared assembly of the event-sourced stack — EventStore, in-process
EventBus, ReadModelStore, ProjectionEngine, and CommandBus.
Generic over the domain aggregate A: the framework never names a concrete
aggregate. Applications supply A and their projectors; the runtime server
(commands::serve) and CLI utilities drive the same wiring.
Structs§
- EsStack
- Bundle of constructed components — the parts external code keeps a handle on after wiring.
- EsStores
- Boxed storage seam shared by every entry point. The command bus and the projection engine each own an independent handle to the same backend so the write path and replay path do not contend on one connection wrapper.
Functions§
- apply_
snapshot_ policy - Apply a snapshot policy to a command bus if one is configured.
- build
- Build the in-process stack for the configured driver, registering the
supplied projectors against the in-process bus so writes drive their views
synchronously. Used by CLI utilities (
migrate --seed,seed) and tests. - build_
stores - Construct the event store and read-model store for the selected driver.
Domain code never sees the concrete type — only
Box<dyn EventStore>andArc<dyn ReadModelStore>.