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

Method EnabledControllers

cgroup2/manager.go:123–146  ·  view source on GitHub ↗

EnabledControllers returns the list of all not nil resource controllers

()

Source from the content-addressed store, hash-verified

121
122// EnabledControllers returns the list of all not nil resource controllers
123func (r *Resources) EnabledControllers() (c []string) {
124 if r.CPU != nil {
125 c = append(c, "cpu")
126 if r.CPU.Cpus != "" || r.CPU.Mems != "" {
127 c = append(c, "cpuset")
128 }
129 }
130 if r.Memory != nil {
131 c = append(c, "memory")
132 }
133 if r.Pids != nil {
134 c = append(c, "pids")
135 }
136 if r.IO != nil {
137 c = append(c, "io")
138 }
139 if r.RDMA != nil {
140 c = append(c, "rdma")
141 }
142 if r.HugeTlb != nil {
143 c = append(c, "hugetlb")
144 }
145 return
146}
147
148// Value of a cgroup setting
149type Value struct {

Callers 2

NewManagerFunction · 0.80
NewChildMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected