agent

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package agent runs the in-cluster continuous loop: collect → evaluate per target → ClusterReadiness CRD status (always) → push snapshot to the server on content change. The agent's local value never depends on server availability (spec §3).

Index

Constants

This section is empty.

Variables

View Source
var AgentVersion = "dev"

AgentVersion is stamped into CRD status and push envelopes. The CLI sets it from the build version; "dev" otherwise.

Functions

func Run

Run executes the continuous loop until ctx is canceled (returns nil — a cancel is a graceful stop, not an error). The first tick runs immediately; later ticks fire every Interval ±10% jitter. Tick errors are logged and counted, never fatal: the loop never dies on a tick error.

Types

type Config

type Config struct {
	Interval       time.Duration // default 10m, min 1m
	ServerURL      string        // optional; "" = CRD-only mode
	ServerToken    string        // bearer for push
	ClusterName    string        // human label sent to server; default = ClusterID
	CRName         string        // default crd.DefaultName
	TeamLabel      string        // default "team"
	ForceSyncEvery time.Duration // default 1h: push even if hash unchanged
}

Jump to

Keyboard shortcuts

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