Albirew/mangadex-next
Albirew
/
mangadex-next
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2024-03-02. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
mangadex-next/routers/health.go

26 lignes
583 B
Go

package routers
import (
"net/http"
"github.com/gorilla/mux"
"github.com/hbjydev/mangadex-next/controllers"
)
type HealthRouter struct{}
func (h *HealthRouter) healthcheck(w http.ResponseWriter, r *http.Request) {
controller := controllers.HealthController{}
controller.Healthy(w, r)
}
func (h *HealthRouter) metrics(w http.ResponseWriter, r *http.Request) {
controller := controllers.HealthController{}
controller.Metrics(w, r)
}
func (h *HealthRouter) RegisterRoutes(r *mux.Router) {
r.HandleFunc("/-/healthy", h.healthcheck)
r.HandleFunc("/-/metrics", h.metrics)
}