节点根据健康检查自动上下线

This commit is contained in:
刘祥超
2020-11-15 21:17:37 +08:00
parent 0181f1a504
commit 1a59ea4b9f
8 changed files with 950 additions and 919 deletions

View File

@@ -14,8 +14,11 @@ type HealthCheckConfig struct {
Timeout *shared.TimeDuration `yaml:"timeout" json:"timeout"` // 超时时间
CountTries int64 `yaml:"countTries" json:"countTries"` // 尝试次数
TryDelay *shared.TimeDuration `yaml:"tryDelay" json:"tryDelay"` // 尝试间隔
FailActions []maps.Map `yaml:"failActions" json:"failActions"` // 失败采取的动作
RecoverActions []maps.Map `yaml:"recoverActions" json:"recoverActions"` // 恢复采取的动作
FailActions []maps.Map `yaml:"failActions" json:"failActions"` // 失败采取的动作 TODO
RecoverActions []maps.Map `yaml:"recoverActions" json:"recoverActions"` // 恢复采取的动作 TODO
AutoDown bool `yaml:"autoDown" json:"autoDown"` // 是否自动下线
CountUp int `yaml:"countUp" json:"countUp"` // 连续在线认定次数
CountDown int `yaml:"countDown" json:"countDown"` // 连续离线认定次数
}
// 初始化