From 4f148ce71eb27f0bdc9e2907590d8c0055bda1ac Mon Sep 17 00:00:00 2001 From: flub Date: Mon, 2 Dec 2024 10:51:58 +0000 Subject: [PATCH] deploy: ec0da0ddb9aea6618cf11b98fb6f9dd07303a798 --- .../discovery/dns/struct.DnsDiscovery.html | 2 +- pr/2983/docs/iroh/discovery/index.html | 9 ++--- .../pkarr/dht/struct.DhtDiscovery.html | 2 +- .../pkarr/struct.PkarrPublisher.html | 4 +-- .../discovery/pkarr/struct.PkarrResolver.html | 2 +- .../struct.StaticProvider.html | 2 +- .../discovery/struct.ConcurrentDiscovery.html | 14 ++++---- .../iroh/discovery/struct.DiscoveryItem.html | 4 +-- .../docs/iroh/discovery/trait.Discovery.html | 10 +++--- .../iroh_relay/server/struct.QuicConfig.html | 4 +-- pr/2983/docs/src/iroh/discovery.rs.html | 34 ++++++++++++++++--- pr/2983/docs/src/iroh_relay/server.rs.html | 4 +-- 12 files changed, 58 insertions(+), 33 deletions(-) diff --git a/pr/2983/docs/iroh/discovery/dns/struct.DnsDiscovery.html b/pr/2983/docs/iroh/discovery/dns/struct.DnsDiscovery.html index 2cdc4b2e75..44bb58759e 100644 --- a/pr/2983/docs/iroh/discovery/dns/struct.DnsDiscovery.html +++ b/pr/2983/docs/iroh/discovery/dns/struct.DnsDiscovery.html @@ -26,7 +26,7 @@
§< &self, ep: Endpoint, node_id: NodeId -) -> Option<BoxStream<Result<DiscoveryItem>>>
Resolves the AddrInfo for the given NodeId. Read more
source§

fn publish(&self, _info: &AddrInfo)

Publishes the given AddrInfo to the discovery mechanism. Read more
source§

fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

Subscribe to all addresses that get passively discovered. Read more

Auto Trait Implementations§

§

impl Freeze for DnsDiscovery

§

impl RefUnwindSafe for DnsDiscovery

§

impl Send for DnsDiscovery

§

impl Sync for DnsDiscovery

§

impl Unpin for DnsDiscovery

§

impl UnwindSafe for DnsDiscovery

Blanket Implementations§

source§

impl<T> Any for T
where +) -> Option<BoxStream<Result<DiscoveryItem>>>

Resolves the AddrInfo for the given NodeId. Read more
source§

fn publish(&self, _info: &AddrInfo)

Publishes the given AddrInfo to the discovery mechanism. Read more
source§

fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

Subscribe to all addresses that get passively discovered. Read more

Auto Trait Implementations§

§

impl Freeze for DnsDiscovery

§

impl RefUnwindSafe for DnsDiscovery

§

impl Send for DnsDiscovery

§

impl Sync for DnsDiscovery

§

impl Unpin for DnsDiscovery

§

impl UnwindSafe for DnsDiscovery

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2983/docs/iroh/discovery/index.html b/pr/2983/docs/iroh/discovery/index.html index e4ad655da7..4c6a7806ff 100644 --- a/pr/2983/docs/iroh/discovery/index.html +++ b/pr/2983/docs/iroh/discovery/index.html @@ -1,4 +1,4 @@ -iroh::discovery - Rust

Module iroh::discovery

source ·
Expand description

Node address discovery.

+iroh::discovery - Rust

Module iroh::discovery

source ·
Expand description

Node address discovery.

To connect to an iroh node a NodeAddr is needed, which may contain a RelayUrl or one or more direct addresses in addition to the NodeId.

Since there is a conversion from NodeId to NodeAddr, you can also use @@ -28,8 +28,7 @@ using HTTP.

  • -

    The LocalSwarmDiscovery discovers iroh nodes present on the local network, -very similar to mdNS.

    +
           very similar to mDNS.
  • The DhtDiscovery also uses the pkarr system but can also publish and lookup @@ -58,7 +57,9 @@

    §Examples

    .discovery(Box::new(discovery)) .bind() .await?;
  • -

    To also enable LocalSwarmDiscovery, it can be added as another service in the +

    To also enable +LocalSwarmDiscovery +it can be added as another service in the ConcurrentDiscovery:

    let discovery = ConcurrentDiscovery::from_services(vec![
    diff --git a/pr/2983/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html b/pr/2983/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html
    index 362c7b8fe5..4055e101e3 100644
    --- a/pr/2983/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html
    +++ b/pr/2983/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html
    @@ -9,7 +9,7 @@
         &self,
         _endpoint: Endpoint,
         node_id: NodeId
    -) -> Option<Boxed<Result<DiscoveryItem>>>

    Resolves the AddrInfo for the given NodeId. Read more
    source§

    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

    Subscribe to all addresses that get passively discovered. Read more

    Auto Trait Implementations§

    §

    impl Freeze for DhtDiscovery

    §

    impl !RefUnwindSafe for DhtDiscovery

    §

    impl Send for DhtDiscovery

    §

    impl Sync for DhtDiscovery

    §

    impl Unpin for DhtDiscovery

    §

    impl !UnwindSafe for DhtDiscovery

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +) -> Option<Boxed<Result<DiscoveryItem>>>

    Resolves the AddrInfo for the given NodeId. Read more
    source§

    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

    Subscribe to all addresses that get passively discovered. Read more

    Auto Trait Implementations§

    §

    impl Freeze for DhtDiscovery

    §

    impl !RefUnwindSafe for DhtDiscovery

    §

    impl Send for DhtDiscovery

    §

    impl Sync for DhtDiscovery

    §

    impl Unpin for DhtDiscovery

    §

    impl !UnwindSafe for DhtDiscovery

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2983/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html b/pr/2983/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html index 13bff820ac..32261ec189 100644 --- a/pr/2983/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html +++ b/pr/2983/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html @@ -28,11 +28,11 @@ server is used instead.

    source

    pub fn update_addr_info(&self, info: &AddrInfo)

    Publishes AddrInfo about this node to a pkarr relay.

    This is a nonblocking function, the actual update is performed in the background.

    -

    Trait Implementations§

    source§

    impl Clone for PkarrPublisher

    source§

    fn clone(&self) -> PkarrPublisher

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PkarrPublisher

    source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Discovery for PkarrPublisher

    source§

    fn publish(&self, info: &AddrInfo)

    Publishes the given AddrInfo to the discovery mechanism. Read more
    source§

    fn resolve( +

    Trait Implementations§

    source§

    impl Clone for PkarrPublisher

    source§

    fn clone(&self) -> PkarrPublisher

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PkarrPublisher

    source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Discovery for PkarrPublisher

    source§

    fn publish(&self, info: &AddrInfo)

    Publishes the given AddrInfo to the discovery mechanism. Read more
    source§

    fn resolve( &self, _endpoint: Endpoint, _node_id: NodeId -) -> Option<BoxStream<Result<DiscoveryItem>>>

    Resolves the AddrInfo for the given NodeId. Read more
    source§

    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

    Subscribe to all addresses that get passively discovered. Read more
    source§

    impl Drop for PkarrPublisher

    source§

    fn drop(&mut self)

    Executes the destructor for this type. Read more

    Auto Trait Implementations§

    §

    impl Freeze for PkarrPublisher

    §

    impl !RefUnwindSafe for PkarrPublisher

    §

    impl Send for PkarrPublisher

    §

    impl Sync for PkarrPublisher

    §

    impl Unpin for PkarrPublisher

    §

    impl !UnwindSafe for PkarrPublisher

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +) -> Option<BoxStream<Result<DiscoveryItem>>>

    Resolves the AddrInfo for the given NodeId. Read more
    source§

    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

    Subscribe to all addresses that get passively discovered. Read more
    source§

    impl Drop for PkarrPublisher

    source§

    fn drop(&mut self)

    Executes the destructor for this type. Read more

    Auto Trait Implementations§

    §

    impl Freeze for PkarrPublisher

    §

    impl !RefUnwindSafe for PkarrPublisher

    §

    impl Send for PkarrPublisher

    §

    impl Sync for PkarrPublisher

    §

    impl Unpin for PkarrPublisher

    §

    impl !UnwindSafe for PkarrPublisher

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2983/docs/iroh/discovery/pkarr/struct.PkarrResolver.html b/pr/2983/docs/iroh/discovery/pkarr/struct.PkarrResolver.html index 427292ee93..6af91926e6 100644 --- a/pr/2983/docs/iroh/discovery/pkarr/struct.PkarrResolver.html +++ b/pr/2983/docs/iroh/discovery/pkarr/struct.PkarrResolver.html @@ -15,7 +15,7 @@ &self, _ep: Endpoint, node_id: NodeId -) -> Option<BoxStream<'static, Result<DiscoveryItem>>>

    Resolves the AddrInfo for the given NodeId. Read more
    source§

    fn publish(&self, _info: &AddrInfo)

    Publishes the given AddrInfo to the discovery mechanism. Read more
    source§

    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

    Subscribe to all addresses that get passively discovered. Read more

    Auto Trait Implementations§

    §

    impl Freeze for PkarrResolver

    §

    impl !RefUnwindSafe for PkarrResolver

    §

    impl Send for PkarrResolver

    §

    impl Sync for PkarrResolver

    §

    impl Unpin for PkarrResolver

    §

    impl !UnwindSafe for PkarrResolver

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +) -> Option<BoxStream<'static, Result<DiscoveryItem>>>

    Resolves the AddrInfo for the given NodeId. Read more
    source§

    fn publish(&self, _info: &AddrInfo)

    Publishes the given AddrInfo to the discovery mechanism. Read more
    source§

    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

    Subscribe to all addresses that get passively discovered. Read more

    Auto Trait Implementations§

    §

    impl Freeze for PkarrResolver

    §

    impl !RefUnwindSafe for PkarrResolver

    §

    impl Send for PkarrResolver

    §

    impl Sync for PkarrResolver

    §

    impl Unpin for PkarrResolver

    §

    impl !UnwindSafe for PkarrResolver

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2983/docs/iroh/discovery/static_provider/struct.StaticProvider.html b/pr/2983/docs/iroh/discovery/static_provider/struct.StaticProvider.html index ca4ef17938..9faabe5631 100644 --- a/pr/2983/docs/iroh/discovery/static_provider/struct.StaticProvider.html +++ b/pr/2983/docs/iroh/discovery/static_provider/struct.StaticProvider.html @@ -29,7 +29,7 @@ &self, _endpoint: Endpoint, node_id: NodeId -) -> Option<Boxed<Result<DiscoveryItem>>>

    Resolves the AddrInfo for the given NodeId. Read more
    source§

    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

    Subscribe to all addresses that get passively discovered. Read more

    Auto Trait Implementations§

    §

    impl Freeze for StaticProvider

    §

    impl RefUnwindSafe for StaticProvider

    §

    impl Send for StaticProvider

    §

    impl Sync for StaticProvider

    §

    impl Unpin for StaticProvider

    §

    impl UnwindSafe for StaticProvider

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +) -> Option<Boxed<Result<DiscoveryItem>>>

    Resolves the AddrInfo for the given NodeId. Read more
    source§

    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

    Subscribe to all addresses that get passively discovered. Read more

    Auto Trait Implementations§

    §

    impl Freeze for StaticProvider

    §

    impl RefUnwindSafe for StaticProvider

    §

    impl Send for StaticProvider

    §

    impl Sync for StaticProvider

    §

    impl Unpin for StaticProvider

    §

    impl UnwindSafe for StaticProvider

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2983/docs/iroh/discovery/struct.ConcurrentDiscovery.html b/pr/2983/docs/iroh/discovery/struct.ConcurrentDiscovery.html index ebbe05621d..9c6ccb75d8 100644 --- a/pr/2983/docs/iroh/discovery/struct.ConcurrentDiscovery.html +++ b/pr/2983/docs/iroh/discovery/struct.ConcurrentDiscovery.html @@ -1,14 +1,14 @@ -ConcurrentDiscovery in iroh::discovery - Rust

    Struct iroh::discovery::ConcurrentDiscovery

    source ·
    pub struct ConcurrentDiscovery { /* private fields */ }
    Expand description

    A discovery service that combines multiple discovery sources.

    +ConcurrentDiscovery in iroh::discovery - Rust

    Struct iroh::discovery::ConcurrentDiscovery

    source ·
    pub struct ConcurrentDiscovery { /* private fields */ }
    Expand description

    A discovery service that combines multiple discovery sources.

    The discovery services will resolve concurrently.

    -

    Implementations§

    source§

    impl ConcurrentDiscovery

    source

    pub fn empty() -> Self

    Creates an empty ConcurrentDiscovery.

    -
    source

    pub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self

    Creates a new ConcurrentDiscovery.

    -
    source

    pub fn add(&mut self, service: impl Discovery + 'static)

    Adds a Discovery service.

    -

    Trait Implementations§

    source§

    impl Debug for ConcurrentDiscovery

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ConcurrentDiscovery

    source§

    fn default() -> ConcurrentDiscovery

    Returns the “default value” for a type. Read more
    source§

    impl Discovery for ConcurrentDiscovery

    source§

    fn publish(&self, info: &AddrInfo)

    Publishes the given AddrInfo to the discovery mechanism. Read more
    source§

    fn resolve( +

    Implementations§

    source§

    impl ConcurrentDiscovery

    source

    pub fn empty() -> Self

    Creates an empty ConcurrentDiscovery.

    +
    source

    pub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self

    Creates a new ConcurrentDiscovery.

    +
    source

    pub fn add(&mut self, service: impl Discovery + 'static)

    Adds a Discovery service.

    +

    Trait Implementations§

    source§

    impl Debug for ConcurrentDiscovery

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ConcurrentDiscovery

    source§

    fn default() -> ConcurrentDiscovery

    Returns the “default value” for a type. Read more
    source§

    impl Discovery for ConcurrentDiscovery

    source§

    fn publish(&self, info: &AddrInfo)

    Publishes the given AddrInfo to the discovery mechanism. Read more
    source§

    fn resolve( &self, endpoint: Endpoint, node_id: NodeId -) -> Option<BoxStream<Result<DiscoveryItem>>>

    Resolves the AddrInfo for the given NodeId. Read more
    source§

    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

    Subscribe to all addresses that get passively discovered. Read more
    source§

    impl<T> From<T> for ConcurrentDiscovery
    where - T: IntoIterator<Item = Box<dyn Discovery>>,

    source§

    fn from(iter: T) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +) -> Option<BoxStream<Result<DiscoveryItem>>>

    Resolves the AddrInfo for the given NodeId. Read more
    source§

    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

    Subscribe to all addresses that get passively discovered. Read more
    source§

    impl<T> From<T> for ConcurrentDiscovery
    where + T: IntoIterator<Item = Box<dyn Discovery>>,

    source§

    fn from(iter: T) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2983/docs/iroh/discovery/struct.DiscoveryItem.html b/pr/2983/docs/iroh/discovery/struct.DiscoveryItem.html index ed19fe20bd..409d990c8f 100644 --- a/pr/2983/docs/iroh/discovery/struct.DiscoveryItem.html +++ b/pr/2983/docs/iroh/discovery/struct.DiscoveryItem.html @@ -1,4 +1,4 @@ -DiscoveryItem in iroh::discovery - Rust

    Struct iroh::discovery::DiscoveryItem

    source ·
    pub struct DiscoveryItem {
    +DiscoveryItem in iroh::discovery - Rust

    Struct iroh::discovery::DiscoveryItem

    source ·
    pub struct DiscoveryItem {
         pub node_id: NodeId,
         pub provenance: &'static str,
         pub last_updated: Option<u64>,
    @@ -10,7 +10,7 @@
     
    §last_updated: Option<u64>

    Optional timestamp when this node address info was last updated.

    Must be microseconds since the unix epoch.

    §addr_info: AddrInfo

    The address info for the node being resolved.

    -

    Trait Implementations§

    source§

    impl Clone for DiscoveryItem

    source§

    fn clone(&self) -> DiscoveryItem

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DiscoveryItem

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +

    Trait Implementations§

    source§

    impl Clone for DiscoveryItem

    source§

    fn clone(&self) -> DiscoveryItem

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DiscoveryItem

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2983/docs/iroh/discovery/trait.Discovery.html b/pr/2983/docs/iroh/discovery/trait.Discovery.html index 2625e816ef..ce623283b5 100644 --- a/pr/2983/docs/iroh/discovery/trait.Discovery.html +++ b/pr/2983/docs/iroh/discovery/trait.Discovery.html @@ -1,4 +1,4 @@ -Discovery in iroh::discovery - Rust

    Trait iroh::discovery::Discovery

    source ·
    pub trait Discovery: Debug + Send + Sync {
    +Discovery in iroh::discovery - Rust

    Trait iroh::discovery::Discovery

    source ·
    pub trait Discovery: Debug + Send + Sync {
         // Provided methods
         fn publish(&self, _info: &AddrInfo) { ... }
         fn resolve(
    @@ -18,19 +18,19 @@
     

    To allow for discovery, the super::Endpoint will call publish whenever discovery information changes. If a discovery mechanism requires a periodic refresh, it should start its own task.

    -

    Provided Methods§

    source

    fn publish(&self, _info: &AddrInfo)

    Publishes the given AddrInfo to the discovery mechanism.

    +

    Provided Methods§

    source

    fn publish(&self, _info: &AddrInfo)

    Publishes the given AddrInfo to the discovery mechanism.

    This is fire and forget, since the Endpoint can not wait for successful publishing. If publishing is async, the implementation should start it’s own task.

    This will be called from a tokio task, so it is safe to spawn new tasks. These tasks will be run on the runtime of the super::Endpoint.

    -
    source

    fn resolve( +

    source

    fn resolve( &self, _endpoint: Endpoint, _node_id: NodeId ) -> Option<BoxStream<Result<DiscoveryItem>>>

    Resolves the AddrInfo for the given NodeId.

    Once the returned [BoxStream] is dropped, the service should stop any pending work.

    -
    source

    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

    Subscribe to all addresses that get passively discovered.

    +
    source

    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

    Subscribe to all addresses that get passively discovered.

    An implementation may choose to defer emitting passively discovered nodes until the stream is actually polled. To avoid missing discovered nodes, poll the stream as soon as possible.

    @@ -47,4 +47,4 @@

    The crate::endpoint::Endpoint will subscribe to the discovery system and add the discovered addresses to the internal address book as they arrive on this stream.

    -

    Implementors§

    source§

    impl Discovery for DnsDiscovery

    source§

    impl Discovery for LocalSwarmDiscovery

    Available on crate feature discovery-local-network only.
    source§

    impl Discovery for DhtDiscovery

    Available on crate feature discovery-pkarr-dht only.
    source§

    impl Discovery for PkarrPublisher

    source§

    impl Discovery for PkarrResolver

    source§

    impl Discovery for StaticProvider

    source§

    impl Discovery for ConcurrentDiscovery

    \ No newline at end of file +

    Implementors§

    source§

    impl Discovery for DnsDiscovery

    source§

    impl Discovery for LocalSwarmDiscovery

    Available on crate feature discovery-local-network only.
    source§

    impl Discovery for DhtDiscovery

    Available on crate feature discovery-pkarr-dht only.
    source§

    impl Discovery for PkarrPublisher

    source§

    impl Discovery for PkarrResolver

    source§

    impl Discovery for StaticProvider

    source§

    impl Discovery for ConcurrentDiscovery

    \ No newline at end of file diff --git a/pr/2983/docs/iroh_relay/server/struct.QuicConfig.html b/pr/2983/docs/iroh_relay/server/struct.QuicConfig.html index c30f5fab39..a462014ba9 100644 --- a/pr/2983/docs/iroh_relay/server/struct.QuicConfig.html +++ b/pr/2983/docs/iroh_relay/server/struct.QuicConfig.html @@ -5,8 +5,8 @@

    Fields§

    §bind_addr: SocketAddr

    The socket address on which the QUIC server should bind.

    Normally you’d chose port 7842, see crate::defaults::DEFAULT_RELAY_QUIC_PORT.

    §server_config: ServerConfig

    The TLS server configuration for the QUIC server.

    -

    If this [rustls::ServerConfig] does not support -TLS 1.3, the QUIC server will fail at [QuicServer::spawn].

    +

    If this [rustls::ServerConfig] does not support TLS 1.3, the QUIC server will fail +to spawn.

    Trait Implementations§

    source§

    impl Debug for QuicConfig

    source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/2983/docs/src/iroh/discovery.rs.html b/pr/2983/docs/src/iroh/discovery.rs.html index 3b912a5739..dc20987c23 100644 --- a/pr/2983/docs/src/iroh/discovery.rs.html +++ b/pr/2983/docs/src/iroh/discovery.rs.html @@ -882,6 +882,18 @@ 882 883 884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896
    //! Node address discovery.
     //!
     //! To connect to an iroh node a [`NodeAddr`] is needed, which may contain a
    @@ -915,9 +927,12 @@
     //! - The [`PkarrResolver`] which can perform lookups from designated [pkarr relay servers]
     //!   using HTTP.
     //!
    -//! - The [`LocalSwarmDiscovery`] discovers iroh nodes present on the local network,
    -//!   very similar to mdNS.
    -//!
    +#![cfg_attr(
    +    feature = "discovery-local-network",
    +    doc = "- [`LocalSwarmDiscovery`]: local_swarm_discovery::LocalSwarmDiscovery
    +             very similar to mDNS."
    +)]
    +//!
     //! - The [`DhtDiscovery`] also uses the [`pkarr`] system but can also publish and lookup
     //!   records to/from the Mainline DHT.
     //!
    @@ -951,7 +966,13 @@
     //! # }
     //! ```
     //!
    -//! To also enable [`LocalSwarmDiscovery`], it can be added as another service in the
    +//! To also enable
    +#![cfg_attr(feature = "discovery-local-network", doc = "[`LocalSwarmDiscovery`]")]
    +#![cfg_attr(
    +    not(feature = "discovery-local-network"),
    +    doc = "`LocalSwarmDiscovery`"
    +)]
    +//! it can be added as another service in the
     //! [`ConcurrentDiscovery`]:
     //!
     //! ```no_run
    @@ -981,9 +1002,12 @@
     //! [Number 0]: https://n0.computer
     //! [`PkarrResolver`]: pkarr::PkarrResolver
     //! [`PkarrPublisher`]: pkarr::PkarrPublisher
    -//! [`LocalSwarmDiscovery`]: local_swarm_discovery::LocalSwarmDiscovery
     //! [`DhtDiscovery`]: pkarr::dht::DhtDiscovery
     //! [pkarr relay servers]: https://pkarr.org/#servers
    +#![cfg_attr(
    +    feature = "discovery-local-network",
    +    doc = "[`LocalSwarmDiscovery`]: local_swarm_discovery::LocalSwarmDiscovery"
    +)]
     
     use std::time::Duration;
     
    diff --git a/pr/2983/docs/src/iroh_relay/server.rs.html b/pr/2983/docs/src/iroh_relay/server.rs.html
    index 2b53e56624..1ce1c7ab90 100644
    --- a/pr/2983/docs/src/iroh_relay/server.rs.html
    +++ b/pr/2983/docs/src/iroh_relay/server.rs.html
    @@ -1241,8 +1241,8 @@
         pub bind_addr: SocketAddr,
         /// The TLS server configuration for the QUIC server.
         ///
    -    /// If this [`rustls::ServerConfig`] does not support
    -    /// TLS 1.3, the QUIC server will fail at [`QuicServer::spawn`].
    +    /// If this [`rustls::ServerConfig`] does not support TLS 1.3, the QUIC server will fail
    +    /// to spawn.
         pub server_config: rustls::ServerConfig,
     }