Documentation ¶
Index ¶
- Constants
- Variables
- type EventDescription
- type EventManager
- func (e *EventManager) GenerateFake() *EventDescription
- func (e *EventManager) GenerateFakeWithLabel() *EventDescription
- func (e *EventManager) GetLabels(event *EventDescription) map[string]string
- func (e *EventManager) GetReason(event *EventDescription) string
- func (e *EventManager) GetSeverity(event *EventDescription) string
- type EventReason
- type EventSeverityType
- type EventSymptomCode
Constants ¶
View Source
const ( NormalType = "Normal" WarningType = "Warning" ErrorType = "Error" CriticalType = "Critical" )
CSI events severity types
View Source
const ( DriveHealthFailureSymptomCode = "01" DriveDiscoveredSymptomCode = "02" DriveStatusChangedSymptomCode = "03" DriveHealthGoodSymptomCode = "04" FakeAttachSymptomCode = "05" NoneSymptomCode = "NONE" SymptomCodeLabelKey = "SymptomID" SymptomCodePrefix = "CSI" )
CSI events symptom codes
Variables ¶
View Source
var ( DriveHealthFailure = &EventDescription{ reason: "DriveHealthFailure", severity: ErrorType, symptomCode: DriveHealthFailureSymptomCode, } DriveHealthSuspect = &EventDescription{ reason: "DriveHealthSuspect", severity: WarningType, symptomCode: DriveHealthFailureSymptomCode, } DriveReadyForRemoval = &EventDescription{ reason: "DriveReadyForRemoval", severity: WarningType, symptomCode: DriveHealthFailureSymptomCode, } DriveReadyForPhysicalRemoval = &EventDescription{ reason: "DriveReadyForPhysicalRemoval", severity: WarningType, symptomCode: DriveHealthFailureSymptomCode, } DriveSuccessfullyRemoved = &EventDescription{ reason: "DriveSuccessfullyRemoved", severity: NormalType, symptomCode: DriveHealthFailureSymptomCode, } DriveRemovalFailed = &EventDescription{ reason: "DriveRemovalFailed", severity: ErrorType, symptomCode: DriveHealthFailureSymptomCode, } DriveRemovedByForce = &EventDescription{ reason: "DriveRemovedByForce", severity: WarningType, symptomCode: DriveHealthFailureSymptomCode, } DriveDiscovered = &EventDescription{ reason: "DriveDiscovered", severity: NormalType, symptomCode: DriveDiscoveredSymptomCode, } DriveStatusOffline = &EventDescription{ reason: "DriveStatusOffline", severity: ErrorType, symptomCode: DriveStatusChangedSymptomCode, } DriveStatusOnline = &EventDescription{ reason: "DriveStatusOnline", severity: NormalType, symptomCode: DriveStatusChangedSymptomCode, } DriveHealthGood = &EventDescription{ reason: "DriveHealthGood", severity: NormalType, symptomCode: DriveHealthGoodSymptomCode, } FakeAttachInvolved = &EventDescription{ reason: "FakeAttachInvolved", severity: ErrorType, symptomCode: FakeAttachSymptomCode, } FakeAttachCleared = &EventDescription{ reason: "FakeAttachCleared", severity: NormalType, symptomCode: FakeAttachSymptomCode, } VolumeDiscovered = &EventDescription{ reason: "VolumeDiscovered", severity: NormalType, symptomCode: NoneSymptomCode, } VolumeBadHealth = &EventDescription{ reason: "VolumeBadHealth", severity: WarningType, symptomCode: NoneSymptomCode, } VolumeUnknownHealth = &EventDescription{ reason: "VolumeUnknownHealth", severity: WarningType, symptomCode: NoneSymptomCode, } VolumeGoodHealth = &EventDescription{ reason: "VolumeGoodHealth", severity: NormalType, symptomCode: NoneSymptomCode, } VolumeSuspectHealth = &EventDescription{ reason: "VolumeSuspectHealth", severity: WarningType, symptomCode: NoneSymptomCode, } DriveHealthUnknown = &EventDescription{ reason: "DriveHealthUnknown", severity: WarningType, symptomCode: NoneSymptomCode, } DriveHasData = &EventDescription{ reason: "DriveHasData", severity: NormalType, symptomCode: NoneSymptomCode, } DriveClean = &EventDescription{ reason: "DriveClean", severity: NormalType, symptomCode: NoneSymptomCode, } DriveHealthOverridden = &EventDescription{ reason: "DriveHealthOverridden", severity: WarningType, symptomCode: NoneSymptomCode, } VolumeGroupScanFailed = &EventDescription{ reason: "VolumeGroupScanFailed", severity: ErrorType, symptomCode: NoneSymptomCode, } VolumeGroupScanInvolved = &EventDescription{ reason: "VolumeGroupScanInvolved", severity: NormalType, symptomCode: NoneSymptomCode, } VolumeGroupReactivateInvolved = &EventDescription{ reason: "VolumeGroupReactivateInvolved", severity: WarningType, symptomCode: NoneSymptomCode, } VolumeGroupReactivateFailed = &EventDescription{ reason: "VolumeGroupReactivateFailed", severity: ErrorType, symptomCode: NoneSymptomCode, } )
List of all CSI events with description
Functions ¶
This section is empty.
Types ¶
type EventDescription ¶
type EventDescription struct {
// contains filtered or unexported fields
}
EventDescription contains info to record CSI event
type EventManager ¶
type EventManager struct{}
EventManager is wrapper to manipulate EventDescription
func (*EventManager) GenerateFake ¶
func (e *EventManager) GenerateFake() *EventDescription
GenerateFake returns filled EventDescription Test function
func (*EventManager) GenerateFakeWithLabel ¶
func (e *EventManager) GenerateFakeWithLabel() *EventDescription
GenerateFakeWithLabel returns filled EventDescription contains symptom code label Test function
func (*EventManager) GetLabels ¶
func (e *EventManager) GetLabels(event *EventDescription) map[string]string
GetLabels return labels for event or nil it has no ones
func (*EventManager) GetReason ¶
func (e *EventManager) GetReason(event *EventDescription) string
GetReason returns event reason
func (*EventManager) GetSeverity ¶
func (e *EventManager) GetSeverity(event *EventDescription) string
GetSeverity returns event severity
type EventSeverityType ¶
type EventSeverityType string
EventSeverityType type of severity for CSI events
type EventSymptomCode ¶
type EventSymptomCode string
EventSymptomCode type of symptom codes for CSI events
Click to show internal directories.
Click to hide internal directories.