inmem

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 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

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)

func WithConsumerLogger

func WithConsumerLogger(logger log.Logger) ConsumerOption

type EventStore

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

func NewEventStore

func NewEventStore(options ...EventStoreOption) *EventStore

func (*EventStore) Load

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

func (*EventStore) Save

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

type EventStoreOption

type EventStoreOption func(*EventStore)

type Producer

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

func NewProducer

func NewProducer(options ...ProducerOption) *Producer

func (*Producer) Close

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

func (*Producer) Send

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

type ProducerOption

type ProducerOption func(destination *Producer)

func WithProducerLogger

func WithProducerLogger(logger log.Logger) ProducerOption

type SagaInstanceStore

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

func NewSagaInstanceStore

func NewSagaInstanceStore() *SagaInstanceStore

func (*SagaInstanceStore) Find

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

func (*SagaInstanceStore) Save

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

func (*SagaInstanceStore) Update

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

type SnapshotStore

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

func (*SnapshotStore) Load

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

func (*SnapshotStore) Save

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

type SnapshotStoreOption

type SnapshotStoreOption func(store *SnapshotStore)

func SnapshotStoreStrategy

func SnapshotStoreStrategy(strategy es.SnapshotStrategy) SnapshotStoreOption

Jump to

Keyboard shortcuts

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