generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 138
routing/http: add support for GetClosestPeers (IPIP-476) #1021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hsanjuan
wants to merge
17
commits into
main
Choose a base branch
from
feat/1004-get-closest-peers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
220a690
Unexport private constant
hsanjuan f7788a7
routing/http/server: add support for GetClosestPeers
hsanjuan 5d4e99e
routing/http/client: add support for GetClosestPeers
hsanjuan d52bcb1
routing/http/contentrouter: add support for GetClosestPeers
hsanjuan 0264929
fix: use 'closer-than' query parameter for spec compliance
lidel 39432b9
fix: use correct variable in error message for closer-than parameter
lidel 384effb
docs: improve GetClosestPeers godoc and use amino constant
lidel d53886a
refactor: rename ContentRouter to DelegatedRouter
lidel 0a8bc14
GetClosestPeers(): remove closer-than and timeout parameters.
hsanjuan ce702e0
examples: go mod tidy
hsanjuan bdb5505
Address review
hsanjuan cd7be90
Merge remote-tracking branch 'origin/main' into feat/1004-get-closest…
hsanjuan 07e74fb
Routing: GetClosestPeers: replace peer.ID argument with CID
hsanjuan 5162f7c
Merge remote-tracking branch 'origin/main' into feat/1004-get-closest…
hsanjuan 713b7c0
routing/http: accept CID or PeerID for GetClosestPeers
lidel ce6837e
docs: add GetClosestPeers changes to CHANGELOG
lidel 3256401
fix(routing/http): correct method name in getClosestPeersJSON logging
lidel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be the only use case of
routinghelpers.DHTRouter(introduced in libp2p/go-libp2p-routing-helpers#93). The kubo PR isn't using it.Since
Client(above) implementsGetClosestPeers()it should be enough, I don't think we need aDHTRouterinterface.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It breaks consistency? do we need a ReadyAbleRouter etc? IUUC the contentRouter is not a Client, but a Router implementation, the problem being that Router doesn't have a unified interface, which is ugly, but placing this new interface in a different place than the others is also weird.