tar

package
v0.4.14-rc3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package tar provides functionality to write a unixfs merkledag as a tar archive.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	Dag  ipld.DAGService
	TarW *tar.Writer
	// contains filtered or unexported fields
}

Writer is a utility structure that helps to write unixfs merkledag nodes as a tar archive format. It wraps any io.Writer.

func NewWriter

func NewWriter(ctx context.Context, dag ipld.DAGService, archive bool, compression int, w io.Writer) (*Writer, error)

NewWriter wraps given io.Writer.

func (*Writer) Close

func (w *Writer) Close() error

Close closes the tar writer.

func (*Writer) WriteNode

func (w *Writer) WriteNode(nd ipld.Node, fpath string) error

WriteNode adds a node to the archive.

Jump to

Keyboard shortcuts

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