statemachine

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StateMachine

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

func New

func New(
	ctx context.Context,
	transitions map[state.EventType]Transitions,
	initialState state.State,
	statusUpdates chan<- *pb.AgentStatus,
	logger logrus.FieldLogger,
) *StateMachine

func (*StateMachine) Run

func (sm *StateMachine) Run(ctx context.Context)

func (*StateMachine) SendEvent

func (sm *StateMachine) SendEvent(e state.EventWithSpan)

type Transitions

type Transitions struct {
	Target  state.State
	Sources []state.State
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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