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
Click to show internal directories.
Click to hide internal directories.