Documentation ¶
Index ¶
- Constants
- Variables
- func CheckOccurences(occurences []int64, numTimes int, numSecs int) (occurred bool)
- func HandleEmbeddedRecovery(forceNormal bool, forceDegraded bool, forceStandBy bool, ...)
- func HandleNullRecovery(forceNormal bool, forceDegraded bool, forceStandBy bool, ...)
- func IsNormalMode() bool
- func IsValidMigrationMode(migrationMode string) bool
- type DegradedModeHandler
- type MigrationModeHandler
- type NormalModeHandler
- type RecoveryDataT
- type RecoveryHandler
- type StandByModeHandler
Constants ¶
View Source
const ( EXPORT = "export" IMPORT = "import" IMPORT_EXPORT = "import-export" )
Variables ¶
View Source
var CurrentMode string = normalMode // default mode
Functions ¶
func CheckOccurences ¶
CheckOccurences : check if this occurred numTimes times in numSecs seconds
func HandleEmbeddedRecovery ¶ added in v0.1.10
func HandleEmbeddedRecovery(forceNormal bool, forceDegraded bool, forceStandBy bool, forceMigrationMode string, currTime int64, appType string)
HandleEmbeddedRecovery decides the recovery Mode in which app should run based on earlier crashes
func HandleNullRecovery ¶ added in v0.1.10
func HandleNullRecovery(forceNormal bool, forceDegraded bool, forceStandBy bool, forceMigrationMode string, currTime int64, appType string)
HandleNullRecovery decides the recovery Mode (normal/migration) in which app should run
func IsValidMigrationMode ¶ added in v0.1.10
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 MigrationModeHandler ¶ added in v0.1.10
type MigrationModeHandler struct {
// contains filtered or unexported fields
}
func (*MigrationModeHandler) Handle ¶ added in v0.1.10
func (handler *MigrationModeHandler) Handle()
func (*MigrationModeHandler) HasThresholdReached ¶ added in v0.1.10
func (handler *MigrationModeHandler) HasThresholdReached() bool
func (*MigrationModeHandler) RecordAppStart ¶ added in v0.1.10
func (handler *MigrationModeHandler) 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 MigrationModeStartTimes []int64 ReadableMigrationModeStartTimes []string StandbyModeStartTimes []int64 ReadableStandbyModeStartTimes []string Mode string }
RecoveryDataT : DS to store the recovery process data
type RecoveryHandler ¶
func NewRecoveryHandler ¶
func NewRecoveryHandler(recoveryData *RecoveryDataT) RecoveryHandler
type StandByModeHandler ¶ added in v1.0.0
type StandByModeHandler struct {
// contains filtered or unexported fields
}
func (*StandByModeHandler) Handle ¶ added in v1.0.0
func (handler *StandByModeHandler) Handle()
func (*StandByModeHandler) HasThresholdReached ¶ added in v1.0.0
func (handler *StandByModeHandler) HasThresholdReached() bool
func (*StandByModeHandler) RecordAppStart ¶ added in v1.0.0
func (handler *StandByModeHandler) RecordAppStart(currTime int64)
Click to show internal directories.
Click to hide internal directories.