Versions in this module Expand all Collapse all v0 v0.3.6 Oct 7, 2021 Changes in this version + type BackgroundContextStrategy struct + func NewBackgroundContextStrategy() *BackgroundContextStrategy + func (s *BackgroundContextStrategy) Append() (context.Context, context.CancelFunc) + func (s *BackgroundContextStrategy) CountEventsFor() (context.Context, context.CancelFunc) + func (s *BackgroundContextStrategy) CreateIndices() (context.Context, context.CancelFunc) + func (s *BackgroundContextStrategy) FromVersion() (context.Context, context.CancelFunc) + func (s *BackgroundContextStrategy) GetEventsFor() (context.Context, context.CancelFunc) + type ContextStrategy interface + Append func() (context.Context, context.CancelFunc) + CountEventsFor func() (context.Context, context.CancelFunc) + CreateIndices func() (context.Context, context.CancelFunc) + FromVersion func() (context.Context, context.CancelFunc) + GetEventsFor func() (context.Context, context.CancelFunc) + type EventStore struct + func NewEventStore(mongoDB *mongo.Database, registry goengine.TypeRegistry, options ...Option) *EventStore + func (s *EventStore) Append(events *goengine.EventStream) error + func (s *EventStore) CountEventsFor(streamName goengine.StreamName, id string) (int64, error) + func (s *EventStore) FromVersion(streamName goengine.StreamName, id string, version int) (*goengine.EventStream, error) + func (s *EventStore) GetEventsFor(streamName goengine.StreamName, id string) (*goengine.EventStream, error) + type MongoEvent struct + ID string + Payload string + RecordedOn time.Time + Type string + Version int + type Option func(eventStore *EventStore) + func ContextBackground() Option + func ContextTimeout(options ...TimeoutContextStrategyOption) Option + type TimeoutContextStrategy struct + func NewTimeoutContextStrategy(options ...TimeoutContextStrategyOption) *TimeoutContextStrategy + func (s *TimeoutContextStrategy) Append() (context.Context, context.CancelFunc) + func (s *TimeoutContextStrategy) CountEventsFor() (context.Context, context.CancelFunc) + func (s *TimeoutContextStrategy) CreateIndices() (context.Context, context.CancelFunc) + func (s *TimeoutContextStrategy) FromVersion() (context.Context, context.CancelFunc) + func (s *TimeoutContextStrategy) GetEventsFor() (context.Context, context.CancelFunc) + type TimeoutContextStrategyOption func(s *TimeoutContextStrategy) + func NewAppendTimeout(timeout time.Duration) TimeoutContextStrategyOption + func NewCountEventsForTimeout(timeout time.Duration) TimeoutContextStrategyOption + func NewCreateIndicesTimeout(timeout time.Duration) TimeoutContextStrategyOption + func NewFromVersionTimeout(timeout time.Duration) TimeoutContextStrategyOption + func NewGetEventsForTimeout(timeout time.Duration) TimeoutContextStrategyOption