xevent

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterAggregate

func FilterAggregate(events []event.Event, a aggregate.Aggregate) []event.Event

FilterAggregate filters events and returns only those that belong to the Aggregate a.

func Make

func Make(name string, data any, n int, opts ...MakeOption) []event.Event

Make returns n events with the specified name and data.

func Shuffle

func Shuffle[D any](events []event.Of[D]) []event.Of[D]

Shuffle shuffles events and returns the shuffled slice.

Types

type MakeOption

type MakeOption func(*makeConfig)

MakeOption is an option for Make.

func ForAggregate

func ForAggregate(as ...aggregate.Aggregate) MakeOption

ForAggregate returns a MakeOption that sets the aggregate for events returne by Make.

func SkipVersion

func SkipVersion(v ...int) MakeOption

SkipVersion returns a MakeOption that emulates a consistency error by skipping the specified aggregate versions when creating the events. This option only has an effect when used together with ForAggregate.

Directories

Path Synopsis
Package etree provides a red-black tree for events.
Package etree provides a red-black tree for events.

Jump to

Keyboard shortcuts

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