Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConditionExpressionResultTypeUnmatch = errors.New("gstatemachines: expression result type must be bool")
View Source
var ErrStateEmptySource = errors.New("gstatemachines: state source invalid")
View Source
var ErrStateEmptyTarget = errors.New("gstatemachines: state target invalid or actions is empty")
View Source
var ErrStateInvalid = errors.New("gstatemachines: state invalid")
View Source
var ErrStateNotExist = errors.New("gstatemachines: state not exist")
View Source
var ErrStateSkip = errors.New("gstatemachines: state skip")
View Source
var ErrTransitionAllNotSatisfied = errors.New("gstatemachines: transition all not satisfied")
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct { BizStater Id string Desc string Transitions []*Transition // contains filtered or unexported fields }
type StateMachine ¶
type StateMachine struct { Definition *StateMachineDefinition // contains filtered or unexported fields }
func (*StateMachine) CurState ¶
func (sm *StateMachine) CurState() *State
type StateMachineDSL ¶
type StateMachineDefinition ¶
type StateMachineDefinition struct { Name string Version string StartStateId string Id2State map[string]*State Transitions []*Transition }
func ToStateMachineDefinition ¶
func ToStateMachineDefinition(dsl string, id2BaseState map[string]BizStater) (*StateMachineDefinition, error)
func (StateMachineDefinition) PlainUML ¶ added in v1.0.9
func (d StateMachineDefinition) PlainUML() string
type StateTransitionDSL ¶ added in v1.0.9
Click to show internal directories.
Click to hide internal directories.