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

Function fetchState

cgroup2/state.go:52–65  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

50}
51
52func fetchState(path string) (State, error) {
53 current, err := os.ReadFile(filepath.Join(path, cgroupFreeze))
54 if err != nil {
55 return Unknown, err
56 }
57 switch strings.TrimSpace(string(current)) {
58 case "1":
59 return Frozen, nil
60 case "0":
61 return Thawed, nil
62 default:
63 return Unknown, nil
64 }
65}

Callers 1

freezeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…