watchtower/pkg/api/metrics/metrics.go
2023-10-21 19:36:00 +02:00

14 lines
363 B
Go

package metrics
import (
. "github.com/containrrr/watchtower/pkg/api/prelude"
"github.com/containrrr/watchtower/pkg/metrics"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
// GetV1 creates a new metrics http handler
func GetV1() HandlerFunc {
// Initialize watchtower metrics
metrics.Init()
return WrapHandler(promhttp.Handler().ServeHTTP)
}