Estoria is an event sourcing toolkit for Go.
Event sourcing enables you to model your application as a series of state-changing events. This approach can make it easier to reason about your application's behavior, as well as to implement features like auditing, replay, and time travel.
Estoria provides composable components for implementing event sourcing in a Go application, including:
- Event-based aggregate state management
- Flexible event store implementations
- Per-event metadata and declared payload content types
- Aggregate snapshotting and caching
- Global event reads for building read models and projections
- Stream deletion and snapshot retention
- Lifecycle hooks
- Acceptance test suites for third-party backend implementations
Estoria requires Go 1.26 or later.
go get github.com/go-estoria/estoriaSee the Getting Started guide for an introduction to the core concepts and components.
See estoria-examples for runnable examples using various backends.
See estoria-contrib for officially-supported event store, snapshot store, and aggregate cache implementations.