blockrecorder

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: Apache-2.0, MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecordEachBlockTo

func RecordEachBlockTo(out io.Writer) car.OnNewCarBlockFunc

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

type PieceBlockMetadata struct {
	CID    cid.Cid
	Offset uint64
	Size   uint64
}

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

Jump to

Keyboard shortcuts

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