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
Functions ¶
This section is empty.
Types ¶
type FetcherConfig ¶
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
func NewFetcherConfig ¶
func NewFetcherConfig(blockService blockservice.BlockService) FetcherConfig
NewFetcherConfig creates a FetchConfig from which session may be created and nodes retrieved.
func (FetcherConfig) FetcherWithSession ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.