devices

package
v1.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotADevice denotes that a file is not a valid linux device.
	ErrNotADevice = errors.New("not a device node")
)

Functions

func DeviceFromPath

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

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

func GetDevices

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

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

func HostDevices

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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