iroh_net::dns

Type Alias DnsResolver

Source
pub type DnsResolver = TokioAsyncResolver;
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
Expand description

The DNS resolver type used throughout iroh-net.

Aliased Type§

struct DnsResolver { /* private fields */ }

Trait Implementations§

Source§

impl ResolverExt for DnsResolver

Source§

async fn lookup_ipv4_ipv6<N: IntoName + Clone>( &self, host: N, timeout: Duration, ) -> Result<impl Iterator<Item = IpAddr>>

👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate

Resolve IPv4 and IPv6 in parallel.

LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is not usable on the stack, so we manually query both lookups concurrently and time them out individually.

Source§

async fn lookup_by_name(&self, name: &str) -> Result<NodeAddr>

👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate

Looks up node info by DNS name.

The resource records returned for name must either contain an node_info::IROH_TXT_NAME TXT record or be a CNAME record that leads to an node_info::IROH_TXT_NAME TXT record.

Source§

async fn lookup_by_id(&self, node_id: &NodeId, origin: &str) -> Result<NodeAddr>

👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate

Looks up node info by NodeId and origin domain name.

Source§

async fn lookup_ipv4_staggered<N: IntoName + Clone>( &self, host: N, timeout: Duration, delays_ms: &[u64], ) -> Result<impl Iterator<Item = IpAddr>>

👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate

Perform an ipv4 lookup with a timeout in a staggered fashion.

From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The result of the first successful call is returned, or a summary of all errors otherwise.

Source§

async fn lookup_ipv6_staggered<N: IntoName + Clone>( &self, host: N, timeout: Duration, delays_ms: &[u64], ) -> Result<impl Iterator<Item = IpAddr>>

👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate

Perform an ipv6 lookup with a timeout in a staggered fashion.

From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The result of the first successful call is returned, or a summary of all errors otherwise.

Source§

async fn lookup_ipv4_ipv6_staggered<N: IntoName + Clone>( &self, host: N, timeout: Duration, delays_ms: &[u64], ) -> Result<impl Iterator<Item = IpAddr>>

👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate

Race an ipv4 and ipv6 lookup with a timeout in a staggered fashion.

From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a summary of all errors otherwise.

Source§

async fn lookup_by_name_staggered( &self, name: &str, delays_ms: &[u64], ) -> Result<NodeAddr>

👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate

Looks up node info by DNS name in a staggered fashion.

From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a summary of all errors otherwise.

Source§

async fn lookup_by_id_staggered( &self, node_id: &NodeId, origin: &str, delays_ms: &[u64], ) -> Result<NodeAddr>

👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate

Looks up node info by NodeId and origin domain name.

From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a summary of all errors otherwise.

Source§

async fn lookup_ipv4<N: IntoName>( &self, host: N, timeout: Duration, ) -> Result<impl Iterator<Item = IpAddr>>

👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
Perform an ipv4 lookup with a timeout.
Source§

async fn lookup_ipv6<N: IntoName>( &self, host: N, timeout: Duration, ) -> Result<impl Iterator<Item = IpAddr>>

👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
Perform an ipv6 lookup with a timeout.