Versions in this module Expand all Collapse all v1 v1.0.1 Oct 12, 2021 Changes in this version type FSM + func (f *FSM) Enter(fn func(state State)) + func (f *FSM) EnterState(state State, fn func()) + func (f *FSM) ExitState(state State, fn func()) v1.0.0 Oct 12, 2021 Changes in this version + type Event int + type FSM struct + func New(initial State) *FSM + func (f *FSM) Current() State + func (f *FSM) Entry(state State, fn func()) + func (f *FSM) Event(e Event) bool + func (f *FSM) Exit(state State, fn func()) + func (f *FSM) Reset() + func (f *FSM) Transition(opts ...Option) + type Option func(*transition) + func Call(fn func()) Option + func Check(fn func() bool) Option + func Dst(s State) Option + func NotCheck(fn func() bool) Option + func On(e Event) Option + func Src(s ...State) Option + func Times(n int) Option + type State int