Documentation ¶
Overview ¶
Package blockrecorder provides utilits to record locations of CIDs to a temporary metadata file, since writing a CAR happens BEFORE we actually hand off for sealing. The metadata file is later used to populate the PieceStore
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecordEachBlockTo ¶
RecordEachBlockTo returns a OnNewCarBlockFunc that records the exact location of a given block's data in a CAR file, and writes that data to the given writer
Types ¶
type PieceBlockMetadata ¶
PieceBlockMetadata is a record of where a given CID lives in a piece, in terms of its offset and size
func ReadBlockMetadata ¶
func ReadBlockMetadata(input io.Reader) ([]PieceBlockMetadata, error)
ReadBlockMetadata reads previously recorded block metadata
func (*PieceBlockMetadata) MarshalCBOR ¶
func (t *PieceBlockMetadata) MarshalCBOR(w io.Writer) error
func (*PieceBlockMetadata) UnmarshalCBOR ¶
func (t *PieceBlockMetadata) UnmarshalCBOR(r io.Reader) error
Click to show internal directories.
Click to hide internal directories.