pub struct EndpointConfig { /* private fields */ }Expand description
Iroh endpoint configuration.
Controls the relay servers and discovery services for the endpoint. Each value defaults to the Radicle infrastructure but can be overridden via environment variable. Both accept a comma-separated list, so a deployment can name more than one server for redundancy. Iroh relays through the fastest of the given relays and falls back to the others, but it publishes to and resolves from every pkarr server:
IROH_RELAYS— relay hosts, each served overhttps://. Default:eu-1.relay.iroh.radicle.garden,1.eu.relay.iroh.radicle.network,1.us.relay.iroh.radicle.networkIROH_PKARR_URLS— pkarr server URLs, used for both publishing and resolving. Default:https://dns.iroh.radicle.garden/pkarr,https://1.eu.dns.iroh.radicle.network/pkarr,https://1.us.dns.iroh.radicle.network/pkarr
Implementations§
Source§impl EndpointConfig
impl EndpointConfig
Sourcepub fn pkarr_urls(&self) -> &[Url]
pub fn pkarr_urls(&self) -> &[Url]
Pkarr server URLs the endpoint publishes to and resolves from.
Sourcepub fn from_env() -> Result<Self, Error>
pub fn from_env() -> Result<Self, Error>
Build an EndpointConfig from the IROH_RELAYS and
IROH_PKARR_URLS environment variables, falling back to the Radicle
defaults when a variable is unset or empty. A value that is malformed, or
that lists no entries, fails here so Preset::apply can consume the
parsed values directly.