ipfsadd

package
v0.12.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2019 License: Apache-2.0, MIT Imports: 18 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adder

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

	CidBuilder cid.Builder
	// contains filtered or unexported fields
}

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

func NewAdder

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

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

func (*Adder) AddAllAndPin added in v0.12.0

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 added in v0.12.0

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

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

SetMfsRoot sets `r` as the root for Adder.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL