Skip to content

terraskye/eventsourcing Documentation

A Go library for building event-sourced systems with CQRS support.

go get github.com/terraskye/eventsourcing

Tutorials

Step-by-step guides to learn event sourcing by building a real application.


How-to guides

Practical recipes for specific tasks.

Commands - Handle concurrency conflicts with optimistic locking - Add metadata to events - Customise stream names (multi-tenancy) - Retry commands on conflict - The aggregate variant — when to use it and when not to

Events - Register events for serialization - Subscribe to events with the event bus - Version events when the schema changes

Queries - Build a live read model - Build a cached projection

Infrastructure - Use KurrentDB as the event store - Add OpenTelemetry tracing - Add structured logging - Test event-sourced code


Reference

Complete API documentation.


Explanation

Background reading to understand the design and concepts.