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

Method SetType

cgroup2/manager.go:286–296  ·  view source on GitHub ↗
(cgType CgroupType)

Source from the content-addressed store, hash-verified

284}
285
286func (c *Manager) SetType(cgType CgroupType) error {
287 // NOTE: We could abort if cgType != Threaded here as currently
288 // it's not possible to revert back to domain, but not sure
289 // it's worth being that opinionated, especially if that may
290 // ever change.
291 v := Value{
292 filename: typeFile,
293 value: string(cgType),
294 }
295 return writeValues(c.path, []Value{v})
296}
297
298func (c *Manager) RootControllers() ([]string, error) {
299 b, err := os.ReadFile(filepath.Join(c.unifiedMountpoint, controllersFile))

Callers 1

TestCgroupTypeFunction · 0.95

Calls 1

writeValuesFunction · 0.85

Tested by 1

TestCgroupTypeFunction · 0.76