state

package
v0.1.0-proto2b Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseStateMachine

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

func NewBaseStateMachine

func NewBaseStateMachine(initial string, allowed map[string][]string) *BaseStateMachine

func (*BaseStateMachine) GetState

func (sm *BaseStateMachine) GetState() string

func (*BaseStateMachine) OnTransition

func (sm *BaseStateMachine) OnTransition(f TransitionFunc)

func (*BaseStateMachine) TransitionTo

func (sm *BaseStateMachine) TransitionTo(newState string) error

type TransitionFunc

type TransitionFunc func(from, to string)

Jump to

Keyboard shortcuts

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