Documentation
¶
Index ¶
- Constants
- func Visualize(fsm *FSM) string
- type Callback
- type Callbacks
- type Event
- type EventDesc
- type EventRunMode
- type FSM
- func (f *FSM) Do(event Event, args ...interface{}) (resp *Response, err error)
- func (f *FSM) EntryEvent() (event Event)
- func (f *FSM) EventsList() (events []Event)
- func (f *FSM) GlobalInitialEvent() (event Event)
- func (f *FSM) InitialState() State
- func (f *FSM) IsFinState(state State) bool
- func (f *FSM) MustCopyWithState(state State) *FSM
- func (f *FSM) Name() string
- func (f *FSM) SetState(event Event) error
- func (f *FSM) State() State
- func (f *FSM) StatesList() (states []State)
- type Response
- type State
Constants ¶
View Source
const ( StateGlobalIdle = State("__idle") StateGlobalDone = State("__done") )
Temporary global finish state for deprecating operations
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EventRunMode ¶
type EventRunMode uint8
const ( EventRunDefault EventRunMode = iota EventRunBefore EventRunAfter )
type FSM ¶
type FSM struct {
// contains filtered or unexported fields
}
func MustNewFSM ¶
func (*FSM) EntryEvent ¶
func (*FSM) EventsList ¶
func (*FSM) GlobalInitialEvent ¶
Check entry event for available emitting as global entry event
func (*FSM) InitialState ¶
func (*FSM) IsFinState ¶
func (*FSM) MustCopyWithState ¶
WithState returns FSM copy with custom setup state
func (*FSM) SetState ¶
SetState allows the user to move to the given state from currentState state. The call does not trigger any callbacks, if defined.
func (*FSM) StatesList ¶
Click to show internal directories.
Click to hide internal directories.