diff --git a/pr/3523/docs/iroh/discovery/index.html b/pr/3523/docs/iroh/discovery/index.html
index 0502e589f6..3a283feb90 100644
--- a/pr/3523/docs/iroh/discovery/index.html
+++ b/pr/3523/docs/iroh/discovery/index.html
@@ -12,7 +12,7 @@ information. Usually this means publishing which Discovery trait is used to define node discovery. This allows multiple
implementations to co-exist because there are many possible ways to implement this.
Each Endpoint can use the discovery mechanisms most suitable to the application.
-The Builder::add_discovery method is used to add a discovery mechanism to an
+The Builder::discovery method is used to add a discovery mechanism to an
Endpoint.
Some generally useful discovery implementations are provided:
To use multiple discovery systems simultaneously you can call Builder::add_discovery.
+
To use multiple discovery systems simultaneously you can call Builder::discovery.
This will use ConcurrentDiscovery under the hood, which performs lookups to all
discovery systems at the same time.
Builder::add_discovery takes any type that implements IntoDiscovery. You can
+
Builder::discovery takes any type that implements IntoDiscovery. You can
implement that trait on a builder struct if your discovery service needs information
from the endpoint it is mounted on. During endpoint construction, your discovery service
is built by calling IntoDiscovery::into_discovery, passing a DiscoveryContext to your
builder. The DiscoveryContext gives access to the endpoint’s secret key and DNS resolver.
If your discovery service does not need any information from its endpoint, you can
-pass the discovery service directly to Builder::add_discovery: All types that
+pass the discovery service directly to Builder::discovery: All types that
implement Discovery also have a blanket implementation of IntoDiscovery.
A very common setup is to enable DNS discovery, which needs to be done in two parts as a
@@ -60,16 +60,16 @@ implement let ep = Endpoint::builder()
- .add_discovery(PkarrPublisher::n0_dns())
- .add_discovery(DnsDiscovery::n0_dns())
+ .discovery(PkarrPublisher::n0_dns())
+ .discovery(DnsDiscovery::n0_dns())
.bind()
.await?;
To also enable MdnsDiscovery it can be added as another service.#[cfg(feature = "discovery-local-network")]
let ep = Endpoint::builder()
- .add_discovery(PkarrPublisher::n0_dns())
- .add_discovery(DnsDiscovery::n0_dns())
- .add_discovery(MdnsDiscovery::builder())
+ .discovery(PkarrPublisher::n0_dns())
+ .discovery(DnsDiscovery::n0_dns())
+ .discovery(MdnsDiscovery::builder())
.bind()
.await?;Modules§
wasm_browserdiscovery-local-networkStructs§
Endpoint for discovery services.Discovery services.UserData::MAX_LENGTH bytes.Enums§
Traits§
super::Endpoint.Discovery.