agent

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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