helpers

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0, MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Block deprecated added in v1.3.0

func Block(ctx context.Context, f fetcher.Fetcher, link ipld.Link) (ipld.Node, error)

Block fetches a schemaless node graph corresponding to single block by link.

Deprecated: use github.com/ipfs/boxo/fetcher/helpers.Block

func BlockAll deprecated added in v1.3.0

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.

Deprecated: use github.com/ipfs/boxo/fetcher/helpers.BlockAll

func BlockMatching deprecated added in v1.3.0

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.

Deprecated: use github.com/ipfs/boxo/fetcher/helpers.BlockMatching

func OnBlocks deprecated

func OnBlocks(bv BlockCallback) fetcher.FetchCallback

OnBlocks produces a fetch call back that only gets called when visiting blocks during a fetch

Deprecated: use github.com/ipfs/boxo/fetcher/helpers.OnBlocks

func OnUniqueBlocks deprecated

func OnUniqueBlocks(bv BlockCallback) fetcher.FetchCallback

OnUniqueBlocks is a callback that only gets called visiting each block once

Deprecated: use github.com/ipfs/boxo/fetcher/helpers.OnUniqueBlocks

Types

type BlockCallback deprecated

type BlockCallback func(BlockResult) error

BlockCallback is a callback for visiting blocks

Deprecated: use github.com/ipfs/boxo/fetcher/helpers.BlockCallback

type BlockResult deprecated

type BlockResult struct {
	Node ipld.Node
	Link ipld.Link
}

BlockResult specifies a node at the top of a block boundary

Deprecated: use github.com/ipfs/boxo/fetcher/helpers.BlockResult

Jump to

Keyboard shortcuts

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