Documentation ¶
Index ¶
- Variables
- func GetCgroupParamInt(path, file string) (int64, error)
- func GetCgroupParamString(path, file string) (string, error)
- func GetCgroupParamUint(path, file string) (uint64, error)
- func GetValueByKey(path, file, key string) (uint64, error)
- func ParseKeyValue(t string) (string, uint64, error)
- func ParseUint(s string, base, bitSize int) (uint64, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotValidFormat = errors.New("line is not a valid key value format") // Deprecated: use cgroups.OpenFile instead. OpenFile = cgroups.OpenFile // Deprecated: use cgroups.ReadFile instead. ReadFile = cgroups.ReadFile // Deprecated: use cgroups.WriteFile instead. WriteFile = cgroups.WriteFile )
Functions ¶
func GetCgroupParamInt ¶
GetCgroupParamInt reads a single int64 value from specified cgroup file. If the value read is "max", the math.MaxInt64 is returned.
func GetCgroupParamString ¶
GetCgroupParamString reads a string from the specified cgroup file.
func GetCgroupParamUint ¶
GetCgroupParamUint reads a single uint64 value from the specified cgroup file. If the value read is "max", the math.MaxUint64 is returned.
func GetValueByKey ¶
GetValueByKey reads a key-value pairs from the specified cgroup file, and returns a value of the specified key. ParseUint is used for value conversion.
func ParseKeyValue ¶
ParseKeyValue parses a space-separated "name value" kind of cgroup parameter and returns its key as a string, and its value as uint64 (ParseUint is used to convert the value). For example, "io_service_bytes 1234" will be returned as "io_service_bytes", 1234.
Types ¶
This section is empty.