Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fsm ¶
type Fsm struct { Initial interface{} Transitions map[interface{}][]Transition }
Fsm is a read-only FSM definition
func New ¶
func New(initial interface{}, transitions []Transition) *Fsm
func (*Fsm) FindTransition ¶
func (f *Fsm) FindTransition(src, dst interface{}) *Transition
func (*Fsm) NewInstance ¶
func (f *Fsm) NewInstance(overrideInitial ...interface{}) FsmInstance
func (*Fsm) NodeExists ¶
type FsmInstance ¶
type FsmInstance struct { *Fsm // contains filtered or unexported fields }
func (*FsmInstance) CanTransitionTo ¶
func (f *FsmInstance) CanTransitionTo(node interface{}) bool
func (*FsmInstance) Current ¶
func (f *FsmInstance) Current() interface{}
func (*FsmInstance) Evaluate ¶
func (f *FsmInstance) Evaluate(input interface{}) error
func (*FsmInstance) TransitionTo ¶
func (f *FsmInstance) TransitionTo(node interface{}) error
type Transition ¶
type Transition struct { Event interface{} Src interface{} Dst interface{} }
Click to show internal directories.
Click to hide internal directories.