integration

package
v0.38.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventForwarderWorker

func EventForwarderWorker(t *testing.T, ctx context.Context, logger *slog.Logger, dbConfig shared.DBConfig, sinker sink.Sinker[ids.AggID])

EventForwarderWorker creates workers that listen to database changes, transform them to events and publish them into the message bus.

Types

type Balance

type Balance struct {
	Name   string
	Amount int64
}

type MockKVStore

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

func (*MockKVStore) Data added in v0.38.1

func (s *MockKVStore) Data() map[string]string

func (*MockKVStore) Get

func (s *MockKVStore) Get(_ context.Context, key string) (_ string, er error)

func (*MockKVStore) Put

func (s *MockKVStore) Put(_ context.Context, key, token string) (er error)

type ProjectionMock

type ProjectionMock[K eventsourcing.ID] struct {
	// contains filtered or unexported fields
}

func NewProjectionMock

func NewProjectionMock[K eventsourcing.ID](name string, codec *jsoncodec.Codec[K]) *ProjectionMock[K]

func (*ProjectionMock[K]) BalanceByID

func (p *ProjectionMock[K]) BalanceByID(id K) (Balance, bool)

func (*ProjectionMock[K]) CatchUpOptions

func (*ProjectionMock[K]) CatchUpOptions() projection.CatchUpOptions

func (*ProjectionMock[K]) Events

func (p *ProjectionMock[K]) Events() []*sink.Message[K]

func (*ProjectionMock[K]) Handle

func (p *ProjectionMock[K]) Handle(ctx context.Context, e *sink.Message[K]) error

func (*ProjectionMock[K]) Name

func (p *ProjectionMock[K]) Name() string

Jump to

Keyboard shortcuts

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