Documentation
¶
Index ¶
- Constants
- Variables
- func CompressToGzipFile(srcPath, dstPath string) error
- func CpuLoad1Usage() float64
- func CurrentLocalIP() string
- func DiskUsagePercent() float64
- func EnsureDirExist(path string) error
- func Have(path string) bool
- func HaveDir(file string) bool
- func IsUUID(sid string) bool
- func LookupCharsetDecode(charset string) transform.Transformer
- func LookupCharsetEncode(charset string) transform.Transformer
- func MemoryUsagePercent() float64
- func ParseMemLimit(lines []string) (uint64, error)
- func ParseMemUsage(lines []string) (uint64, error)
- func RandomStr(length int) string
- func ReadFileLines(path string) ([]string, error)
- func UUID() string
- type Mem
- type MemStat
- type UTCTime
Constants ¶
View Source
const ( UTF8 = "utf8" GBK = "gbk" GB2312 = "gb2312" ISOLatin1 = "ios-8859-1" )
Variables ¶
View Source
var (
ErrLines = errors.New("not correct line format")
)
View Source
var (
ErrUnSupportFormat = errors.New("unsupported time format")
)
Functions ¶
func CompressToGzipFile ¶
func CpuLoad1Usage ¶
func CpuLoad1Usage() float64
func CurrentLocalIP ¶
func CurrentLocalIP() string
func DiskUsagePercent ¶
func DiskUsagePercent() float64
func EnsureDirExist ¶
func LookupCharsetDecode ¶
func LookupCharsetDecode(charset string) transform.Transformer
func LookupCharsetEncode ¶
func LookupCharsetEncode(charset string) transform.Transformer
func MemoryUsagePercent ¶
func MemoryUsagePercent() float64
func ParseMemLimit ¶
func ParseMemUsage ¶
func ReadFileLines ¶
Types ¶
type Mem ¶
func (Mem) MemUsageNoCache ¶
type MemStat ¶
func ParseMemStat ¶
type UTCTime ¶
func NewNowUTCTime ¶
func NewNowUTCTime() UTCTime
func NewUTCTime ¶
func (UTCTime) MarshalJSON ¶
func (*UTCTime) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.