Documentation
¶
Overview ¶
Package config loads and validates the zatterad server configuration. Sources, in increasing precedence: built-in defaults → TOML file (/etc/zattera/config.toml or --config) → command-line flags (wired by the server command). The CLI has its own tiny config (internal/cli).
Index ¶
Constants ¶
View Source
const ( RoleControl = "control" RoleWorker = "worker" )
Role names a node can assume.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACMEConfig ¶
type Config ¶
type Config struct {
// NodeName defaults to the hostname.
NodeName string `toml:"node_name"`
// DataDir holds raft state, registry blobs, logs, TSDB, certs.
DataDir string `toml:"data_dir"`
// Roles: control, worker, or both.
Roles []string `toml:"roles"`
// Domain is the cluster app domain (apps get <app>-<env>.<domain>).
Domain string `toml:"domain"`
// Dev enables single-node developer mode: self-signed TLS, ACME off,
// mesh off, bootstrap admin token printed at first start.
Dev bool `toml:"dev"`
API APIConfig `toml:"api"`
Ingress IngressConfig `toml:"ingress"`
Registry RegistryConfig `toml:"registry"`
Mesh MeshConfig `toml:"mesh"`
ACME ACMEConfig `toml:"acme"`
Join JoinConfig `toml:"join"`
Raft RaftConfig `toml:"raft"`
Logs LogsConfig `toml:"logs"`
}
Config is the full zatterad configuration.
type IngressConfig ¶
type JoinConfig ¶
type LogsConfig ¶
type MeshConfig ¶
type MeshConfig struct {
// Disabled forces no mesh (implied in single-node dev mode).
Disabled bool `toml:"disabled"`
// ListenPort for WireGuard UDP.
ListenPort uint16 `toml:"listen_port"`
// Interface name (Linux). Darwin picks utunN automatically.
Interface string `toml:"interface"`
// PublicEndpoints this node is reachable at ("ip:port"); autodetected
// when empty and the node has a public address.
PublicEndpoints []string `toml:"public_endpoints"`
}
type RaftConfig ¶
type RaftConfig struct {
// Listen for raft transport (control nodes; bound to mesh IP or
// 127.0.0.1 in single-node).
Listen string `toml:"listen"`
}
type RegistryConfig ¶
Click to show internal directories.
Click to hide internal directories.