feat: add healthz endpoint

This commit is contained in:
Haitao Pan 2026-01-24 00:00:30 +08:00
parent 6928b9a6ff
commit 08a0a7a61b

View File

@ -82,6 +82,9 @@ func runServer(ctx context.Context, cfg *config.Config, logger *slog.Logger) err
c.Next()
logger.Info("request", "method", c.Request.Method, "path", c.FullPath(), "status", c.Writer.Status(), "latency", time.Since(start))
})
r.GET("/healthz", func(c *gin.Context) {
c.Status(http.StatusOK)
})
storeCfg := store.Config{
Driver: cfg.Store.Driver,