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 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 Peer ¶
type Peer struct {
Name string
Trust *trust.Level
FactExchanger bool
Endpoints []string
Basic bool
}
Peer represents the parsed info about a peer read from the config file
type PeerData ¶
type PeerData struct {
PublicKey string
Name string
Trust string
FactExchanger bool
Endpoints []string
Basic bool
}
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) IsBasic ¶ added in v0.5.0
IsBasic returns true if the peer is explicitly configured as a basic peer, or false otherwise
func (Peers) IsFactExchanger ¶ added in v0.3.1
IsFactExchanger returns true if the peer is configured 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 *bool
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.