Help us shape the future of Go! Take the 2026 Go Developer Survey

core

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanTransition

func CanTransition(from, to State) bool

CanTransition returns whether transition from -> to is legal.

Types

type ErrInvalidTransition

type ErrInvalidTransition struct {
	From State
	To   State
}

ErrInvalidTransition indicates an invalid lifecycle transition.

func (ErrInvalidTransition) Error

func (e ErrInvalidTransition) Error() string

type State

type State string

State defines the agent lifecycle state contract.

const (
	StateInit      State = "init"
	StateReady     State = "ready"
	StateRunning   State = "running"
	StatePaused    State = "paused"
	StateCompleted State = "completed"
	StateFailed    State = "failed"
)

Jump to

Keyboard shortcuts

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