state

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

package state implements thread safe state machine which represents Cluster Agent overall progress on k8s bootstrap

Index

Constants

This section is empty.

Variables

View Source
var ErrIncorrectActionRequest = errors.New("incorrect ActionRequest")

Functions

This section is empty.

Types

type Active

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

func (*Active) Deregister

func (s *Active) Deregister() error

func (*Active) Register

func (s *Active) Register() error

func (*Active) State

func (s *Active) State() string

type Deregistering

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

func (*Deregistering) Deregister

func (s *Deregistering) Deregister() error

func (*Deregistering) Register

func (s *Deregistering) Register() error

func (*Deregistering) State

func (s *Deregistering) State() string

type Inactive

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

func (*Inactive) Deregister

func (s *Inactive) Deregister() error

func (*Inactive) Register

func (s *Inactive) Register() error

func (*Inactive) State

func (s *Inactive) State() string

type InstallInProgress

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

func (*InstallInProgress) Deregister

func (s *InstallInProgress) Deregister() error

func (*InstallInProgress) Register

func (s *InstallInProgress) Register() error

func (*InstallInProgress) State

func (s *InstallInProgress) State() string

type Registering

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

func (*Registering) Deregister

func (s *Registering) Deregister() error

func (*Registering) Register

func (s *Registering) Register() error

func (*Registering) State

func (s *Registering) State() string

type State

type State interface {
	Register() error
	Deregister() error
	State() string
}

type StateMachine

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

StateMachine represents Cluster Agent overall progress. It can be found here http://edge-node.app.intel.com/docs/implementation-designs/bare_metal_agents/cluster-agent-design/#cluster-agent-state-machine ERROR should be used to indicate persistent errors from which CA can't recover

func New

func New(ctx context.Context, c *comms.Client, guid string, accessTokenPath string, execute func(ctx context.Context, command string) error) *StateMachine

func (*StateMachine) Deregister

func (sm *StateMachine) Deregister() error

func (*StateMachine) Register

func (sm *StateMachine) Register() error

func (*StateMachine) State

func (sm *StateMachine) State() string

type UninstallInProgress

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

func (*UninstallInProgress) Deregister

func (s *UninstallInProgress) Deregister() error

func (*UninstallInProgress) Register

func (s *UninstallInProgress) Register() error

func (*UninstallInProgress) State

func (s *UninstallInProgress) State() string

Jump to

Keyboard shortcuts

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