Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsContextCancelErr ¶
IsContextCancelErr checks whther the given err is ContextCancelError or has a one wrapped. See: errors.Is.
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 Budget *traversal.Budget PanicCallback panics.CallBackFn }
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. // // Note that CurrentRequest will block if the traverser is performing an // IPLD load. IsComplete() (bool, error) // CurrentRequest returns the parameters for the current block load waiting // to be fulfilled in order to advance further. // // Note that CurrentRequest will block if the traverser is performing an // IPLD load. 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.