state_machine

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrChangeState = errors.New("change state error")

Functions

This section is empty.

Types

type StateMachine

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

StateMachine 无限状态机

func NewStateMachine

func NewStateMachine() *StateMachine

func (*StateMachine) ChangeState

func (x *StateMachine) ChangeState(from, to uint) error

func (*StateMachine) Register

func (x *StateMachine) Register(from, to *StateNode) error

type StateNode

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

func NewStateNode

func NewStateNode(state uint, desc string) *StateNode

Jump to

Keyboard shortcuts

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