trace

package
v0.0.0-...-b205a7c Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoEventStoreDefined = errors.New("no event store defined")

ErrNoEventStoreDefined is if no event store has been defined.

Functions

This section is empty.

Types

type EventStore

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

EventStore wraps an EventStore and adds debug tracing.

func NewEventStore

func NewEventStore(eventStore eh.EventStore) *EventStore

NewEventStore creates a new EventStore.

func (*EventStore) GetTrace

func (s *EventStore) GetTrace() []eh.Event

GetTrace returns the events that happened during the tracing.

func (*EventStore) Load

func (s *EventStore) Load(ctx context.Context, aggregateType eh.AggregateType, id eh.UUID) ([]eh.Event, error)

Load loads all events for the aggregate id from the base store. Returns ErrNoEventStoreDefined if no event store could be found.

func (*EventStore) ResetTrace

func (s *EventStore) ResetTrace()

ResetTrace resets the trace.

func (*EventStore) Save

func (s *EventStore) Save(ctx context.Context, events []eh.Event, originalVersion int) error

Save appends all events to the base store and trace them if enabled.

func (*EventStore) StartTracing

func (s *EventStore) StartTracing()

StartTracing starts the tracing of events.

func (*EventStore) StopTracing

func (s *EventStore) StopTracing()

StopTracing stops the tracing of events.

Jump to

Keyboard shortcuts

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