v0.1.26: версия в /health, admin health и UI; ldflags VERSION; Makefile build фикс
This commit is contained in:
@@ -727,6 +727,7 @@ func jsonErr(w http.ResponseWriter, code int, msg string) {
|
||||
// adminHealthDetail — ответ GET /admin/health
|
||||
type adminHealthDetail struct {
|
||||
Status string `json:"status"`
|
||||
Version string `json:"version"`
|
||||
TenantCount int `json:"tenant_count"`
|
||||
QueueCount int `json:"queue_count"`
|
||||
MessageCount int `json:"message_count"`
|
||||
@@ -750,6 +751,7 @@ func (h *Handler) detailedHealth(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(adminHealthDetail{
|
||||
Status: "ok",
|
||||
Version: models.Version,
|
||||
TenantCount: 1,
|
||||
QueueCount: queueCount,
|
||||
MessageCount: msgCount,
|
||||
@@ -768,6 +770,7 @@ func (h *Handler) detailedHealth(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(adminHealthDetail{
|
||||
Status: "ok",
|
||||
Version: models.Version,
|
||||
TenantCount: len(tenants),
|
||||
QueueCount: queueCount,
|
||||
MessageCount: msgCount,
|
||||
|
||||
Reference in New Issue
Block a user