compute/pkg/prom/prom.go

15 lines
317 B
Go

package prom
import (
"github.com/prometheus/client_golang/api"
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
)
func New() (v1.API, error) {
client, err := api.NewClient(api.Config{
Address: "http://localhost:9090", // Remplacez par l'URL de votre Prometheus
})
return v1.NewAPI(client), err
}