package
23.2.20+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
No description provided by the author
Package application_api pertains to the RPC and HTTP APIs exposed by the application layers, including SQL and tenant-scoped HTTP.
No description provided by the author
Package autoconfig defines a mechanism through which the SQL service for a tenant (including, possibly, the system tenant) can run SQL tasks defined externally only once, using jobs.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
license handles enforcement of license policies in the server.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package settingswatcher provides utilities to update cluster settings using a range feed.
No description provided by the author
No description provided by the author
No description provided by the author
Package storage_api pertains to the RPC and HTTP APIs exposed by the storage and KV layers.
No description provided by the author
No description provided by the author
Package telemetry contains helpers for capturing diagnostics information.
Package tenantsettingswatcher implements an in-memory view of the tenant_settings table (containing overrides for tenant settings) using a rangefeed.
No description provided by the author
# Functions
CallDrainServerSide is a reference implementation for a server-side function that wishes to shut down a server gracefully via the Drain interface.
ExpectedInitialRangeCount returns the expected number of ranges that should be on the server after bootstrap.
GetBootstrapSchema returns the schema which will be used to bootstrap a new server.
InitHandshake starts off an inter-node TLS handshake protocol, as described here: https://github.com/cockroachdb/cockroach/pull/51991 .
ListenAndUpdateAddrs starts a TCP listener on the specified address then updates the address and advertised address fields based on the actual interface address resolved by the OS during the Listen() call.
ListenerFactoryForConfig return an RPCListenerFactory for the given configuration.
MakeBaseConfig returns a BaseConfig with default values.
MakeConfig returns a Config for the system tenant with default values.
MakeKVConfig returns a KVConfig with default values.
MakeServerOptionsForURL creates the input for MakeURLForServer().
MakeSQLConfig returns a SQLConfig with default values.
NewNode returns a new instance of Node.
NewNoopTenantSideCostController returns a noop cost controller.
NewSeparateProcessTenantServer creates a tenant-specific, SQL-only server against a KV backend, with defaults appropriate for a SQLServer that is not located in the same process as a KVServer.
NewServer creates a Server from a server.Config.
NewStickyVFSRegistry creates a new StickyVFSRegistry.
NewWaitingForInitError creates an error indicating that the server cannot run the specified method until the node has been initialized.
SetOpenFileLimitForOneStore sets the soft limit for open file descriptors when there is only one store.
TestingMakeLoggingContexts is exposed for use in tests.
UpdateAddrs updates the listen and advertise port numbers with those found during the call to net.Listen().
# Constants
AcceptHeader is the canonical header name for accept.
ClusterNameParamInQueryURL is the HTTP query URL parameter used to select a particular virtual cluster.
ContentTypeHeader is the canonical header name for content type.
No description provided by the author
Table sources.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
128 MiB.
Context defaults.
JSONContentType is the JSON content type.
No description provided by the author
No description provided by the author
RaftStateDormant is used when there is no known raft state.
RemoteNodeID is used to look up remote nodeID values to route requests to from a request's query params or a Cookie.
TempDirPrefix is the filename prefix of any temporary subdirectory created.
TempDirsRecordFilename is the filename for the record file that keeps track of the paths of the temporary directories created.
TenantSelectHeader is the HTTP header used to select a particular tenant.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
ApplyTenantLicense is a hook for CCL code which enables enterprise features for the tenant process if the COCKROACH_TENANT_LICENSE environment variable is set.
ConnectionShutdownTimeout is the max amount of time waiting for clients to disconnect.
DrainWait is the initial wait time before a drain effectively starts.
ErrAddJoinTokenConsumed is an error to signal the server consumed the Add/Join token but failed to provide the CertBundle to the client.
ErrClusterInitialized is reported when the Bootstrap RPC is run on a node that is already part of an initialized cluster.
ErrIncompatibleBinaryVersion is returned when a CRDB node with a binary version X attempts to join a cluster with an active version that's higher.
ErrInvalidAddJoinToken is an error to signal server rejected Add/Join token as invalid.
ErrInvalidTenant is reported as one of the error marks on the error result of newServerFn, i.e.
ErrNoNodeID is returned by getNodeIDFromRequest if the request contains no nodeID to proxy to.
HotRangesRequestNodeTimeout controls the timeout of a serverpb.HotRangesRequest.
HSTSEnabled is a boolean that enables HSTS headers on the HTTP server.
JobShutdownTimeout is the max amount of time waiting for jobs to stop executing.
NewTenantSideCostController is a hook for CCL code which implements the controller.
NewTenantUsageServer is a hook for CCL code which implements the tenant usage server.
PersistedInsightsUIEnabled controls if the insights endpoint uses the persisted statement_execution_insights and transaction_execution_insights tables.
QueryShutdownTimeout is the max amount of time waiting for queries to stop execution.
Cluster settings.
ServerHTTPBasePath is a cluster setting that contains the path to route the user to after successful login.
SQLAPIClock is exposed for override by tests.
SQLStatsResponseMax controls the maximum number of statements and transactions returned by the CombinedStatements endpoint.
SQLStatsShowInternal controls if statistics for internal executions should be returned in sql stats APIs, including: CombinedStatementStats, ListSessions, and ListLocalSessions.
StatsActivityUIEnabled controls if the combined statement stats uses the system.statement_activity and system.transaction_activity which acts as a cache storing the top queries from system.statement_statistics and system.transaction_statistics tables.
TestServerFactory can be passed to serverutils.InitTestServerFactory and rangetestutils.InitTestServerFactory.
UseStrictMemFS option instructs StickyVFSRegistry to produce strict in-memory filesystems, i.e.
# Structs
BaseConfig holds parameters that are needed to setup either a KV or a SQL server.
CertificateBundle manages the collection of certificates used by a CockroachDB node.
Config holds the parameters needed to set up a combined KV and SQL server.
KeyVisualizerServer is a concrete implementation of the keyvispb.KeyVisualizerServer interface.
KVConfig holds the parameters that (together with a BaseConfig) allow setting up a KV server.
ListenError is returned from Start when we fail to start listening on either the main Cockroach port or the HTTP port, so that the CLI can instruct the user on what might have gone wrong.
LocalKVServerInfo is used to group information about the local KV server necessary for creating the internalClientAdapter for an in-process tenant talking to that server.
A Node manages a map of stores (by store ID) for which it serves traffic.
ServiceCertificateBundle is a container for the CA and host node certs.
SQLConfig holds the parameters that (together with a BaseConfig) allow setting up a SQL server.
SQLServer encapsulates the part of a CRDB server that is dedicated to SQL processing.
SQLServerWrapper is a utility struct that encapsulates a SQLServer and its helpers that make it a networked service.
TenantMigrationServer is an implementation of the Migration service for tenants.
TestingKnobs groups testing knobs for the Server.
# Interfaces
No description provided by the author
ServerIterator is an interface that provides an abstraction around fanning out requests to different "servers" or "nodes".
StickyVFSRegistry manages the lifecycle of sticky in-memory filesystems.
StmtDiagnosticsRequester is the interface into *stmtdiagnostics.Registry used by AdminUI endpoints.
# Type aliases
Engines is a container of engines, allowing convenient closing.
GetNodeIDHTTPAddressFn is a callback to look up HTTP addresses for a given NodeID.
MaxOffsetType stores the configured MaxOffset.
ParseNodeIDFn is a callback to parse strings into `roachpb.NodeID` instances.
No description provided by the author
ServerSideDrainFn is the interface of the server-side handler for the Drain logic.
StickyVFSOption is a config option for a sticky engine registry that can be passed to NewStickyVFSRegistry.