bsfetcher

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: 12 Imported by: 11 modules, 11 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPrototypeChooser = func(lnk ipld.Link, lnkCtx ipld.LinkContext) (ipld.NodePrototype, error) {
	if tlnkNd, ok := lnkCtx.LinkNode.(schema.TypedLinkNode); ok {
		return tlnkNd.LinkTargetNodePrototype(), nil
	}
	return basicnode.Prototype.Any, nil
}

DefaultPrototypeChooser supports choosing the prototype from the link and falling back to a basicnode.Any builder

Deprecated: use github.com/ipfs/boxo/fetcher/impl/blockservice.DefaultPrototypeChooser

Functions

This section is empty.

Types

type FetcherConfig deprecated

type FetcherConfig struct {
	NodeReifier      ipld.NodeReifier
	PrototypeChooser traversal.LinkTargetNodePrototypeChooser
	// contains filtered or unexported fields
}

FetcherConfig defines a configuration object from which Fetcher instances are constructed

Deprecated: use github.com/ipfs/boxo/fetcher/impl/blockservice.FetcherConfig

func NewFetcherConfig deprecated

func NewFetcherConfig(blockService blockservice.BlockService) FetcherConfig

NewFetcherConfig creates a FetchConfig from which session may be created and nodes retrieved.

Deprecated: use github.com/ipfs/boxo/fetcher/impl/blockservice.NewFetcherConfig

func (FetcherConfig) FetcherWithSession added in v1.6.0

func (fc FetcherConfig) FetcherWithSession(ctx context.Context, s *blockservice.Session) fetcher.Fetcher

func (FetcherConfig) NewSession

func (fc FetcherConfig) NewSession(ctx context.Context) fetcher.Fetcher

NewSession creates a session from which nodes may be retrieved. The session ends when the provided context is canceled.

func (FetcherConfig) WithReifier added in v1.4.0

func (fc FetcherConfig) WithReifier(nr ipld.NodeReifier) fetcher.Factory

WithReifier derives a different fetcher factory from the same source but with a chosen NodeReifier for pathing semantics.

Jump to

Keyboard shortcuts

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