trickle

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 8 Imported by: 39

Documentation

Overview

Package trickle allows to build trickle DAGs. In this type of DAG, non-leave nodes are first filled with data leaves, and then incorporate "layers" of subtrees as additional links.

Each layer is a trickle sub-tree and is limited by an increasing maximum depth. Thus, the nodes first layer can only hold leaves (depth 1) but subsequent layers can grow deeper. By default, this module places 4 nodes per layer (that is, 4 subtrees of the same maximum depth before increasing it).

Trickle DAGs are very good for sequentially reading data, as the first data leaves are directly reachable from the root and those coming next are always nearby. They are suited for things like streaming applications.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append deprecated

func Append(ctx context.Context, basen ipld.Node, db *h.DagBuilderHelper) (out ipld.Node, errOut error)

Append appends the data in `db` to the dag, using the Trickledag format

Deprecated: use github.com/ipfs/boxo/ipld/unixfs/importer/trickle.Append

func Layout deprecated

func Layout(db *h.DagBuilderHelper) (ipld.Node, error)

Layout builds a new DAG with the trickle format using the provided DagBuilderHelper. See the module's description for a more detailed explanation.

Deprecated: use github.com/ipfs/boxo/ipld/unixfs/importer/trickle.Layout

func VerifyTrickleDagStructure deprecated

func VerifyTrickleDagStructure(nd ipld.Node, p VerifyParams) error

VerifyTrickleDagStructure checks that the given dag matches exactly the trickle dag datastructure layout

Deprecated: use github.com/ipfs/boxo/ipld/unixfs/importer/trickle.VerifyTrickleDagStructure

Types

type VerifyParams deprecated

type VerifyParams struct {
	Getter      ipld.NodeGetter
	Direct      int
	LayerRepeat int
	Prefix      *cid.Prefix
	RawLeaves   bool
}

VerifyParams is used by VerifyTrickleDagStructure

Deprecated: use github.com/ipfs/boxo/ipld/unixfs/importer/trickle.VerifyParams

Jump to

Keyboard shortcuts

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