package
0.5.0
Repository: https://github.com/jmalloc/ax.git
Documentation: pkg.go.dev

# Packages

Package mapping contains subpackages that implement various message-to-saga mapping strategies.
Package persistence contains subpackages that implement various saga persistence strategies.

# Functions

GenerateInstanceID generates a new unique identifier for a saga instance.
MarshalData marshals d to a binary representation.
MustParseInstanceID parses s into a saga instance ID and returns it.
NewAggregate returns a new aggregate saga.
NewWorkflow returns a saga that forwards to the given aggregate.
ParseInstanceID parses s into a saga instance ID and returns it.
UnmarshalData unmarshals a saga instance from some serialized representation.

# Structs

Aggregate is a Saga for implementing application-defined domain aggregates.
Applier is an implementation of ax.Sender that applies published events to saga data for evented sagas.
CompletableByData is an embeddable struct that implements a Saga.IsInstanceComplete() method that forwards the completion check on to a CompletableData value.
ErrorIfNotFound is an embeddable struct that implements a Saga.HandleNotFound() method that always returns an error.
IgnoreNotFound is an embeddable struct that implements a Saga.HandleNotFound() method that is a no-op.
Instance is an instance of a saga.
InstanceID uniquely identifies a saga instance.
InstancesNeverComplete is an embeddable struct that implements a Saga.IsInstanceComplete() method that always returns false.
MessageHandler is an implementation of routing.MessageHandler that loads a saga instance, forwards the message to the saga, then perists any changes to the instance.
Workflow is a Saga for implementing application-defined workflows.

# Interfaces

CompletableData is an interface for application-defined saga data that can be queried as to whether the saga instance is "complete".
Data is an interface for application-defined data associated with a saga instance.
EventedSaga is a saga that only mutates its data when an event occurs.
Mapper is an interface for mapping inbound messages to their target saga instance.
Persister is an interface for loading saga instances, and persisting the changes that occur to them.
A Saga is a stateful message handler.
UnitOfWork encapsulates the logic for persisting changes to an instance.

# Type aliases

Revision is a one-based version of a saga instance.