lsscsi

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Jump to

Keyboard shortcuts

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