reset

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupMachine

func CleanupMachine(log *slog.Logger, machineName string) phases.Task

CleanupMachine returns a composite task that removes all artifacts of an nspawn machine: its nspawn configuration, rootfs, and applied config.

func CleanupRoutes

func CleanupRoutes(log *slog.Logger) phases.Task

CleanupRoutes returns a task that removes policy routing rules and flushes routing tables used by unbounded-net WireGuard gateways.

func ReloadSystemd

func ReloadSystemd(log *slog.Logger) phases.Task

ReloadSystemd returns a task that runs systemctl daemon-reload to pick up unit file changes made by other reset tasks.

func RemoveAgentArtifacts

func RemoveAgentArtifacts(log *slog.Logger) phases.Task

RemoveAgentArtifacts returns a task that removes the agent binary, install script, legacy uninstall script, config directory, and temp files.

func RemoveAppliedConfig

func RemoveAppliedConfig(log *slog.Logger, machineName string) phases.Task

RemoveAppliedConfig returns a task that removes the applied agent config file for the named machine. Errors are logged but do not fail the task.

func RemoveMachine

func RemoveMachine(log *slog.Logger, machineName string) phases.Task

RemoveMachine returns a task that removes the machine rootfs using machinectl and then force-removes the directory.

func RemoveNSpawnConfig

func RemoveNSpawnConfig(log *slog.Logger, machineName string) phases.Task

RemoveNSpawnConfig returns a task that removes the nspawn configuration file and the systemd service override directory for the named machine.

func RemoveNetworkInterfaces

func RemoveNetworkInterfaces(log *slog.Logger) phases.Task

RemoveNetworkInterfaces returns a task that removes all network interfaces created by unbounded-net: WireGuard interfaces (wg*), and tunnel/overlay interfaces (geneve0, vxlan0, ipip0, unbounded0, cbr0).

func RemoveWireGuardKeys

func RemoveWireGuardKeys(log *slog.Logger) phases.Task

RemoveWireGuardKeys returns a task that removes WireGuard private and public key files from /etc/wireguard.

func StopDaemon

func StopDaemon(log *slog.Logger) phases.Task

StopDaemon returns a task that stops, disables, and removes the unbounded-agent-daemon systemd unit. Errors from stop and disable are logged but do not fail the task since the unit may not be present.

func StopMachine

func StopMachine(log *slog.Logger, machineName string) phases.Task

StopMachine returns a task that stops the nspawn machine, waits for it to fully stop (up to 30 seconds), and force-terminates it if necessary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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