Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseStateMachine ¶
type BaseStateMachine struct {
// contains filtered or unexported fields
}
func NewBaseStateMachine ¶
func NewBaseStateMachine(initial string, allowed map[string][]string) *BaseStateMachine
func (*BaseStateMachine) GetState ¶
func (sm *BaseStateMachine) GetState() string
func (*BaseStateMachine) OnTransition ¶
func (sm *BaseStateMachine) OnTransition(f TransitionFunc)
func (*BaseStateMachine) TransitionTo ¶
func (sm *BaseStateMachine) TransitionTo(newState string) error
type TransitionFunc ¶
type TransitionFunc func(from, to string)
Click to show internal directories.
Click to hide internal directories.