loader

package
v0.0.6-0...-9dfb6b8 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapAsyncLoader

func WrapAsyncLoader(
	ctx context.Context,
	asyncLoadFn AsyncLoadFn,
	requestID graphsync.RequestID,
	errorChan chan error) ipld.Loader

WrapAsyncLoader creates a regular ipld link laoder from an asynchronous load function, with the given cancellation context, for the given requests, and will transmit load errors on the given channel

Types

type AsyncLoadFn

type AsyncLoadFn func(graphsync.RequestID, ipld.Link) <-chan types.AsyncLoadResult

AsyncLoadFn is a function which given a request id and an ipld.Link, returns a channel which will eventually return data for the link or an err

Jump to

Keyboard shortcuts

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