Documentation
¶
Overview ¶
Package config holds Phase 3 daemon TOML settings (library layer; daemon owns persistence).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RestartRequiredKeys = []string{
"listen_addr", "quic_listen_addr", "bootstrap", "api_addr", "key_dir",
"disable_upnp", "fallback_host", "min_observed_peers",
"ice_signal_url", "ice_stun_urls", "ice_turn_urls", "ice_publish_turns",
}
RestartRequiredKeys lists config keys that need daemon restart after change.
Functions ¶
Types ¶
type Config ¶
type Config struct {
ListenAddr string `toml:"listen_addr" json:"listen_addr"`
QUICListenAddr string `toml:"quic_listen_addr" json:"quic_listen_addr"`
Bootstrap []string `toml:"bootstrap" json:"bootstrap"`
DisableUPnP bool `toml:"disable_upnp" json:"disable_upnp"`
FallbackHost string `toml:"fallback_host" json:"fallback_host"`
MinObservedPeers int `toml:"min_observed_peers" json:"min_observed_peers"`
APIAddr string `toml:"api_addr" json:"api_addr"`
APIToken string `toml:"api_token" json:"api_token"`
KeyDir string `toml:"key_dir" json:"key_dir"`
LogFormat string `toml:"log_format" json:"log_format"`
LogLevel string `toml:"log_level" json:"log_level"`
ICESignalURL string `toml:"ice_signal_url" json:"ice_signal_url"`
ICESTUNURLs []string `toml:"ice_stun_urls" json:"ice_stun_urls"`
ICETURNURLs []string `toml:"ice_turn_urls" json:"ice_turn_urls"`
ICEPublishTurns []string `toml:"ice_publish_turns" json:"ice_publish_turns"`
// AutoPublish controls whether the daemon publishes the node identity to the DHT
// on startup and on a schedule (default true). When false, the node stays off the DHT
// as a discoverable endpoint while still participating in routing.
AutoPublish bool `toml:"auto_publish" json:"auto_publish"`
}
Config is the a2ald configuration (spec Phase 3).
func Default ¶
func Default() Config
Default returns a copy with zero values filled to spec defaults.
func (*Config) KeyDirOrDefault ¶
KeyDirOrDefault returns the directory for node.key; empty KeyDir means <dataDir>/keys.
Click to show internal directories.
Click to hide internal directories.