eventsourcing

package
v0.0.0-...-317f090 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 7 Imported by: 0

README

event-sourcing

This is a simple event sourcing library for Go.

Feature

  • EventBus
  • Snapshots
  • OpenTracing
  • Store engine
    • PostgreSQL
OpenTracing

OpenTracing

References

Documentation

Overview

Package event_store - implementation of event store

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventSourcing

type EventSourcing interface {
	Save(ctx context.Context, events []*eventsourcing.Event) error
	SafeSave(ctx context.Context, events []*eventsourcing.Event) error
	Load(ctx context.Context, aggregateID string) (*eventsourcing.Snapshot, []*eventsourcing.Event, error)

	GetAggregateWithoutSnapshot(ctx context.Context) ([]*eventsourcing.BaseAggregate, error)
	SaveSnapshot(ctx context.Context, snapshot *eventsourcing.Snapshot) error
}

EventSourcing - interface for event store

func New

func New(ctx context.Context, log logger.Logger, store db.DB) (EventSourcing, error)

New - create new EventStore

Directories

Path Synopsis
domain
store

Jump to

Keyboard shortcuts

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