calculateSeverity returns: health.SeverityError if all proxies are unhealthy, health.SeverityOK if all proxies are healthy and there are no warnings, health.SeverityWarning otherwise.
(total, healthy, warning int)
| 124 | // health.SeverityOK if all proxies are healthy and there are no warnings, |
| 125 | // health.SeverityWarning otherwise. |
| 126 | func calculateSeverity(total, healthy, warning int) health.Severity { |
| 127 | if total == 0 || (total == healthy && warning == 0) { |
| 128 | return health.SeverityOK |
| 129 | } |
| 130 | if healthy == 0 { |
| 131 | return health.SeverityError |
| 132 | } |
| 133 | return health.SeverityWarning |
| 134 | } |
no outgoing calls