Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StateFunction ¶
type StateFunction func(sm *StateMachine) error
type StateMachine ¶
type StateMachine struct { Data any Config *config.Config CliMode bool // contains filtered or unexported fields }
func NewStateMachine ¶
func NewStateMachine(stateCount int) *StateMachine
func (*StateMachine) AddState ¶
func (sm *StateMachine) AddState(id int, fn StateFunction)
func (*StateMachine) SetState ¶
func (sm *StateMachine) SetState(state int)
func (*StateMachine) Step ¶
func (sm *StateMachine) Step() error
Click to show internal directories.
Click to hide internal directories.