Documentation
¶
Overview ¶
Package doctor implements `wg-guard doctor` (docs/operations/runbook.md): read-only environment and state checks with actionable remedies, plus `--fix` which re-runs the boot repairs (interface reconciliation, nftables, tc, sysctls) through the same orchestration `serve` uses. The fix path refuses to run while the service is up — it would race the serialized reconciler for the AWG subprocess.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendInspector ¶
BackendInspector is the read-only runtime surface used by diagnostics. Docker deployments provide an inspector backed by the running container, while repair orchestration retains its independently selected Backend.
type Deps ¶
type Deps struct {
Cfg *config.Config
ConfigPath string
DB *database.DB
Reg *settings.Registry
Ring *secrets.KeyRing
Backend tunnel.Backend
Inspector BackendInspector
Run subprocess.Runner
Shaper *shaper.Manager
Log *slog.Logger
// Fix applies the safe boot repairs after the read-only pass.
Fix bool
// ServiceUp lets the caller pre-check whether the node is serving
// (the fix path refuses when it is).
ServiceUp bool
}
Deps wires the doctor. DB/Reg may be nil where a check cannot run.