Documentation
¶
Index ¶
- Variables
- type EventStore
- func (s *EventStore) GetTrace() []eh.Event
- func (s *EventStore) Load(ctx context.Context, aggregateType eh.AggregateType, id eh.UUID) ([]eh.Event, error)
- func (s *EventStore) ResetTrace()
- func (s *EventStore) Save(ctx context.Context, events []eh.Event, originalVersion int) error
- func (s *EventStore) StartTracing()
- func (s *EventStore) StopTracing()
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) StartTracing ¶
func (s *EventStore) StartTracing()
StartTracing starts the tracing of events.
func (*EventStore) StopTracing ¶
func (s *EventStore) StopTracing()
StopTracing stops the tracing of events.
Click to show internal directories.
Click to hide internal directories.