pub struct Config {
pub http: Option<HttpConfig>,
pub https: Option<HttpsConfig>,
pub dns: DnsConfig,
pub metrics: Option<MetricsConfig>,
pub mainline: Option<MainlineConfig>,
pub zone_store: Option<StoreConfig>,
pub pkarr_put_rate_limit: RateLimitConfig,
pub data_dir: Option<PathBuf>,
}Expand description
Server configuration
The config is usually loaded from a file with Self::load.
The struct also implements Default which creates a config suitable for local development
and testing.
Fields§
§http: Option<HttpConfig>Config for the HTTP server
If set to None no HTTP server will be started.
https: Option<HttpsConfig>Config for the HTTPS server
If set to None no HTTPS server will be started.
dns: DnsConfigConfig for the DNS server.
metrics: Option<MetricsConfig>Config for the metrics server.
The metrics server is started by default. To disable the metrics server, set to
Some(MetricsConfig::disabled()).
mainline: Option<MainlineConfig>Config for the mainline lookup.
zone_store: Option<StoreConfig>Config for the zone store.
pkarr_put_rate_limit: RateLimitConfigConfig for pkarr rate limit
data_dir: Option<PathBuf>Location where all data of iroh-dns-server is stored.
If unset, will use IROH_DNS_DATA_DIR environment variable if set,
and otherwise a iroh-dns directory in the host system’s data directory.