Documentation
¶
Overview ¶
Package config loads controller settings from flags and SYNCLOUD_* environment variables.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// DataDir holds the SQLite database and all controller state.
DataDir string
// Listen is the address the API and dashboard listen on.
Listen string
// AgentListen is where the agent gateway (gRPC, mTLS) listens.
AgentListen string
// AgentAdvertise is the gateway address given to joining nodes. In production
// this is the controller's WireGuard IP (10.90.0.1:7443, §8).
AgentAdvertise string
// PublicHTTP and PublicHTTPS are Traefik's public entrypoints
// (":80"/":443"; dev serves HTTP on 127.0.0.1:8080, HTTPS still on :443).
PublicHTTP string
PublicHTTPS string
// PublicValkey is Traefik's entrypoint for public Valkey databases
// (TLS, routed by SNI; Phase 12e).
PublicValkey string
// PublicPostgres is Traefik's entrypoint for public PostgreSQL databases
// (STARTTLS, routed by SNI; Phase 13).
PublicPostgres string
// PublicPorts is the range public TCP/UDP service ports are assigned
// from ("20000-20999"; Phase 15c).
PublicPorts string
// PostgresImage overrides PostgreSQL images per major version
// ("18=img,17=img").
PostgresImage string
// TraefikAdmin serves Traefik's ping and metrics on loopback.
TraefikAdmin string
// SystemTasks runs the platform components on ctl-0 (D20). Off in tests.
SystemTasks bool
// BaseDomain is set on first start when no base domain is stored (§5.0.2).
// Without it the controller uses <public-ip>.sslip.io, or in dev mode
// <its address>.sslip.io (the agent advertise IP or the default-route address).
BaseDomain string
// PublicIP overrides public IP detection.
PublicIP string
// ACME issues real certificates (default on outside dev mode).
ACME bool
ACMEDirectory string
ACMEEmail string
// ACMECAFile is an extra CA bundle trusted for the ACME server (e.g. Pebble in tests).
ACMECAFile string
// ControllerSchedulable lets the controller node run services (D3).
ControllerSchedulable bool
// RegistryPullHost overrides the registry host nodes pull "@registry/…"
// images from (default: registry.<base-domain>).
RegistryPullHost string
// RegistryInsecure makes builds push over plain HTTP (default: dev only).
RegistryInsecure bool
// BuildNode pins Git builds to one node by name (default: any node).
BuildNode string
// VictoriaLogsURL is where container logs are stored (the system task).
VictoriaLogsURL string
// VictoriaMetricsURL stores metrics such as uptime checks (the system task).
VictoriaMetricsURL string
// Firewall manages each node's host firewall (§8.3).
Firewall bool
// SecurityGroups isolates containers with security groups (§8.3).
SecurityGroups bool
// CentralProbes checks every task from the controller (§5.6).
CentralProbes bool
// DownloadsDir holds agent and CLI binaries served to joining nodes.
DownloadsDir string
// ShellImage and ShellSynctl configure Cloud Shell (§7.1).
ShellImage string
ShellSynctl string
// ReleaseURL and ReleaseChannel are where upgrades come from (§5.0.1);
// UpgradeSettle is how long a new controller must stay healthy.
ReleaseURL string
ReleaseChannel string
UpgradeSettle time.Duration
// Dev enables development behavior (verbose logs, relaxed origin checks for the Vite dev server).
Dev bool
}
func LoadController ¶
func LoadController(args []string) (Controller, error)
LoadController parses args (without the program name). Environment variables provide defaults; flags override them.
func (Controller) DBPath ¶
func (c Controller) DBPath() string