agentstate

package
v1.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package agentstate centralizes access to local persisted agent state.

Index

Constants

View Source
const (
	MetadataKeyBackendBaseURL = "backend_base_url"
	MetadataKeySAKToken       = "sak_token"
	MetadataKeyEnrolledAt     = "enrolled_at"
	MetadataKeyNodeGroup      = "node_group"
	MetadataKeyComputeZone    = "compute_zone"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State interface {
	GetBackendBaseURL(ctx context.Context) (value string, ok bool, err error)
	SetBackendBaseURL(ctx context.Context, value string) error

	GetJWT(ctx context.Context) (value string, ok bool, err error)
	SetJWT(ctx context.Context, value string) error

	GetSAK(ctx context.Context) (value string, ok bool, err error)
	SetSAK(ctx context.Context, value string) error

	GetNodeUUID(ctx context.Context) (value string, ok bool, err error)
	SetNodeUUID(ctx context.Context, value string) error

	GetEnrollmentTime(ctx context.Context) (value time.Time, ok bool, err error)
	SetEnrollmentTime(ctx context.Context, value time.Time) error

	GetNodeGroup(ctx context.Context) (value string, ok bool, err error)
	SetNodeGroup(ctx context.Context, value string) error

	GetComputeZone(ctx context.Context) (value string, ok bool, err error)
	SetComputeZone(ctx context.Context, value string) error
}

State provides local persisted metadata/state access for backend workflows.

func NewSQLite

func NewSQLite() State

NewSQLite returns a State backed by the agent sqlite metadata database.

Jump to

Keyboard shortcuts

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