mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
This updates vendored runc/libcontainer to 1.1.0, and google/cadvisor to a version updated to runc 1.1.0 (google/cadvisor#3048). Changes in vendor are generated by (roughly): ./hack/pin-dependency.sh github.com/google/cadvisor v0.44.0 ./hack/pin-dependency.sh github.com/opencontainers/runc v1.1.0 ./hack/update-vendor.sh ./hack/lint-dependencies.sh # And follow all its recommendations. ./hack/update-vendor.sh ./hack/update-internal-modules.sh ./hack/lint-dependencies.sh # Re-check everything again. Co-Authored-By: Kir Kolyshkin <kolyshkin@gmail.com>
32 lines
606 B
Go
32 lines
606 B
Go
package fs
|
|
|
|
import (
|
|
"github.com/opencontainers/runc/libcontainer/cgroups"
|
|
"github.com/opencontainers/runc/libcontainer/configs"
|
|
)
|
|
|
|
type NameGroup struct {
|
|
GroupName string
|
|
Join bool
|
|
}
|
|
|
|
func (s *NameGroup) Name() string {
|
|
return s.GroupName
|
|
}
|
|
|
|
func (s *NameGroup) Apply(path string, _ *configs.Resources, pid int) error {
|
|
if s.Join {
|
|
// Ignore errors if the named cgroup does not exist.
|
|
_ = apply(path, pid)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (s *NameGroup) Set(_ string, _ *configs.Resources) error {
|
|
return nil
|
|
}
|
|
|
|
func (s *NameGroup) GetStats(path string, stats *cgroups.Stats) error {
|
|
return nil
|
|
}
|