wgconfig

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package wgconfig converts protobuf Configuration types to wgtypes.Config and applies them via wgctrl.Client.ConfigureDevice().

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyConfig

func ApplyConfig(ctx context.Context, ifaceName string, cfg *pb.Configuration) error

ApplyConfig configures the named WireGuard device with the given configuration. Peers not in cfg are removed. Existing peers are updated in place, so their sessions survive the update.

func BuildConfig

func BuildConfig(cfg *pb.Configuration, current []wgtypes.Peer) (*wgtypes.Config, error)

BuildConfig converts a protobuf Configuration into a wgtypes.Config that turns the current peers into the desired ones without replacing all peers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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