# Functions

AddNumericStats combines derived statistics.
AsIntents takes a slice of spans and returns it as a slice of intents for the given transaction.
BytesNext returns the next possible byte slice, using the extra capacity of the provided slice if possible, and if not, appending an \x00.
ConsultsTimestampCache returns whether the command must consult the timestamp cache to determine whether a mutation is safe at a proposed timestamp or needs to move to a higher timestamp to avoid re-writing history.
ErrorUnexpectedlySet creates a string to panic with when a response (typically a roachpb.BatchResponse) unexpectedly has Error set in its response header.
InsertRangeInfo inserts ri into a slice of RangeInfo's if a descriptor for the same range is not already present.
IsRange returns true if the command is range-based and must include a start and an end key.
IsReadOnly returns true iff the request is read-only.
IsTransactionWrite returns true if the request produces write intents when used within a transaction.
MakePriority generates a random priority value, biased by the specified userPriority.
MakeTransaction creates a new transaction.
MakeValueFromBytes returns a value with bytes and tag set.
MakeValueFromBytesAndTimestamp returns a value with bytes, timestamp and tag set.
MakeValueFromString returns a value with bytes and tag set.
MergeSpans sorts the incoming spans and merges overlapping spans.
MustParseVersion calls ParseVersion and panics on error.
NewAmbiguousResultError initializes a new AmbiguousResultError with an explanatory message.
NewCheckConsistency returns a Request initialized to scan from start to end keys.
NewConditionalPut returns a Request initialized to put value as a byte slice at key if the existing value at key equals expValueBytes.
NewDelete returns a Request initialized to delete the value at key.
NewDeleteRange returns a Request initialized to delete the values in the given key range (excluding the endpoint).
NewError creates an Error from the given error.
NewErrorf creates an Error from the given error message.
NewErrorWithTxn creates an Error from the given error and a transaction.
No description provided by the author
NewGet returns a Request initialized to get the value at key.
NewHandledRetryableTxnError initializes a new HandledRetryableTxnError.
NewIncrement returns a Request initialized to increment the value at key by increment.
NewInitPut returns a Request initialized to put the value at key, as long as the key doesn't exist, returning a ConditionFailedError if the key exists and the existing value is different from value.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewPut returns a Request initialized to put the value at key.
NewPutInline returns a Request initialized to put the value at key using an inline value.
NewRangeKeyMismatchError initializes a new RangeKeyMismatchError.
NewRangeNotFoundError initializes a new RangeNotFoundError.
NewReadWithinUncertaintyIntervalError creates a new uncertainty retry error.
NewReplicaTooOldError initializes a new ReplicaTooOldError.
NewReverseScan returns a Request initialized to reverse scan from end to start keys with max results.
NewScan returns a Request initialized to scan from start to end keys with max results.
NewSendError creates a SendError.
NewStoreNotFoundError initializes a new StoreNotFoundError.
NewTransactionAbortedError initializes a new TransactionAbortedError.
NewTransactionPushError initializes a new TransactionPushError.
NewTransactionReplayError initializes a new TransactionReplayError.
NewTransactionRetryError initializes a new TransactionRetryError.
NewTransactionStatusError initializes a new TransactionStatusError from the given message.
ParseVersion parses a Version from a string of the form "<major>.<minor>-<unstable>" where the "-<unstable>" is optional.
PercentilesFromData derives percentiles from a slice of data points.
PrepareTransactionForRetry returns a new Transaction to be used for retrying the original Transaction.
No description provided by the author
No description provided by the author
UpdatesTimestampCache returns whether the command must update the timestamp cache in order to set a low water mark for the timestamp at which mutations to overlapping key(s) can write such that they don't re-write history.

# Constants

ABORTED is the state for a transaction which has been aborted.
No description provided by the author
AddSSTable links a file into the RocksDB log-structured merge-tree.
AdminChangeReplicas is called to add or remove replicas for a range.
AdminMerge is called to coordinate a merge of two adjacent ranges.
AdminScatter moves replicas and leaseholders for a selection of ranges.
AdminSplit is called to coordinate a split of a range.
AdminTransferLease is called to initiate a range lease transfer.
BeginTransaction writes a new transaction record, marking the beginning of the write-portion of a transaction.
CheckConsistency verifies the consistency of all ranges falling within a key span.
COMMITTED is the state for a transaction which has been committed.
ComputeChecksum starts a checksum computation over a replica snapshot.
ConditionalPut sets the value for a key if the existing value matches the value specified in the request.
CONSENSUS requires that reads must achieve consensus.
CONSISTENT reads are guaranteed to read committed data; the mechanism relies on clocks to determine lease expirations.
Delete removes the value for the specified key.
DeleteRange removes all values for keys which fall between args.RequestHeader.Key and args.RequestHeader.EndKey, with the latter endpoint excluded.
DeprecatedVerifyChecksum is no longer used.
EndTransaction either commits or aborts an ongoing transaction.
Export dumps a keyrange into files.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GC garbage collects values based on expired timestamps for a list of keys in a range.
Get fetches the value for a key from the KV map, respecting a possibly historical timestamp.
HeartbeatTxn sends a periodic heartbeat to extant transaction rows to indicate the client is still alive and the transaction should not be considered abandoned.
Import bulk loads key/value entries.
INCONSISTENT reads return the latest available, committed values.
Increment increments the value at the specified key.
InitPut sets the value for a key if the key doesn't exist.
LeaseEpoch allows range operations while the node liveness epoch is equal to the lease epoch.
LeaseExpiration allows range operations while the wall clock is within the expiration timestamp.
LeaseInfo returns information about a range's lease.
LeaseNone specifies no lease, to be used as a default value.
MaxDiversityScore is the largest possible diversity score, indicating that two localities are as different from each other as possible.
MaxTxnPriority is the maximum allowed txn priority.
MaxUserPriority is the maximum allowed user priority.
Merge merges a given value into the specified key.
MinTxnPriority is the minimum allowed txn priority.
MinUserPriority is the minimum allowed user priority.
Noop is a no-op.
NormalUserPriority is set to 1, meaning ops run through the database are all given equal weight when a random priority is chosen.
PENDING is the default state for a new transaction.
Abort the transaction if possible to accommodate a concurrent writer.
Deprecated.
Push the timestamp forward if possible to accommodate a concurrent reader.
Abort the transaction if it's abandoned, but don't attempt to mutate it otherwise.
PushTxn attempts to resolve read or write conflicts between transactions.
Put sets the value for a key at the specified timestamp.
QueryTxn fetches the current state of the designated transaction.
RangeLookup looks up range descriptors, containing the locations of replicas for the range containing the specified key.
No description provided by the author
RequestLease requests a range lease for a replica.
ResolveIntent resolves existing write intents for a key.
ResolveIntentRange resolves existing write intents for a key range.
A transaction containing a delete range command had its timestamp moved forward.
A possible replay caused by duplicate begin txn or out-of-order txn sequence number.
For backwards compatibility.
A SERIALIZABLE transaction had its timestamp moved forward.
A concurrent writer finished first, causing restart.
ReverseScan fetches the values for all keys which fall between args.RequestHeader.Key and args.RequestHeader.EndKey, with the latter endpoint excluded.
Scan fetches the values for all keys which fall between args.RequestHeader.Key and args.RequestHeader.EndKey, with the latter endpoint excluded.
BACKOFF is for errors that can retried by restarting the transaction after an exponential backoff.
IMMEDIATE is for errors that can be retried by restarting the transaction immediately.
NONE (the default) is used for errors which have no effect on the transaction state.
TransferLease transfers the range lease from a lease holder to a new one.
TruncateLog discards a prefix of the raft log.
UnspecifiedUserPriority means NormalUserPriority.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TIMESERIES is applied to values which contain InternalTimeSeriesData.
TUPLE represents a DTuple, encoded as repeated pairs of varint field number followed by a value encoded Datum.
This is a subset of the SQL column type values, representing the underlying storage for various types.
WriteBatch applies the operations encoded in a BatchRepr.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
KeyMax is a maximum key value which sorts after all other keys.
KeyMin is a minimum key value which sorts before all other keys.
PrettyPrintKey prints a key in human readable format.
PrettyPrintRange prints a key range in human readable format.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RKeyMax is a maximum key value which sorts after all other keys.
RKeyMin is a minimum key value which sorts before all other keys.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

AbortCacheEntry contains information about a transaction which has been aborted.
AddSSTableRequest is arguments to the AddSSTable() method, to link a file into the RocksDB log-structured merge-tree.
AddSSTableResponse is the response to a AddSSTable() operation.
An AdminChangeReplicasRequest is the argument to the AdminChangeReplicas() method.
No description provided by the author
An AdminMergeRequest is the argument to the AdminMerge() method.
An AdminMergeResponse is the return value from the AdminMerge() method.
AdminScatterRequest is the argument to the AdminScatter() method, which moves replicas and leaseholders for a selection of ranges.
ScatterResponse is the response to a Scatter() operation.
No description provided by the author
An AdminSplitRequest is the argument to the AdminSplit() method.
An AdminSplitResponse is the return value from the AdminSplit() method.
An AdminTransferLeaseRequest is the argument to the AdminTransferLease() method.
No description provided by the author
An AmbiguousResultError indicates that a request may have succeeded or failed, but the response was not received and the final result is ambiguous.
Attributes specifies a list of arbitrary strings describing node topology, store type, and machine capabilities.
A BatchRequest contains one or more requests to be executed in parallel, or if applicable (based on write-only commands and range-locality), as a single update.
A BatchResponse contains one or more responses, one per request corresponding to the requests in the matching BatchRequest.
No description provided by the author
A BeginTransactionRequest is the argument to the BeginTransaction() method.
A BeginTransactionResponse is the return value from the BeginTransaction() method.
No description provided by the author
No description provided by the author
A CheckConsistencyRequest is the argument to the CheckConsistency() method.
A CheckConsistencyResponse is the return value from the CheckConsistency() method.
CollectedStats wraps collected timings and metadata for some query's execution.
A ComputeChecksumRequest is arguments to the ComputeChecksum() method, to start computing the checksum for the specified range at the snapshot for this request command.
A ComputeChecksumResponse is the response to a ComputeChecksum() operation.
A ConditionalPutRequest is the argument to the ConditionalPut() method.
A ConditionalPutResponse is the return value from the ConditionalPut() method.
A ConditionFailedError indicates that the expected value of a ConditionalPutRequest was not found, either because it was missing or was not equal.
CSVOptions describe the format of csv data (delimiter, comment, etc).
A DeleteRangeRequest is the argument to the DeleteRange() method.
A DeleteRangeResponse is the return value from the DeleteRange() method.
A DeleteRequest is the argument to the Delete() method.
A DeleteResponse is the return value from the Delete() method.
No description provided by the author
No description provided by the author
An EndTransactionRequest is the argument to the EndTransaction() method.
An EndTransactionResponse is the return value from the EndTransaction() method.
Error is a generic representation including a string message and information about retryability.
ErrorDetail is a union type containing all available errors.
ErrPosition describes the position of an error in a Batch.
ExportRequest is the argument to the Export() method, to dump a keyrange into files under a basepath.
ExportResponse is the response to an Export() operation.
File describes a keyrange that has been dumped to a file at the given path.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A GCRequest is arguments to the GC() method.
No description provided by the author
A GCResponse is the return value from the GC() method.
A GetRequest is the argument for the Get() method.
A GetResponse is the return value from the Get() method.
HandledRetryableTxnError is an error detail representing a retryable error that has been "handled" by the TxnCoordSender.
A Header is attached to a BatchRequest, encapsulating routing and auxiliary information required for executing it.
A HeartbeatTxnRequest is arguments to the HeartbeatTxn() method.
A HeartbeatTxnResponse is the return value from the HeartbeatTxn() method.
ImportRequest is the argument to the Import() method, to bulk load key/value entries.
No description provided by the author
No description provided by the author
ImportResponse is the response to a Import() operation.
An IncrementRequest is the argument to the Increment() method.
An IncrementResponse is the return value from the Increment method.
An InitPutRequest is the argument to the InitPut() method.
A InitPutResponse is the return value from the InitPut() method.
A Intent is a Span together with a Transaction metadata and its status.
InternalCommitTrigger encapsulates all of the internal-only commit triggers.
InternalTimeSeriesData is a collection of data samples for some measurable value, where each sample is taken over a uniform time interval.
A InternalTimeSeriesSample represents data gathered from multiple measurements of a variable value over a given period of time.
KeyValue is a pair of Key and Value for returned Key/Value pairs from ScanRequest/ScanResponse.
Lease contains information about range leases including the expiration and lease holder.
LeaseInfoRequest is the argument to the LeaseInfo() method, for getting information about a range's lease.
LeaseInfoResponse is the response to a LeaseInfo() operation.
A LeaseRejectedError indicates that the requested replica could not acquire the desired lease because of an existing range lease.
Locality is an ordered set of key value Tiers that describe a node's location.
A MergeRequest contains arguments to the Merge() method.
MergeResponse is the response to a Merge() operation.
A MergeTrigger is run after a successful commit of an AdminMerge command.
ModifiedSpanTrigger indicates that a specific span has been modified.
NodeDescriptor holds details on node physical/network topology.
A NodeUnavailableError indicates that the sending gateway can not process requests at the time, and that the client should retry the request with another peer.
A NoopRequest is a no-op.
A NoopResponse is the return value from a no-op operation.
A NotLeaseHolderError indicates that the current range is not the lease holder.
No description provided by the author
No description provided by the author
An OpRequiresTxnError indicates that a command required to be carried out in a transactional context but was not.
Percentiles contains a handful of hard-coded percentiles meant to summarize a distribution.
A PushTxnRequest is arguments to the PushTxn() method.
A PushTxnResponse is the return value from the PushTxn() method.
A PutRequest is the argument to the Put() method.
A PutResponse is the return value from the Put() method.
A QueryTxnResponse is arguments to the QueryTxn() method.
A QueryTxnResponse is the return value from the QueryTxn() method.
A RaftGroupDeletedError indicates a raft group has been deleted for the replica.
RaftSnapshotData is the payload of a raftpb.Snapshot.
No description provided by the author
RaftTombstone contains information about a replica that has been deleted.
RaftTruncatedState contains metadata about the truncated portion of the raft log.
RangeDescriptor is the value stored in a range metadata key.
RangeInfo describes a range which executed a request.
A RangeKeyMismatchError indicates that a command was sent to a range which did not contain the key(s) specified by the command.
A RangeLookupRequest is arguments to the RangeLookup() method.
A RangeLookupResponse is the return value from the RangeLookup() method.
A RangeNotFoundError indicates that a command was sent to a range which is not hosted on this store.
A ReadWithinUncertaintyIntervalError indicates that a read at timestamp encountered a write within the uncertainty interval of the reader.
A ReplicaCorruptionError indicates that the replica has experienced an error which puts its integrity at risk.
ReplicaDescriptor describes a replica location by node ID (corresponds to a host:port via lookup on gossip network) and store ID (identifies the device).
ReplicaIdent uniquely identifies a specific replica.
ReplicationTarget identifies a node/store pair.
ReplicaTooOldError is sent in response to a raft message when the recipient of the raft message believes the sender of the raft message to have been removed from the raft group.
A RequestLeaseRequest is arguments to the RequestLease() method.
A RequestLeaseResponse is the response to a RequestLease() or TransferLease() operation.
A RequestUnion contains exactly one of the optional requests.
A ResolveIntentRangeRequest is arguments to the ResolveIntentRange() method.
A ResolveIntentRangeResponse is the return value from the ResolveIntent() method.
A ResolveIntentRequest is arguments to the ResolveIntent() method.
A ResolveIntentResponse is the return value from the ResolveIntent() method.
ResponseHeader is returned with every storage node response.
A ResponseUnion contains exactly one of the optional responses.
A ReverseScanRequest is the argument to the ReverseScan() method.
A ReverseScanResponse is the return value from the ReverseScan() method.
RSpan is a key range with an inclusive start RKey and an exclusive end RKey.
A ScanRequest is the argument to the Scan() method.
A ScanResponse is the return value from the Scan() method.
A SendError indicates that a message could not be delivered to the desired recipient(s).
Span is supplied with every storage node request.
A SplitTrigger is run after a successful commit of an AdminSplit command.
No description provided by the author
No description provided by the author
StoreCapacity contains capacity information for a storage device.
StoreDeadReplicas holds a storeID and a list of dead replicas on that store.
StoreDescriptor holds store information including store attributes, node descriptor and store capacity.
A StoreIdent uniquely identifies a store in the cluster.
A StoreNotFoundError indicates that a command was sent to a store which is not hosted on this node.
Tier represents one level of the locality hierarchy.
A Transaction is a unit of work performed on the database.
A TransactionAbortedError indicates that the transaction was aborted by another concurrent transaction.
A TransactionPushError indicates that the transaction could not continue because it encountered a write intent from another transaction which it was unable to push.
A TransactionReplayError indicates that a BeginTransaction request is being replayed.
A TransactionRetryError indicates that the transaction must be retried, usually with an increased transaction timestamp.
A TransactionStatusError indicates that the transaction status is incompatible with the requested operation.
A TransferLeaseRequest represents the arguments to the TransferLease() method.
TruncateLogRequest is used to remove a prefix of the raft log.
TruncateLogResponse is the response to a TruncateLog() operation.
A TxnPrevAttemptError indicates a batch response for a request sent through client Txn was found that was meant for a previous incarnation of the transaction.
UnhandledRetryableError tells the recipient that a KV request must be retried.
An UntrackedTxnError indicates that an attempt to transmit a batch request for a Transaction failed because the Transaction was not being tracked by the TxnCoordSender properly.
Value specifies the value at a key.
No description provided by the author
WriteBatchRequest is arguments to the WriteBatch() method, to apply the operations encoded in a BatchRepr.
WriteBatchResponse is the response to a WriteBatch() operation.
A WriteIntentError indicates that one or more write intent belonging to another transaction were encountered leading to a read/write or write/write conflict.
A WriteTooOldError indicates that a write encountered a versioned value newer than its timestamp, making it impossible to rewrite history.

# Interfaces

ErrorDetailInterface is an interface for each error detail.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Request is an interface for RPC requests.
Response is an interface for RPC responses.

# Type aliases

No description provided by the author
Key is a custom type for a byte string in proto messages which refer to Cockroach keys.
KeyValueByKey implements sorting of a slice of KeyValues by key.
LeaseType describes the type of lease.
Method is the enumerated type for methods.
NodeID is a custom type for a cockroach node ID.
TxnPushType determines what action to take when pushing a transaction.
A RangeID is a unique ID associated to a Raft consensus group.
RangeIDSlice implements sort.Interface.
ReadConsistencyType specifies what type of consistency is observed during read operations.
ReplicaChangeType is a parameter of ChangeReplicasTrigger.
ReplicaID is a custom type for a range replica ID.
RKey denotes a Key whose local addressing has been accounted for.
Spans is a slice of spans.
StoreID is a custom type for a cockroach store ID.
StoreIDSlice implements sort.Interface.
TransactionRestart indicates how an error should be handled in a transactional context.
TransactionRetryReason specifies what caused a transaction retry.
TransactionStatus specifies possible states for a transaction.
UserPriority is a custom type for transaction's user priority.
ValueType defines a set of type constants placed in the "tag" field of Value messages.