dagspliter

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0, MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

type Box struct {
	/// CID of the roots of the *partial* DAGs contained in this Box.
	Roots []cid.Cid
	/// CIDs of the roots of the sub-DAGs excluded from the original DAGs
	/// (delimited by Roots). We don't keep track of which sub-DAG is being
	/// trimmed from which full DAG in Roots, so to obtain the *partial* DAGs
	/// one needs to walk each DAG in Roots checking if any of its links
	/// are contained here.
	External []cid.Cid
}

/ Box is a way of packing together *partial* DAGs to achieve a certain size / while generating the associated CAR file containing them. It is an / alternative to actual re-chunking the DAG nodes which can be expensive for / very large DAGs. A *partial* DAG is generated by excluding certain sub-DAGs / from it.

func (*Box) MarshalCBOR

func (t *Box) MarshalCBOR(w io.Writer) error

func (*Box) UnmarshalCBOR

func (t *Box) UnmarshalCBOR(r io.Reader) error

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder(dserv ipld.DAGService, chunksize uint64, minSubgraphSize uint64) *Builder

func (*Builder) Boxes

func (b *Builder) Boxes() []*Box

func (*Builder) Pack

func (b *Builder) Pack(ctx context.Context, root cid.Cid) error

Jump to

Keyboard shortcuts

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