pub struct Builder { /* private fields */ }
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
Available on crate feature
discovery-pkarr-dht
only.Expand description
Builder for DhtDiscovery
.
By default, publishing to the DHT is enabled, and relay publishing is disabled.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn client(self, client: PkarrClient) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn client(self, client: PkarrClient) -> Self
Explicitly sets the pkarr client to use.
Sourcepub fn secret_key(self, secret_key: SecretKey) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn secret_key(self, secret_key: SecretKey) -> Self
Sets the secret key to use for signing the DNS packets.
Without a secret key, the node will not publish its address to the DHT.
Sourcepub fn ttl(self, ttl: u32) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn ttl(self, ttl: u32) -> Self
Sets the time-to-live value for the DNS packets.
Sourcepub fn pkarr_relay(self, pkarr_relay: Url) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn pkarr_relay(self, pkarr_relay: Url) -> Self
Sets the pkarr relay URL to use.
Sourcepub fn n0_dns_pkarr_relay(self) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn n0_dns_pkarr_relay(self) -> Self
Uses the default number 0 pkarr relay URL.
Sourcepub fn dht(self, dht: bool) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn dht(self, dht: bool) -> Self
Sets whether to publish to the Mainline DHT.
Sourcepub fn include_direct_addresses(self, include_direct_addresses: bool) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn include_direct_addresses(self, include_direct_addresses: bool) -> Self
Sets whether to include the direct addresses in the DNS packet.
Sourcepub fn initial_publish_delay(self, initial_publish_delay: Duration) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn initial_publish_delay(self, initial_publish_delay: Duration) -> Self
Sets the initial delay before the first publish.
Sourcepub fn republish_delay(self, republish_delay: Duration) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn republish_delay(self, republish_delay: Duration) -> Self
Sets the republish delay for the DHT.
Sourcepub fn build(self) -> Result<DhtDiscovery>
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn build(self) -> Result<DhtDiscovery>
Builds the discovery mechanism.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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