hierarchy

package
v0.4.9-RC1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

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 hierarchy 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

Jump to

Keyboard shortcuts

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