Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FSMEventsMapper ¶
type FSMMapper ¶
type FSMMapper map[string]MachineProvider
type FSMPool ¶
type FSMPool struct {
// contains filtered or unexported fields
}
func Init ¶
func Init(machines ...MachineProvider) *FSMPool
func (*FSMPool) EntryPointMachine ¶
func (p *FSMPool) EntryPointMachine() (MachineProvider, error)
func (*FSMPool) MachineByEvent ¶
func (p *FSMPool) MachineByEvent(event fsm.Event) (MachineProvider, error)
func (*FSMPool) MachineByState ¶
func (p *FSMPool) MachineByState(state fsm.State) (MachineProvider, error)
Out states now is not returns machine
type FSMStatesMapper ¶
type MachineProvider ¶
type MachineProvider interface { Name() string InitialState() fsm.State State() fsm.State // Process event Do(event fsm.Event, args ...interface{}) (*fsm.Response, error) GlobalInitialEvent() fsm.Event EntryEvent() fsm.Event EventsList() []fsm.Event StatesList() []fsm.State IsFinState(state fsm.State) bool }
Click to show internal directories.
Click to hide internal directories.