in proxy/health/health.go [60:78]
func UpdateInstanceStatus(err error) {
if registry.DefaultRegistrator == nil {
openlog.Warn("Registrator is nil, can not update instance status")
return
}
if err != nil {
if runtime.InstanceStatus == runtime.StatusRunning {
openlog.Info("service is not healthy, update status")
ChangeStatus(runtime.StatusDown)
}
} else {
if runtime.InstanceStatus == runtime.StatusDown {
openlog.Info("service is healthy, update status")
ChangeStatus(runtime.StatusRunning)
}
}
}