/
githubmirror
/
origin
Обзор
Документация
Войти
/
githubmirror
/
origin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
vendor/github.com/opencontainers/cgroups/fs/devices.go
38 строк
768 B
Fabio Bertinatto
bump(k8s): update k8s.io/* dependencies to v1.33.2
17 июл 2025, 12:12
17 июл 2025, 12:12
fc21ea0
Код
Авторство
О чём код?
package fs import ( "github.com/opencontainers/cgroups" ) type DevicesGroup struct{} func (s *DevicesGroup) Name() string { return "devices" } func (s *DevicesGroup) Apply(path string, r *cgroups.Resources, pid int) error { if r.SkipDevices { return nil } if path == "" { // Return error here, since devices cgroup // is a hard requirement for container's security. return errSubsystemDoesNotExist } return apply(path, pid) } func (s *DevicesGroup) Set(path string, r *cgroups.Resources) error { if cgroups.DevicesSetV1 == nil { if len(r.Devices) == 0 { return nil } return cgroups.ErrDevicesUnsupported } return cgroups.DevicesSetV1(path, r) } func (s *DevicesGroup) GetStats(path string, stats *cgroups.Stats) error { return nil }