requestHandlers

package
v1.6.11 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: GPL-3.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResolverRequestHandler

func NewResolverRequestHandler(
	finder dataRetriever.RequestersFinder,
	requestedItemsHandler dataRetriever.RequestedItemsHandler,
	whiteList dataRetriever.WhiteListHandler,
	maxTxsToRequest int,
	shardID uint32,
	requestInterval time.Duration,
) (*resolverRequestHandler, error)

NewResolverRequestHandler creates a requestHandler interface implementation with request functions

Types

type ChunkRequester added in v1.6.0

type ChunkRequester interface {
	RequestDataFromReferenceAndChunk(reference []byte, chunkIndex uint32) error
}

ChunkRequester can request a chunk of a large data

type EpochRequester added in v1.6.0

type EpochRequester interface {
	RequestDataFromEpoch(identifier []byte) error
}

EpochRequester can request data for a specific epoch

type HashSliceRequester added in v1.6.0

type HashSliceRequester interface {
	RequestDataFromHashArray(hashes [][]byte, epoch uint32) error
	IsInterfaceNil() bool
}

HashSliceRequester can request multiple hashes at once

type HeaderRequester added in v1.6.0

type HeaderRequester interface {
	NonceRequester
	EpochRequester
}

HeaderRequester defines what a block header requester can do

type NonceRequester added in v1.6.0

type NonceRequester interface {
	RequestDataFromNonce(nonce uint64, epoch uint32) error
}

NonceRequester can request data for a specific nonce

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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