Documentation
¶
Overview ¶
General Purpose FSM library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action func() Input
An Action describes something an FSM will do. It returns an Input to allow for automatic chaining of actions.
type ClashingStateError ¶
type ClashingStateError int
ClashingStateError indicates that an attempt to define an FSM where two states share the same index was made.
func (ClashingStateError) Error ¶
func (err ClashingStateError) Error() string
type FSM ¶
FSM is the main structure defining a Finite State Machine.
type ImpossibleStateError ¶
type ImpossibleStateError int
ImpossibleStateError indicates that an FSM is in a state which wasn't part of its definition. This indicates that either the definition is wrong, or someone is monkeying around with the FSM state manually.
func (ImpossibleStateError) Error ¶
func (err ImpossibleStateError) Error() string
type InvalidInputError ¶
InvalidInputError indicates that an input was passed to an FSM which is not valid for its current state.
func (InvalidInputError) Error ¶
func (err InvalidInputError) Error() string