eth-indexer/internal/api/api.go
Mohamed Sohail 2793d92343
Feat/consolidate functionality (#22)
* 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
2024-10-31 10:41:43 +03:00

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)
}
}