package
2.0.2
Repository: https://github.com/cockroachdb/pebble.git
Documentation: pkg.go.dev

# Functions

AssertionFailedf creates an assertion error and panics in invariants.Enabled builds.
CatchErrorPanic runs a function and catches any panic that contains an error, returning that error.
CheckComparer is a mini test suite that verifies a comparer implementation.
CloseHelper wraps an io.Closer in a wrapper that ignores extra calls to Close.
CorruptionErrorf formats according to a format specifier and returns the string as an error value that is marked as a corruption error.
DebugTree returns the iterator tree as a multi-line string.
DecodeInternalKey decodes an encoded internal key.
FakeKVs constructs InternalKVs from the given key strings, in the format "key:seq-num".
InternalCompare compares two internal keys using the specified comparison function.
MakeAssertComparer creates a Comparer that is the same with the given Comparer except that it asserts that the Compare and Equal functions adhere to their specifications.
MakeExclusiveSentinelKey constructs an internal key that is an exclusive sentinel key, used as the upper boundary for an sstable when a ranged key is the largest key in an sstable.
MakeFilename builds a filename from components.
MakeFilepath builds a filepath from components.
MakeInPlaceValue constructs an in-place value.
MakeInternalKey constructs an internal key from a specified user key, sequence number and kind.
MakeInternalKV constructs an InternalKV with the provided internal key and value.
MakeRangeDeleteSentinelKey constructs an internal key that is a range deletion sentinel key, used as the upper boundary for an sstable when a range deletion is the largest key in an sstable.
MakeSearchKey constructs an internal key that is appropriate for searching for a the specified user key.
MakeTrailer constructs an internal key trailer from the specified sequence number and kind.
MarkCorruptionError marks given error as a corruption error.
MinUserKey returns the smaller of two user keys.
MustExist checks if err is an error indicating a file does not exist.
NewDeletableSumValueMerger return a ValueMerger which computes the sum of its arguments, but transforms a zero sum into a non-existent entry.
NewFakeIter returns an iterator over the given KVs.
ParseDiskFileNum parses the provided string as a disk file number.
ParseFilename parses the components from a filename.
ParseInternalKey parses the string representation of an internal key.
ParseInternalKeyRange parses a string of the form: [<user-key>#<seq-num>,<kind>-<user-key>#<seq-num>,<kind>].
ParseKind parses the string representation of an internal key kind.
ParseSeqNum parses the string representation of a sequence number.
ParseUserKeyBounds parses UserKeyBounds from a string representation of the form "[foo, bar]" or "[foo, bar)".
PhysicalTableDiskFileNum converts the FileNum of a physical table to the backing DiskFileNum.
PhysicalTableFileNum converts the DiskFileNum backing a physical table into the table's FileNum.
SharedPrefixLen returns the largest i such that a[:i] equals b[:i].
UserKeyBoundsEndExclusive creates the bounds [start, end).
UserKeyBoundsEndExclusiveIf creates either [start, end] or [start, end) bounds.
UserKeyBoundsFromInternal creates the bounds [smallest.UserKey, largest.UserKey] or [smallest.UserKey, largest.UserKey) if largest is an exclusive sentinel.
UserKeyBoundsInclusive creates the bounds [start, end].
UserKeyExclusive creates an exclusive user key boundary.
UserKeyExclusiveIf creates a user key boundary which can be either inclusive or exclusive.
UserKeyInclusive creates an inclusive user key boundary.
Visible returns true if a key with the provided sequence number is visible at the specified snapshot sequence numbers.

# Constants

SSTable block defaults.
SSTable block defaults.
SSTable block defaults.
The two possible values of BoundaryKind.
The FileType enumeration.
The FileType enumeration.
The FileType enumeration.
The FileType enumeration.
The FileType enumeration.
The FileType enumeration.
The FileType enumeration.
The two possible values of BoundaryKind.
InternalKeyBoundaryRangeKey is the marker for a range key boundary.
These constants are part of the file format, and should not be changed.
InternalKeyKindDeleteSized keys behave identically to InternalKeyKindDelete keys, except that they hold an associated uint64 value indicating the (len(key)+len(value)) of the shadowed entry the tombstone is expected to delete.
InternalKeyKindExcise is used to persist the Excise part of an IngestAndExcise to a WAL.
InternalKeyKindIngestSST is used to distinguish a batch that corresponds to the WAL entry for ingested sstables that are added to the flushable queue.
A marker for an invalid key.
These constants are part of the file format, and should not be changed.
This maximum value isn't part of the file format.
InternalKeyKindMaxForSSTable is the largest valid key kind that can exist in an SSTable.
These constants are part of the file format, and should not be changed.
InternalKeyKindColumnFamilySingleDelete InternalKeyKind = 8InternalKeyKindBeginPrepareXID InternalKeyKind = 9InternalKeyKindEndPrepareXID InternalKeyKind = 10InternalKeyKindCommitXID InternalKeyKind = 11InternalKeyKindRollbackXID InternalKeyKind = 12InternalKeyKindNoop InternalKeyKind = 13InternalKeyKindColumnFamilyRangeDelete InternalKeyKind = 14.
InternalKeyKindRangeKeyDelete removes all range keys within a key range.
These constants are part of the file format, and should not be changed.
These constants are part of the file format, and should not be changed.
These constants are part of the file format, and should not be changed.
InternalKeyKindRangeKeySet and InternalKeyKindRangeUnset represent keys that set and unset values associated with ranges of key space.
InternalKeyKindSeparator is a key used for separator / successor keys written to sstable block indexes.
These constants are part of the file format, and should not be changed.
InternalKeyKindSetWithDelete keys are SET keys that have met with a DELETE or SINGLEDEL key in a prior compaction.
InternalKeyKindSingleDelete (SINGLEDEL) is a performance optimization solely for compactions (to reduce write amp and space amp).
Internal to the sstable format.
These constants are part of the file format, and should not be changed.
InternalKeyRangeDeleteSentinel is the marker for a range delete sentinel key.
InternalKeyZeroSeqnumMaxTrailer is the largest trailer with a zero sequence number.
InternalTrailerLen is the number of bytes used to encode InternalKey.Trailer.
MaxShortAttribute is the maximum value of the short attribute (3 bits).
SeekGEFlagsNone is the default value of SeekGEFlags, with all flags disabled.
SeekLTFlagsNone is the default value of SeekLTFlags, with all flags disabled.
SeqNumBatchBit is set on batch sequence numbers which prevents those entries from being excluded from iteration.
SeqNumMax is the largest valid sequence number.
SeqNumStart is the first sequence number assigned to a key.
SeqNumZero is the zero sequence number, set by compactions if they can guarantee there are no keys underneath an internal key.
SSTable block defaults.
The available filter types.

# Variables

DefaultComparer is the default implementation of the Comparer interface.
DefaultFormatter is the default implementation of user key formatting: non-ASCII data is formatted as escaped hexadecimal values.
DefaultLogger logs to the Go stdlib logs.
DefaultMerger is the default implementation of the Merger interface.
DefaultSplit is a trivial implementation of Split which always returns the full key.
ErrCorruption is a marker to indicate that data in a file (WAL, MANIFEST, sstable) isn't in the expected format.
ErrNotFound means that a get or delete call did not find the requested key.
InvalidInternalKey is an invalid internal key for which Valid() will return false.

# Structs

AppendValueMerger concatenates merge operands in order from oldest to newest.
ArchiveCleaner archives file instead delete.
AtomicSeqNum is an atomic SeqNum.
AttributeAndLen represents the pair of value length and the short attribute.
Comparer defines a total ordering over the space of []byte keys: a 'less than' relationship.
DeleteCleaner deletes file.
FakeIter is an iterator over a fixed set of KVs.
FileInfo provides some rudimentary information about a file.
GaugeSampleMetric is used to measure a gauge value (e.g.
InMemLogger implements Logger using an in-memory buffer (used for testing).
InternalIteratorStats contains miscellaneous stats produced by InternalIterators that are part of the InternalIterator tree.
InternalKey is a key used for the in-memory and on-disk partial DBs that make up a pebble DB.
InternalKV represents a single internal key-value pair.
LazyFetcher supports fetching a lazy value.
LazyValue represents a value that may not already have been extracted.
LoggerWithNoopTracer wraps a logger and does no tracing.
Merger defines an associative merge operation.
NoopLoggerAndTracer does no logging and tracing.
ThroughputMetric is used to measure the byte throughput of some component that performs work in a single-threaded manner.
UserKeyBoundary represents the endpoint of a bound which can be exclusive or inclusive.
UserKeyBounds is a user key interval with an inclusive start boundary and with an end boundary that can be either inclusive or exclusive.

# Interfaces

BlockPropertyFilter is used in an Iterator to filter sstables and blocks within the sstable.
Cleaner cleans obsolete files.
DeletableValueMerger is an extension to ValueMerger which allows indicating that the result of a merge operation is non-existent.
A Fataler fatals a process with a message when called.
FilterPolicy is an algorithm for probabilistically encoding a set of keys.
FilterWriter provides an interface for creating filter blocks.
InternalIterator iterates over a DB's key/value pairs in key order.
IteratorDebug is an interface implemented by all internal iterators and fragment iterators.
Logger defines an interface for writing log messages.
LoggerAndTracer defines an interface for logging and tracing.
NeedsFileContents is implemented by a cleaner that needs the contents of the files that it is being asked to clean.
TopLevelIterator extends InternalIterator to include an additional absolute positioning method, SeekPrefixGEStrict.
ValueFetcher is an interface for fetching a value.
ValueMerger receives merge operands one by one.

# Type aliases

AbbreviatedKey returns a fixed length prefix of a user key such that AbbreviatedKey(a) < AbbreviatedKey(b) implies a < b, and AbbreviatedKey(a) > AbbreviatedKey(b) implies a > b.
BoundaryKind indicates if a boundary is exclusive or inclusive.
Compare returns -1, 0, or +1 depending on whether a is 'less than', 'equal to' or 'greater than' b.
ComparePointSuffixes compares two point key suffixes and returns -1, 0, or +1.
CompareRangeSuffixes compares two suffixes where either or both suffix originates from a range key and returns -1, 0, or +1.
A DiskFileNum identifies a file or object with exists on disk.
Equal returns true if a and b are equivalent.
FileNum is an internal DB identifier for a table.
FileType enumerates the types of files found in a DB.
FilterType is the level at which to apply a filter: block or table.
FormatBytes formats a byte slice using hexadecimal escapes for non-ASCII data.
FormatKey returns a formatter for the user key.
FormatValue returns a formatter for the user value.
ImmediateSuccessor is invoked with a prefix key ([Split(a) == len(a)]) and appends to dst the smallest prefix key that is larger than the given prefix a.
InternalKeyKind enumerates the kind of key: a deletion tombstone, a set value, a merged value, etc.
InternalKeyTrailer encodes a SeqNum and an InternalKeyKind.
Merge creates a ValueMerger for the specified key initialized with the value of one merge operand.
SeekGEFlags holds flags that may configure the behavior of a forward seek.
SeekLTFlags holds flags that may configure the behavior of a reverse seek.
Separator is used to construct SSTable index blocks.
SeqNum is a sequence number defining precedence among identical keys.
ShortAttribute encodes a user-specified attribute of the value.
ShortAttributeExtractor is an extractor that given the value, will return the ShortAttribute.
Split returns the length of the prefix of the user key that corresponds to the key portion of an MVCC encoding scheme to enable the use of prefix bloom filters.
Successor appends to dst a shortened key k given a key a such that Compare(a, k) <= 0.