transition

package
v0.18.15 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NOOP string = "noop"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Register(ts Transition) error
	Process(name string, ctx interface{}, current Status) (Status, error)
}

func NewEngine

func NewEngine(states []Status) Engine

type Status

type Status int

type Transition

type Transition struct {
	Name string
	Fn   func(ctx interface{}) error
	From Status
	To   Status
}

Jump to

Keyboard shortcuts

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