devices

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 5 Imported by: 391

Documentation

Index

Constants

View Source
const (
	Wildcard       = config.Wildcard
	WildcardDevice = config.WildcardDevice
	BlockDevice    = config.BlockDevice
	CharDevice     = config.CharDevice
	FifoDevice     = config.FifoDevice
)

Deprecated: use github.com/opencontainers/cgroups/devices/config.

Variables

View Source
var ErrNotADevice = errors.New("not a device node")

ErrNotADevice denotes that a file is not a valid linux device.

Functions

This section is empty.

Types

type Device deprecated added in v1.0.0

type Device = config.Device

Deprecated: use github.com/opencontainers/cgroups/devices/config.

func DeviceFromPath

func DeviceFromPath(path, permissions string) (*Device, error)

DeviceFromPath takes the path to a device and its cgroup_permissions (which cannot be easily queried) to look up the information about a linux device and returns that information as a Device struct.

func GetDevices added in v1.0.0

func GetDevices(path string) ([]*Device, error)

GetDevices recursively traverses a directory specified by path and returns all devices found there.

func HostDevices

func HostDevices() ([]*Device, error)

HostDevices returns all devices that can be found under /dev directory.

type Permissions deprecated added in v1.0.0

type Rule deprecated added in v1.0.0

type Type deprecated added in v1.0.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL