readasonecar

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CarReader

type CarReader interface {
	NextInfo() (cid.Cid, uint64, error)
	NextNode() (cid.Cid, uint64, *blocks.BasicBlock, error)
	NextNodeBytes() (cid.Cid, uint64, []byte, error)

	HeadeSizeUntilNow() (uint64, error)
	Close() error
}

type MultiReader

type MultiReader struct {
	// contains filtered or unexported fields
}

func NewMultiReader

func NewMultiReader(files ...string) (*MultiReader, error)

func (*MultiReader) Close

func (mr *MultiReader) Close() error

func (*MultiReader) CurrentIndex

func (mr *MultiReader) CurrentIndex() int

func (*MultiReader) CurrentReader

func (mr *MultiReader) CurrentReader() *carreader.CarReader

func (*MultiReader) Files

func (mr *MultiReader) Files() []string

func (*MultiReader) HeadeSizeUntilNow

func (mr *MultiReader) HeadeSizeUntilNow() (uint64, error)

HeadeSizeUntilNow returns the size of the headers of all the CAR files read so far (including the current one). E.g. if the current index is 2, this will return the sum of the header sizes of the CAR files at indices 0, 1, and 2.

func (*MultiReader) HeaderSize

func (mr *MultiReader) HeaderSize(index int) (uint64, error)

HeaderSize returns the size of the header of the CAR file at the given index.

func (*MultiReader) NextInfo

func (mr *MultiReader) NextInfo() (cid.Cid, uint64, error)

func (*MultiReader) NextNode

func (mr *MultiReader) NextNode() (cid.Cid, uint64, *blocks.BasicBlock, error)

func (*MultiReader) NextNodeBytes

func (mr *MultiReader) NextNodeBytes() (cid.Cid, uint64, []byte, error)

func (*MultiReader) Readers

func (mr *MultiReader) Readers() []*carreader.CarReader

Jump to

Keyboard shortcuts

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