fsm

package
v1.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TaskFinish

func TaskFinish(state api.State) bool

Types

type Event

type Event struct {
	Type            string
	Action          api.Action
	Msg             string
	ExternalMessage string
}

func (Event) UniqueName

func (e Event) UniqueName() string

type FSM

type FSM struct {
	// contains filtered or unexported fields
}

func (*FSM) AllowTransit

func (F *FSM) AllowTransit(event Event) error

func (*FSM) CurrentFunc

func (F *FSM) CurrentFunc(currentFunc func(id, nodeName string) (api.State, error)) *FSM

func (*FSM) CurrentState

func (F *FSM) CurrentState() (api.State, error)

func (*FSM) Guard

func (F *FSM) Guard(guard map[string]api.State) *FSM

func (*FSM) ID

func (F *FSM) ID(id string) *FSM

func (*FSM) LastState

func (F *FSM) LastState(lastState api.State)

func (*FSM) NodeName

func (F *FSM) NodeName(nodeName string) *FSM

func (*FSM) StageSequence

func (F *FSM) StageSequence(stageSequence map[api.State]api.State) *FSM

func (*FSM) TaskStagCompleted

func (F *FSM) TaskStagCompleted(state api.State) bool

func (*FSM) Transit

func (F *FSM) Transit(event Event) error

func (*FSM) UpdateFunc

func (F *FSM) UpdateFunc(updateFunc func(id, nodeName string, state api.State, event Event) error) *FSM

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL