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

Method GetType

cgroup2/manager.go:277–284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

275)
276
277func (c *Manager) GetType() (CgroupType, error) {
278 val, err := os.ReadFile(filepath.Join(c.path, typeFile))
279 if err != nil {
280 return "", err
281 }
282 trimmed := strings.TrimSpace(string(val))
283 return CgroupType(trimmed), nil
284}
285
286func (c *Manager) SetType(cgType CgroupType) error {
287 // NOTE: We could abort if cgType != Threaded here as currently

Callers 2

TestCgroupTypeFunction · 0.95
DeleteMethod · 0.95

Calls 1

CgroupTypeTypeAlias · 0.85

Tested by 1

TestCgroupTypeFunction · 0.76