requestHandlers

package
v1.7.13 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

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