traversal

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package traversal provides abstraction and implementation needed to traverse all chunks below a given root hash. It tries to parse all manifests and collections in its attempt to log all chunk addresses on the way.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPyramid = errors.New("traversal: invalid pyramid")

Functions

This section is empty.

Types

type PutGetter added in v1.1.0

type PutGetter interface {
	storage.Putter
	storage.Getter
}

type Traverser added in v1.1.0

type Traverser interface {
	// Traverse iterates through each address related to the supplied one, if possible.
	Traverse(context.Context, boson.Address, boson.AddressIterFunc) error
	// GetPyramid returns pyramid hash and its contains data.
	GetPyramid(context.Context, boson.Address) (map[string][]byte, error)
	// GetChunkHashes returns all stored data chunk related to the given reference, if possible.
	GetChunkHashes(context.Context, boson.Address, map[string][]byte) ([][][]byte, [][]byte, error)
}

Traverser represents service which traverse through address dependent chunks.

func New added in v1.1.0

func New(store PutGetter) Traverser

New constructs for a new Traverser.

Jump to

Keyboard shortcuts

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