saga

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BaseArcActionMismatchError = errors.New("base arc can only and needs one action")
View Source
var NotEnoughArcsError = errors.New("a story need more than one arc")

Functions

func Init

func Init(pers event.Persistence, dataTypeVersion, name string, story Story,
	p event.CryptoKeyProvider, ctx context.Context) (out *saga, err error)

Types

type Action

type Action struct {
	Id string `json:"id"`
	//Requires []string `json:"requires"`
	Type string   `json:"type"` //I might want to simplify this.
	Body executor `json:"body"`
}

func (*Action) UnmarshalJSON

func (a *Action) UnmarshalJSON(data []byte) error

type Arc

type Arc struct {
	Actions []Action
	// contains filtered or unexported fields
}

type Saga

type Saga interface {
	ExecuteFirst(e executor) error
	Close()
}

type Story

type Story struct {
	Name string
	Arcs []Arc
}

Jump to

Keyboard shortcuts

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