package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
Compile creates a set of state Transitions from a Pattern.
FromBool creates a Bool from a Go bool.
MakeMachine creates a new Machine.
# Structs
Args is a structure containing the arguments passed to Transition.Action.
Machine encapsulates a State with a set of State transitions.
Transition is a Machine's response to an Event applied to a State.
TransitionNotFoundError is returned from Machine.Apply when the Event cannot be applied to the current State.
Transitions is a set of expanded state transitions generated from a Pattern, forming a State graph with Events acting as the directed edges between different States.
# Interfaces
Bool represents a boolean pattern.
Event is something that happens to a Machine which may or may not trigger a state transition.
EventPayload is extra payload on an Event that does not contribute to state transition decisions, but that can be affected by a state transition.
ExtendedState is extra state in a Machine that does not contribute to state transition decisions, but that can be affected by a state transition.
State is a node in a Machine's transition graph.