inmemes

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

README

InMem provides a simple in memory implementation of an event store.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryEventStore

type InMemoryEventStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

InMemoryEventStore implements the

func NewInMemoryEventStore

func NewInMemoryEventStore() *InMemoryEventStore

NewInMemoryEventStore is a factory method for creating InMemoryEventStore instances.

func (*InMemoryEventStore) RepublishAllEvents added in v1.7.0

func (im *InMemoryEventStore) RepublishAllEvents() error

RepublishAllEvents republishers events to subscribers.

func (*InMemoryEventStore) RetrieveEvents

func (im *InMemoryEventStore) RetrieveEvents(aggregateID string) ([]goes.Event, error)

RetrieveEvents retrieves the events in the event store assocaited with the given aggregate id.

func (*InMemoryEventStore) StoreEvents

func (im *InMemoryEventStore) StoreEvents(agg *goes.Aggregate) error

StoreEvents stores the events for the given aggregate in the event store.

func (*InMemoryEventStore) SubscribeEvents

func (im *InMemoryEventStore) SubscribeEvents(callback goes.EventPublishedCallback) goes.SubscriptionID

SubscribeEvents registers the provided callback as an event subscriber.

func (*InMemoryEventStore) Unsubscribe

func (im *InMemoryEventStore) Unsubscribe(subscriptionID goes.SubscriptionID)

Unsubscribe removes the event subscription associated with the provided subscription id.

Jump to

Keyboard shortcuts

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