executor

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0, MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

type ExecutionEnv

type ExecutionEnv struct {
	Ctx              context.Context
	SendRequest      func(peer.ID, gsmsg.GraphSyncRequest)
	RunBlockHooks    func(p peer.ID, response graphsync.ResponseData, blk graphsync.BlockData) error
	TerminateRequest func(graphsync.RequestID)
	WaitForMessages  func(ctx context.Context, resumeMessages chan graphsync.ExtensionData) ([]graphsync.ExtensionData, error)
	Loader           AsyncLoadFn
}

ExecutionEnv are request parameters that last between requests

func (ExecutionEnv) Start

func (ee ExecutionEnv) Start(re RequestExecution) (chan graphsync.ResponseProgress, chan error)

Start begins execution of a request in a go routine

type RequestExecution

type RequestExecution struct {
	Ctx              context.Context
	P                peer.ID
	NetworkError     chan error
	Request          gsmsg.GraphSyncRequest
	LastResponse     *atomic.Value
	DoNotSendCids    *cid.Set
	NodeStyleChooser traversal.LinkTargetNodeStyleChooser
	ResumeMessages   chan []graphsync.ExtensionData
	PauseMessages    chan struct{}
}

RequestExecution are parameters for a single request execution

Jump to

Keyboard shortcuts

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