Documentation
¶
Overview ¶
Package agent holds the awg-agent daemon's startup/run logic, shared by every agent binary regardless of which service.Backend it drives. The kernel build (cmd/awg-agent) uses the default netlink/amneziawg-dkms backend; a userspace build (cmd/awg-agent-userspace) calls service.SetBackend before Run to swap in an amneziawg-go backend. Everything below the backend — config, storage, the HTTP API, metrics, the storage watcher and graceful shutdown — is identical, so it lives here once instead of being duplicated per main.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(version string)
Run parses the agent's configuration from the environment and runs the daemon until it receives SIGINT/SIGTERM, then shuts down gracefully. version is the build-stamped version string (see each main's -ldflags). The link backend must already be selected (service.SetBackend) before calling Run; the default is the kernel/amneziawg-dkms backend.
Types ¶
This section is empty.