eventbus

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TestEventType is the EventType used for testing.
	TestEventType = cqrs.EventType("test.event")
	// TestAggregateType is the AggregateType used for testing.
	TestAggregateType = cqrs.AggregateType("test.aggregate")
)

Variables

View Source
var (
	// TestEventConfig is the EventConfig used for testing.
	TestEventConfig = event.Config()
)

Functions

func Once

func Once(ctx context.Context, bus cqrs.EventBus, typ cqrs.EventType, opts ...OnceOption) (<-chan cqrs.Event, error)

Once ...

func TestPublish

func TestPublish(ctx context.Context, t *testing.T, bus cqrs.EventBus)

TestPublish tests the Publish function of an EventBus implementation.

Types

type OnceOption

type OnceOption func(*onceConfig)

OnceOption ...

func OnceMatch

func OnceMatch(matchers ...cqrs.EventMatcher) OnceOption

OnceMatch ...

func OnceTimeout

func OnceTimeout(d time.Duration) OnceOption

OnceTimeout ...

type TestEventData

type TestEventData struct {
	A int
	B string
	C bool
}

TestEventData is used for testing EventBus implementations.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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