config

package
v0.0.0-...-dc44bb0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIServerEndpoint   string
	APIServerPassword   string
	APIServerPrivateIP  string
	APIServerPublicKey  string
	APIServerURL        string
	ConfigDir           string
	DeviceIPv4          string `envconfig:"DEVICEIP"` // Not changing to v4 yet as it's configured in config files on disk all around
	DeviceIPv6          string
	EnableRouting       bool
	LogLevel            string
	Name                string
	PrivateKey          string
	PrometheusAddr      string
	PrometheusPublicKey string
	PrometheusTunnelIP  string
	WireGuardConfigPath string
	WireGuardIPv4       *netip.Prefix `ignored:"true"`
	WireGuardIPv6       *netip.Prefix `ignored:"true"`
	AutoEnroll          bool
}

func DefaultConfig

func DefaultConfig() Config

func (*Config) Parse

func (c *Config) Parse() error

func (Config) StaticPeers

func (c Config) StaticPeers() []wireguard.Peer

func (Config) ValidateWireGuard

func (c Config) ValidateWireGuard() error

Jump to

Keyboard shortcuts

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