Versions in this module Expand all Collapse all v1 v1.1.2 Apr 3, 2024 v1.1.1 Apr 3, 2024 Changes in this version + const InternalKeyKindDelete + const InternalKeyKindDeleteSized + const InternalKeyKindInvalid + const InternalKeyKindLogData + const InternalKeyKindMax + const InternalKeyKindMerge + const InternalKeyKindRangeDelete + const InternalKeyKindSet + const InternalKeyKindSetWithDelete + const InternalKeyKindSingleDelete + const InternalKeyRangeDeleteSentinel + const InternalKeySeqNumBatch + const InternalKeySeqNumMax + const MaximumBlockSize + const TableFilter + var DefaultComparer = base.DefaultComparer + func NewSimpleReadable(r ReadableFile) (objstorage.Readable, error) + func RewriteKeySuffixesAndReturnFormat(sst []byte, rOpts ReaderOptions, out objstorage.Writable, o WriterOptions, ...) (*WriterMetadata, TableFormat, error) + type AbbreviatedKey = base.AbbreviatedKey + type BlockHandle struct + Length uint64 + Offset uint64 + type BlockHandleWithProperties struct + Props []byte + type BlockIntervalCollector struct + func (b *BlockIntervalCollector) Add(key InternalKey, value []byte) error + func (b *BlockIntervalCollector) AddPrevDataBlockToIndexBlock() + func (b *BlockIntervalCollector) FinishDataBlock(buf []byte) ([]byte, error) + func (b *BlockIntervalCollector) FinishIndexBlock(buf []byte) ([]byte, error) + func (b *BlockIntervalCollector) FinishTable(buf []byte) ([]byte, error) + func (b *BlockIntervalCollector) Name() string + type BlockIntervalFilter struct + func NewBlockIntervalFilter(name string, lower uint64, upper uint64) *BlockIntervalFilter + func NewTestKeysBlockPropertyFilter(filterMin, filterMax uint64) *BlockIntervalFilter + func (b *BlockIntervalFilter) Init(name string, lower, upper uint64) + func (b *BlockIntervalFilter) Intersects(prop []byte) (bool, error) + func (b *BlockIntervalFilter) Name() string + func (b *BlockIntervalFilter) SetInterval(lower, upper uint64) + type BlockPropertiesFilterer struct + func IntersectsTable(filters []BlockPropertyFilter, limited BoundLimitedBlockPropertyFilter, ...) (*BlockPropertiesFilterer, error) + type BlockPropertyCollector interface + Add func(key InternalKey, value []byte) error + AddPrevDataBlockToIndexBlock func() + FinishDataBlock func(buf []byte) ([]byte, error) + FinishIndexBlock func(buf []byte) ([]byte, error) + FinishTable func(buf []byte) ([]byte, error) + Name func() string + func NewBlockIntervalCollector(name string, pointCollector, rangeCollector DataBlockIntervalCollector) BlockPropertyCollector + func NewTestKeysBlockPropertyCollector() BlockPropertyCollector + type BlockPropertyFilter = base.BlockPropertyFilter + type BoundLimitedBlockPropertyFilter interface + KeyIsWithinLowerBound func(key []byte) bool + KeyIsWithinUpperBound func(key []byte) bool + type Buf struct + func (b *Buf) Release() + func (b Buf) Valid() bool + type BufferPool struct + func (p *BufferPool) Alloc(n int) Buf + func (p *BufferPool) Init(initialSize int) + func (p *BufferPool) Release() + type ChecksumType byte + const ChecksumTypeCRC32c + const ChecksumTypeNone + const ChecksumTypeXXHash + const ChecksumTypeXXHash64 + func (t ChecksumType) String() string + type CommonProperties struct + NumDeletions uint64 + NumEntries uint64 + NumRangeDeletions uint64 + NumRangeKeyDels uint64 + NumRangeKeySets uint64 + NumSizedDeletions uint64 + RawKeySize uint64 + RawPointTombstoneKeySize uint64 + RawPointTombstoneValueSize uint64 + RawValueSize uint64 + ValueBlocksSize uint64 + func (c *CommonProperties) NumPointDeletions() uint64 + func (c *CommonProperties) String() string + type CommonReader interface + CommonProperties func() *CommonProperties + EstimateDiskUsage func(start, end []byte) (uint64, error) + NewCompactionIter func(bytesIterated *uint64, rp ReaderProvider, bufferPool *BufferPool) (Iterator, error) + NewIterWithBlockPropertyFiltersAndContextEtc func(ctx context.Context, lower, upper []byte, filterer *BlockPropertiesFilterer, ...) (Iterator, error) + NewRawRangeDelIter func() (keyspan.FragmentIterator, error) + NewRawRangeKeyIter func() (keyspan.FragmentIterator, error) + type Compare = base.Compare + type Comparer = base.Comparer + type Comparers map[string]*Comparer + type Compression int + const DefaultCompression + const NCompression + const NoCompression + const SnappyCompression + const ZstdCompression + func (c Compression) String() string + type DataBlockIntervalCollector interface + Add func(key InternalKey, value []byte) error + FinishDataBlock func() (lower uint64, upper uint64, err error) + type Equal = base.Equal + type FilterMetrics struct + Hits int64 + Misses int64 + type FilterMetricsTracker struct + func (m *FilterMetricsTracker) Load() FilterMetrics + type FilterPolicy = base.FilterPolicy + type FilterType = base.FilterType + type FilterWriter = base.FilterWriter + type InternalKey = base.InternalKey + type InternalKeyKind = base.InternalKeyKind + type Iterator interface + MaybeFilteredKeys func() bool + NextPrefix func(succKey []byte) (*InternalKey, base.LazyValue) + SetCloseHook func(fn func(i Iterator) error) + type Layout struct + Data []BlockHandleWithProperties + Filter BlockHandle + Footer BlockHandle + Format TableFormat + Index []BlockHandle + MetaIndex BlockHandle + Properties BlockHandle + RangeDel BlockHandle + RangeKey BlockHandle + TopIndex BlockHandle + ValueBlock []BlockHandle + ValueIndex BlockHandle + func (l *Layout) Describe(w io.Writer, verbose bool, r *Reader, ...) + type Merger = base.Merger + type Mergers map[string]*Merger + type PreviousPointKeyOpt struct + func (o PreviousPointKeyOpt) UnsafeKey() base.InternalKey + type Properties struct + ComparerName string + CompressionName string + CompressionOptions string + DataSize uint64 + ExternalFormatVersion uint32 + FilterPolicyName string + FilterSize uint64 + GlobalSeqNum uint64 + IndexPartitions uint64 + IndexSize uint64 + IndexType uint32 + IsStrictObsolete bool + Loaded map[uintptr]struct{} + MergerName string + NumDataBlocks uint64 + NumMergeOperands uint64 + NumRangeKeyUnsets uint64 + NumValueBlocks uint64 + NumValuesInValueBlocks uint64 + PrefixExtractorName string + PrefixFiltering bool + PropertyCollectorNames string + RawRangeKeyKeySize uint64 + RawRangeKeyValueSize uint64 + SnapshotPinnedKeySize uint64 + SnapshotPinnedKeys uint64 + SnapshotPinnedValueSize uint64 + TopLevelIndexSize uint64 + UserProperties map[string]string + WholeKeyFiltering bool + func (p *Properties) NumPointDeletions() uint64 + func (p *Properties) NumRangeKeys() uint64 + func (p *Properties) String() string + type ReadableFile interface + Stat func() (os.FileInfo, error) + type Reader struct + Compare Compare + FormatKey base.FormatKey + Properties Properties + Split Split + func NewMemReader(sst []byte, o ReaderOptions) (*Reader, error) + func NewReader(f objstorage.Readable, o ReaderOptions, extraOpts ...ReaderOption) (*Reader, error) + func (r *Reader) Close() error + func (r *Reader) CommonProperties() *CommonProperties + func (r *Reader) EstimateDiskUsage(start, end []byte) (uint64, error) + func (r *Reader) Layout() (*Layout, error) + func (r *Reader) NewCompactionIter(bytesIterated *uint64, rp ReaderProvider, bufferPool *BufferPool) (Iterator, error) + func (r *Reader) NewIter(lower, upper []byte) (Iterator, error) + func (r *Reader) NewIterWithBlockPropertyFilters(lower, upper []byte, filterer *BlockPropertiesFilterer, useFilterBlock bool, ...) (Iterator, error) + func (r *Reader) NewIterWithBlockPropertyFiltersAndContextEtc(ctx context.Context, lower, upper []byte, filterer *BlockPropertiesFilterer, ...) (Iterator, error) + func (r *Reader) NewRawRangeDelIter() (keyspan.FragmentIterator, error) + func (r *Reader) NewRawRangeKeyIter() (keyspan.FragmentIterator, error) + func (r *Reader) TableFormat() (TableFormat, error) + func (r *Reader) TryAddBlockPropertyFilterForHideObsoletePoints(snapshotForHideObsoletePoints uint64, fileLargestSeqNum uint64, ...) (hideObsoletePoints bool, filters []BlockPropertyFilter) + func (r *Reader) ValidateBlockChecksums() error + type ReaderOption interface + type ReaderOptions struct + Cache *cache.Cache + Comparer *Comparer + DeniedUserProperties map[string]struct{} + Filters map[string]FilterPolicy + LoggerAndTracer base.LoggerAndTracer + Merge base.Merge + MergerName string + type ReaderProvider interface + Close func() + GetReader func() (r *Reader, err error) + type SeekGEFlags = base.SeekGEFlags + type SeekLTFlags = base.SeekLTFlags + type Separator = base.Separator + type Split = base.Split + type Successor = base.Successor + type SuffixReplaceableBlockCollector interface + UpdateKeySuffixes func(oldProp []byte, oldSuffix, newSuffix []byte) error + type SuffixReplaceableTableCollector interface + UpdateKeySuffixes func(oldProps map[string]string, oldSuffix, newSuffix []byte) error + type TableFormat uint32 + const NumTableFormats + const TableFormatLevelDB + const TableFormatMax + const TableFormatPebblev1 + const TableFormatPebblev2 + const TableFormatPebblev3 + const TableFormatPebblev4 + const TableFormatRocksDBv2 + const TableFormatUnspecified + func ParseTableFormat(magic []byte, version uint32) (TableFormat, error) + func (f TableFormat) AsTuple() (string, uint32) + func (f TableFormat) String() string + type TablePropertyCollector interface + Add func(key InternalKey, value []byte) error + Finish func(userProps map[string]string) error + Name func() string + type TestKeysMaskingFilter struct + func NewTestKeysMaskingFilter() TestKeysMaskingFilter + func (f TestKeysMaskingFilter) Intersects(prop []byte) (bool, error) + func (f TestKeysMaskingFilter) SetSuffix(suffix []byte) error + type TrivialReaderProvider struct + func (trp TrivialReaderProvider) Close() + func (trp TrivialReaderProvider) GetReader() (*Reader, error) + type UserKeyPrefixBound struct + Lower []byte + Upper []byte + func (ukb *UserKeyPrefixBound) IsEmpty() bool + type VirtualReader struct + Properties CommonProperties + func MakeVirtualReader(reader *Reader, meta manifest.VirtualFileMeta, isForeign bool) VirtualReader + func (v *VirtualReader) CommonProperties() *CommonProperties + func (v *VirtualReader) EstimateDiskUsage(start, end []byte) (uint64, error) + func (v *VirtualReader) NewCompactionIter(bytesIterated *uint64, rp ReaderProvider, bufferPool *BufferPool) (Iterator, error) + func (v *VirtualReader) NewIterWithBlockPropertyFiltersAndContextEtc(ctx context.Context, lower, upper []byte, filterer *BlockPropertiesFilterer, ...) (Iterator, error) + func (v *VirtualReader) NewRawRangeDelIter() (keyspan.FragmentIterator, error) + func (v *VirtualReader) NewRawRangeKeyIter() (keyspan.FragmentIterator, error) + func (v *VirtualReader) ValidateBlockChecksumsOnBacking() error + type Writer struct + func NewWriter(writable objstorage.Writable, o WriterOptions, extraOpts ...WriterOption) *Writer + func (w *Writer) Add(key InternalKey, value []byte) error + func (w *Writer) AddRangeKey(key InternalKey, value []byte) error + func (w *Writer) AddWithForceObsolete(key InternalKey, value []byte, forceObsolete bool) error + func (w *Writer) Close() (err error) + func (w *Writer) Delete(key []byte) error + func (w *Writer) DeleteRange(start, end []byte) error + func (w *Writer) EstimatedSize() uint64 + func (w *Writer) Merge(key, value []byte) error + func (w *Writer) Metadata() (*WriterMetadata, error) + func (w *Writer) RangeKeyDelete(start, end []byte) error + func (w *Writer) RangeKeySet(start, end, suffix, value []byte) error + func (w *Writer) RangeKeyUnset(start, end, suffix []byte) error + func (w *Writer) Set(key, value []byte) error + func (w *Writer) Write(blockWithTrailer []byte) (n int, err error) + type WriterMetadata struct + HasPointKeys bool + HasRangeDelKeys bool + HasRangeKeys bool + LargestPoint InternalKey + LargestRangeDel InternalKey + LargestRangeKey InternalKey + LargestSeqNum uint64 + Properties Properties + Size uint64 + SmallestPoint InternalKey + SmallestRangeDel InternalKey + SmallestRangeKey InternalKey + SmallestSeqNum uint64 + func RewriteKeySuffixes(sst []byte, rOpts ReaderOptions, out objstorage.Writable, o WriterOptions, ...) (*WriterMetadata, error) + func RewriteKeySuffixesViaWriter(r *Reader, out objstorage.Writable, o WriterOptions, from, to []byte) (*WriterMetadata, error) + func (m *WriterMetadata) SetLargestPointKey(k InternalKey) + func (m *WriterMetadata) SetLargestRangeDelKey(k InternalKey) + func (m *WriterMetadata) SetLargestRangeKey(k InternalKey) + func (m *WriterMetadata) SetSmallestPointKey(k InternalKey) + func (m *WriterMetadata) SetSmallestRangeDelKey(k InternalKey) + func (m *WriterMetadata) SetSmallestRangeKey(k InternalKey) + type WriterOption interface + type WriterOptions struct + BlockPropertyCollectors []func() BlockPropertyCollector + BlockRestartInterval int + BlockSize int + BlockSizeThreshold int + Cache *cache.Cache + Checksum ChecksumType + Comparer *Comparer + Compression Compression + FilterPolicy FilterPolicy + FilterType FilterType + IndexBlockSize int + IsStrictObsolete bool + MergerName string + Parallelism bool + RequiredInPlaceValueBound UserKeyPrefixBound + ShortAttributeExtractor base.ShortAttributeExtractor + TableFormat TableFormat + TablePropertyCollectors []func() TablePropertyCollector + WritingToLowestLevel bool