watchtower/pkg/api/metrics/metrics.go

15 lines
363 B
Go
Raw Normal View History

package metrics
import (
2023-10-21 19:35:41 +02:00
. "github.com/containrrr/watchtower/pkg/api/prelude"
"github.com/containrrr/watchtower/pkg/metrics"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
2023-10-21 19:35:41 +02:00
// GetV1 creates a new metrics http handler
func GetV1() HandlerFunc {
// Initialize watchtower metrics
metrics.Init()
return WrapHandler(promhttp.Handler().ServeHTTP)
}