From aa005892ff3025adee6b93fe67e3b1c3f980fb9a Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 9 Apr 2020 10:59:58 -0700 Subject: [PATCH] doc(routing): document count Count == 0 now means that we search for an unbounded number of providers. --- routing/routing.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routing/routing.go b/routing/routing.go index c707805..807f968 100644 --- a/routing/routing.go +++ b/routing/routing.go @@ -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)