state

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(spec model.State, mapFunctions environment.MapFunctions, mapEvents environment.MapEvents) (environment.State, error)

Types

type Action

type Action struct {
	Function environment.Function
	Event    environment.Event
	// contains filtered or unexported fields
}

func (*Action) Run

func (a *Action) Run(dataIn model.Object) (model.Object, error)

type Actions

type Actions []*Action

func (Actions) Run

func (a Actions) Run(dataIn model.Object) (model.Object, error)

type Callback

type Callback struct {
	StateImpl
	EventRef
}

func (*Callback) Run

func (c *Callback) Run(ctx context.Context, dataIn model.Object) (dataOut model.Object, err error)

type Event

type Event struct {
	StateImpl
	// contains filtered or unexported fields
}

func (*Event) Run

func (e *Event) Run(ctx context.Context, dataIn model.Object) (model.Object, error)

type EventRef

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

func (*EventRef) Run

func (e *EventRef) Run(ctx context.Context, dataIn model.Object) (model.Object, error)

type Inject

type Inject struct {
	StateImpl
	// contains filtered or unexported fields
}

func (*Inject) Run

func (i *Inject) Run(ctx context.Context, dataIn model.Object) (model.Object, error)

type Operation

type Operation struct {
	StateImpl
	// contains filtered or unexported fields
}

func (*Operation) Run

func (s *Operation) Run(ctx context.Context, dataIn model.Object) (dataOut model.Object, err error)

type ProduceEventImp

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

func (*ProduceEventImp) Name

func (p *ProduceEventImp) Name() string

type StateImpl

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

func NewBase

func NewBase(spec model.State, mapEvents environment.MapEvents) (s StateImpl, err error)

func (*StateImpl) FilterInput

func (t *StateImpl) FilterInput(data model.Object) (model.Object, error)

func (*StateImpl) FilterOutput

func (t *StateImpl) FilterOutput(data model.Object) (model.Object, error)

func (*StateImpl) Name

func (t *StateImpl) Name() string

func (*StateImpl) Next

func (e *StateImpl) Next() (string, bool)

func (*StateImpl) ProduceEvents

func (t *StateImpl) ProduceEvents(ctx context.Context, dataIn model.Object) (err error)

func (*StateImpl) Transition

func (t *StateImpl) Transition() string

func (*StateImpl) Type

func (p *StateImpl) Type() model.StateType

type Switch

type Switch struct {
	StateImpl
	// contains filtered or unexported fields
}

func (*Switch) Run

func (s *Switch) Run(ctx context.Context, dataIn model.Object) (model.Object, error)

type SwitchCondition

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

Jump to

Keyboard shortcuts

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