Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-core
Commits
aa005892
Commit
aa005892
authored
Apr 09, 2020
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc(routing): document count
Count == 0 now means that we search for an unbounded number of providers.
parent
2159f6a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
routing/routing.go
routing/routing.go
+3
-1
No files found.
routing/routing.go
View file @
aa005892
...
...
@@ -30,6 +30,9 @@ type ContentRouting interface {
Provide
(
context
.
Context
,
cid
.
Cid
,
bool
)
error
// Search for peers who are able to provide a given key
//
// When count is 0, this method will return an unbounded number of
// results.
FindProvidersAsync
(
context
.
Context
,
cid
.
Cid
,
int
)
<-
chan
peer
.
AddrInfo
}
...
...
@@ -37,7 +40,6 @@ type ContentRouting interface {
// This can be implemented by a simple lookup table, a tracking server,
// or even a DHT.
type
PeerRouting
interface
{
// Find specific Peer
// FindPeer searches for a peer with given ID, returns a peer.AddrInfo
// with relevant addresses.
FindPeer
(
context
.
Context
,
peer
.
ID
)
(
peer
.
AddrInfo
,
error
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment