mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-19 15:01:22 +02:00
feat(health): add health check detail to health api
This commit is contained in:
@@ -16,12 +16,14 @@ func getHealthInfo(r Route) map[string]string {
|
||||
"status": "unknown",
|
||||
"uptime": "n/a",
|
||||
"latency": "n/a",
|
||||
"detail": "n/a",
|
||||
}
|
||||
}
|
||||
return map[string]string{
|
||||
"status": mon.Status().String(),
|
||||
"uptime": mon.Uptime().Round(time.Second).String(),
|
||||
"latency": mon.Latency().Round(time.Microsecond).String(),
|
||||
"detail": mon.Detail(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user