Documentation ¶
Index ¶
- func Block(ctx context.Context, f fetcher.Fetcher, link ipld.Link) (ipld.Node, error)
- func BlockAll(ctx context.Context, f fetcher.Fetcher, root ipld.Link, ...) error
- func BlockMatching(ctx context.Context, f fetcher.Fetcher, root ipld.Link, match ipld.Node, ...) error
- func OnBlocks(bv BlockCallback) fetcher.FetchCallback
- func OnUniqueBlocks(bv BlockCallback) fetcher.FetchCallback
- type BlockCallback
- type BlockResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockAll ¶
func BlockAll(ctx context.Context, f fetcher.Fetcher, root ipld.Link, cb fetcher.FetchCallback) error
BlockAll traverses all nodes in the graph linked by root. The nodes will be untyped and send over the results channel.
func BlockMatching ¶
func BlockMatching(ctx context.Context, f fetcher.Fetcher, root ipld.Link, match ipld.Node, cb fetcher.FetchCallback) error
BlockMatching traverses a schemaless node graph starting with the given link using the given selector and possibly crossing block boundaries. Each matched node is sent to the FetchResult channel.
func OnBlocks ¶
func OnBlocks(bv BlockCallback) fetcher.FetchCallback
OnBlocks produces a fetch call back that only gets called when visiting blocks during a fetch
func OnUniqueBlocks ¶
func OnUniqueBlocks(bv BlockCallback) fetcher.FetchCallback
OnUniqueBlocks is a callback that only gets called visiting each block once
Types ¶
type BlockCallback ¶
type BlockCallback func(BlockResult) error
BlockCallback is a callback for visiting blocks
type BlockResult ¶
type BlockResult struct { Node ipld.Node Link ipld.Link }
BlockResult specifies a node at the top of a block boundary
Click to show internal directories.
Click to hide internal directories.