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
TerminalError chan error
Request gsmsg.GraphSyncRequest
LastResponse *atomic.Value
DoNotSendCids *cid.Set
NodePrototypeChooser traversal.LinkTargetNodePrototypeChooser
ResumeMessages chan []graphsync.ExtensionData
PauseMessages chan struct{}
}
RequestExecution are parameters for a single request execution
Click to show internal directories.
Click to hide internal directories.