Documentation ¶
Index ¶
- type AdapterStat
- type DiskStatus
- func (d *DiskStatus) Get() error
- func (d *DiskStatus) GetPhysicalDrive() error
- func (d *DiskStatus) GetVirtualDrive() error
- func (d *DiskStatus) ListBrokenDrive() ([]VirtualDriveStat, []PhysicalDriveStat, error)
- func (d *DiskStatus) ListBrokenPhysicalDrive() ([]PhysicalDriveStat, error)
- func (d *DiskStatus) ListBrokenVirtualDrive() ([]VirtualDriveStat, error)
- func (d *DiskStatus) String() string
- func (d *DiskStatus) ToJson() (string, error)
- type PhysicalDriveStat
- type VirtualDriveStat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterStat ¶
type AdapterStat struct { AdapterId int `json:"adapter_id"` VirtualDriveStats []VirtualDriveStat `json:"virtual_drive_stats"` PhysicalDriveStats []PhysicalDriveStat `json:"physical_drive_stats"` }
AdapterStat is a struct to get the Adapter Stat of a RAID card. AdapterStat has VirtualDriveStats and PhysicalDriveStats in itself.
func (*AdapterStat) String ¶
func (a *AdapterStat) String() string
String() is used to get the print string.
func (*AdapterStat) ToJson ¶
func (a *AdapterStat) ToJson() (string, error)
ToJson() is used to get the json encoded string.
type DiskStatus ¶
type DiskStatus struct { AdapterStats []AdapterStat `json:"adapter_stats"` // contains filtered or unexported fields }
DiskStatus is a struct to get all Adapters' Stat of the server
func NewDiskStatus ¶
func NewDiskStatus(megaCliPath string, adapterCount int) (*DiskStatus, error)
NewDiskStatus() use the megaCliPath and apapterCount to build a DiskStatus.
func (*DiskStatus) Get ¶
func (d *DiskStatus) Get() error
Get() is used to get all the stat of a DiskStatus.
func (*DiskStatus) GetPhysicalDrive ¶
func (d *DiskStatus) GetPhysicalDrive() error
GetPhysicalDrive() is used to get the PhysicalDriveStat of a DiskStatus.
func (*DiskStatus) GetVirtualDrive ¶
func (d *DiskStatus) GetVirtualDrive() error
GetVirtualDrive() is used to get the VirtualDriveStat of a DiskStatus.
func (*DiskStatus) ListBrokenDrive ¶
func (d *DiskStatus) ListBrokenDrive() ([]VirtualDriveStat, []PhysicalDriveStat, error)
ListBrokenDrive() is used to list the Broken Drives of a DiskStatus.
func (*DiskStatus) ListBrokenPhysicalDrive ¶
func (d *DiskStatus) ListBrokenPhysicalDrive() ([]PhysicalDriveStat, error)
ListBrokenPhysicalDrive() is used to list the Broken Physical Drives of a DiskStatus.
func (*DiskStatus) ListBrokenVirtualDrive ¶
func (d *DiskStatus) ListBrokenVirtualDrive() ([]VirtualDriveStat, error)
ListBrokenVirtualDrive() is used to list the Broken Virtual Drives of a DiskStatus.
func (*DiskStatus) String ¶
func (d *DiskStatus) String() string
String() is used to get the print string.
func (*DiskStatus) ToJson ¶
func (d *DiskStatus) ToJson() (string, error)
ToJson() is used to get the json encoded string.
type PhysicalDriveStat ¶
type PhysicalDriveStat struct { EnclosureDeviceId int `json:"enclosure_device_id"` DeviceId int `json:"device_id"` SlotNumber int `json:"slot_number"` MediaErrorCount int `json:"media_error_count"` OtherErrorCount int `json:"other_error_count"` PredictiveFailureCount int `json:"predictive_failure_count"` Pdtype string `json:"pd_type"` RawSize string `json:"raw_size"` FirmwareState string `json:"firmware_state"` Brand string `json:"brand"` Model string `json:"model"` SerialNumber string `json:"serial_number"` DriveTemperature string `json:"drive_emperature"` }
PhysicalDriveStat is a struct to get the Physical Drive Stat of a RAID card.
func (*PhysicalDriveStat) String ¶
func (p *PhysicalDriveStat) String() string
String() is used to get the print string.
func (*PhysicalDriveStat) ToJson ¶
func (p *PhysicalDriveStat) ToJson() (string, error)
ToJson() is used to get the json encoded string.
type VirtualDriveStat ¶
type VirtualDriveStat struct { VirtualDrive int `json:"virtual_drive"` Name string `json:"name"` Size string `json:"size"` State string `json:"state"` NumberOfDrives int `json:"number_of_drives"` Encryptiontype string `json:"encryption_type"` }
VirtualDriveStat is a struct to get the Virtual Drive Stat of a RAID card.
func (*VirtualDriveStat) String ¶
func (v *VirtualDriveStat) String() string
String() is used to get the print string.
func (*VirtualDriveStat) ToJson ¶
func (v *VirtualDriveStat) ToJson() (string, error)
ToJson() is used to get the json encoded string.