Documentation ¶
Index ¶
Constants ¶
View Source
const ( // UdevSystem is used to filter devices other than disk which udev tracks (eg. CD ROM) UdevSystem = "disk" // UDevPartition is used to filter out partitions UdevPartition = "partition" // LinkNameIndex is used to get link index from dev link LinkNameIndex = 2 UdevDevname = "DEVNAME" UdevDevtype = "DEVTYPE" UdevFsUUID = "ID_FS_UUID" UdevIDPath = "ID_PATH" UdevModel = "ID_MODEL" UdevPartEntryType = "ID_PART_ENTRY_TYPE" UdevPartEntryUUID = "ID_PART_ENTRY_UUID" UdevPartTableType = "ID_PART_TABLE_TYPE" UdevPartTableUUID = "ID_PART_TABLE_UUID" UdevSerialNumber = "ID_SERIAL" UdevType = "ID_TYPE" UdevVendor = "ID_VENDOR" UdevWWN = "ID_WWN" )
key and env of udev uevent.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
func InitUdevDevice ¶
func (Device) GetDevName ¶
GetDevName returns the path of device in /dev directory
func (Device) GetDevType ¶
func (Device) GetShortName ¶
GetShortName returns the short device name of the /dev directory, e.g /dev/sda will return the name sda
func (Device) IsPartition ¶
IsPartition check if device is a partition
type Udev ¶
type Udev struct {
// contains filtered or unexported fields
}
func (*Udev) ActionHandler ¶
func (*Udev) AddBlockDevice ¶
func (u *Udev) AddBlockDevice(device *v1beta1.BlockDevice, autoProvisioned bool)
AddBlockDevice add new block device and partitions by watching the udev add action
func (*Udev) RemoveBlockDevice ¶
RemoveBlockDevice will set the existing block device to detached state
Click to show internal directories.
Click to hide internal directories.