package
19.1.0-beta.20190304+incompatible
Repository: https://github.com/darinpp/cockroach.git
Documentation: pkg.go.dev

# Packages

Package kvbase exports kv level interfaces to avoid dependency cycles.

# Functions

GRPCTransportFactory is the default TransportFactory, using GRPC.
InitFactoryForLocalTestCluster initializes a TxnCoordSenderFactory that can be used with LocalTestCluster.
MakeTxnMetrics returns a TxnMetrics struct that contains metrics whose windowed portions retain data for approximately histogramWindow.
NewDistSender returns a batch.Sender instance which connects to the Cockroach cluster via the supplied gossip instance.
NewDistSenderForLocalTestCluster creates a DistSender for a LocalTestCluster.
NewLeaseHolderCache creates a new leaseHolderCache of the given size.
NewRangeDescriptorCache returns a new RangeDescriptorCache which uses the given RangeDescriptorDB as the underlying source of range descriptors.
NewRangeIterator creates a new RangeIterator.
NewReplicaSlice creates a ReplicaSlice from the replicas listed in the range descriptor and using gossip to lookup node descriptors.
NewTxnCoordSenderFactory creates a new TxnCoordSenderFactory.
SenderTransportFactory wraps a client.Sender for use as a KV Transport.

# Constants

Ascending means Next() will advance towards keys that compare higher.
Descending means Next() will advance towards keys that compare lower.

# Variables

CanSendToFollower is used by the DistSender to determine if it needs to look up the current lease holder for a request.
MaxTxnRefreshSpansBytes is a threshold in bytes for refresh spans stored on the coordinator during the lifetime of a transaction.

# Structs

ClientTestingKnobs contains testing options that dictate the behavior of the key-value client.
A DistSender provides methods to access Cockroach's monolithic, distributed key value store.
DistSenderConfig holds configuration and auxiliary objects that can be passed to NewDistSender.
DistSenderMetrics is the set of metrics for a given distributed sender.
EvictionToken holds eviction state between calls to LookupRangeDescriptor.
A LeaseHolderCache is a cache of replica descriptors keyed by range ID.
A LeaseHolderCacheShard is a cache of replica descriptors keyed by range ID.
RangeDescriptorCache is used to retrieve range descriptors for arbitrary keys.
A RangeIterator provides a mechanism for iterating over all ranges in a key span.
ReplicaInfo extends the Replica structure with the associated node descriptor.
A SendOptions structure describes the algorithm for sending RPCs to one or more replicas, depending on error conditions and how many successful responses are required.
A TxnCoordSender is the production implementation of client.TxnSender.
TxnCoordSenderFactory implements client.TxnSenderFactory.
TxnCoordSenderFactoryConfig holds configuration and auxiliary objects that can be passed to NewTxnCoordSenderFactory.
TxnMetrics holds all metrics relating to KV transactions.

# Interfaces

RangeDescriptorDB is a type which can query range descriptors from an underlying datastore.
Transport objects can send RPCs to one or more replicas of a range.

# Type aliases

A LatencyFunc returns the latency from this node to a remote address and a bool indicating whether the latency is valid.
A ReplicaSlice is a slice of ReplicaInfo.
ScanDirection determines the semantics of RangeIterator.Next() and RangeIterator.NeedAnother().
TransportFactory encapsulates all interaction with the RPC subsystem, allowing it to be mocked out for testing.