Documentation
¶
Index ¶
- Constants
- Variables
- func EnsurePublicSetup(nodeID pkg.Identifier, inf *pkg.PublicConfig) (*netlink.Bridge, error)
- func GetPublicSetup() (pkg.PublicConfig, error)
- func HasPublicSetup() bool
- func IPs() ([]net.IPNet, error)
- func LoadPublicConfig() (*pkg.PublicConfig, error)
- func NewWireguard(name string) (wg *wireguard.Wireguard, err error)
- func SavePublicConfig(cfg pkg.PublicConfig) error
- func SetPersistence(path string)
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 LoadPublicConfig ¶ added in v0.5.5
func LoadPublicConfig() (*pkg.PublicConfig, error)
LoadPublicConfig loads public config from file
func NewWireguard ¶
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.
Click to show internal directories.
Click to hide internal directories.