feat(iroh)!: add MdnsDiscoveryBuilder::service_name method#3482
Merged
Conversation
added 2 commits
September 29, 2025 22:13
This commit also narrows down the options to create an `MdnsDiscovery` service. Now you must use `MdnsDiscovery::builder` to create an `MdnsDiscoveryBuilder`, then use the `build()` method to create the `MdnsDiscovery` service. This also changes the default service name to `irohv1` as well as changing the provenance name to simply `mdns`.
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3482/docs/iroh/ Last updated: 2025-09-30T16:14:28Z |
… errors and panics
Frando
approved these changes
Sep 30, 2025
Contributor
no strong preference from my side |
Member
|
I think |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Changes the default service name to
irohv1as well as changing the provenance name to simplymdns.Adds an
MdnsDiscoveryBuilder::service_namemethod to allow users to use their own service name for their mDNS records.This commit also narrows down the options to create an
MdnsDiscoveryservice. Now you can only useMdnsDiscovery::builder(orMdnsDiscoveryBuilder::default()) to create anMdnsDiscoveryBuilder, then use thebuild()method to create theMdnsDiscoveryservice.closes #3184
Breaking Changes
MdnsDiscovery::newis now privateMdnsDiscoveryBuilder::newis now privateMdnsDiscovery::builder()to create anMdnsDiscoveryBuilderMdnsDiscoveryBuilder::default()to create anMdnsDiscoveryBuilderMdnsDiscoveryBuilder::service_name()iroh.local.swarmtoirohv1DiscoveryItemchanged fromlocal.swarm.discoverytomdnsNotes & open questions
irohv1or isiroh.v1prettier 😂 ?MdnsDiscovery::newmethod from the public API, so there are only two ways to build anMdnsDiscoverynow, which are:My question is: is
MdnsDiscovery::builder().build()too ugly? Or am I just being extra in not loving it? Should I add theMdnsDiscovery::new()method back?Change checklist