trickle

package
v0.4.16-rc3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2018 License: MIT Imports: 8 Imported by: 0

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

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

func Layout added in v0.4.14

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.

func VerifyTrickleDagStructure added in v0.3.2

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

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

Types

type VerifyParams added in v0.4.12

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

VerifyParams is used by VerifyTrickleDagStructure

Jump to

Keyboard shortcuts

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