Skip to content

Commit

Permalink
providers: add some docs
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Łukasz Magiera <[email protected]>
  • Loading branch information
magik6k committed Jun 25, 2018
1 parent d59cbe7 commit 981daa7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,17 @@ type blockRequest struct {
Ctx context.Context
}

// Interface defines providers interface to libp2p routing system
// Interface is an abstraction on top of the libp2p content routing which
// optimizes common content routing tasks
type Interface interface {
// Provide a block to the network. Calls to this method are usually
// non-blocking with back-pressure which might happen under load
Provide(k *cid.Cid) error

// ProvideRecursive provides graph to the network. Calls to this method are
// usually non-blocking with back-pressure which might happen under load
//
// Note: only call this method with offline NodeGetter.
ProvideRecursive(ctx context.Context, n ipld.Node, serv ipld.NodeGetter) error

FindProviders(ctx context.Context, k *cid.Cid) error
Expand Down

0 comments on commit 981daa7

Please sign in to comment.