35 lines
1.4 KiB
Go
35 lines
1.4 KiB
Go
package xstore
|
|
|
|
type FollowerPhase string
|
|
|
|
const (
|
|
FollowerPhaseNew FollowerPhase = ""
|
|
FollowerPhaseCheck FollowerPhase = "FollowerPhaseCheck"
|
|
FollowerPhaseBackupPrepare FollowerPhase = "FollowerPhaseBackupPrepare"
|
|
FollowerPhaseBackupStart FollowerPhase = "FollowerPhaseBackupStart"
|
|
FollowerPhaseBackup FollowerPhase = "FollowerPhaseBackup"
|
|
FollowerPhaseLoggerRebuild FollowerPhase = "FollowerPhaseLoggerRebuild"
|
|
FollowerPhaseMonitorBackup FollowerPhase = "FollowerPhaseMonitorBackup"
|
|
FollowerPhaseBeforeRestore FollowerPhase = "FollowerPhaseBeforeRestore"
|
|
FollowerPhaseRestore FollowerPhase = "FollowerPhaseRestore"
|
|
FollowerPhaseAfterRestore FollowerPhase = "FollowerPhaseAfterRestore"
|
|
FollowerPhaseSuccess FollowerPhase = "FollowerPhaseSuccess"
|
|
FollowerPhaseWaitSwitch FollowerPhase = "FollowerPhaseWaitSwitch"
|
|
FollowerPhaseFailed FollowerPhase = "FollowerPhaseFailed"
|
|
FollowerPhaseLoggerCreate FollowerPhase = "FollowerPhaseLoggerCreate"
|
|
FollowerCreateTmpPod FollowerPhase = "FollowerCreateRemotePod"
|
|
FollowerPhaseDeleting FollowerPhase = "FollowerPhaseDeleting"
|
|
)
|
|
|
|
func IsEndPhase(phase FollowerPhase) bool {
|
|
return phase == FollowerPhaseSuccess || phase == FollowerPhaseFailed || phase == FollowerPhaseDeleting
|
|
}
|
|
|
|
type FollowerRole string
|
|
|
|
const (
|
|
FollowerRoleLearner FollowerRole = "learner"
|
|
FollowerRoleFollower FollowerRole = "follower"
|
|
FollowerRoleLogger FollowerRole = "logger"
|
|
)
|