Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AgentID = "UNSET" SecretHex = "UNSET" ServerURL = "UNSET" CertFingerprintHex = "UNSET" SleepSecondsStr = "30" DNSDomainStr = "" )
These vars are injected at build time via -ldflags. Defaults are obviously invalid to fail fast if not injected.
Functions ¶
Types ¶
type Config ¶
type Config struct {
AgentID string
Secret []byte
ServerURL string
CertFingerprint []byte
SleepSeconds int
DNSDomain string
}
Config holds the decoded runtime config for the agent.
func LoadConfig ¶
LoadConfig decodes the ldflags-injected hex values into a Config. Returns an error if any required value is missing or malformed.
Click to show internal directories.
Click to hide internal directories.