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
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
Click to show internal directories.
Click to hide internal directories.