package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Packages

Package regionlatency has testing utilities for injecting artificial latency into test clusters.

# Functions

CertsDirPrefix sets the prefix for the directory where the client certificates are stored.
ClientCerts set whether the client certificates are loaded on-disk and in the connection URL.
DBName sets the database name to use when connecting to the server.
DefaultSQLConnOptions returns the default options for opening a SQL connection.
GetExternalCaller returns the file:line of the first function in the call stack outside of this package.
GetJSONProto uses the supplied client to GET the URL specified by the parameters and unmarshals the result into response.
GetJSONProtoWithAdminAndTimeoutOption is like GetJSONProtoWithAdminOption but the caller can specify an additional timeout duration for the request.
GetJSONProtoWithAdminOption is like GetJSONProto but the caller can customize whether the request is performed with admin privilege.
InitTestClusterFactory should be called once to provide the implementation of the service.
InitTestServerFactory should be called once to provide the implementation of the service.
NewCluster creates TestCluster made up of numNodes in-memory testing servers.
NewServer creates a test server.
OpenDBConn sets up a gosql DB connection to the given server.
OpenDBConnE is like OpenDBConn, but returns an error.
PostJSONProto uses the supplied client to POST the URL specified by the parameters and unmarshals the result into response.
PostJSONProtoWithAdminOption is like PostJSONProto but the caller can customize whether the request is performed with admin privilege.
PreventDisableSQLForTenantError is thrown by tests that attempt to set DisableSQLServer but run with cluster virtualization.
SetClusterSetting executes set cluster settings statement, and then ensures that all nodes in the test cluster see that setting update.
ShouldStartDefaultTestTenant determines whether a default test tenant should be started for test servers or clusters, to serve SQL traffic by default.
StartCluster is a convenience function that calls NewCluster() followed by Start() on the resulting cluster instance.
StartServer creates and starts a test server.
StartServerOnly creates and starts a test server.
StartServerOnlyE is like StartServerOnly() but it lets the test decide what to do with the error.
StartTenant starts a tenant SQL server connecting to the supplied test server.
TestingSetDefaultTenantSelectionOverride changes the global selection override.
TestingSetWrapperLogger is used in tests.
TestTenantID returns a roachpb.TenantID that can be used when starting a test Tenant.
TestTenantID2 returns another roachpb.TenantID that can be used when starting a test Tenant.
TestTenantID3 returns another roachpb.TenantID that can be used when starting a test Tenant.
User sets the username to use when connecting to the server.
UserPassword sets the username and password to use when connecting to the server.
WaitForTenantCapabilities waits until the given set of capabilities have been cached.

# Constants

# Variables

# Structs

KeyAndTargets contains replica startKey and targets.
SplitPoint describes a split point that is passed to SplitTable.
SQLConnOptions contains options for opening a SQL connection.

# Interfaces

ApplicationLayerInterface defines accessors to the application layer of a test server.
StorageLayerInterface defines accessors to the storage layer of a test server.
TenantControlInterface defines the API of a test server that can start the SQL and HTTP service for secondary tenants (virtual clusters).
TestClusterFactory encompasses the actual implementation of the shim service.
TestClusterInterface defines TestCluster functionality used by tests.
TestFataler is the minimal interface of testing.T that is used by StartServer.
TestLogger is the minimal interface of testing.T that is used by StartServerOnlyE.
TestServerController defines the control interface for a test server.
TestServerFactory encompasses the actual implementation of the shim service.
TestServerInterfaceRaw is the interface of server.testServer.

# Type aliases

SQLConnOption is an option for opening a SQL connection.