sys

package
v0.0.0-...-53eedaf Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyRoutes

func ApplyRoutes(logger *zap.Logger, args ApplyRoutesArgs) (changed bool, err error)

ApplyRoutes takes a declarative speficiation of what the routes should be like, and interact with the system routing table to achieve that state.

Types

type ApplyRoutesArgs

type ApplyRoutesArgs struct {
	// Interface specifies the primary and VPN interfaces. Set to nil to auto
	// detect.
	Interfaces *InterfaceNames
	// VPNIPs is a list of IPs that should go through the VPN interface.
	VPNIPs []net.IP
}

ApplyRoutesArgs includes args needed to call ApplyRoutes. These arges specifies the desired final state that ApplyRoutes should achieve.

type InterfaceNames

type InterfaceNames struct {
	Primary string
	VPN     string
}

InterfaceNames contains two interface names.

Jump to

Keyboard shortcuts

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