environment

package
v0.0.0-...-f7dc3f6 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment interface {
	Spec() model.Workflow
	InitializeWorkflow(spec model.Workflow, busEvent bus.Bus) error
	Start() string
	State(name string) State
	CompensateBy(transition State) error
}

type Event

type Event interface {
	Produce(ctx context.Context, data model.Object) error
	Consume(ctx context.Context) (cloudevents.Event, error)
}

type Function

type Function interface {
	Init() error
	Run(data model.Object) (model.Object, error)
}

type MapEvents

type MapEvents map[string]Event

type MapFunctions

type MapFunctions map[string]Function

type MapStates

type MapStates map[string]State

type NewEnvironment

type NewEnvironment func() Environment

type State

type State interface {
	Type() model.StateType
	Name() string

	FilterInput(model.Object) (model.Object, error)
	FilterOutput(model.Object) (model.Object, error)
	Run(ctx context.Context, dataIn model.Object) (model.Object, error)
	ProduceEvents(ctx context.Context, data model.Object) error
	Next() (string, bool)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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