Struct iroh_dns_server::config::Config
source · pub struct Config {
pub http: Option<HttpConfig>,
pub https: Option<HttpsConfig>,
pub dns: DnsConfig,
pub metrics: Option<MetricsConfig>,
pub mainline: Option<MainlineConfig>,
pub pkarr_put_rate_limit: RateLimitConfig,
}
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: DnsConfig
Config 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.
pkarr_put_rate_limit: RateLimitConfig
Config for pkarr rate limit
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more