Documentation
¶
Index ¶
Constants ¶
View Source
const ( // SG_IO ioctl constants (from scsi/sg.h) SG_IO = 0x2285 // ioctl command for SCSI Generic I/O SG_DXFER_FROM_DEV = -3 // Data transfer from device SG_DXFER_TO_DEV = -2 // Data transfer to device SG_DXFER_NONE = -1 // No data transfer // SCSI command opcodes SCSI_READ_CAPACITY_10 = 0x25 // READ CAPACITY(10) SCSI_READ_CAPACITY_16 = 0x9e // SERVICE ACTION IN(16) for READ CAPACITY(16) SCSI_INQUIRY = 0x12 // INQUIRY command SCSI_LOG_SENSE = 0x4d // LOG SENSE command )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockDevice ¶
type BlockDevice interface {
// GetBlockDeviceStats returns capacity statistics for a block device
// devicePath: path to block device (e.g., /dev/sda, /dev/mapper/mpatha, /dev/nvme0n1)
// protocol: storage protocol type ("iscsi", "nvme", "fc", or empty for auto-detection)
// Returns: (used, available, capacity, error)
GetBlockDeviceStats(ctx context.Context, devicePath, protocol string) (used, available, capacity int64, err error)
}
BlockDevice defines interface for block device statistics
Click to show internal directories.
Click to hide internal directories.