package
5.2.2+incompatible
Repository: https://github.com/rleungx/tidb-tools.git
Documentation: pkg.go.dev
# Functions
ClientWithTLS creates a http client wit tls.
GetCPUPercentage calculates CPU usage and returns percentage in float64(e.g.
GetJSON fetches a page and parses it as JSON.
GetRawInfo do what its name tells.
NewTLS constructs a new HTTP client with TLS configured with the CA, certificate and key paths.
NewTLSFromMockServer constructs a new TLS instance from the certificates of an *httptest.Server.
OriginError return original err.
ParseHostPortAddr returns a scheme://host:port or host:port list.
PrintInfo prints the app's basic information in log.
SliceToMap converts slice to map.
StringsToInterfaces converts string slice to interface slice.
ToTLSConfig generates tls's config.
ToTLSConfigWithVerify constructs a `*tls.Config` from the CA, certification and key paths, and add verify for CN.
ToTLSConfigWithVerifyByRawbytes constructs a `*tls.Config` from the CA, certification and key bytes and add verify for CN.
TSOToRoughTime translates tso to rough time that used to display.