mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
21 lines
508 B
Go
21 lines
508 B
Go
package worker
|
|
|
|
import (
|
|
"github.com/hanzo-fi/go-libs/v5/pkg/transport/api"
|
|
"github.com/hanzo-fi/go-libs/v5/pkg/service/health"
|
|
"github.com/go-chi/chi/v5"
|
|
"github.com/go-chi/chi/v5/middleware"
|
|
)
|
|
|
|
// NewRouter returns minimal router containing health checks
|
|
func NewRouter(
|
|
info api.ServiceInfo,
|
|
healthController *health.HealthController,
|
|
) *chi.Mux {
|
|
r := chi.NewRouter()
|
|
r.Use(middleware.Recoverer)
|
|
r.Get("/_healthcheck", healthController.Check)
|
|
r.Get("/_info", api.InfoHandler(info))
|
|
return r
|
|
}
|