Documentation ¶
Index ¶
- Variables
- func CheckOccurrences(occurrences []int64, numTimes, numSecs int) (occurred bool)
- func HandleEmbeddedRecovery(forceNormal, forceDegraded bool, currTime int64, appType string) error
- func HandleNullRecovery(forceNormal, forceDegraded bool, currTime int64, appType string) error
- func Init()
- func IsNormalMode() bool
- type DegradedModeHandler
- type NormalModeHandler
- type RecoveryDataT
- type RecoveryHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var (
CurrentMode = normalMode // default mode
)
Functions ¶
func CheckOccurrences ¶ added in v0.2.0
CheckOccurrences : check if this occurred numTimes times in numSecs seconds
func HandleEmbeddedRecovery ¶ added in v0.1.10
HandleEmbeddedRecovery decides the recovery Mode in which app should run based on earlier crashes
func HandleNullRecovery ¶ added in v0.1.10
HandleNullRecovery decides the recovery Mode (normal/degraded) in which app should run
Types ¶
type DegradedModeHandler ¶
type DegradedModeHandler struct {
// contains filtered or unexported fields
}
func (*DegradedModeHandler) Handle ¶
func (*DegradedModeHandler) Handle()
func (*DegradedModeHandler) HasThresholdReached ¶
func (*DegradedModeHandler) HasThresholdReached() bool
func (*DegradedModeHandler) RecordAppStart ¶
func (handler *DegradedModeHandler) RecordAppStart(currTime int64)
type NormalModeHandler ¶
type NormalModeHandler struct {
// contains filtered or unexported fields
}
func (*NormalModeHandler) Handle ¶
func (*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 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.