chekov-0.1.1 doesn't have any documentation.
Table of Contents
Features
Postgres
EventStore backend- Dispatch
Command
toAggregate
- Generate
Event
fromAggregate
- Store and notify
Event
with subscriptions - Dispatch
Event
toEventHandler
Getting started
Choosing an EventStore backend
Chekov works only with Postgres
backend for now. The choice is easy to make!
But some more backends need to be implemented, see the related issue.
Defining Aggregates
An Aggregate is a struct that hold a domain state. Here's an example of a UserAggregate:
/// Define an Executor for the `CreateUser` command
/// The result is a list of events in case of success
/// Define an Applier for the `UserCreated` event
/// Applier is a mutation action on the aggregate
Defining Commands
You need to create a struct per command, any type of struct can implement Command
but we advise to use struct for a better readability.
A command can only produce (or not) one type of events and it targets a single Aggregate.
A command must have a single and unique identifier
that is used to route the command to the right target.
Defining Events
An Event
can be a struct
or an enum
.
Defining Saga
Not implemented yet