inmem

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: MIT Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSnapshotStore

func NewSnapshotStore(options ...SnapshotStoreOption) es.AggregateRootStoreMiddleware

NewSnapshotStore constructs a new SnapshotStore and returns es.AggregateRootStoreMiddleware

Types

type Consumer

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

Consumer implements msg.Consumer

func NewConsumer

func NewConsumer(options ...ConsumerOption) *Consumer

NewConsumer constructs a new Consumer

func (*Consumer) Close

func (c *Consumer) Close(context.Context) error

Close implements msg.Consumer.Close

func (*Consumer) Listen

func (c *Consumer) Listen(ctx context.Context, channel string, consumer msg.ReceiveMessageFunc) error

Listen implements msg.Consumer.Listen

type ConsumerOption

type ConsumerOption func(*Consumer)

ConsumerOption options for Consumer

func WithConsumerLogger

func WithConsumerLogger(logger log.Logger) ConsumerOption

WithConsumerLogger sets the log.Logger for Consumer

type EventStore

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

EventStore implements es.AggregateRootStore

func NewEventStore

func NewEventStore(options ...EventStoreOption) *EventStore

NewEventStore constructs a new EventStore

func (*EventStore) Load

func (s *EventStore) Load(_ context.Context, root *es.AggregateRoot) error

Load implements es.AggregateRootStore.Load

func (*EventStore) Save

func (s *EventStore) Save(_ context.Context, root *es.AggregateRoot) error

Save implements es.AggregateRootStore.Save

type EventStoreOption

type EventStoreOption func(*EventStore)

EventStoreOption options for EventStore

type Producer

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

Producer implements msg.Producer

func NewProducer

func NewProducer(options ...ProducerOption) *Producer

NewProducer constructs a new Producer

func (*Producer) Close

func (p *Producer) Close(context.Context) error

Close implements msg.Producer.Close

func (*Producer) Send

func (p *Producer) Send(_ context.Context, channel string, message msg.Message) error

Send implements msg.Producer.Send

type ProducerOption

type ProducerOption func(destination *Producer)

ProducerOption options for Producer

func WithProducerLogger

func WithProducerLogger(logger log.Logger) ProducerOption

WithProducerLogger sets the log.Logger for Producer

type SagaInstanceStore

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

SagaInstanceStore implements saga.InstanceStore

func NewSagaInstanceStore

func NewSagaInstanceStore() *SagaInstanceStore

NewSagaInstanceStore constructs a new SagaInstanceStore

func (*SagaInstanceStore) Find

func (s *SagaInstanceStore) Find(_ context.Context, sagaName, sagaID string) (*saga.Instance, error)

Find implements saga.InstanceStore.Find

func (*SagaInstanceStore) Save

func (s *SagaInstanceStore) Save(_ context.Context, instance *saga.Instance) error

Save implements saga.InstanceStore.Save

func (*SagaInstanceStore) Update

func (s *SagaInstanceStore) Update(_ context.Context, instance *saga.Instance) error

Update implements saga.InstanceStore.Update

type SnapshotStore

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

SnapshotStore implements es.AggregateRootStore

func (*SnapshotStore) Load

func (s *SnapshotStore) Load(ctx context.Context, root *es.AggregateRoot) error

Load implements es.AggregateRootStore.Load

func (*SnapshotStore) Save

func (s *SnapshotStore) Save(ctx context.Context, root *es.AggregateRoot) error

Save implements es.AggregateRootStore.Save

type SnapshotStoreOption

type SnapshotStoreOption func(store *SnapshotStore)

SnapshotStoreOption options for SnapshotStore

func WithSnapshotStoreStrategy added in v0.0.2

func WithSnapshotStoreStrategy(strategy es.SnapshotStrategy) SnapshotStoreOption

WithSnapshotStoreStrategy sets the snapshotting strategy for SnapshotStore

Jump to

Keyboard shortcuts

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