state_machine

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 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 State added in v0.2.0

type State map[uint]State

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 uint)

Jump to

Keyboard shortcuts

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