inmemory

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBus

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

EventBus provides an in memory implementation of the VersionedEventPublisher VersionedEventReceiver interfaces

func NewEventBus

func NewEventBus() *EventBus

NewEventBus ...

func (*EventBus) PublishEvents

func (bus *EventBus) PublishEvents(events []*goengine.DomainMessage) error

PublishEvents publishes events to the event bus

func (*EventBus) ReceiveEvents

func (bus *EventBus) ReceiveEvents(options goengine.VersionedEventReceiverOptions) error

ReceiveEvents starts a go routine that monitors incoming events and routes them to a receiver channel specified within the options

type EventStore

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

EventStore ...

func NewEventStore

func NewEventStore() *EventStore

NewEventStore ...

func (*EventStore) Append

func (s *EventStore) Append(events *goengine.EventStream) error

Append ...

func (*EventStore) CountEventsFor

func (s *EventStore) CountEventsFor(streamName goengine.StreamName, id string) (int64, error)

CountEventsFor ...

func (*EventStore) FromVersion

func (s *EventStore) FromVersion(streamName goengine.StreamName, id string, version int) (*goengine.EventStream, error)

FromVersion ...

func (*EventStore) GetEventsFor

func (s *EventStore) GetEventsFor(streamName goengine.StreamName, id string) (*goengine.EventStream, error)

GetEventsFor ...

Jump to

Keyboard shortcuts

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