agent

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL