# Functions
BlockFsDetect detects the type of block device.
DiskGetRBDFormat returns a rbd formatted string with the given values.
DiskMount mounts a disk device.
DiskMountClear unmounts and removes the mount path used for disk shares.
DiskParseRBDFormat parses an rbd formatted string, and returns the pool name, volume name, and list of options.
DiskVMVirtfsProxyStart starts a new virtfs-proxy-helper process.
DiskVMVirtfsProxyStop stops the virtfs-proxy-helper process.
DiskVMVirtiofsdStart starts a new virtiofsd process.
DiskVMVirtiofsdStop stops an existing virtiofsd process and cleans up.
IsBlockdev returns boolean indicating whether device is block type.
LoadByType loads a device by type based on its project and config.
NetworkGetDevMAC retrieves the current MAC setting for a named network device.
NetworkSetDevMAC sets the MAC setting for a named network device if different from current.
NetworkSetDevMTU sets the MTU setting for a named network device if different from current.
New instantiates a new device struct, validates the supplied config and sets it into the device.
UnixDeviceCreate creates a UNIX device (either block or char).
UnixDeviceExists checks if the unix device already exists in devices path.
UnixHotplugNewEvent instantiates a new UnixHotplugEvent struct.
UnixHotplugRunHandlers executes any handlers registered for Unix hotplug events.
USBNewEvent instantiates a new USBEvent struct.
USBRunHandlers executes any handlers registered for USB events.
Validate checks a device's config is valid.
# Constants
DiskDirectIO is used to indicate disk should use direct I/O.
DiskFileDescriptorMountPrefix indicates the mount dev path is using a file descriptor rather than a normal path.
DiskIOUring is used to indicate disk should use io_uring if the system supports it.
DiskLoopBacked is used to indicate disk is backed onto a loop device.
DiskVirtiofsdSockMountOpt indicates the mount option prefix used to provide the virtiofsd socket path to the QEMU driver.
GPUNvidiaDeviceKey is the key used for NVIDIA devices through libnvidia-container.
IBDevPrefix Infiniband devices prefix.
RBDFormatPrefix is the prefix used in disk paths to identify RBD.
RBDFormatSeparator is the field separate used in disk paths for RBD devices.
# Variables
ErrCannotUpdate is the error that occurs when a device cannot be updated.
ErrMissingVirtiofsd is the error that occurs if virtiofsd is missing.
ErrUnsupportedDevType is the error that occurs when an unsupported device type is created.
# Structs
UnixDevice contains information about a created UNIX device.
UnixEvent represents the properties of a Unix device inotify event.
UnixHotplugEvent represents the properties of a Unix hotplug device uevent.
UnixSubscription used to subcribe to specific events.
UnsupportedError used for indicating the error is caused due to a lack of support.
USBEvent represents the properties of a USB device uevent.
# Type aliases
VolatileGetter is a function that retrieves any key/value string that exists in the database config for this instance.
VolatileSetter is a function that accepts one or more key/value strings to save into the config for this instance.