eventstore

package
v0.0.0-...-eecab09 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorCodeCacheSet = domainerrors.ErrorCodeInfraDatasource + domainerrors.ErrorCodeInfraDatasource + domainerrors.ErrorCodeInfraDatasourceEventStore + iota
	ErrorCodeResourceNotFound
	ErrorCodeEventFormatWrong
)
View Source
const (
	ReadStreadNum = 100
	EventSplitNum = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DBImpl

type DBImpl struct {
	// contains filtered or unexported fields
}

func NewEventStoreDBImpl

func NewEventStoreDBImpl(esdb *eventstore.StoreDB, mapper *event.TypeMapper) (*DBImpl, error)

func (*DBImpl) Close

func (e *DBImpl) Close() error

func (*DBImpl) Load

func (e *DBImpl) Load(ctx context.Context, streamID string, version int) ([]event.DomainEvent, error)

func (*DBImpl) SafeStore

func (e *DBImpl) SafeStore(ctx context.Context, events []event.DomainEvent, expectedVersion int) error

func (*DBImpl) Store

func (e *DBImpl) Store(ctx context.Context, events []event.DomainEvent, version int) error

Jump to

Keyboard shortcuts

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