Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct { Terminal bool Transitions StateTransitions }
State is the basic building block in the FSM. A State can be final or not, and has transitions to other states
type StateTransitions ¶
type StateTransitions []*Transition
StateTransitions is a sortable slice of transitions according to their priorities
func (StateTransitions) Len ¶
func (t StateTransitions) Len() int
func (StateTransitions) Less ¶
func (t StateTransitions) Less(i, j int) bool
func (StateTransitions) Swap ¶
func (t StateTransitions) Swap(i, j int)
type Transition ¶
Transition links 2 states. If a transition's matcher matches, the next state can be reached
Click to show internal directories.
Click to hide internal directories.