Commit 33803890 authored by Steven Allen's avatar Steven Allen

dag: move GetMany from DAGService to NodeGetter

This will allow many consumers of `DAGService` to take `NodeGetter` instead and
implementing `GetMany` for all `NodeGetter`s is pretty trivial.
parent 2f52265e
......@@ -22,6 +22,9 @@ type NodeGetter interface {
// machine; consider setting a deadline in the context.
Get(context.Context, *cid.Cid) (Node, error)
// GetMany returns a channel of NodeOptions given a set of CIDs.
GetMany(context.Context, []*cid.Cid) <-chan *NodeOption
// TODO(ipfs/go-ipfs#4009): Remove this method after fixing.
// OfflineNodeGetter returns an version of this NodeGetter that will
......@@ -70,9 +73,6 @@ type DAGService interface {
// If the node is not in this DAG, Remove returns ErrNotFound.
Remove(*cid.Cid) error
// GetMany returns a channel of NodeOptions given a set of CIDs.
GetMany(context.Context, []*cid.Cid) <-chan *NodeOption
// AddMany adds many nodes to this DAG.
//
// Consider using NewBatch instead of calling this directly if you need
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment