workflow

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompensationError

type CompensationError struct {
	// contains filtered or unexported fields
}

func NewCompensationError

func NewCompensationError(executionErr error, compensationErrs ...error) *CompensationError

func (*CompensationError) CompensationErrors

func (e *CompensationError) CompensationErrors() []error

func (*CompensationError) Error

func (e *CompensationError) Error() string

func (*CompensationError) ExecutionError

func (e *CompensationError) ExecutionError() error

type Step

type Step interface {
	Execute(ctx context.Context) error
	Compensate(ctx context.Context) error
}

func StepFunc

func StepFunc(execute func(ctx context.Context) error, compensate func(ctx context.Context) error) Step

type Workflow

type Workflow struct {
	// contains filtered or unexported fields
}

func New

func New(steps ...Step) *Workflow

func (*Workflow) Execute

func (w *Workflow) Execute(ctx context.Context) error

Jump to

Keyboard shortcuts

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