composed6/services/api/internal/api/handlers/health.go
jordan e6993db729
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Add service component: api
2026-02-01 20:05:24 +00:00

27 lines
552 B
Go

package handlers
import (
"net/http"
"github.com/jordan/composed6/pkg/httpresponse"
"github.com/jordan/composed6/pkg/logging"
)
// Health handles health check endpoints.
type Health struct {
logger *logging.Logger
}
// NewHealth creates a new Health handler.
func NewHealth(logger *logging.Logger) *Health {
return &Health{logger: logger}
}
// Check returns the service health status.
func (h *Health) Check(w http.ResponseWriter, r *http.Request) {
httpresponse.OK(w, r, map[string]string{
"service": "api",
"status": "healthy",
})
}