build(deps): bump github.com/open-policy-agent/opa from 0.51.0 to 0.59.0
Bumps [github.com/open-policy-agent/opa](https://github.com/open-policy-agent/opa) from 0.51.0 to 0.59.0. - [Release notes](https://github.com/open-policy-agent/opa/releases) - [Changelog](https://github.com/open-policy-agent/opa/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-policy-agent/opa/compare/v0.51.0...v0.59.0) --- updated-dependencies: - dependency-name: github.com/open-policy-agent/opa dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
Ralf Haferkamp
parent
a6a6c22c14
commit
1f069c7c00
+21
@@ -201,6 +201,27 @@ if err != nil {
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Get and set cgroup type
|
||||
```go
|
||||
m, err := cgroup2.LoadSystemd("/", "my-cgroup-abc.slice")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// https://www.kernel.org/doc/html/v5.0/admin-guide/cgroup-v2.html#threads
|
||||
cgType, err := m.GetType()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Println(cgType)
|
||||
|
||||
err = m.SetType(cgroup2.Threaded)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
```
|
||||
|
||||
### Attention
|
||||
|
||||
All static path should not include `/sys/fs/cgroup/` prefix, it should start with your own cgroups name
|
||||
|
||||
Reference in New Issue
Block a user