feat: add bounded observability and verified SLO incident alerts

This commit is contained in:
Vladislav Agapov
2026-10-29 18:01:11 +03:00
parent 470d9d6f1e
commit 6c7601802d
325 changed files with 24988 additions and 44 deletions
+28
View File
@@ -0,0 +1,28 @@
package fiber
import (
"github.com/gofiber/fiber/v2"
"gitea.privcloud.tech/vlad_marlo/mtusi2026lab6/internal/service"
)
// handleLive reports that the server process is running.
func (ctrl *Controller) handleLive(ctx *fiber.Ctx) error {
return ctx.JSON(fiber.Map{"status": "ok"})
}
// handleReady reports readiness unless shutdown has started.
func (ctrl *Controller) handleReady(ctx *fiber.Ctx) error {
if ctrl.stopping.Load() {
return errBusy
}
if err := ctrl.readiness.Ping(ctx.UserContext()); err != nil {
return errBusy
}
return ctrl.handleLive(ctx)
}
// handleNotFound returns the application error for an unmatched route.
func (ctrl *Controller) handleNotFound(_ *fiber.Ctx) error {
return service.ErrNotFound
}