@cryptotaxi247 / kubo / commits / c73493e9f

interface docs for merkledag

License: MIT Signed-off-by: ForrestWeston <forrest@protocol.ai>

ForrestWeston committed Jan 22, 2018 at 14:49 UTC c73493e9f3d52f46a1ece8172199a4040afb33a1
1 file changed +4
merkledag/merkledag.go
+4
@@ -27,14 +27,18 @@ var ErrNotFound = fmt.Errorf("merkledag: not found")
27
28 // DAGService is an IPFS Merkle DAG service.
29 type DAGService interface {
30 + // Add adds the node to the DAGService
31 Add(node.Node) (*cid.Cid, error)
32 + // Get gets the node the from the DAGService
33 Get(context.Context, *cid.Cid) (node.Node, error)
34 + // Remove removes the node from the DAGService
35 Remove(node.Node) error
36
37 // GetMany returns a channel of NodeOption given
38 // a set of CIDs.
39 GetMany(context.Context, []*cid.Cid) <-chan *NodeOption
40
41 + // Batch is a buffer for batching adds to a dag.
42 Batch() *Batch
43
44 LinkService