Documentation ¶
Index ¶
- Variables
- func GetCPUPercentage() float64
- func GetRawInfo(app string) string
- func OriginError(err error) error
- func ParseHostPortAddr(s string) ([]string, error)
- func SliceToMap(slice []string) map[string]interface{}
- func StringsToInterfaces(strs []string) []interface{}
- func TSOToRoughTime(ts int64) time.Time
- func ToTLSConfig(SSLCA, SSLCert, SSLKey string) (*tls.Config, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "None" BuildTS = "None" GitHash = "None" )
Version information.
Functions ¶
func GetCPUPercentage ¶
func GetCPUPercentage() float64
GetCPUPercentage calculates CPU usage and returns percentage in float64(e.g. 2.5 means 2.5%). http://man7.org/linux/man-pages/man2/getrusage.2.html
func ParseHostPortAddr ¶
ParseHostPortAddr returns a scheme://host:port or host:port list
func SliceToMap ¶
SliceToMap converts slice to map
func StringsToInterfaces ¶
func StringsToInterfaces(strs []string) []interface{}
StringsToInterfaces converts string slice to interface slice
func TSOToRoughTime ¶
TSOToRoughTime translates tso to rough time that used to display
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.