package
20.1.0-rc.2+incompatible
Repository: https://github.com/cargillb/cockroachdb.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

CleanupTempDirs removes all directories listed in the record file specified by recordPath.
ClearRangeWithHeuristic clears the keys from start (inclusive) to end (exclusive).
ComputeStatsGo scans the underlying engine from start to end keys and computes stats counters based on the values.
CreateTempDir creates a temporary directory with a prefix under the given parentDir and returns the absolute path of the temporary directory.
DecodeMVCCKey decodes an engine.MVCCKey from its serialized representation.
DefaultPebbleOptions returns the default pebble options.
EncodeKey encodes an engine.MVCC key into the RocksDB representation.
EncodeKeyToBuf encodes an engine.MVCC key into the RocksDB representation.
GetBufUsingIter returns an IterAndBuf using the supplied iterator.
GetIterAndBuf returns an IterAndBuf for passing into various MVCC* methods.
InitPebbleLogger initializes the logger to use for Pebble log messages.
IsIntentOf returns true if the meta record is an intent of the supplied transaction.
MakeBackupSSTWriter creates a new SSTWriter tailored for backup SSTs.
MakeIngestionSSTWriter creates a new SSTWriter tailored for ingestion SSTs.
MakeMultiIterator creates an iterator that multiplexes SimpleIterators.
MakeMVCCMetadataKey creates an MVCCKey from a roachpb.Key.
MakeValue returns the inline value.
MergeInternalTimeSeriesData exports the engine's C++ merge logic for InternalTimeSeriesData to higher level packages.
MVCCBlindConditionalPut is a fast-path of MVCCConditionalPut.
MVCCBlindInitPut is a fast-path of MVCCInitPut.
MVCCBlindPut is a fast-path of MVCCPut.
MVCCBlindPutProto sets the given key to the protobuf-serialized byte string of msg and the provided timestamp.
MVCCClearTimeRange clears all MVCC versions within the span [key, endKey) which have timestamps in the span (startTime, endTime].
MVCCConditionalPut sets the value for a specified key only if the expected value matches.
MVCCDelete marks the key deleted so that it will not be returned in future get responses.
MVCCDeleteRange deletes the range of key/value pairs specified by start and end keys.
MVCCFindSplitKey finds a key from the given span such that the left side of the split is roughly targetSize bytes.
MVCCGarbageCollect creates an iterator on the ReadWriter.
MVCCGet returns the most recent value for the specified key whose timestamp is less than or equal to the supplied timestamp.
MVCCGetAsTxn constructs a temporary transaction from the given transaction metadata and calls MVCCGet as that transaction.
MVCCGetProto fetches the value at the specified key and unmarshals it into msg if msg is non-nil.
MVCCIncrement fetches the value for key, and assuming the value is an "integer" type, increments it by inc and stores the new value.
MVCCInitPut sets the value for a specified key if the key doesn't exist.
MVCCIterate iterates over the key range [start,end).
MVCCKeyCompare compares cockroach keys, including the MVCC timestamps.
MVCCMerge implements a merge operation.
MVCCPut sets the value for a specified key.
MVCCPutProto sets the given key to the protobuf-serialized byte string of msg and the provided timestamp.
MVCCResolveWriteIntent either commits or aborts (rolls back) an extant write intent for a given txn according to commit parameter.
MVCCResolveWriteIntentRange commits or aborts (rolls back) the range of write intents specified by start and end keys for a given txn.
MVCCResolveWriteIntentRangeUsingIter commits or aborts (rolls back) the range of write intents specified by start and end keys for a given txn.
MVCCResolveWriteIntentUsingIter is a variant of MVCCResolveWriteIntent that uses iterator and buffer passed as parameters (e.g.
MVCCScan scans the key range [key, endKey) in the provided reader up to some maximum number of results in ascending order.
MVCCScanAsTxn constructs a temporary transaction from the given transaction metadata and calls MVCCScan as that transaction.
MVCCScanToBytes is like MVCCScan, but it returns the results in a byte array.
NewDefaultEngine allocates and returns a new, opened engine with the default configuration.
NewDefaultInMem allocates and returns a new, opened in-memory engine with the default configuration.
NewEngine creates a new storage engine.
NewInMem allocates and returns a new, opened in-memory engine.
NewMemSSTIterator returns a `SimpleIterator` for an in-memory sstable.
NewMVCCIncrementalIterator creates an MVCCIncrementalIterator with the specified reader and options.
NewOpLoggerBatch creates a new batch that logs logical mvcc operations and wraps the provided batch.
NewPebble creates a new Pebble instance, at the specified path.
NewPebbleTempEngine creates a new Pebble engine for DistSQL processors to use when the working set is larger than can be stored in memory.
NewRocksDBBatchReader creates a RocksDBBatchReader from the given repr and verifies the header.
NewRocksDBTempEngine creates a new RocksDB engine for DistSQL processors to use when the working set is larger than can be stored in memory.
NewSSTIterator returns a `SimpleIterator` for an in-memory sstable.
NewTee creates a new instance of the TeeEngine engine.
NewTempEngine creates a new engine for DistSQL processors to use when the working set is larger than can be stored in memory.
PutProto sets the given key to the protobuf-serialized byte string of msg and the provided timestamp.
RecordTempDir records tempPath to the record file specified by recordPath to facilitate cleanup of the temporary directory on subsequent startups.
RocksDBBatchCount provides an efficient way to get the count of mutations in a RocksDB Batch representation.
SafeWriteToFile writes the byte slice to the filename, contained in dir, using the given fs.
Scan returns up to max key/value objects starting from start (inclusive) and ending at end (non-inclusive).
WriteSyncNoop carries out a synchronous no-op write to the engine.

# Constants

These constants come from rocksdb/db/dbformat.h.
These constants come from rocksdb/db/dbformat.h.
These constants come from rocksdb/db/dbformat.h.
BatchTypeColumnFamilySingleDeletion BatchType = 0x8 BatchTypeBeginPrepareXID BatchType = 0x9 BatchTypeEndPrepareXID BatchType = 0xA BatchTypeCommitXID BatchType = 0xB BatchTypeRollbackXID BatchType = 0xC BatchTypeNoop BatchType = 0xD BatchTypeColumnFamilyRangeDeletion BatchType = 0xE.
BatchTypeColumnFamilyDeletion BatchType = 0x4 BatchTypeColumnFamilyValue BatchType = 0x5 BatchTypeColumnFamilyMerge BatchType = 0x6.
These constants come from rocksdb/db/dbformat.h.
CPutAllowIfMissing is used to indicate a CPut can also succeed when the expected entry does not exist.
CPutFailIfMissing is used to indicate the existing value must match the expected value exactly i.e.
MaxArrayLen is a safe maximum length for slices on this architecture.
MVCCAbortIntentOpType corresponds to the MVCCAbortIntentOp variant.
MVCCCommitIntentOpType corresponds to the MVCCCommitIntentOp variant.
MVCCUpdateIntentOpType corresponds to the MVCCUpdateIntentOp variant.
MVCCVersionTimestampSize is the size of the timestamp portion of MVCC version keys (used to update stats).
MVCCWriteIntentOpType corresponds to the MVCCWriteIntentOp variant.
MVCCWriteValueOpType corresponds to the MVCCWriteValueOp variant.

# Variables

DefaultStorageEngine represents the default storage engine to use.
MVCCComparer is a pebble.Comparer object that implements MVCC-specific comparator settings for use with Pebble.
MVCCKeyMax is a maximum mvcc-encoded key value which sorts after all other keys.
MVCCMerger is a pebble.Merger object that implements the merge operator used by Cockroach.
NewEncryptedEnvFunc creates an encrypted environment and returns the vfs.FS to use for reading and writing data.
NilKey is the nil MVCCKey.
PebbleTablePropertyCollectors is the list of Pebble TablePropertyCollectors.

# Structs

EncryptionRegistries contains the encryption-related registries: Both are serialized protobufs.
EnvStats is a set of RocksDB env stats, including encryption status.
A Error wraps an error returned from a RocksDB operation.
IterAndBuf used to pass iterators and buffers between MVCC* calls, allowing reuse without the callers needing to know the particulars.
IteratorStats is returned from (Iterator).Stats.
IterOptions contains options used to create an Iterator.
MemFile is a file-like struct that buffers all data written to it in memory.
MVCCGetOptions bundles options for the MVCCGet family of functions.
MVCCIncrementalIterator iterates over the diff of the key range [startKey,endKey) and time range (startTime,endTime].
MVCCIncrementalIterOptions bundles options for NewMVCCIncrementalIterator.
MVCCKey is a versioned key, distinguished from roachpb.Key with the addition of a timestamp.
MVCCKeyValue contains the raw bytes of the value for a key.
MVCCLogicalOpDetails contains details about the occurrence of an MVCC logical operation.
MVCCScanOptions bundles options for the MVCCScan family of functions.
MVCCScanResult groups the values returned from an MVCCScan operation.
MVCCValueMerger implements the `ValueMerger` interface.
OpLoggerBatch records a log of logical MVCC operations.
Pebble is a wrapper around a Pebble database instance.
PebbleConfig holds all configuration parameters and knobs used in setting up a new Pebble instance.
PebbleFileRegistry keeps track of files for the data-FS and store-FS for Pebble (see encrypted_fs.go for high-level comment).
RocksDBBatchBuilder is used to construct the RocksDB batch representation.
RocksDBBatchReader is used to iterate the entries in a RocksDB batch representation.
RowCounter is a helper that counts how many distinct rows appear in the KVs that is is shown via `Count`.
SSTWriter writes SSTables.
Stats is a set of Engine stats.
TeeEngine sends all write operations to both the underlying engine instances, and for all read operations, it verifies that any keys and values returned match.
TeeEngineBatch implements a Batch on top of underlying eng1 and eng2 batches.
TeeEngineFile is a File that forwards to both underlying eng1 and eng2 files.
TeeEngineIter is an Iterator that iterates on underlying eng1 and eng2 iterators in lockstep.
TeeEngineReader implements a generic Reader on top of two underlying engine1/2 readers.
TeeEngineReadWriter implements a generic ReadWriter.
Version stores all the version information for all stores and is used as the format for the version file.

# Interfaces

Batch is the interface for batch specific operations.
EncryptionStatsHandler provides encryption related stats.
Engine is the interface that wraps the core operations of a key/value store.
Iterator is an interface for iterating over key/value pairs in an engine.
MVCCIterator is an interface that extends Iterator and provides concrete implementations for MVCCGet and MVCCScan operations.
Reader is the read interface to an engine's data.
ReadWriter is the read/write interface to an engine's data.
SimpleIterator is an interface for iterating over key/value pairs in an engine.
Writer is the write interface to an engine's data.

# Type aliases

BatchType represents the type of an entry in an encoded RocksDB batch.
CPutMissingBehavior describes the handling a non-existing expected value.
MVCCLogicalOpType is an enum with values corresponding to each of the enginepb.MVCCLogicalOp variants.