Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContextCancelError ¶
type ContextCancelError struct{}
ContextCancelError is a sentinel that indicates the passed in context was cancelled
func (ContextCancelError) Error ¶
func (cp ContextCancelError) Error() string
type TraversalBuilder ¶
type TraversalBuilder struct {
Root ipld.Link
Selector ipld.Node
Visitor traversal.AdvVisitFn
LinkSystem ipld.LinkSystem
Chooser traversal.LinkTargetNodePrototypeChooser
}
TraversalBuilder defines parameters for an iterative traversal
type Traverser ¶
type Traverser interface {
// IsComplete returns the completion state (boolean) and if so, the final error result from IPLD
IsComplete() (bool, error)
// Current request returns the current link waiting to be loaded
CurrentRequest() (ipld.Link, ipld.LinkContext)
// Advance advances the traversal successfully by supplying the given reader as the result of the next IPLD load
Advance(reader io.Reader) error
// Error errors the traversal by returning the given error as the result of the next IPLD load
Error(err error)
// Shutdown cancels the traversal
Shutdown(ctx context.Context)
// NBlocksTraversed returns the number of blocks successfully traversed
NBlocksTraversed() int
}
Traverser is an interface for performing a selector traversal that operates iteratively -- it stops and waits for a manual load every time a block boundary is encountered
Click to show internal directories.
Click to hide internal directories.