Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidState = errors.New("does not exists") StateEnd = "end" )
Functions ¶
Types ¶
type Option ¶
type Option func(*Options)
Option func signature
func InitialState ¶
InitialState sets init state for state machine
func WrapState ¶ added in v3.10.5
func WrapState(w StateWrapper) Option
WrapState adds a state Wrapper to a list of options passed into the fsm
type Options ¶
type Options struct { // Initial state Initial string // Wrappers runs before state Wrappers []StateWrapper // DryRun mode DryRun bool }
Options struct holding fsm options
func NewOptions ¶ added in v3.10.5
NewOptions returns new Options struct filled by passed Option
type StateOption ¶
type StateOption func(*StateOptions)
StateOption func signature
func StateDryRun ¶
func StateDryRun(b bool) StateOption
StateDryRun says that state executes in dry run mode
type StateWrapper ¶ added in v3.10.5
StateWrapper wraps the StateFunc and returns the equivalent
Click to show internal directories.
Click to hide internal directories.