ipfs-cluster: github.com/ipfs/ipfs-cluster/adder/single Index | Files

package single

import "github.com/ipfs/ipfs-cluster/adder/single"

Package single implements a ClusterDAGService that chunks and adds content to cluster without sharding, before pinning it.


Package Files


type DAGService Uses

type DAGService struct {
    // contains filtered or unexported fields

DAGService is an implementation of an adder.ClusterDAGService which puts the added blocks directly in the peers allocated to them (without sharding).

func New Uses

func New(rpc *rpc.Client, opts api.PinOptions, local bool) *DAGService

New returns a new Adder with the given rpc Client. The client is used to perform calls to IPFS.BlockPut and Pin content on Cluster.

func (*DAGService) Add Uses

func (dgs *DAGService) Add(ctx context.Context, node ipld.Node) error

Add puts the given node in the destination peers.

func (*DAGService) AddMany Uses

func (dgs *DAGService) AddMany(ctx context.Context, nodes []ipld.Node) error

AddMany calls Add for every given node.

func (*DAGService) Finalize Uses

func (dgs *DAGService) Finalize(ctx context.Context, root cid.Cid) (cid.Cid, error)

Finalize pins the last Cid added to this DAGService.

Package single imports 8 packages (graph) and is imported by 2 packages. Updated 2020-06-07. Refresh now. Tools for package owners.