state

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventType

type EventType string
const (
	EventWaitForExternalEvent EventType = "WaitForExternalEvent"
	EventLogin                EventType = "Login"
	EventAuthenticated        EventType = "Authenticated"
	EventBootstrapped         EventType = "Bootstrapped"
	EventDisconnect           EventType = "Disconnect"
)

type EventWithSpan

type EventWithSpan struct {
	Event EventType
	Span  trace.Span
}

func SpanEvent

func SpanEvent(ctx context.Context, e EventType) EventWithSpan

func (EventWithSpan) String

func (e EventWithSpan) String() string

type Lifecycle

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

func NewLifecycle

func NewLifecycle(ctx context.Context, state State) *Lifecycle

func (*Lifecycle) Enter

func (s *Lifecycle) Enter(out chan<- EventWithSpan)

func (*Lifecycle) Exit

func (s *Lifecycle) Exit()

func (*Lifecycle) IsState

func (s *Lifecycle) IsState(state State) bool

func (*Lifecycle) Status

func (s *Lifecycle) Status() *pb.AgentStatus

func (*Lifecycle) String

func (s *Lifecycle) String() string

type State

type State interface {
	Enter(context.Context) EventWithSpan
	String() string
	Status() *pb.AgentStatus
}

Jump to

Keyboard shortcuts

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