mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 09:18:31 +02:00
api: add /v1/health/ws for health bubbles on dashboard
This commit is contained in:
@@ -26,7 +26,12 @@ type (
|
||||
|
||||
func (stats *RouteStats) Add(r *R.Route) {
|
||||
stats.Total++
|
||||
switch r.Health() {
|
||||
mon := r.HealthMonitor()
|
||||
if mon == nil {
|
||||
stats.NumUnknown++
|
||||
return
|
||||
}
|
||||
switch mon.Status() {
|
||||
case health.StatusHealthy:
|
||||
stats.NumHealthy++
|
||||
case health.StatusUnhealthy:
|
||||
|
||||
Reference in New Issue
Block a user