eventstore

package
v0.0.0-...-da8027b Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package eventstore is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrVersionInconsistency = errors.New("eventstore: version inconsistency")
	ErrEventsNotFound       = errors.New("eventstore: events not found")
)

Functions

This section is empty.

Types

type Collector

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

func (*Collector) Append

func (s *Collector) Append(ctx context.Context, sid stream.ID, st stream.Type, events []stream.Event, expected stream.Version) (err error)

func (*Collector) Iter

func (s *Collector) Iter(ctx context.Context, st stream.Type, fn WalkFunc) error

func (*Collector) Load

func (s *Collector) Load(ctx context.Context, sid stream.ID, st stream.Type, from stream.Version) (events []stream.Event, err error)

type InMemStore

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

func NewInMemStore

func NewInMemStore() *InMemStore

func (*InMemStore) Append

func (s *InMemStore) Append(_ context.Context, sid stream.ID, st stream.Type, e []stream.Event, expected stream.Version) error

func (*InMemStore) Drop

func (s *InMemStore) Drop()

func (*InMemStore) Iter

func (s *InMemStore) Iter(_ context.Context, st stream.Type, w WalkFunc) error

func (*InMemStore) Load

func (s *InMemStore) Load(_ context.Context, sid stream.ID, st stream.Type, from stream.Version) ([]stream.Event, error)

type Logging

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

func (*Logging) Append

func (l *Logging) Append(ctx context.Context, sid stream.ID, st stream.Type, events []stream.Event, expected stream.Version) (err error)

func (*Logging) Iter

func (l *Logging) Iter(ctx context.Context, st stream.Type, fn WalkFunc) (err error)

func (*Logging) Load

func (l *Logging) Load(ctx context.Context, sid stream.ID, st stream.Type, from stream.Version) (events []stream.Event, err error)

type Metrics

type Metrics struct {
	LoadCounter   metrics.Counter
	LoadHistogram metrics.Histogram
	LoadGauge     metrics.Gauge

	AppendCounter   metrics.Counter
	AppendHistogram metrics.Histogram
	AppendGauge     metrics.Gauge
}

func (*Metrics) Append

func (m *Metrics) Append(st stream.Type, et stream.EventType, startTime time.Time)

func (*Metrics) AppendTotal

func (m *Metrics) AppendTotal(st stream.Type, total int)

func (*Metrics) Load

func (m *Metrics) Load(st stream.Type, total int, start time.Time)

type Middleware

type Middleware func(Store) Store

func NewCollector

func NewCollector(m *Metrics) Middleware

func NewLogging

func NewLogging(logger log.Logger) Middleware

func Wrap

func Wrap(em Middleware, ems ...Middleware) Middleware

type MockStore

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

MockStore is a mock of Store interface

func NewMockStore

func NewMockStore(ctrl *gomock.Controller) *MockStore

NewMockStore creates a new mock instance

func (*MockStore) Append

func (m *MockStore) Append(arg0 context.Context, arg1 stream.ID, arg2 stream.Type, arg3 []stream.Event, arg4 stream.Version) error

Append mocks base method

func (*MockStore) EXPECT

func (m *MockStore) EXPECT() *MockStoreMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockStore) Iter

func (m *MockStore) Iter(arg0 context.Context, arg1 stream.Type, arg2 WalkFunc) error

Iter mocks base method

func (*MockStore) Load

func (m *MockStore) Load(arg0 context.Context, arg1 stream.ID, arg2 stream.Type, arg3 stream.Version) ([]stream.Event, error)

Load mocks base method

type MockStoreMockRecorder

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

MockStoreMockRecorder is the mock recorder for MockStore

func (*MockStoreMockRecorder) Append

func (mr *MockStoreMockRecorder) Append(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

Append indicates an expected call of Append

func (*MockStoreMockRecorder) Iter

func (mr *MockStoreMockRecorder) Iter(arg0, arg1, arg2 interface{}) *gomock.Call

Iter indicates an expected call of Iter

func (*MockStoreMockRecorder) Load

func (mr *MockStoreMockRecorder) Load(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

Load indicates an expected call of Load

type WalkFunc

type WalkFunc func(stream.ID, stream.Version, []stream.Event) error

Jump to

Keyboard shortcuts

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