testu

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2017 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UseCidV1 = NodeOpts{Prefix: mdag.V1CidPrefix(), RawLeavesUsed: true}
View Source
var UseProtoBufLeaves = NodeOpts{Prefix: mdag.V0CidPrefix()}
View Source
var UseRawLeaves = NodeOpts{Prefix: mdag.V0CidPrefix(), ForceRawLeaves: true, RawLeavesUsed: true}

Functions

func ArrComp

func ArrComp(a, b []byte) error

func GetDAGServ

func GetDAGServ() mdag.DAGService

func GetEmptyNode

func GetEmptyNode(t testing.TB, dserv mdag.DAGService, opts NodeOpts) node.Node

func GetNode

func GetNode(t testing.TB, dserv mdag.DAGService, data []byte, opts NodeOpts) node.Node

func GetRandomNode

func GetRandomNode(t testing.TB, dserv mdag.DAGService, size int64, opts NodeOpts) ([]byte, node.Node)

func PrintDag

func PrintDag(nd *mdag.ProtoNode, ds mdag.DAGService, indent int)

func SizeSplitterGen

func SizeSplitterGen(size int64) chunk.SplitterGen

Types

type NodeOpts added in v0.4.12

type NodeOpts struct {
	Prefix cid.Prefix
	// ForceRawLeaves if true will force the use of raw leaves
	ForceRawLeaves bool
	// RawLeavesUsed is true if raw leaves or either implicitly or explicitly enabled
	RawLeavesUsed bool
}

NodeOpts is used by GetNode, GetEmptyNode and GetRandomNode

var UseBlake2b256 NodeOpts

Jump to

Keyboard shortcuts

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