traversal

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: BSD-3-Clause Imports: 12 Imported by: 5

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 (
	// ErrInvalidType is returned when the reference was not expected type.
	ErrInvalidType = errors.New("traversal: invalid type")
)

Functions

This section is empty.

Types

type Service

type Service interface {
	// TraverseAddresses iterates through each address related to the supplied
	// one, if possible.
	TraverseAddresses(context.Context, swarm.Address, swarm.AddressIterFunc) error

	// TraverseBytesAddresses iterates through each address of a bytes.
	TraverseBytesAddresses(context.Context, swarm.Address, swarm.AddressIterFunc) error
	// TraverseFileAddresses iterates through each address of a file.
	TraverseFileAddresses(context.Context, swarm.Address, swarm.AddressIterFunc) error
	// TraverseManifestAddresses iterates through each address of a manifest,
	// as well as each entry found in it.
	TraverseManifestAddresses(context.Context, swarm.Address, swarm.AddressIterFunc) error
}

Service is the service to find dependent chunks for an address.

func NewService

func NewService(storer storage.Storer) Service

Jump to

Keyboard shortcuts

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