This repository was archived by the owner on Jun 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
chore: update content and peer routing interfaces removing peer-info #43
Merged
vasco-santos
merged 3 commits into
v0.3.x
from
chore/update-content-and-peer-routing-interfaces-removing-peer-info
Apr 17, 2020
Merged
chore: update content and peer routing interfaces removing peer-info #43
vasco-santos
merged 3 commits into
v0.3.x
from
chore/update-content-and-peer-routing-interfaces-removing-peer-info
Apr 17, 2020
Conversation
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
BREAKING CHANGE: content-routing and peer-routing APIs return an object with relevant properties instead of peer-info
This was referenced Apr 7, 2020
jacobheun
suggested changes
Apr 16, 2020
src/content-routing/README.md
Outdated
|
||
### `.provide` | ||
- `findProviders(peerId)` |
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.
Suggested change
- `findProviders(peerId)` | |
- `findProviders(cid)` |
src/content-routing/README.md
Outdated
|
||
It returns an `AsyncIterable` containing the identification and addresses of the peers providing the given key, as follows: | ||
|
||
`AsyncIterable<{ id: CID, addrs: Multiaddr[] }>` |
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.
Should this be a PeerId?
Suggested change
`AsyncIterable<{ id: CID, addrs: Multiaddr[] }>` | |
`AsyncIterable<{ id: PeerId, addrs: Multiaddr[] }>` |
src/peer-routing/README.md
Outdated
key is a multihash | ||
**Returns** | ||
|
||
It returns a the `peer-id` [cid](https://github.com/multiformats/js-cid) together with the known peers [multiaddrs](https://github.com/multiformats/js-multiaddr), as follows: |
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 is confusing. Is it a PeerId or CID? Shouldn't it be a PeerId?
jacobheun
approved these changes
Apr 16, 2020
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.
1 correction, otherwise this LGTM
Co-Authored-By: Jacob Heun <[email protected]>
jacobheun
pushed a commit
that referenced
this pull request
Apr 21, 2020
…43) * chore: update content and peer routing interfaces removing peer-info BREAKING CHANGE: content-routing and peer-routing APIs return an object with relevant properties instead of peer-info
jacobheun
pushed a commit
that referenced
this pull request
Jun 5, 2020
…43) * chore: update content and peer routing interfaces removing peer-info BREAKING CHANGE: content-routing and peer-routing APIs return an object with relevant properties instead of peer-info
jacobheun
pushed a commit
that referenced
this pull request
Jun 5, 2020
…43) * chore: update content and peer routing interfaces removing peer-info BREAKING CHANGE: content-routing and peer-routing APIs return an object with relevant properties instead of peer-info
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
In the context of deprecating
peer-info
as described on libp2p/js-libp2p#589, this PR removes thepeer-info
usage on thecontent-routing
andpeer-routing
interfaces.findPeer
Returns
Promise<{ id: CID, addrs: Multiaddr[] }>
instead of aPeerInfo
findProviders
Returns
AsyncIterable<{ id: CID, addrs: Multiaddr[] }>
instead ofAsyncIterable<PeerInfo>
BREAKING CHANGE: content-routing and peer-routing APIs return an object with relevant properties instead of peer-info