eventually

package module
v0.0.0-...-fff96b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2021 License: MIT Imports: 0 Imported by: 0

README


Eventually

Event Sourcing for Go


Idiomatic library to help you build Event Sourced application in Go.

Please note

The library is currently under development and not ready yet for production use-cases.

Note on semantic versioning

This library is actively being developed, and prior to v1 release the following Semantic versioning is being adopted:

  • Breaking changes are tagged with a new MINOR release
  • New features, patches and documentation are tagged with a new PATCH release

Contributing

You want to contribute to eventually but you don't know where to start?

First of all, thank you for considering contributing ❤

You can head over our CONTRIBUTING section to know how to contribute to the project, and — in case you don't have a clear idea what to contribute — what is most needed needed from contributors.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in eventually-go by you, shall be licensed as MIT, without any additional terms or conditions.

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

type Message struct {
	Payload  Payload
	Metadata Metadata
}

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.

func (Metadata) With

func (m Metadata) With(key string, value interface{}) Metadata

With returns a new Metadata reference holding the value addressed using the specified key.

type Payload

type Payload interface {
	Name() string
}

Payload is a Message payload.

Each payload should have a unique name identifier, that can be used to uniquely route a message to its type.

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.
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.
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.
postgres
Package postgres contains an Event Store implementation using PostgreSQL as backend data store.
Package postgres contains an Event Store implementation using PostgreSQL as backend data store.
postgres/migrations
Code generated for package migrations by go-bindata DO NOT EDIT.
Code generated for package migrations by go-bindata DO NOT EDIT.
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.
opentelemetry
Package opentelemetry provides extension components for eventually library to enable OpenTelemetry instrumentation.
Package opentelemetry provides extension components for eventually library to enable OpenTelemetry instrumentation.
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 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.
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL