integration

package
v0.39.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 21 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 KV added in v0.39.0

type KV struct {
	Key, Value string
}

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)

func (*MockKVStore) Puts added in v0.39.0

func (s *MockKVStore) Puts() []KV

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, msg projection.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