mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-08-07 17:40:34 +00:00
This change updates four dependencies: - github.com/containerd/containerd/api from v1.11.0 to v1.11.1 - github.com/cyphar/filepath-securejoin from v0.6.1 to v0.7.0 - github.com/opencontainers/cgroups from v0.0.6 to v0.0.7 - github.com/opencontainers/selinux from v1.13.1 to v1.15.1 The new filepath-securejoin release requires a newer version of cyphar.com/go-pathrs, so that module also moves from v0.2.2 to v0.2.5. The file hack/unwanted-dependencies.json did not need any changes. Signed-off-by: Davanum Srinivas <davanum@gmail.com>
36 lines
769 B
Go
36 lines
769 B
Go
package fs
|
|
|
|
import (
|
|
"github.com/opencontainers/cgroups"
|
|
)
|
|
|
|
type NetPrioGroup struct{}
|
|
|
|
func (s *NetPrioGroup) Name() string {
|
|
return "net_prio"
|
|
}
|
|
|
|
// ID returns the controller ID for net_prio subsystem.
|
|
// Returns 0 as net_prio is not a cgroups.Controller.
|
|
func (s *NetPrioGroup) ID() cgroups.Controller {
|
|
return 0
|
|
}
|
|
|
|
func (s *NetPrioGroup) Apply(path string, _ *cgroups.Resources, pid int) error {
|
|
return apply(path, pid)
|
|
}
|
|
|
|
func (s *NetPrioGroup) Set(path string, r *cgroups.Resources) error {
|
|
for _, prioMap := range r.NetPrioIfpriomap {
|
|
if err := cgroups.WriteFile(path, "net_prio.ifpriomap", prioMap.CgroupString()); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (s *NetPrioGroup) GetStats(path string, stats *cgroups.Stats) error {
|
|
return nil
|
|
}
|