MCPcopy Create free account
hub / github.com/containerd/cgroups / parseKV

Function parseKV

cgroup1/utils.go:175–187  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

173}
174
175func parseKV(raw string) (string, uint64, error) {
176 parts := strings.Fields(raw)
177 switch len(parts) {
178 case 2:
179 v, err := parseUint(parts[1], 10, 64)
180 if err != nil {
181 return "", 0, err
182 }
183 return parts[0], v, nil
184 default:
185 return "", 0, ErrInvalidFormat
186 }
187}
188
189// ParseCgroupFile parses the given cgroup file, typically /proc/self/cgroup
190// or /proc/<pid>/cgroup, into a map of subsystems to cgroup paths, e.g.

Callers 4

StatMethod · 0.70
getUsageMethod · 0.70
parseStatsMethod · 0.70
parseOomControlStatsMethod · 0.70

Calls 1

parseUintFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…