cmd

package
v0.12.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

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) 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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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