cockroach: github.com/cockroachdb/cockroach/pkg

Directories

PathSynopsis
acceptance
acceptance/cluster
acceptance/localcluster
acceptance/localcluster/tcPackage tc contains utility methods for using the Linux tc (traffic control) command to mess with the network links between cockroach nodes running on the local machine.
base
bench
bench/ddl_analysis
blobsPackage blobs contains a gRPC service to be used for remote file access.
blobs/blobspb
build
ccl
ccl/backupccl
ccl/baseccl
ccl/buildccl
ccl/changefeedccl
ccl/changefeedccl/cdctest
ccl/changefeedccl/changefeedbase
ccl/changefeedccl/kvfeedPackage kvfeed provides an abstraction to stream kvs to a buffer.
ccl/changefeedccl/schemafeed
ccl/changefeedccl/schemafeed/schematestutilsPackage schematestutils is a utility package for constructing schema objects in the context of cdc.
ccl/cliccl
ccl/cliccl/cliflagsccl
ccl/cmdccl/enc_utils
ccl/gssapiccl
ccl/importccl
ccl/kvccl
ccl/kvccl/kvfollowerreadscclPackage kvfollowerreadsccl implements and injects the functionality needed to expose follower reads to clients.
ccl/kvccl/kvtenantcclPackage kvtenantccl provides utilities required by SQL-only tenant processes in order to interact with the key-value layer.
ccl/logictestcclPackage logictestccl houses the SQL logic tests that test CCL features.
ccl/partitionccl
ccl/servercclPackage serverccl houses tests that verify CCL behavior of a running CockroachDB server.
ccl/sqlproxyccl
ccl/storageccl
ccl/storageccl/engineccl
ccl/storageccl/engineccl/enginepbccl
ccl/utilccl
ccl/utilccl/licenseccl
ccl/utilccl/sampledataccl
ccl/workloadccl
ccl/workloadccl/allccl
ccl/workloadccl/cliccl
ccl/workloadccl/format
ccl/workloadccl/roachmartccl
cli
cli/cliflags
cli/syncbench
cli/systembench
cli/systembench/systembenchpb
clusterversionPackage clusterversion defines the interfaces to interact with cluster/binary versions in order accommodate backward incompatible behaviors.
cmd/allocsim
cmd/cmdutil
cmd/cmpconnPackage cmpconn assists in comparing results from DB connections.
cmd/cmp-protocolcmp-protocol connects to postgres and cockroach servers and compares the binary and text pgwire encodings of SQL statements.
cmd/cmp-protocol/pgconnectPackage pgconnect provides a way to get byte encodings from a simple query.
cmd/cmp-sqlcmp-sql connects to postgres and cockroach servers and compares the results of SQL statements.
cmd/cockroachThis is the default entry point for a CockroachDB binary.
cmd/cockroach-osscockroach-oss is an entry point for a CockroachDB binary that excludes all CCL-licensed code.
cmd/cockroach-shortcockroach-short is an entry point for a CockroachDB binary that excludes certain components that are slow to build or have heavyweight dependencies.
cmd/compile-build
cmd/compile-builds
cmd/cr2pgcr2pg is a program that reads CockroachDB-formatted SQL files on stdin, modifies them to be Postgres compatible, and outputs them to stdout.
cmd/cr2pg/sqlstreamPackage sqlstream streams an io.Reader into SQL statements.
cmd/docgen
cmd/docgen/extract
cmd/fuzzfuzz builds and executes fuzz tests.
cmd/generate-binaryThis connects to a postgres server and crafts postgres-protocol message to encode its arguments into postgres' text and binary encodings.
cmd/generate-spatial-ref-sys
cmd/geoviz
cmd/github-postCommand github-post parses the JSON-formatted output from a Go test session, as generated by either 'go test -json' or './pkg.test | go tool test2json -t', and posts issues for any failed tests to GitHub.
cmd/github-pull-request-makeThis utility detects new tests added in a given pull request, and runs them under stress in our CI infrastructure.
cmd/gossipsimPackage simulation provides tools meant to visualize or test aspects of a Cockroach cluster on a single host.
cmd/internal/issues
cmd/prereqsprereqs generates Make prerequisites for Go binaries.
cmd/protoc-gen-gogoroach
cmd/publish-artifacts
cmd/publish-provisional-artifacts
cmd/reducereduce reduces SQL passed over stdin using cockroach demo.
cmd/returncheck
cmd/roachprod
cmd/roachprod/cloud
cmd/roachprod/config
cmd/roachprod/errors
cmd/roachprod/install
cmd/roachprod/ssh
cmd/roachprod-stress
cmd/roachprod/ui
cmd/roachprod/vm
cmd/roachprod/vm/aws
cmd/roachprod/vm/aws/terraformgenCommand terraformgen generate the terraform file used to configure AWS for multiregion support.
cmd/roachprod/vm/azurePackage azure allows roachprod to create instances within the Microsoft Azure cloud.
cmd/roachprod/vm/flagstub
cmd/roachprod/vm/gce
cmd/roachprod/vm/local
cmd/roachtest
cmd/roachvetCommand roachvet is a vettool which includes all of the standard analysis passes included in go vet as well as the `shadow` pass and some first-party passes.
cmd/skiperrsskiperrs connects to a postgres-compatible server with its URL specified as the first argument.
cmd/skipped-tests
cmd/skip-test
cmd/smithcmpsmithcmp is a tool to execute random queries on a database.
cmd/smithtestsmithtest is a tool to execute sqlsmith tests on cockroach demo instances.
cmd/teamcity-triggerteamcity-trigger launches a variety of nightly build jobs on TeamCity using its REST API.
cmd/testfiltertestfilter is a utility to manipulate JSON streams in [test2json] format.
cmd/uptodateuptodate efficiently computes whether an output file is up-to-date with regard to its input files.
cmd/urlcheck
cmd/urlcheck/lib/urlcheck
cmd/whoownsitwhoownsit looks for OWNERS in the directory and parenting directories until it finds an owner for a given file.
cmd/workload
cmd/wraprules
cmd/zerosum
col/coldata
col/coldataext
col/coldatatestutils
col/colserde
col/colserde/arrowserdePackage arrowserde contains the flatbuffer generated code used for Apache Arrow serialization (and some small helpers associated with the generated code).
col/typeconv
compose
config
config/zonepb
geoPackage geo contains the base types for spatial data type operations.
geo/geodistPackage geodist finds distances between two geospatial shapes.
geo/geogenPackage geogen provides utilities for generating various geospatial types.
geo/geogfn
geo/geographiclibPackage geographiclib is a wrapper around the GeographicLib library.
geo/geoindex
geo/geomfnPackage geomfn contains functions that are used for geometry-based builtins.
geo/geopb
geo/geoprojPackage geoproj contains functions that interface with the PROJ library.
geo/geoprojbasePackage geoprojbase is a minimal dependency package that contains basic metadata and data structures for SRIDs and their CRS transformations.
geo/geosPackage geos is a wrapper around the spatial data types between the geo package and the GEOS C library.
geo/geosegmentize
geo/geotransform
gossipPackage gossip implements a protocol for sharing information between Cockroach nodes using an ad-hoc, peer-to-peer network.
gossip/resolver
gossip/simulation
internal/client/requestbatcherPackage requestbatcher is a library to enable easy batching of roachpb requests.
internal/codeowners
internal/gopathPackage gopath contains utilities to get the current GOPATH.
internal/rsg
internal/rsg/yaccPackage yacc parses .y files.
internal/sqlsmith
internal/teamPackage team involves processing team information based on a yaml file containing team metadata.
jobs
jobs/jobspb
jobs/jobsprotectedts
jobs/jobstest
keysPackage keys manages the construction of keys for CockroachDB's key-value layer.
kvPackage kv and its KV API have been deprecated for external usage.
kv/bulk
kv/kvbasePackage kvbase exports kv level interfaces to avoid dependency cycles.
kv/kvclientPackage kvclient houses the implementation of the KV client.
kv/kvclient/kvcoordPackage kvcoord provides a key-value API to an underlying cockroach datastore.
kv/kvclient/kvtenantPackage kvtenant provides utilities required by SQL-only tenant processes in order to interact with the key-value layer.
kv/kvnemesisPackage kvnemesis exercises the KV api with random traffic and then validates that the observed behaviors are consistent with our guarantees.
kv/kvserverPackage kvserver provides access to the Store and Range abstractions.
kv/kvserver/abortspan
kv/kvserver/applyPackage apply provides abstractions and routines associated with the application of committed raft entries to a replicated state machine.
kv/kvserver/batcheval
kv/kvserver/batcheval/result
kv/kvserver/closedtsPackage closedts houses the interfaces and basic definitions used by the various components of the closed timestamp subsystems.
kv/kvserver/closedts/container
kv/kvserver/closedts/ctpb
kv/kvserver/closedts/minpropPackage minprop exports a main data structure, Tracker, which checkpoints closed timestamps and associated Raft Lease Applied indexes positions for which (under additional conditions) it is legal to serve follower reads.
kv/kvserver/closedts/provider
kv/kvserver/closedts/provider/testutils
kv/kvserver/closedts/storage
kv/kvserver/closedts/transport
kv/kvserver/closedts/transport/testutils
kv/kvserver/compactor
kv/kvserver/concurrencyPackage concurrency provides a concurrency manager structure that encapsulates the details of concurrency control and contention handling for serializable key-value transactions.
kv/kvserver/concurrency/lockPackage lock provides type definitions for locking-related concepts used by concurrency control in the key-value layer.
kv/kvserver/constraint
kv/kvserver/diskmap
kv/kvserver/gcPackage gc contains the logic to run scan a range for garbage and issue GC requests to remove that garbage.
kv/kvserver/idalloc
kv/kvserver/intentresolver
kv/kvserver/kvserverbase
kv/kvserver/kvserverpb
kv/kvserver/protectedtsPackage protectedts exports the interface to the protected timestamp subsystem which allows clients to prevent GC of expired data.
kv/kvserver/protectedts/ptcache
kv/kvserver/protectedts/ptpb
kv/kvserver/protectedts/ptproviderPackage ptprovider encapsulates the concrete implementation of the protectedts.Provider.
kv/kvserver/protectedts/ptreconcilePackage ptreconcile provides logic to reconcile protected timestamp records with state associated with their metadata.
kv/kvserver/protectedts/ptstoragePackage ptstorage implements protectedts.Storage.
kv/kvserver/protectedts/ptverifier
kv/kvserver/raftentryPackage raftentry provides a cache for entries to avoid extra deserializations.
kv/kvserver/rangefeed
kv/kvserver/rditer
kv/kvserver/reports
kv/kvserver/spanlatchPackage spanlatch provides a latch management structure for serializing access to keys and key ranges.
kv/kvserver/spanset
kv/kvserver/split
kv/kvserver/stateloader
kv/kvserver/tenantratePackage tenantrate contains logic for rate limiting client requests on a per-tenant basis.
kv/kvserver/tscachePackage tscache provides a timestamp cache structure that records the maximum timestamp that key ranges were read from and written to.
kv/kvserver/txnrecovery
kv/kvserver/txnwait
releasePackage release contains utilities for assisting with the release process.
roachpb
rpc
rpc/nodedialer
scheduledjobs
security
security/securitytestPackage securitytest embeds the TLS test certificates.
serverPackage server implements the Cockroach storage node.
server/debug
server/debug/goroutineui
server/debug/pprofui
server/diagnosticspb
server/dumpstore
server/goroutinedumper
server/heapprofiler
server/serverpbPackage serverpb is a reverse proxy.
server/status
server/status/statuspb
server/telemetryPackage telemetry contains helpers for capturing diagnostics information.
settingsPackage settings provides a central registry of runtime editable settings and accompanying helper functions for retrieving their current values.
settings/cluster
sqlPackage sql provides the user-facing API for access to a Cockroach datastore.
sql/backfill
sql/catalog
sql/catalog/accessors
sql/catalog/bootstrapPackage bootstrap contains the metadata required to bootstrap the sql schema for a fresh cockroach cluster.
sql/catalog/catalogkeys
sql/catalog/catalogkvPackage catalogkv provides functions for interacting with the system catalog tables using the kv client.
sql/catalog/catconstants
sql/catalog/colinfoPackage colinfo contains type information and related structures for dealing with columns returned from sql operations.
sql/catalog/databasePackage database primarily provides the incoherent database cache and related interfaces.
sql/catalog/dbdescPackage dbdesc contains the concrete implementations of catalog.DatabaseDescriptor.
sql/catalog/descpb
sql/catalog/descsPackage descs provides abstractions for dealing with sets of descriptors.
sql/catalog/hydratedtablesPackage hydratedtables contains logic to cache table descriptors with user defined types hydrated.
sql/catalog/leasePackage lease provides functionality to create and manage sql schema leases.
sql/catalog/resolver
sql/catalog/schemadesc
sql/catalog/systemschema
sql/catalog/tabledescPackage tabledesc provides concrete implementations of catalog.TableDesc.
sql/catalog/typedescPackage typedesc contains the concrete implementations of catalog.TypeDescriptor.
sql/colcontainer
sql/colconv
sql/colencoding
sql/colexec
sql/colexecbase
sql/colexecbase/colexecerror
sql/colexec/colbuilder
sql/colexec/execgen
sql/colexec/execpb
sql/colfetcher
sql/colflow
sql/colflow/colrpc
sql/colmem
sql/covering
sql/delegate
sql/distsql
sql/doctorPackage doctor provides utilities for checking the consistency of cockroach internal persisted metadata.
sql/enum
sql/execinfra
sql/execinfrapb
sql/faketreeevalPackage faketreeeval provides fake implementations of tree eval interfaces.
sql/flowinfra
sql/gcjob
sql/gcjob/gcjobnotifierPackage gcjobnotifier provides a mechanism to share a SystemConfigDeltaFilter among all gc jobs.
sql/lex
sql/logictest
sqlmigrations
sqlmigrations/leasemanagerPackage leasemanager provides functionality for acquiring and managing leases via the kv api for use during sqlmigrations.
sql/mutations
sql/oidextPackage oidext contains oids that are not in `github.com/lib/pq/oid` as they are not shipped by default with postgres.
sql/optPackage opt contains the Cockroach SQL optimizer.
sql/opt/benchPackage bench houses benchmarks for the SQL optimizer.
sql/opt/catPackage cat contains interfaces that are used by the query optimizer to avoid including specifics of sqlbase structures in the opt code.
sql/opt/constraint
sql/opt/exec
sql/opt/exec/execbuilder
sql/opt/exec/explain
sql/opt/idxconstraint
sql/opt/invertedexpr
sql/opt/invertedidx
sql/optionalnodeliveness
sql/opt/memo
sql/opt/norm
sql/opt/opbench
sql/opt/optbuilder
sql/opt/optgen/exprgen
sql/opt/optgen/langPackage lang implements a language called Optgen, short for "optimizer generator".
sql/opt/orderingPackage ordering contains operator-specific logic related to orderings - whether ops can provide Required orderings, what orderings do they need to require from their children, etc.
sql/opt/partialidx
sql/opt/props
sql/opt/props/physical
sql/opt/testutils
sql/opt/testutils/opttester
sql/opt/testutils/testcat
sql/opt/testutils/testexpr
sql/opt/xform
sql/paramparsePackage paramparse parses parameters that are set in param lists or session vars.
sql/parser
sql/parser/fuzz
sql/pgwire
sql/pgwire/hbaPackage hba implements an hba.conf parser.
sql/pgwire/pgcodePackage pgcode defines the PostgreSQL 5-character support codes used throughout the CockroachDB source tree.
sql/pgwire/pgerror
sql/pgwire/pgnotice
sql/pgwire/pgwirebasePackage pgwirebase contains type definitions and very basic protocol structures to be used by both the pgwire package and by others (particularly by the sql package).
sql/physicalplan
sql/physicalplan/replicaoraclePackage replicaoracle provides functionality for physicalplan to choose a replica for a range.
sql/privilege
sql/protoreflect
sql/querycache
sql/roleoption
sql/row
sql/rowcontainer
sql/rowenc
sql/rowexec
sql/rowflow
sql/schemachange
sql/schemaexprPackage schemaexpr provides utilities for dealing with expressions with table schemas, such as check constraints, computed columns, and partial index predicates.
sql/scrub
sql/sem/builtins
sql/sem/transform
sql/sem/tree
sql/sessiondata
sql/span
sql/sqlerrorsPackage sqlerrors exports errors which can occur in the sql package.
sql/sqllivenessPackage sqlliveness provides interfaces to associate resources at the SQL level with tenant SQL processes.
sql/sqlliveness/slinstancePackage slinstance provides functionality for acquiring sqlliveness leases via sessions that have a unique id and expiration.
sql/sqlliveness/slproviderPackage slprovider exposes an implementation of the sqlliveness.Provider interface.
sql/sqlliveness/slstorage
sql/sqltelemetryPackage sqltelemetry contains telemetry counter definitions for various SQL features.
sql/sqltestutilsPackage sqltestutils provides helper methods for testing sql packages.
sql/sqlutil
sql/stats
sql/stmtdiagnostics
sql/tests
sql/types
sql/vtable
storagePackage storage provides low-level storage.
storage/cloud
storage/cloudimpl
storage/cloudimpl/filetable
storage/enginepb
storage/fs
storage/metamorphic
testutils
testutils/buildutil
testutils/colcontainerutils
testutils/diagutils
testutils/distsqlutils
testutils/gossiputil
testutils/jobutils
testutils/keysutils
testutils/kvclientutils
testutils/lintPackage lint tests Go code for policy and style violations, as well as detecting suspicious constructs that are typically bugs.
testutils/lint/passes/descriptormarshalPackage descriptormarshal defines an suite of Analyzers that detects correct setting of timestamps when unmarshaling table descriptors.
testutils/lint/passes/errcmpPackage errcmp defines an Analyzer which checks for usage of errors.Is instead of direct ==/!= comparisons.
testutils/lint/passes/fmtsafe
testutils/lint/passes/hashPackage hash defines an Analyzer that detects correct use of hash.Hash.
testutils/lint/passes/nocopyPackage nocopy defines an Analyzer that detects invalid uses of util.NoCopy.
testutils/lint/passes/returnerrcheckPackage returnerrcheck defines an suite of Analyzers that detects conditionals which check for a non-nil error and then proceed to return a nil error.
testutils/lint/passes/timerPackage timer defines an Analyzer that detects correct use of timeutil.Timer.
testutils/lint/passes/unconvertPackage unconvert defines an Analyzer that detects unnecessary type conversions.
testutils/localtestcluster
testutils/pgtest
testutils/physicalplanutils
testutils/reducePackage reduce implements a reducer core for reducing the size of test failure cases.
testutils/reduce/reducesql
testutils/serverutils
testutils/skip
testutils/sqlutils
testutils/storageutils
testutils/testcluster
testutils/zerofields
tsPackage ts provides a basic time series database on top of the underlying CockroachDB key/value datastore.
ts/catalog
ts/testmodel
ts/tspbPackage tspb is a reverse proxy.
uiPackage ui embeds the assets for the web UI into the Cockroach binary.
ui/distcclPackage distccl embeds the assets for the CCL version of the web UI into the Cockroach binary.
ui/distossPackage distoss embeds the assets for the OSS version of the web UI into the Cockroach binary.
util
util/arith
util/binfetcher
util/bitarray
util/bufalloc
util/cache
util/caller
util/cancelchecker
util/cgroups
util/cloudinfo
util/contextutil
util/ctxgroupPackage ctxgroup wraps golang.org/x/sync/errgroup with a context func.
util/duration
util/encoding
util/encoding/csvPackage csv reads and writes comma-separated values (CSV) files.
util/envutil
util/errorutil
util/errorutil/unimplemented
util/fileutil
util/flagutilPackage flagutil facilitates creation of rich flag types.
util/fsmPackage fsm provides an interface for defining and working with finite-state machines.
util/growstack
util/grpcutil
util/hlcPackage hlc implements the Hybrid Logical Clock outlined in "Logical Physical Clocks and Consistent Snapshots in Globally Distributed Databases", available online at http://www.cse.buffalo.edu/tech-reports/2014-04.pdf.
util/httputil
util/humanizeutil
util/intervalPackage interval provides two implementations for an interval tree.
util/interval/genericPackage generic provides an implementation of a generic immutable interval B-Tree.
util/interval/generic/internal
util/ipaddr
util/iterutil
util/json
util/keysutil
util/leaktestPackage leaktest provides tools to detect leaked goroutines in tests.
util/limit
util/logPackage log implements logging.
util/log/logflags
util/metricPackage metric provides server metrics (a.k.a.
util/metric/aggmetricPackage aggmetric provides functionality to create metrics which expose aggregate metrics for internal collection and additionally per-child reporting to prometheus.
util/mon
util/netutil
util/prettyPackage pretty prints documents based on a target line width.
util/protoutil
util/quotapoolPackage quotapool provides an abstract implementation of a pool of resources to be distributed among concurrent clients.
util/randutil
util/retry
util/ring
util/sdnotifyPackage sdnotify implements both sides of the systemd readiness protocol.
util/search
util/sequence
util/shuffle
util/sort
util/span
util/stop
util/stringarena
util/stringencoding
util/syncutil
util/syncutil/singleflightPackage singleflight provides a duplicate function call suppression mechanism.
util/sysutilPackage sysutil is a cross-platform compatibility layer on top of package syscall.
util/timeofday
util/timetz
util/timeutil
util/timeutil/pgdatePackage pgdate contains parsing functions and types for dates and times in a manner that is compatible with PostgreSQL.
util/tracing
util/treeprinter
util/uint128
util/unaccent
util/unique
util/uuid
util/version
workloadPackage workload provides an abstraction for generators of sql query loads (and requisite initial data) as well as tools for working with these generators.
workload/bank
workload/bulkingestPackage bulkingest defines a workload that is intended to stress some edge cases in our bulk-ingestion infrastructure.
workload/cli
workload/debugPackage debug provides a workload subcommand under which useful workload utilities live.
workload/examples
workload/faker
workload/geospatial
workload/histogram
workload/indexes
workload/interleavebench
workload/interleavedpartitioned
workload/jsonload
workload/kv
workload/ledger
workload/movr
workload/querybench
workload/querylog
workload/queue
workload/rand
workload/schemachange
workload/sqlsmith
workload/tpcc
workload/tpccchecks
workload/tpcds
workload/tpch
workload/workloadimplPackage workloadimpl provides dependency-light helpers for implementing workload.Generators.
workload/workloadsql
workload/ycsbPackage ycsb is the workload specified by the Yahoo! Cloud Serving Benchmark.

Updated 2020-10-01. Refresh now. Tools for package owners.