Documentation
¶
Index ¶
- Variables
- func CheckOccurences(occurences []int64, numTimes int, numSecs int) (occurred bool)
- func HandleRecovery(forceNormal bool, forceDegraded bool, forceMaintenance bool, currTime int64)
- func IsNormalMode() bool
- type DegradedModeHandler
- type MaintenanceModeHandler
- type NormalModeHandler
- type RecoveryDataT
- type RecoveryHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var CurrentMode string = normalMode // default mode
Functions ¶
func CheckOccurences ¶
CheckOccurences : check if this occurred numTimes times in numSecs seconds
func HandleRecovery ¶
HandleRecovery decides the recovery Mode in which app should run based on earlier crashes
Types ¶
type DegradedModeHandler ¶
type DegradedModeHandler struct {
// contains filtered or unexported fields
}
func (*DegradedModeHandler) Handle ¶
func (handler *DegradedModeHandler) Handle()
func (*DegradedModeHandler) HasThresholdReached ¶
func (handler *DegradedModeHandler) HasThresholdReached() bool
func (*DegradedModeHandler) RecordAppStart ¶
func (handler *DegradedModeHandler) RecordAppStart(currTime int64)
type MaintenanceModeHandler ¶
type MaintenanceModeHandler struct {
// contains filtered or unexported fields
}
func (*MaintenanceModeHandler) Handle ¶
func (handler *MaintenanceModeHandler) Handle()
func (*MaintenanceModeHandler) HasThresholdReached ¶
func (handler *MaintenanceModeHandler) HasThresholdReached() bool
func (*MaintenanceModeHandler) RecordAppStart ¶
func (handler *MaintenanceModeHandler) RecordAppStart(currTime int64)
type NormalModeHandler ¶
type NormalModeHandler struct {
// contains filtered or unexported fields
}
func (*NormalModeHandler) Handle ¶
func (handler *NormalModeHandler) Handle()
func (*NormalModeHandler) HasThresholdReached ¶
func (handler *NormalModeHandler) HasThresholdReached() bool
func (*NormalModeHandler) RecordAppStart ¶
func (handler *NormalModeHandler) RecordAppStart(currTime int64)
type RecoveryDataT ¶
type RecoveryDataT struct { StartTimes []int64 ReadableStartTimes []string DegradedModeStartTimes []int64 ReadableDegradedModeStartTimes []string MaintenanceModeStartTimes []int64 ReadableMaintenanceModeStartTimes []string Mode string }
RecoveryDataT : DS to store the recovery process data
type RecoveryHandler ¶
func NewRecoveryHandler ¶
func NewRecoveryHandler(recoveryData *RecoveryDataT) RecoveryHandler
Click to show internal directories.
Click to hide internal directories.