* breaking: use event router, adsd telegram notifier, update indexer schema * fix: early ack on handler not found * fix: jetstream switch to new API, discard buffer on close * remove telegram dependency, rely on log alters instead, which indirectly connect to telegram via uptrace * feat (breaking): switch to self contained auto bootstrapper
23 lines
336 B
Go
23 lines
336 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/VictoriaMetrics/metrics"
|
|
"github.com/go-chi/chi/v5"
|
|
)
|
|
|
|
func New() *chi.Mux {
|
|
r := chi.NewRouter()
|
|
|
|
r.Get("/metrics", metricsHandler())
|
|
|
|
return r
|
|
}
|
|
|
|
func metricsHandler() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, _ *http.Request) {
|
|
metrics.WritePrometheus(w, true)
|
|
}
|
|
}
|