Versions in this module Expand all Collapse all v1 v1.0.0 Aug 23, 2023 v0 v0.1.0 Aug 23, 2023 Changes in this version + const CommonName + const Country + const DNS + const DefaultMaxRetries + const Email + const IP + const Locality + const MaxServerID + const NewSessionDefaultRetryCnt + const NewSessionRetryUnlimited + const Organization + const OrganizationalUnit + const Province + const RetryInterval + const URI + var BuildTS = "None" + var ClusterTableInstanceColumnName = "INSTANCE" + var GetSequenceByName func(is interface{}, schema, sequence model.CIStr) (SequenceTable, error) + var GitBranch = "None" + var GitHash = "None" + var InformationSchemaName = model.NewCIStr("INFORMATION_SCHEMA") + var MetricSchemaName = model.NewCIStr("METRICS_SCHEMA") + var PerformanceSchemaName = model.NewCIStr("PERFORMANCE_SCHEMA") + var SupportCipher = make(map[string]struct{}, len(tlsCipherString)) + var Version = "None" + func ChanMap(c <-chan T, f func(T) R) <-chan R + func CheckSupportX509NameOneline(oneline string) (err error) + func ClientWithTLS(tlsCfg *tls.Config) *http.Client + func ColumnToProto(c *model.ColumnInfo) *tipb.ColumnInfo + func ColumnsToProto(columns []*model.ColumnInfo, pkIsHandle bool) []*tipb.ColumnInfo + func ComposeURL(address, path string) string + func CreateCertificates(certpath string, keypath string, rsaKeySize int, ...) error + func DelKeyWithPrefix(rm kv.RetrieverMutator, prefix kv.Key) error + func FmtNonASCIIPrintableCharToHex(str string) string + func GenLogFields(costTime time.Duration, info *ProcessInfo, needTruncateSQL bool) []zap.Field + func GenRLimit() uint64 + func GetAutoAnalyzeProcID(serverIDGetter func() uint64) uint64 + func GetCPUPercentage() float64 — darwin/amd64, linux/amd64, windows/amd64 + func GetGOGC() int + func GetJSON(client *http.Client, url string, v interface{}) error + func GetLocalIP() string + func GetRawInfo(app string) string + func HasCancelled(ctx context.Context) (cancel bool) + func InternalHTTPClient() *http.Client + func InternalHTTPSchema() string + func IsMemDB(dbLowerName string) bool + func IsMemOrSysDB(dbLowerName string) bool + func IsSysDB(dbLowerName string) bool + func IsSystemView(dbLowerName string) bool + func IsTLSExpiredError(err error) bool + func LoadTLSCertificates(ca, key, cert string, autoTLS bool, rsaKeySize int) (tlsConfig *tls.Config, autoReload bool, err error) + func MockPkixAttribute(name, value string) pkix.AttributeTypeAndValue + func NewSession(ctx context.Context, logPrefix string, etcdCli *clientv3.Client, ...) (*concurrency.Session, error) + func NewTLSConfig(opts ...TLSConfigOption) (*tls.Config, error) + func OriginError(err error) error + func ParseAndCheckSAN(san string) (map[SANType][]string, error) + func ParseHostPortAddr(s string) ([]string, error) + func PrintInfo(app string) + func PrintableASCII(b byte) bool + func QueryStrForLog(query string) string + func Recover(metricsLabel, funcInfo string, recoverFn func(), quit bool) + func RowKeyPrefixFilter(rowKeyPrefix kv.Key) kv.FnKeyCmp + func RunWithRetry(retryCnt int, backoff uint64, f func() (bool, error)) (err error) + func ScanMetaWithPrefix(retriever kv.Retriever, prefix kv.Key, filter func(kv.Key, []byte) bool) error + func SetGOGC(val int) int + func SliceToMap(slice []string) map[string]interface + func Str2Int64Map(str string) map[int64]struct + func StringsToInterfaces(strs []string) []interface + func SyntaxError(err error) error + func SyntaxWarn(err error) error + func TLSCipher2String(n uint16) string + func TSOToRoughTime(ts int64) time.Time + func ToTLSConfig(caPath, certPath, keyPath string) (*tls.Config, error) + func ToTLSConfigWithVerify(caPath, certPath, keyPath string, verifyCN []string) (*tls.Config, error) + func WithRecovery(exec func(), recoverFn func(r interface{})) + func X509NameOnline(n pkix.Name) string + type GlobalConnID struct + Is64bits bool + LocalConnID uint64 + ServerID uint64 + ServerIDGetter func() uint64 + func NewGlobalConnID(serverID uint64, is64Bits bool) GlobalConnID + func NewGlobalConnIDWithGetter(serverIDGetter func() uint64, is64Bits bool) GlobalConnID + func ParseGlobalConnID(id uint64) (g GlobalConnID, isTruncated bool, err error) + func (g *GlobalConnID) ID() uint64 + func (g *GlobalConnID) NextID() uint64 + type OOMAlarmVariablesInfo struct + SessionAnalyzeVersion int + SessionEnabledRateLimitAction bool + SessionMemQuotaQuery int64 + type ProcessInfo struct + Command byte + CurTxnStartTS uint64 + DB string + Digest string + DiskTracker *disk.Tracker + ExpensiveLogTime time.Time + Host string + ID uint64 + IndexNames []string + Info string + MaxExecutionTime uint64 + MemTracker *memory.Tracker + OOMAlarmVariablesInfo OOMAlarmVariablesInfo + Plan interface{} + PlanExplainRows [][]string + Port string + RedactSQL bool + RefCountOfStmtCtx *stmtctx.ReferenceCount + RuntimeStatsColl *execdetails.RuntimeStatsColl + State uint16 + StatsInfo func(interface{}) map[string]uint64 + StmtCtx *stmtctx.StatementContext + TableIDs []int64 + Time time.Time + User string + func (pi *ProcessInfo) String() string + func (pi *ProcessInfo) ToRow(tz *time.Location) []interface{} + func (pi *ProcessInfo) ToRowForShow(full bool) []interface{} + type SANType string + type SequenceTable interface + GetSequenceID func() int64 + GetSequenceNextVal func(ctx interface{}, dbName, seqName string) (int64, error) + SetSequenceVal func(ctx interface{}, newVal int64, dbName, seqName string) (int64, bool, error) + type SessionManager interface + CheckOldRunningTxn func(job2ver map[int64]int64, job2ids map[int64]string) + DeleteInternalSession func(se interface{}) + GetInternalSessionStartTSList func() []uint64 + GetProcessInfo func(id uint64) (*ProcessInfo, bool) + Kill func(connectionID uint64, query bool) + KillAllConnections func() + KillNonFlashbackClusterConn func() + ServerID func() uint64 + ShowProcessList func() map[uint64]*ProcessInfo + ShowTxnList func() []*txninfo.TxnInfo + StoreInternalSession func(se interface{}) + UpdateTLSConfig func(cfg *tls.Config) + type TLS struct + func NewTLS(caPath, certPath, keyPath, host string, verifyCN []string) (*TLS, error) + func (tc *TLS) WrapListener(l net.Listener) net.Listener + type TLSConfigOption func(*tlsConfigBuilder) + func WithCAContent(caContent []byte) TLSConfigOption + func WithCAPath(caPath string) TLSConfigOption + func WithCertAndKeyContent(certContent, keyContent []byte) TLSConfigOption + func WithCertAndKeyPath(certPath, keyPath string) TLSConfigOption + func WithVerifyCommonName(verifyCN []string) TLSConfigOption + type WaitGroupWrapper struct + func (w *WaitGroupWrapper) Run(exec func()) + func (w *WaitGroupWrapper) RunWithRecover(exec func(), recoverFn func(r interface{}))