internal

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package internal contains all the actual logic of the project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, log logr.Logger, service *service.Service) error

Run loads the wgpeer configuration from credentials and runs Run on it.

Types

type Configuration added in v0.0.5

type Configuration struct {
	// IfaceName if the wireguard interface we are managing.
	IfaceName string `yaml:"ifaceName"`
	// Peers is the set of peers this node wants to communicate with.
	Peers []peer.Peer `yaml:"peers"`
	// contains filtered or unexported fields
}

Configuration is the unmarshalled form of the configuration file and contains all information of this node that are required for wgpeer.

func (*Configuration) Loop added in v0.0.5

func (c *Configuration) Loop(ctx context.Context, log logr.Logger) error

Loop updates the wireguard configuration until the given ctx is cancelled.

func (*Configuration) Run added in v0.0.5

func (c *Configuration) Run(ctx context.Context, log logr.Logger, service *service.Service) error

Run performs configuration of the local wireguard instance according to the configuration file at configPath.

Directories

Path Synopsis
Package netlink contains code that interacts with the generic linux netlink.
Package netlink contains code that interacts with the generic linux netlink.
Package peer handles the matching of data in this project.
Package peer handles the matching of data in this project.

Jump to

Keyboard shortcuts

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