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

Function Load

cgroup2/manager.go:232–248  ·  view source on GitHub ↗

Load a cgroup.

(group string, opts ...InitOpts)

Source from the content-addressed store, hash-verified

230
231// Load a cgroup.
232func Load(group string, opts ...InitOpts) (*Manager, error) {
233 c := InitConfig{mountpoint: defaultCgroup2Path}
234 for _, opt := range opts {
235 if err := opt(&c); err != nil {
236 return nil, err
237 }
238 }
239
240 if err := VerifyGroupPath(group); err != nil {
241 return nil, err
242 }
243 path := filepath.Join(c.mountpoint, group)
244 return &Manager{
245 unifiedMountpoint: c.mountpoint,
246 path: path,
247 }, nil
248}
249
250type Manager struct {
251 unifiedMountpoint string

Callers 1

main.goFile · 0.92

Calls 1

VerifyGroupPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…