Documentation
¶
Index ¶
Constants ¶
const ChattyFlag = "chatty"
ChattyFlag is the name of the setting to enable chatty mode
const ConfigPathFlag = "config-path"
ConfigPathFlag is the name of the setting for the config file base path
const DebugFlag = "debug"
DebugFlag enables debug logging
const DumpConfigFlag = "dump"
DumpConfigFlag is the name of the flag to request config dumping
const IfaceFlag = "iface"
IfaceFlag is the name of the flag to set the wireguard interface to use
const RouterAuto = "auto"
RouterAuto is the magic string for the Router config entry to request auto-detection
const RouterFlag = "router"
RouterFlag is the name of the flag to set router mode
Variables ¶
This section is empty.
Functions ¶
func CreateTrustEvaluator ¶
CreateTrustEvaluator maps a peer config map into an evaluator that returns the configured trust levels
Types ¶
type PeerData ¶
type PeerData struct {
PublicKey string
Name string
Trust string
FactExchanger bool
Endpoints []string
}
PeerData represents the raw data to configure a peer read from the config file
type Peers ¶
Peers represents a set of peer configs, with handy access methods that avoid boiler plate for peers that are not configured
func (Peers) IsFactExchanger ¶ added in v0.3.1
IsFactExchanger returns true if the peer is configred as a FactExchanger
type Server ¶
type Server struct {
Iface string
Port int
IsRouter bool
Chatty bool
ReportIfaces []string
HideIfaces []string
Peers Peers
Debug bool
}
Server describes the configuration for the server, after parsing from various sources
type ServerData ¶ added in v0.3.0
type ServerData struct {
Iface string
Port int
Router string
Chatty bool
Peers []PeerData
ReportIfaces []string
HideIfaces []string
Debug bool
Dump bool
// contains filtered or unexported fields
}
ServerData represents the raw data from the config for the server, before it is cleaned up into a `Server` config object.