package devices
import "github.com/opencontainers/runc/libcontainer/cgroups/devices"
Index ¶
Types ¶
type Emulator ¶
type Emulator struct {
// contains filtered or unexported fields
}
func EmulatorFromList ¶
EmulatorFromList takes a reader to a "devices.list"-like source, and returns a new Emulator that represents the state of the devices cgroup. Note that black-list devices cgroups cannot be fully reconstructed, due to limitations in the devices cgroup API. Instead, such cgroups are always treated as "allow all" cgroups.
func (*Emulator) Apply ¶
func (*Emulator) IsAllowAll ¶
func (*Emulator) IsBlacklist ¶
func (*Emulator) Transition ¶
Transition calculates what is the minimally-disruptive set of rules need to be applied to a devices cgroup in order to transition to the given target. This means that any already-existing rules will not be applied, and disruptive rules (like denying all device access) will only be applied if necessary.
This function is the sole reason for all of Emulator -- to allow us to figure out how to update a containers' cgroups without causing spurrious device errors (if possible).
Source Files ¶
- Version
- v1.0.0-rc93
- Published
- Feb 3, 2021
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 4 hours ago –
Tools for package owners.