Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockHooks ¶
type BlockHooks interface {
ProcessBlockHooks(p peer.ID, response graphsync.ResponseData, block graphsync.BlockData) hooks.UpdateResult
}
BlockHooks run for each block loaded
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor handles actually executing graphsync requests and verifying them. It has control of requests when they are in the "running" state, while the manager is in charge when requests are queued or paused
func NewExecutor ¶
func NewExecutor( manager Manager, blockHooks BlockHooks) *Executor
NewExecutor returns a new executor
type Manager ¶
type Manager interface { SendRequest(peer.ID, gsmsg.GraphSyncRequest) GetRequestTask(peer.ID, *peertask.Task, chan RequestTask) ReleaseRequestTask(peer.ID, *peertask.Task, error) }
Manager is an interface the Executor uses to interact with the request manager
type ReconciledLoader ¶
type ReconciledLoader interface { SetRemoteOnline(online bool) RetryLastLoad() types.AsyncLoadResult BlockReadOpener(lctx linking.LinkContext, link datamodel.Link) types.AsyncLoadResult }
ReconciledLoader is an interface that can be used to load blocks from a local store or a remote request
type RequestTask ¶
type RequestTask struct { Ctx context.Context Span trace.Span Request gsmsg.GraphSyncRequest LastResponse *atomic.Value DoNotSendFirstBlocks int64 PauseMessages <-chan struct{} Traverser ipldutil.Traverser P peer.ID InProgressErr chan error Empty bool ReconciledLoader ReconciledLoader }
RequestTask are parameters for a single request execution
Click to show internal directories.
Click to hide internal directories.