fsm

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnrecognizedState = errors.New("unrecognized state")
)

Functions

func NewDotOutput

func NewDotOutput(w io.Writer, dir string) error

Types

type FSM

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

func NewFSM

func NewFSM(funcs map[State]StateFunc, initState, closeState State) *FSM

func (*FSM) Loop

func (f *FSM) Loop() error

func (*FSM) Shutdown added in v0.14.0

func (f *FSM) Shutdown()

func (*FSM) SignalHandling

func (f *FSM) SignalHandling(signals ...os.Signal)

type State

type State int
const (
	UnknownState State = -255
	WaitState    State = -254
	CloseState   State = -253
)

type StateFunc

type StateFunc func() (State, error)

Jump to

Keyboard shortcuts

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