Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LsscsiCmdImpl is a base CMD for lsscsi LsscsiCmdImpl = "lsscsi --no-nvme" // SCSIDeviceSizeCmdImpl is a CMD to get devices size by id SCSIDeviceSizeCmdImpl = LsscsiCmdImpl + " --brief --size %s" // SCSIDeviceCmdImpl is a CMD to get devices information about Vendor, Model and etc SCSIDeviceCmdImpl = LsscsiCmdImpl + " --classic %s" // SCSIType is a type of devices we search in lsscsi output SCSIType = "disk" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LSSCSI ¶
type LSSCSI struct {
// contains filtered or unexported fields
}
LSSCSI is a wrap for system lsscsi util
func NewLSSCSI ¶
func NewLSSCSI(e command.CmdExecutor, logger *logrus.Logger) *LSSCSI
NewLSSCSI is a constructor for LSSCSI
func (*LSSCSI) GetSCSIDevices ¶
func (la *LSSCSI) GetSCSIDevices() ([]*SCSIDevice, error)
GetSCSIDevices gets information about SCSIDevice using lsscsi util
type SCSIDevice ¶
type SCSIDevice struct { ID string Path string Size int64 Vendor string Model string Firmware string }
SCSIDevice represents devices in lsscsi output
type WrapLsscsi ¶
type WrapLsscsi interface {
GetSCSIDevices() ([]*SCSIDevice, error)
}
WrapLsscsi is an interface that encapsulates operation with system lsscsi util
Click to show internal directories.
Click to hide internal directories.