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

# 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.
NewDB returns a new DB.
NewDBWithContext returns a new DB with the given parameters.
NewLeaseManager allocates a new LeaseManager.
NewSender returns an implementation of Sender which exposes the Key-Value database provided by a Cockroach cluster by connecting via RPC to a Cockroach node.
NewTxn returns a new txn.
NewTxnWithProto is like NewTxn, except it returns a new txn with the provided Transaction proto.
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.
Wrap returns a Sender which applies the given function before delegating to the supplied Sender.

# Constants

DefaultLeaseDuration is the duration a lease will be acquired for if no duration was specified in a LeaseManager's options.

# 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.
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
Result holds the result for a single DB or Txn operation (e.g.
Txn is an in-progress distributed database transaction.
TxnExecOptions controls how Exec() runs a transaction and the corresponding closure.

# Interfaces

Sender is the interface used to call into a Cockroach instance.
SenderWithDistSQLBackdoor is implemented by the TxnCoordSender to give DistSQL some hacky powers when handling errors that happened on remote nodes.

# Type aliases

SenderFunc is an adapter to allow the use of ordinary functions as Senders.