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

package ipfsadd

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

Package ipfsadd is a simplified copy of go-ipfs/core/coreunix/add.go


Package Files


type Adder Uses

type Adder struct {
    Out       chan *api.AddedOutput
    Progress  bool
    Trickle   bool
    RawLeaves bool
    Silent    bool
    NoCopy    bool
    Chunker   string

    CidBuilder cid.Builder

    // Cluster: ipfs does a hack in commands/add.go to set the filenames
    // in emitted events correctly. We carry a root folder name (or a
    // filename in the case of single files here and emit those events
    // correctly from the beginning).
    OutputPrefix string
    // contains filtered or unexported fields

Adder holds the switches passed to the `add` command.

func NewAdder Uses

func NewAdder(ctx context.Context, ds ipld.DAGService) (*Adder, error)

NewAdder Returns a new Adder used for a file add operation.

func (*Adder) AddAllAndPin Uses

func (adder *Adder) AddAllAndPin(file files.Node) (ipld.Node, error)

AddAllAndPin adds the given request's files and pin them. Cluster: we don'pin. Former AddFiles.

func (*Adder) PinRoot Uses

func (adder *Adder) PinRoot(root ipld.Node) error

PinRoot recursively pins the root node of Adder and writes the pin state to the backing datastore. Cluster: we don't pin. Former Finalize().

func (*Adder) SetMfsRoot Uses

func (adder *Adder) SetMfsRoot(r *mfs.Root)

SetMfsRoot sets `r` as the root for Adder.

Package ipfsadd imports 19 packages (graph) and is imported by 1 packages. Updated 2020-05-12. Refresh now. Tools for package owners.