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

Function Default

cgroup1/v1.go:28–45  ·  view source on GitHub ↗

Default returns all the groups in the default cgroups mountpoint in a single hierarchy

()

Source from the content-addressed store, hash-verified

26
27// Default returns all the groups in the default cgroups mountpoint in a single hierarchy
28func Default() ([]Subsystem, error) {
29 root, err := v1MountPoint()
30 if err != nil {
31 return nil, err
32 }
33 subsystems, err := defaults(root)
34 if err != nil {
35 return nil, err
36 }
37 var enabled []Subsystem
38 for _, s := range pathers(subsystems) {
39 // check and remove the default groups that do not exist
40 if _, err := os.Lstat(s.Path("/")); err == nil {
41 enabled = append(enabled, s)
42 }
43 }
44 return enabled, nil
45}
46
47// v1MountPoint returns the mount point where the cgroup
48// mountpoints are mounted in a single hierarchy

Callers

nothing calls this directly

Calls 4

v1MountPointFunction · 0.85
defaultsFunction · 0.85
pathersFunction · 0.85
PathMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…