Versions in this module Expand all Collapse all v1 v1.0.0 Jan 18, 2021 Changes in this version + func ExportDot(fsm *FSM, outfile string) error + type ArgsType map[string]interface + type Callback func(*State, EventType, ArgsType) + type Callbacks map[StateType]Callback + type EventType string + const EntryEvent + const ExitEvent + type FSM struct + func NewFSM(transitions Transitions, callbacks Callbacks) (*FSM, error) + func (fsm *FSM) SendEvent(state *State, event EventType, args ArgsType) error + type State struct + func NewState(initState StateType) *State + func (state *State) Current() StateType + func (state *State) Is(target StateType) bool + func (state *State) Set(next StateType) + type StateType string + type Transition struct + Event EventType + From StateType + To StateType + type Transitions []Transition