package
6.7.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Packages
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
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
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
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
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
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 mock is just for test only.
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
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
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
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
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
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
# Functions
ChanMap creates a channel which applies the function over the input Channel.
CheckSupportX509NameOneline parses and validate input str is X509_NAME_oneline format and precheck check-item is supported by TiDB https://www.openssl.org/docs/manmaster/man3/X509_NAME_oneline.html.
ClientWithTLS creates a http client wit tls.
ColumnsToProto converts a slice of model.ColumnInfo to a slice of tipb.ColumnInfo.
ColumnToProto converts model.ColumnInfo to tipb.ColumnInfo.
ComposeURL adds HTTP schema if missing and concats address with path.
CreateCertificates creates and writes a cert based on the params.
DelKeyWithPrefix deletes keys with prefix.
FmtNonASCIIPrintableCharToHex turns non-printable-ASCII characters into Hex.
GenLogFields generate log fields.
GenRLimit get RLIMIT_NOFILE limit.
GetAutoAnalyzeProcID returns processID for auto analyze TODO support IDs for concurrent auto-analyze.
GetCPUPercentage calculates CPU usage and returns percentage in float64(e.g.
GetGOGC returns the current value of GOGC.
GetJSON fetches a page and parses it as JSON.
GetLocalIP will return a local IP(non-loopback, non 0.0.0.0), if there is one.
GetRawInfo do what its name tells nolint:unused.
HasCancelled checks whether context has be cancelled.
InternalHTTPClient is used by TiDB-Server to request other components.
InternalHTTPSchema specifies use http or https to request other components.
IsMemDB checks whether dbLowerName is memory database.
IsMemOrSysDB uses to check whether dbLowerName is memory database or system database.
IsSysDB checks whether dbLowerName is system database.
IsSystemView is similar to IsMemOrSyDB, but does not include the mysql schema.
IsTLSExpiredError checks error is caused by TLS expired.
LoadTLSCertificates loads CA/KEY/CERT for special paths.
MockPkixAttribute generates mock AttributeTypeAndValue.
NewGlobalConnID creates GlobalConnID with serverID.
NewGlobalConnIDWithGetter creates GlobalConnID with serverIDGetter.
NewSession creates a new etcd session.
NewTCPConnWithIOCounter creates a new TCPConnWithIOCounter.
NewTLS constructs a new HTTP client with TLS configured with the CA, certificate and key paths.
NewTLSConfig creates a tls.Config from the given options.
NewWaitGroupEnhancedWrapper returns WaitGroupEnhancedWrapper, the empty source indicates the unit test, then the `checkUnExitedProcess` won't be executed.
OriginError return original err.
ParseAndCheckSAN parses and check SAN str.
ParseGlobalConnID parses an uint64 to GlobalConnID.
ParseHostPortAddr returns a scheme://host:port or host:port list.
PrintableASCII detects if b is a printable ASCII character.
PrintInfo prints the app's basic information in log nolint:unused.
QueryStrForLog trim the query if the query length more than 4096.
ReadLine tries to read a complete line from bufio.Reader.
ReadLines tries to read lines from bufio.Reader.
Recover includes operations such as recovering, clearing,and printing information.
RowKeyPrefixFilter returns a function which checks whether currentKey has decoded rowKeyPrefix as prefix.
RunWithRetry will run the f with backoff and retry.
ScanMetaWithPrefix scans metadata with the prefix.
SetGOGC update GOGC and related metrics.
SliceToMap converts slice to map nolint:unused.
Str2Int64Map converts a string to a map[int64]struct{}.
StringsToInterfaces converts string slice to interface slice.
SyntaxError converts parser error to TiDB's syntax error.
SyntaxWarn converts parser warn to TiDB's syntax warn.
TLSCipher2String convert tls num to string.
ToTLSConfig generates tls's config.
ToTLSConfigWithVerify constructs a `*tls.Config` from the CA, certification and key paths, and add verify for CN.
TSOToRoughTime translates tso to rough time that used to display.
WithCAContent sets the CA content to build a tls.Config, and the peer should use the certificate which can be verified by this CA.
WithCAPath sets the CA path to build a tls.Config, and the peer should use the certificate which can be verified by this CA.
WithCertAndKeyContent sets the client certificate and primary key content to build a tls.Config.
WithCertAndKeyPath sets the client certificate and primary key path to build a tls.Config.
WithRecovery wraps goroutine startup call with force recovery.
WithVerifyCommonName sets the Common Name the peer must provide before starting a TLS connection.
X509NameOnline prints pkix.Name into old X509_NAME_oneline format.
# Constants
CommonName is type name for common name.
Country is type name for country.
DefaultMaxRetries indicates the max retry count.
DNS indicates dns info in SAN.
Email is type name for email.
IP indicates ip info in SAN.
Locality is type name for locality.
MaxServerID is maximum serverID.
NewSessionDefaultRetryCnt is the default retry times when create new session.
NewSessionRetryUnlimited is the unlimited retry times when create new session.
Organization is type name for organization.
OrganizationalUnit is type name for organizational unit.
Province is type name for province or state.
RetryInterval indicates retry interval.
URI indicates uri info in SAN.
# Variables
Version information.
ClusterTableInstanceColumnName is the `INSTANCE` column name of the cluster table.
GetSequenceByName could be used in expression package without import cycle problem.
Version information.
Version information.
InformationSchemaName is the `INFORMATION_SCHEMA` database name.
MetricSchemaName is the `METRICS_SCHEMA` database name.
PerformanceSchemaName is the `PERFORMANCE_SCHEMA` database name.
SupportCipher maintains cipher supported by TiDB.
Version information.
# Structs
GlobalConnID is the global connection ID, providing UNIQUE connection IDs across the whole TiDB cluster.
OOMAlarmVariablesInfo is a struct for OOM alarm variables.
ProcessInfo is a struct used for show processlist statement.
TCPConnWithIOCounter is a wrapper of net.TCPConn with counter that accumulates the bytes this connection reads/writes.
TLS saves some information about tls.
WaitGroupEnhancedWrapper wrapper wg, it provides the basic ability of WaitGroupWrapper with checking unexited process if the `exited` signal is true by print them on log.
WaitGroupWrapper is a wrapper for sync.WaitGroup.
# Interfaces
ProtectedTSList holds a list of timestamps that should delay GC.
SequenceTable is implemented by tableCommon, and it is specialised in handling sequence operation.
SessionManager is an interface for session manage.
# Type aliases
SANType is enum value for GlobalPrivValue.SANs keys.
TLSConfigOption is used to build a tls.Config in NewTLSConfig.