Documentation
¶
Overview ¶
Package eventually contains types and abstraction to allow you to write Event-sourced application, without having to take care of the infrastructure setup necessary to run such an architecture.
The library contains multiple packages, you might want to start from `aggregate` to implement your Aggregate types, and `command` to implement the Command Handlers to interact with or update your Aggregates.
`query` and `projection` allows you to implement Domain Queries and Read Models.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command Message
Command is a Message representing an action being performed by something or somebody.
In order to enforce this concept, it is suggested to name Command types using "present tense".
type Event ¶
type Event Message
Event is a Message representing some Domain information that has happened in the past, which is of vital information to the Domain itself.
Event type names should be phrased in the past tense, to enforce the notion of "information happened in the past".
type Message ¶
Message represents any kind of information that can be carried around.
Usually, a Message only contains a payload, but it could optionally include some metadata (e.g. some debug identifiers).
type Metadata ¶
type Metadata map[string]interface{}
Metadata contains some data related to a Message that are not functional for the Message itself, but instead functioning as supporting information to provide additional context.
Directories
¶
Path | Synopsis |
---|---|
Package aggregate defines interfaces and types necessary to allow users to define their own Aggregate types.
|
Package aggregate defines interfaces and types necessary to allow users to define their own Aggregate types. |
snapshot
Package snapshot provides support for Aggregate Root snapshots, useful where the size of your Aggregate Roots is expected to considerably grow in size and number of events.
|
Package snapshot provides support for Aggregate Root snapshots, useful where the size of your Aggregate Roots is expected to considerably grow in size and number of events. |
Package command contains types and interfaces for implementing Command Handlers and dispatching Domain Commands, necessary for producing side effects in your Aggregates and system, and implement your Domain's business logic.
|
Package command contains types and interfaces for implementing Command Handlers and dispatching Domain Commands, necessary for producing side effects in your Aggregates and system, and implement your Domain's business logic. |
core
module
|
|
Package eventstore contains the necessary abstractions and types to represents and interact with an Event Store.
|
Package eventstore contains the necessary abstractions and types to represents and interact with an Event Store. |
inmemory
Package inmemory provides an in-memory implementation of an Event Store, and some other utilities that use an in-memory backend.
|
Package inmemory provides an in-memory implementation of an Event Store, and some other utilities that use an in-memory backend. |
stream
Package stream exports types for dealing with Event Streams, such as Event Stream ids and Event Streams targets.
|
Package stream exports types for dealing with Event Streams, such as Event Stream ids and Event Streams targets. |
postgres
Module
|
|
extension
|
|
correlation
Package correlation contains extensions for eventually key components to support correlated events for tracing and debugging purposes.
|
Package correlation contains extensions for eventually key components to support correlated events for tracing and debugging purposes. |
oteleventually
Package oteleventually provides extension components for eventually library to enable OpenTelemetry instrumentation.
|
Package oteleventually provides extension components for eventually library to enable OpenTelemetry instrumentation. |
zaplogger
Package zaplogger provides an logger.Logger implementation using zap as backend logger.
|
Package zaplogger provides an logger.Logger implementation using zap as backend logger. |
firestore
module
|
|
integrationtest
module
|
|
Package internal contains types, functions and definitions that are not meant to be exported to users, and are only needed for internal reasons (e.g.
|
Package internal contains types, functions and definitions that are not meant to be exported to users, and are only needed for internal reasons (e.g. |
Package logger defines a common logger interface used by the library various components.
|
Package logger defines a common logger interface used by the library various components. |
oteleventually
module
|
|
postgres
module
|
|
Package projection contains a Projection interface, one for left-folding events to execute side effects, and one for Domain Read Models.
|
Package projection contains a Projection interface, one for left-folding events to execute side effects, and one for Domain Read Models. |
Package query contains types and components for implementing Domain Queries and Query Handlers for producing Domain Read Models, which should compose the Read API of your application.
|
Package query contains types and components for implementing Domain Queries and Query Handlers for producing Domain Read Models, which should compose the Read API of your application. |
Package scenario exposes declarative testing support for multiple components pertaining the Eventually library, such as Command Handlers, Projections, etc.
|
Package scenario exposes declarative testing support for multiple components pertaining the Eventually library, such as Command Handlers, Projections, etc. |
serdes
module
|
|
Package subscription contains Event Subscription implementations to listens and process Events coming from an Event Store, such as running Projections.
|
Package subscription contains Event Subscription implementations to listens and process Events coming from an Event Store, such as running Projections. |
checkpoint
Package checkpoint expose the Checkpointer interface, used to checkpoint, or save, the current progress of a Subscription, so that it might survive application restarts without reprocessing Events.
|
Package checkpoint expose the Checkpointer interface, used to checkpoint, or save, the current progress of a Subscription, so that it might survive application restarts without reprocessing Events. |