public

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// PublicBridge public bridge name, exists only after a call to EnsurePublicSetup
	PublicBridge    = types.PublicBridge
	PublicNamespace = types.PublicNamespace
)

Variables

View Source
var ErrNoPublicConfig = errors.New("no public configuration")

ErrNoPublicConfig is the error returns by ReadPubIface when no public interface is configured

Functions

func EnsurePublicSetup

func EnsurePublicSetup(nodeID pkg.Identifier, inf *pkg.PublicConfig) (*netlink.Bridge, error)

EnsurePublicSetup create the public setup, it's okay to have inf == nil

func GetPublicSetup added in v0.5.5

func GetPublicSetup() (pkg.PublicConfig, error)

GetPublicSetup gets the public setup from reality or error if node has no public setup

func HasPublicSetup added in v0.5.5

func HasPublicSetup() bool

func IPs

func IPs() ([]net.IPNet, error)

IPs gets the public ips of the nodes

func LoadPublicConfig added in v0.5.5

func LoadPublicConfig() (*pkg.PublicConfig, error)

LoadPublicConfig loads public config from file

func NewWireguard

func NewWireguard(name string) (wg *wireguard.Wireguard, err error)

NewWireguard creates a new wireguard instance in public namespace if exits

func SavePublicConfig added in v0.5.5

func SavePublicConfig(cfg pkg.PublicConfig) error

SavePublicConfig stores public config in a file

func SetPersistence added in v0.5.5

func SetPersistence(path string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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