traversalrecord

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TraversalRecord

type TraversalRecord struct {
	// contains filtered or unexported fields
}

TraversalRecord records the links traversed by a selector and their paths in a space efficient manner

func NewTraversalRecord

func NewTraversalRecord() *TraversalRecord

NewTraversalRecord returns a new traversal record

func (tr *TraversalRecord) AllLinks() []cid.Cid

AllLinks returns all links traversed for a given record

func (tr *TraversalRecord) GetLinks(root datamodel.Path) []cid.Cid

GetLinks returns all links starting at the path in the tree rooted at 'root'

func (*TraversalRecord) RecordNextStep

func (tr *TraversalRecord) RecordNextStep(p []datamodel.PathSegment, link cid.Cid, successful bool)

RecordNextStep records the next step in the traversal into the tree based on its path, link, and whether the load was successful or not

type Verifier

type Verifier struct {
	// contains filtered or unexported fields
}

Verifier allows you to verify series of links loads matches a previous traversal order when those loads are successful At any point it can reconstruct the current path.

func NewVerifier

func NewVerifier(root *TraversalRecord) *Verifier

func (*Verifier) CurrentPath

func (v *Verifier) CurrentPath() datamodel.Path

func (*Verifier) Done

func (v *Verifier) Done() bool

func (*Verifier) VerifyNext

func (v *Verifier) VerifyNext(link cid.Cid, successful bool) error

Jump to

Keyboard shortcuts

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