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

# Packages

Package requestbatcher is a library to enable easy batching of roachpb requests.

# Functions

DefaultDBContext returns (a copy of) the default options for NewDBWithContext.
IncrementValRetryable increments a key's value by a specified amount and returns the new value.
MakeMockTxnSenderFactory creates a MockTxnSenderFactory from a sender function that receives the transaction in addition to the request.
NewDB returns a new DB.
NewDBWithContext returns a new DB with the given parameters.
NewLeaseManager allocates a new LeaseManager.
NewMockTransactionalSender creates a MockTransactionalSender.
NewTxn returns a new txn.
NewTxnWithCoordMeta is like NewTxn, except it returns a new txn with the provided TxnCoordMeta.
NewTxnWithProto is like NewTxn, except it returns a new txn with the provided Transaction proto.
RangeLookup is used to look up RangeDescriptors - a RangeDescriptor is a metadata structure which describes the key range and replica locations of a distinct range in the cluster.
SendWrapped is identical to SendWrappedWith with a zero header.
SendWrappedWith is a convenience function which wraps the request in a batch and sends it via the provided Sender and headers.
TestingIsRangeLookup returns if the provided BatchRequest looks like a single RangeLookup scan.
TestingIsRangeLookupRequest returns if the provided Request looks like a single RangeLookup scan.
Wrap returns a Sender which applies the given function before delegating to the supplied Sender.

# Constants

AnyTxnStatus means GetMeta() will return the info without checking the txn's status.
DefaultLeaseDuration is the duration a lease will be acquired for if no duration was specified in a LeaseManager's options.
LeafTxn specifies this sender is for one of potentially many distributed client transactions.
OnlyPending means GetMeta() will return an error if the transaction is not in the pending state.
RootTxn specifies this sender is the root transaction, and is responsible for aggregating all transactional state (see TxnCoordMeta) and finalizing the transaction.

# Variables

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

# Structs

AutoCommitError wraps a non-retryable error coming from auto-commit.
Batch provides for the parallel execution of a number of database operations.
CrossRangeTxnWrapperSender is a Sender whose purpose is to wrap non-transactional requests that span ranges into a transaction so they can execute atomically.
DB is a database handle to a single cockroach cluster.
DBContext contains configuration parameters for DB.
KeyValue represents a single key/value pair.
Lease contains the state of a lease on a particular key.
LeaseManager provides functionality for acquiring and managing leases via the kv api.
LeaseManagerOptions are used to configure a new LeaseManager.
LeaseNotAvailableError indicates that the lease the caller attempted to acquire is currently held by a different client.
No description provided by the author
MockTransactionalSender allows a function to be used as a TxnSender.
MockTxnSenderFactory is a TxnSenderFactory producing MockTxnSenders.
Result holds the result for a single DB or Txn operation (e.g.
Txn is an in-progress distributed database transaction.

# Interfaces

Sender is implemented by modules throughout the crdb stack, on both the "client" and the "server", involved in passing along and ultimately evaluating requests (batches).
TxnSender is the interface used to call into a CockroachDB instance when sending transactional requests.
TxnSenderFactory is the interface used to create new instances of TxnSender.

# Type aliases

NonTransactionalFactoryFunc is a TxnSenderFactory that cannot, in fact, create any transactional senders, only non-transactional ones.
SenderFunc is an adapter to allow the use of ordinary functions as Senders.
TxnStatusOpt represents options for TxnSender.GetMeta().
TxnType specifies whether a transaction is the root (parent) transaction, or a leaf (child) in a tree of client.Txns, as is used in a DistSQL flow.