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: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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