Documentation ¶
Index ¶
Constants ¶
View Source
const ( // BlockSubSystem is the key used to represent block subsystem in sysfs BlockSubSystem = "block" // NVMeSubSystem is the key used to represent nvme subsystem in sysfs NVMeSubSystem = "nvme" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DependentDevices ¶
type DependentDevices struct { // Parent is the parent device of the given blockdevice Parent string // Partitions are the partitions of this device if any Partitions []string // Holders is the slice of block-devices that are held by a given // blockdevice Holders []string // Slaves is the slice of blockdevices to which the given blockdevice // is a slave Slaves []string }
DependentDevices represents all the dependent blockdevices of the given Device
type Device ¶
type Device struct { // Path of the blockdevice. eg: /dev/sda, /dev/dm-0 Path string }
Device represents a blockdevice. This struct is used by hierachy pkg which is used to get the necessary blockdevice hierarchy information
func (*Device) GetDependents ¶
func (d *Device) GetDependents() (DependentDevices, error)
GetDependents gets all the dependent devices for a given Device
Click to show internal directories.
Click to hide internal directories.