package port

import (
	"net/http"

	"gitea.dwysokinski.me/twhelp/corev3/internal/health"
	"gitea.dwysokinski.me/twhelp/corev3/internal/health/healthhttp"
	"github.com/go-chi/chi/v5"
)

func NewMetaHTTPHandler(h *health.Health) http.Handler {
	r := chi.NewRouter()

	r.Get("/livez", healthhttp.LiveHandler(h).ServeHTTP)
	r.Get("/readyz", healthhttp.ReadyHandler(h).ServeHTTP)

	return r
}
