d3l

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssurerClient

type AssurerClient interface {
	SegmentShardRequestSend(ctx context.Context, peerKey ed25519.PublicKey, erasureRoot crypto.Hash, shardIndex uint16, segmentIndexes []uint16) (segmentShards [][]byte, err error)
	GetAllPeers() []*peer.Peer
}

AssurerClient

type SegmentsFetcher

type SegmentsFetcher interface {

	// Fetch fetches enough segment shards from the availability system to reconstructs the requested segments
	// the availability system expects to request the shards by the erasure-root
	// however we request the segments by segment-root,
	// to tackle this problem the SegmentsFetcher keeps internally a dictionary of segment-root to erasure-root mappings
	Fetch(ctx context.Context, segmentRoot crypto.Hash, segmentIndexes ...uint16) ([]work.Segment, error)
}

SegmentsFetcher defines an interface for fetching imported segments from the availability system

func NewSegmentsFetcher

func NewSegmentsFetcher(assurerClient AssurerClient, segmentRootToErasureRoot map[crypto.Hash]crypto.Hash) SegmentsFetcher

NewSegmentsFetcher creates a basic segments fetcher

Jump to

Keyboard shortcuts

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