enrollment

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package enrollment registers an agent with the FallBCK server using a one-time token

Index

Constants

View Source
const ConfigFileName = "agent.yaml"

ConfigFileName is the agent configuration file inside the data directory

Variables

View Source
var AgentVersion = "0.1.0"

AgentVersion is reported to the server at enrollment; set by the agent binary

Functions

func Enroll added in v0.6.0

func Enroll(ctx context.Context, o Options) (*config.AgentConfig, error)

Enroll exchanges a one-time enrollment token for an agent identity and bearer token, and writes agent.yaml (and an optional server CA bundle) into the data directory. Operator settings already present in an existing agent.yaml (db_backup, TLS options) are preserved.

func EnrollAgent

func EnrollAgent(ctx context.Context, serverURL, token, dataDir string) (*config.AgentConfig, error)

EnrollAgent enrolls a filesystem agent (see Enroll)

Types

type Options added in v0.6.0

type Options struct {
	ServerURL string
	Token     string
	// DataDir receives agent.yaml; default: the type's default data directory
	DataDir string
	// AgentType is config.AgentTypeFilesystem (default) or config.AgentTypeDatabase
	AgentType string
	// Version reported to the server (default AgentVersion)
	Version string
	// Hostname overrides the reported hostname (e.g. k8s-<cluster>); default os.Hostname()
	Hostname string
}

Options parameterise an enrollment

Jump to

Keyboard shortcuts

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