package
1.1.0-rc.1
Repository: https://github.com/soopsio/cockroach.git
Documentation: pkg.go.dev

# Functions

GRPCTransportFactory is the default TransportFactory, using GRPC.
InitSenderForLocalTestCluster initializes a TxnCoordSender that can be used with LocalTestCluster.
MakeTxnMetrics returns a TxnMetrics struct that contains metrics whose windowed portions retain data for approximately histogramWindow.
NewDBServer allocates and returns a new DBServer.
NewDistSender returns a batch.Sender instance which connects to the Cockroach cluster via the supplied gossip instance.
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.
NewTxnCoordSender creates a new TxnCoordSender for use from a KV distributed DB instance.
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.

# Structs

BatchCall contains a response and an RPC error (note that the response contains its own roachpb.Error, which is separate from BatchCall.Err), and is analogous to the net/rpc.Call struct.
A DBServer provides an HTTP server endpoint serving the key-value API.
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.
DistSenderTestingKnobs is a part of the context used to control parts of the system.
EvictionToken holds eviction state between calls to LookupRangeDescriptor.
A LeaseHolderCache 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 an implementation of client.Sender which wraps a lower-level Sender (either a storage.Stores or a DistSender) to which it sends commands.
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 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.