Documentation ¶
Index ¶
- Variables
- type FetcherConfigdeprecated
Constants ¶
This section is empty.
Variables ¶
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.