v0

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NameObjects names the backend data object
	NameObjects = "data"
	// NameIndex names the backend index object
	NameIndex = "index"
)

Variables

This section is empty.

Functions

func AppendBlockData

func AppendBlockData(ctx context.Context, w backend.Writer, meta *backend.BlockMeta, tracker backend.AppendTracker, buffer []byte) (backend.AppendTracker, error)

AppendBlockData appends the bytes passed to the block data

func BloomName

func BloomName(shard int) string

BloomName returns the backend bloom name for the given shard

func MarshalObjectToWriter

func MarshalObjectToWriter(id common.ID, b []byte, w io.Writer) (int, error)

func NewAppender

func NewAppender(writer io.Writer) common.Appender

NewAppender returns an appender. This appender simply appends new objects

to the provided io.Writer.

func NewBufferedAppender

func NewBufferedAppender(writer io.Writer, indexDownsample int, totalObjectsEstimate int) common.Appender

NewBufferedAppender returns an bufferedAppender. This appender builds a writes to

the provided writer and also builds a downsampled records slice.

func NewDedupingIterator

func NewDedupingIterator(iter common.Iterator, combiner common.ObjectCombiner) (common.Iterator, error)

NewDedupingIterator returns a dedupingIterator. This iterator is used to wrap another

iterator.  It will dedupe consecutive objects with the same id using the ObjectCombiner.

func NewIndexReader

func NewIndexReader(index []byte) (common.IndexReader, error)

NewIndexReader returns an index reader for a byte slice of marshalled ordered records.

func NewIterator

func NewIterator(reader io.Reader) common.Iterator

func NewPageReader

func NewPageReader(r io.ReaderAt) common.PageReader

NewPageReader returns a new v0 pageReader. A v0 pageReader is basically a no-op. It retrieves the requested byte ranges and returns them as is. A pages "format" is a contiguous collection of objects | -- object -- | -- object -- | ...

func NewPagedFinder

func NewPagedFinder(index common.IndexReader, r common.PageReader, combiner common.ObjectCombiner) common.Finder

NewPagedFinder returns a paged. This finder is used for searching

a set of records and returning an object. If a set of consecutive records has
matching ids they will be combined using the ObjectCombiner.

func NewPagedIterator

func NewPagedIterator(chunkSizeBytes uint32, indexReader common.IndexReader, pageReader common.PageReader) common.Iterator

NewPagedIterator returns a backendIterator. This iterator is used to iterate

through objects stored in object storage.

func NewRecordIterator

func NewRecordIterator(r []*common.Record, ra io.ReaderAt) common.Iterator

NewRecordIterator returns a recordIterator. This iterator is used for iterating through

a series of objects by reading them one at a time from Records.

func WriteBlockData

func WriteBlockData(ctx context.Context, w backend.Writer, meta *backend.BlockMeta, r io.Reader, size int64) error

WriteBlockData writes the data object from an io.Reader to the backend.Writer

func WriteBlockMeta

func WriteBlockMeta(ctx context.Context, w backend.Writer, meta *backend.BlockMeta, records []*common.Record, b *common.ShardedBloomFilter) error

WriteBlockMeta writes the bloom filter, meta and index to the passed in backend.Writer

Types

This section is empty.

Jump to

Keyboard shortcuts

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