mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 19:24:14 +08:00
interface docs for merkledag
License: MIT Signed-off-by: ForrestWeston <forrest@protocol.ai>
This commit is contained in:
@ -27,14 +27,18 @@ var ErrNotFound = fmt.Errorf("merkledag: not found")
|
|||||||
|
|
||||||
// DAGService is an IPFS Merkle DAG service.
|
// DAGService is an IPFS Merkle DAG service.
|
||||||
type DAGService interface {
|
type DAGService interface {
|
||||||
|
// Add adds the node to the DAGService
|
||||||
Add(node.Node) (*cid.Cid, error)
|
Add(node.Node) (*cid.Cid, error)
|
||||||
|
// Get gets the node the from the DAGService
|
||||||
Get(context.Context, *cid.Cid) (node.Node, error)
|
Get(context.Context, *cid.Cid) (node.Node, error)
|
||||||
|
// Remove removes the node from the DAGService
|
||||||
Remove(node.Node) error
|
Remove(node.Node) error
|
||||||
|
|
||||||
// GetMany returns a channel of NodeOption given
|
// GetMany returns a channel of NodeOption given
|
||||||
// a set of CIDs.
|
// a set of CIDs.
|
||||||
GetMany(context.Context, []*cid.Cid) <-chan *NodeOption
|
GetMany(context.Context, []*cid.Cid) <-chan *NodeOption
|
||||||
|
|
||||||
|
// Batch is a buffer for batching adds to a dag.
|
||||||
Batch() *Batch
|
Batch() *Batch
|
||||||
|
|
||||||
LinkService
|
LinkService
|
||||||
|
Reference in New Issue
Block a user