mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
Update Go module directive to v2
Make the Go modules directive to make Prometheus "v2". This allows git tags like `v2.48.0` to work as expected by thrid party imports. Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
parent
ae2852be6a
commit
0d927d173e
|
@ -3,7 +3,7 @@ go:
|
|||
# .circle/config.yml should also be updated.
|
||||
version: 1.21
|
||||
repository:
|
||||
path: github.com/prometheus/prometheus
|
||||
path: github.com/prometheus/prometheus/v2
|
||||
build:
|
||||
binaries:
|
||||
- name: prometheus
|
||||
|
|
|
@ -52,31 +52,31 @@ import (
|
|||
"k8s.io/klog"
|
||||
klogv2 "k8s.io/klog/v2"
|
||||
|
||||
"github.com/prometheus/prometheus/config"
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/legacymanager"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/model/exemplar"
|
||||
"github.com/prometheus/prometheus/model/histogram"
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/model/metadata"
|
||||
"github.com/prometheus/prometheus/model/relabel"
|
||||
"github.com/prometheus/prometheus/notifier"
|
||||
_ "github.com/prometheus/prometheus/plugins" // Register plugins.
|
||||
"github.com/prometheus/prometheus/promql"
|
||||
"github.com/prometheus/prometheus/promql/parser"
|
||||
"github.com/prometheus/prometheus/rules"
|
||||
"github.com/prometheus/prometheus/scrape"
|
||||
"github.com/prometheus/prometheus/storage"
|
||||
"github.com/prometheus/prometheus/storage/remote"
|
||||
"github.com/prometheus/prometheus/tracing"
|
||||
"github.com/prometheus/prometheus/tsdb"
|
||||
"github.com/prometheus/prometheus/tsdb/agent"
|
||||
"github.com/prometheus/prometheus/tsdb/wlog"
|
||||
"github.com/prometheus/prometheus/util/documentcli"
|
||||
"github.com/prometheus/prometheus/util/logging"
|
||||
prom_runtime "github.com/prometheus/prometheus/util/runtime"
|
||||
"github.com/prometheus/prometheus/web"
|
||||
"github.com/prometheus/prometheus/v2/config"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/legacymanager"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/model/exemplar"
|
||||
"github.com/prometheus/prometheus/v2/model/histogram"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/model/metadata"
|
||||
"github.com/prometheus/prometheus/v2/model/relabel"
|
||||
"github.com/prometheus/prometheus/v2/notifier"
|
||||
_ "github.com/prometheus/prometheus/v2/plugins" // Register plugins.
|
||||
"github.com/prometheus/prometheus/v2/promql"
|
||||
"github.com/prometheus/prometheus/v2/promql/parser"
|
||||
"github.com/prometheus/prometheus/v2/rules"
|
||||
"github.com/prometheus/prometheus/v2/scrape"
|
||||
"github.com/prometheus/prometheus/v2/storage"
|
||||
"github.com/prometheus/prometheus/v2/storage/remote"
|
||||
"github.com/prometheus/prometheus/v2/tracing"
|
||||
"github.com/prometheus/prometheus/v2/tsdb"
|
||||
"github.com/prometheus/prometheus/v2/tsdb/agent"
|
||||
"github.com/prometheus/prometheus/v2/tsdb/wlog"
|
||||
"github.com/prometheus/prometheus/v2/util/documentcli"
|
||||
"github.com/prometheus/prometheus/v2/util/logging"
|
||||
prom_runtime "github.com/prometheus/prometheus/v2/util/runtime"
|
||||
"github.com/prometheus/prometheus/v2/web"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -34,9 +34,9 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/notifier"
|
||||
"github.com/prometheus/prometheus/rules"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/notifier"
|
||||
"github.com/prometheus/prometheus/v2/rules"
|
||||
)
|
||||
|
||||
const startupTime = 10 * time.Second
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/prometheus/prometheus/util/testutil"
|
||||
"github.com/prometheus/prometheus/v2/util/testutil"
|
||||
)
|
||||
|
||||
// As soon as prometheus starts responding to http request it should be able to
|
||||
|
|
|
@ -32,7 +32,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/util/testutil"
|
||||
"github.com/prometheus/prometheus/v2/util/testutil"
|
||||
)
|
||||
|
||||
type origin int
|
||||
|
|
|
@ -30,7 +30,7 @@ import (
|
|||
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -23,10 +23,10 @@ import (
|
|||
|
||||
"github.com/go-kit/log"
|
||||
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/model/textparse"
|
||||
"github.com/prometheus/prometheus/tsdb"
|
||||
tsdb_errors "github.com/prometheus/prometheus/tsdb/errors"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/model/textparse"
|
||||
"github.com/prometheus/prometheus/v2/tsdb"
|
||||
tsdb_errors "github.com/prometheus/prometheus/v2/tsdb/errors"
|
||||
)
|
||||
|
||||
func getMinAndMaxTimestamps(p textparse.Parser) (int64, int64, error) {
|
||||
|
|
|
@ -22,10 +22,10 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/storage"
|
||||
"github.com/prometheus/prometheus/tsdb"
|
||||
"github.com/prometheus/prometheus/tsdb/chunkenc"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/storage"
|
||||
"github.com/prometheus/prometheus/v2/tsdb"
|
||||
"github.com/prometheus/prometheus/v2/tsdb/chunkenc"
|
||||
)
|
||||
|
||||
type backfillSample struct {
|
||||
|
|
|
@ -47,19 +47,19 @@ import (
|
|||
promconfig "github.com/prometheus/common/config"
|
||||
"github.com/prometheus/common/expfmt"
|
||||
|
||||
"github.com/prometheus/prometheus/config"
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/file"
|
||||
"github.com/prometheus/prometheus/discovery/kubernetes"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/model/rulefmt"
|
||||
"github.com/prometheus/prometheus/notifier"
|
||||
_ "github.com/prometheus/prometheus/plugins" // Register plugins.
|
||||
"github.com/prometheus/prometheus/promql"
|
||||
"github.com/prometheus/prometheus/promql/parser"
|
||||
"github.com/prometheus/prometheus/scrape"
|
||||
"github.com/prometheus/prometheus/util/documentcli"
|
||||
"github.com/prometheus/prometheus/v2/config"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/file"
|
||||
"github.com/prometheus/prometheus/v2/discovery/kubernetes"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/model/rulefmt"
|
||||
"github.com/prometheus/prometheus/v2/notifier"
|
||||
_ "github.com/prometheus/prometheus/v2/plugins" // Register plugins.
|
||||
"github.com/prometheus/prometheus/v2/promql"
|
||||
"github.com/prometheus/prometheus/v2/promql/parser"
|
||||
"github.com/prometheus/prometheus/v2/scrape"
|
||||
"github.com/prometheus/prometheus/v2/util/documentcli"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -32,8 +32,8 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/model/rulefmt"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/model/rulefmt"
|
||||
)
|
||||
|
||||
var promtoolPath = os.Args[0]
|
||||
|
|
|
@ -27,8 +27,8 @@ import (
|
|||
config_util "github.com/prometheus/common/config"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/storage/remote"
|
||||
"github.com/prometheus/prometheus/util/fmtutil"
|
||||
"github.com/prometheus/prometheus/v2/storage/remote"
|
||||
"github.com/prometheus/prometheus/v2/util/fmtutil"
|
||||
)
|
||||
|
||||
// Push metrics to a prometheus remote write (for testing purpose only).
|
||||
|
|
|
@ -29,7 +29,7 @@ import (
|
|||
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
|
||||
_ "github.com/prometheus/prometheus/plugins" // Register plugins.
|
||||
_ "github.com/prometheus/prometheus/v2/plugins" // Register plugins.
|
||||
)
|
||||
|
||||
func newAPI(url *url.URL, roundTripper http.RoundTripper, headers map[string]string) (v1.API, error) {
|
||||
|
|
|
@ -23,12 +23,12 @@ import (
|
|||
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/model/timestamp"
|
||||
"github.com/prometheus/prometheus/rules"
|
||||
"github.com/prometheus/prometheus/storage"
|
||||
"github.com/prometheus/prometheus/tsdb"
|
||||
tsdb_errors "github.com/prometheus/prometheus/tsdb/errors"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/model/timestamp"
|
||||
"github.com/prometheus/prometheus/v2/rules"
|
||||
"github.com/prometheus/prometheus/v2/storage"
|
||||
"github.com/prometheus/prometheus/v2/tsdb"
|
||||
tsdb_errors "github.com/prometheus/prometheus/v2/tsdb/errors"
|
||||
)
|
||||
|
||||
const maxSamplesInMemory = 5000
|
||||
|
|
|
@ -26,9 +26,9 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/tsdb"
|
||||
"github.com/prometheus/prometheus/tsdb/chunkenc"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/tsdb"
|
||||
"github.com/prometheus/prometheus/v2/tsdb/chunkenc"
|
||||
)
|
||||
|
||||
type mockQueryRangeAPI struct {
|
||||
|
|
|
@ -24,11 +24,11 @@ import (
|
|||
"github.com/go-kit/log"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/prometheus/prometheus/config"
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/scrape"
|
||||
"github.com/prometheus/prometheus/v2/config"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/scrape"
|
||||
)
|
||||
|
||||
type sdCheckResult struct {
|
||||
|
|
|
@ -19,10 +19,10 @@ import (
|
|||
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/config"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/model/relabel"
|
||||
"github.com/prometheus/prometheus/v2/config"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/model/relabel"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
|
|
@ -33,15 +33,15 @@ import (
|
|||
"github.com/go-kit/log"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/promql/parser"
|
||||
"github.com/prometheus/prometheus/storage"
|
||||
"github.com/prometheus/prometheus/tsdb"
|
||||
"github.com/prometheus/prometheus/tsdb/chunkenc"
|
||||
"github.com/prometheus/prometheus/tsdb/chunks"
|
||||
tsdb_errors "github.com/prometheus/prometheus/tsdb/errors"
|
||||
"github.com/prometheus/prometheus/tsdb/fileutil"
|
||||
"github.com/prometheus/prometheus/tsdb/index"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/promql/parser"
|
||||
"github.com/prometheus/prometheus/v2/storage"
|
||||
"github.com/prometheus/prometheus/v2/tsdb"
|
||||
"github.com/prometheus/prometheus/v2/tsdb/chunkenc"
|
||||
"github.com/prometheus/prometheus/v2/tsdb/chunks"
|
||||
tsdb_errors "github.com/prometheus/prometheus/v2/tsdb/errors"
|
||||
"github.com/prometheus/prometheus/v2/tsdb/fileutil"
|
||||
"github.com/prometheus/prometheus/v2/tsdb/index"
|
||||
)
|
||||
|
||||
const timeDelta = 30000
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/promql"
|
||||
"github.com/prometheus/prometheus/v2/promql"
|
||||
)
|
||||
|
||||
func TestGenerateBucket(t *testing.T) {
|
||||
|
|
|
@ -32,12 +32,12 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/prometheus/prometheus/model/histogram"
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/promql"
|
||||
"github.com/prometheus/prometheus/promql/parser"
|
||||
"github.com/prometheus/prometheus/rules"
|
||||
"github.com/prometheus/prometheus/storage"
|
||||
"github.com/prometheus/prometheus/v2/model/histogram"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/promql"
|
||||
"github.com/prometheus/prometheus/v2/promql/parser"
|
||||
"github.com/prometheus/prometheus/v2/rules"
|
||||
"github.com/prometheus/prometheus/v2/storage"
|
||||
)
|
||||
|
||||
// RulesUnitTest does unit testing of rules based on the unit testing files provided.
|
||||
|
|
|
@ -16,7 +16,7 @@ package main
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/prometheus/prometheus/promql"
|
||||
"github.com/prometheus/prometheus/v2/promql"
|
||||
)
|
||||
|
||||
func TestRulesUnitTest(t *testing.T) {
|
||||
|
|
|
@ -32,10 +32,10 @@ import (
|
|||
"github.com/prometheus/common/sigv4"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/model/relabel"
|
||||
"github.com/prometheus/prometheus/storage/remote/azuread"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/model/relabel"
|
||||
"github.com/prometheus/prometheus/v2/storage/remote/azuread"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -30,34 +30,34 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/aws"
|
||||
"github.com/prometheus/prometheus/discovery/azure"
|
||||
"github.com/prometheus/prometheus/discovery/consul"
|
||||
"github.com/prometheus/prometheus/discovery/digitalocean"
|
||||
"github.com/prometheus/prometheus/discovery/dns"
|
||||
"github.com/prometheus/prometheus/discovery/eureka"
|
||||
"github.com/prometheus/prometheus/discovery/file"
|
||||
"github.com/prometheus/prometheus/discovery/hetzner"
|
||||
"github.com/prometheus/prometheus/discovery/http"
|
||||
"github.com/prometheus/prometheus/discovery/ionos"
|
||||
"github.com/prometheus/prometheus/discovery/kubernetes"
|
||||
"github.com/prometheus/prometheus/discovery/linode"
|
||||
"github.com/prometheus/prometheus/discovery/marathon"
|
||||
"github.com/prometheus/prometheus/discovery/moby"
|
||||
"github.com/prometheus/prometheus/discovery/nomad"
|
||||
"github.com/prometheus/prometheus/discovery/openstack"
|
||||
"github.com/prometheus/prometheus/discovery/ovhcloud"
|
||||
"github.com/prometheus/prometheus/discovery/puppetdb"
|
||||
"github.com/prometheus/prometheus/discovery/scaleway"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/discovery/triton"
|
||||
"github.com/prometheus/prometheus/discovery/uyuni"
|
||||
"github.com/prometheus/prometheus/discovery/vultr"
|
||||
"github.com/prometheus/prometheus/discovery/xds"
|
||||
"github.com/prometheus/prometheus/discovery/zookeeper"
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/model/relabel"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/aws"
|
||||
"github.com/prometheus/prometheus/v2/discovery/azure"
|
||||
"github.com/prometheus/prometheus/v2/discovery/consul"
|
||||
"github.com/prometheus/prometheus/v2/discovery/digitalocean"
|
||||
"github.com/prometheus/prometheus/v2/discovery/dns"
|
||||
"github.com/prometheus/prometheus/v2/discovery/eureka"
|
||||
"github.com/prometheus/prometheus/v2/discovery/file"
|
||||
"github.com/prometheus/prometheus/v2/discovery/hetzner"
|
||||
"github.com/prometheus/prometheus/v2/discovery/http"
|
||||
"github.com/prometheus/prometheus/v2/discovery/ionos"
|
||||
"github.com/prometheus/prometheus/v2/discovery/kubernetes"
|
||||
"github.com/prometheus/prometheus/v2/discovery/linode"
|
||||
"github.com/prometheus/prometheus/v2/discovery/marathon"
|
||||
"github.com/prometheus/prometheus/v2/discovery/moby"
|
||||
"github.com/prometheus/prometheus/v2/discovery/nomad"
|
||||
"github.com/prometheus/prometheus/v2/discovery/openstack"
|
||||
"github.com/prometheus/prometheus/v2/discovery/ovhcloud"
|
||||
"github.com/prometheus/prometheus/v2/discovery/puppetdb"
|
||||
"github.com/prometheus/prometheus/v2/discovery/scaleway"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/triton"
|
||||
"github.com/prometheus/prometheus/v2/discovery/uyuni"
|
||||
"github.com/prometheus/prometheus/v2/discovery/vultr"
|
||||
"github.com/prometheus/prometheus/v2/discovery/xds"
|
||||
"github.com/prometheus/prometheus/v2/discovery/zookeeper"
|
||||
"github.com/prometheus/prometheus/v2/model/labels"
|
||||
"github.com/prometheus/prometheus/v2/model/relabel"
|
||||
)
|
||||
|
||||
func mustParseURL(u string) *config.URL {
|
||||
|
|
|
@ -34,10 +34,10 @@ import (
|
|||
"github.com/prometheus/common/config"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -33,10 +33,10 @@ import (
|
|||
"github.com/prometheus/common/config"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
package aws
|
||||
|
||||
import (
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
type ec2Metrics struct {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
package aws
|
||||
|
||||
import (
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
type lightsailMetrics struct {
|
||||
|
|
|
@ -42,10 +42,10 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/prometheus/common/version"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -16,7 +16,7 @@ package azure
|
|||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*azureMetrics)(nil)
|
||||
|
|
|
@ -29,9 +29,9 @@ import (
|
|||
"github.com/prometheus/common/config"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -29,8 +29,8 @@ import (
|
|||
"go.uber.org/goleak"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
|
|
@ -16,7 +16,7 @@ package consul
|
|||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*consulMetrics)(nil)
|
||||
|
|
|
@ -29,9 +29,9 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/prometheus/common/version"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
type DigitalOceanSDTestSuite struct {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
package digitalocean
|
||||
|
||||
import (
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*digitaloceanMetrics)(nil)
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/common/config"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
// Discoverer provides information about target groups. It maintains a set
|
||||
|
|
|
@ -28,9 +28,9 @@ import (
|
|||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -28,8 +28,8 @@ import (
|
|||
"go.uber.org/goleak"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
|
|
@ -16,7 +16,7 @@ package dns
|
|||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*dnsMetrics)(nil)
|
||||
|
|
|
@ -28,10 +28,10 @@ import (
|
|||
"github.com/prometheus/common/config"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -24,8 +24,8 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
func testUpdateServices(respHandler http.HandlerFunc) ([]*targetgroup.Group, error) {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
package eureka
|
||||
|
||||
import (
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*eurekaMetrics)(nil)
|
||||
|
|
|
@ -34,8 +34,8 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -29,8 +29,8 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/goleak"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
|
|
@ -16,7 +16,7 @@ package file
|
|||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*fileMetrics)(nil)
|
||||
|
|
|
@ -29,10 +29,10 @@ import (
|
|||
"google.golang.org/api/compute/v1"
|
||||
"google.golang.org/api/option"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
package gce
|
||||
|
||||
import (
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*gceMetrics)(nil)
|
||||
|
|
|
@ -27,9 +27,9 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/prometheus/common/version"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -25,9 +25,9 @@ import (
|
|||
"github.com/prometheus/common/config"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
package hetzner
|
||||
|
||||
import (
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*hetznerMetrics)(nil)
|
||||
|
|
|
@ -29,8 +29,8 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/prometheus/common/version"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -32,9 +32,9 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/prometheus/common/version"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -28,8 +28,8 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
func TestHTTPValidRefresh(t *testing.T) {
|
||||
|
|
|
@ -16,7 +16,7 @@ package http
|
|||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*httpMetrics)(nil)
|
||||
|
|
|
@ -16,29 +16,29 @@
|
|||
package install
|
||||
|
||||
import (
|
||||
_ "github.com/prometheus/prometheus/discovery/aws" // register aws
|
||||
_ "github.com/prometheus/prometheus/discovery/azure" // register azure
|
||||
_ "github.com/prometheus/prometheus/discovery/consul" // register consul
|
||||
_ "github.com/prometheus/prometheus/discovery/digitalocean" // register digitalocean
|
||||
_ "github.com/prometheus/prometheus/discovery/dns" // register dns
|
||||
_ "github.com/prometheus/prometheus/discovery/eureka" // register eureka
|
||||
_ "github.com/prometheus/prometheus/discovery/file" // register file
|
||||
_ "github.com/prometheus/prometheus/discovery/gce" // register gce
|
||||
_ "github.com/prometheus/prometheus/discovery/hetzner" // register hetzner
|
||||
_ "github.com/prometheus/prometheus/discovery/http" // register http
|
||||
_ "github.com/prometheus/prometheus/discovery/ionos" // register ionos
|
||||
_ "github.com/prometheus/prometheus/discovery/kubernetes" // register kubernetes
|
||||
_ "github.com/prometheus/prometheus/discovery/linode" // register linode
|
||||
_ "github.com/prometheus/prometheus/discovery/marathon" // register marathon
|
||||
_ "github.com/prometheus/prometheus/discovery/moby" // register moby
|
||||
_ "github.com/prometheus/prometheus/discovery/nomad" // register nomad
|
||||
_ "github.com/prometheus/prometheus/discovery/openstack" // register openstack
|
||||
_ "github.com/prometheus/prometheus/discovery/ovhcloud" // register ovhcloud
|
||||
_ "github.com/prometheus/prometheus/discovery/puppetdb" // register puppetdb
|
||||
_ "github.com/prometheus/prometheus/discovery/scaleway" // register scaleway
|
||||
_ "github.com/prometheus/prometheus/discovery/triton" // register triton
|
||||
_ "github.com/prometheus/prometheus/discovery/uyuni" // register uyuni
|
||||
_ "github.com/prometheus/prometheus/discovery/vultr" // register vultr
|
||||
_ "github.com/prometheus/prometheus/discovery/xds" // register xds
|
||||
_ "github.com/prometheus/prometheus/discovery/zookeeper" // register zookeeper
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/aws" // register aws
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/azure" // register azure
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/consul" // register consul
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/digitalocean" // register digitalocean
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/dns" // register dns
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/eureka" // register eureka
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/file" // register file
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/gce" // register gce
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/hetzner" // register hetzner
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/http" // register http
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/ionos" // register ionos
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/kubernetes" // register kubernetes
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/linode" // register linode
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/marathon" // register marathon
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/moby" // register moby
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/nomad" // register nomad
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/openstack" // register openstack
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/ovhcloud" // register ovhcloud
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/puppetdb" // register puppetdb
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/scaleway" // register scaleway
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/triton" // register triton
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/uyuni" // register uyuni
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/vultr" // register vultr
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/xds" // register xds
|
||||
_ "github.com/prometheus/prometheus/v2/discovery/zookeeper" // register zookeeper
|
||||
)
|
||||
|
|
|
@ -23,8 +23,8 @@ import (
|
|||
"github.com/prometheus/common/config"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
package ionos
|
||||
|
||||
import (
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*ionosMetrics)(nil)
|
||||
|
|
|
@ -28,9 +28,9 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/prometheus/common/version"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -28,7 +28,7 @@ import (
|
|||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
// Endpoints discovers new endpoint targets.
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
func makeEndpoints() *v1.Endpoints {
|
||||
|
|
|
@ -30,8 +30,8 @@ import (
|
|||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
// EndpointSlice discovers new endpoint targets.
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
func strptr(str string) *string {
|
||||
|
|
|
@ -28,7 +28,7 @@ import (
|
|||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
// Ingress implements discovery of Kubernetes ingress.
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
"k8s.io/api/networking/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
type TLSMode int
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
|
||||
disv1beta1 "k8s.io/api/discovery/v1beta1"
|
||||
|
||||
|
@ -51,8 +51,8 @@ import (
|
|||
// Required to get the GCP auth provider working.
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -31,9 +31,9 @@ import (
|
|||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/testutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/testutil"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
|
|
@ -16,7 +16,7 @@ package kubernetes
|
|||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*kubernetesMetrics)(nil)
|
||||
|
|
|
@ -28,8 +28,8 @@ import (
|
|||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
func makeNode(name, address, providerID string, labels, annotations map[string]string) *v1.Node {
|
||||
|
|
|
@ -30,7 +30,7 @@ import (
|
|||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
const nodeIndex = "node"
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
func makeOptionalBool(v bool) *bool {
|
||||
|
|
|
@ -28,7 +28,7 @@ import (
|
|||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
// Service implements discovery of Kubernetes services.
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
func makeMultiPortService() *v1.Service {
|
||||
|
|
|
@ -24,8 +24,8 @@ import (
|
|||
"github.com/go-kit/log/level"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
type poolKey struct {
|
||||
|
|
|
@ -27,9 +27,9 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/testutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/testutil"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
|
|
@ -24,8 +24,8 @@ import (
|
|||
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -30,9 +30,9 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/prometheus/common/version"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
type LinodeSDTestSuite struct {
|
||||
|
|
|
@ -16,7 +16,7 @@ package linode
|
|||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*linodeMetrics)(nil)
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/common/config"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
type poolKey struct {
|
||||
|
|
|
@ -28,8 +28,8 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/testutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/testutil"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
|
|
@ -32,10 +32,10 @@ import (
|
|||
"github.com/prometheus/common/config"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -25,8 +25,8 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
package marathon
|
||||
|
||||
import (
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*marathonMetrics)(nil)
|
||||
|
|
|
@ -30,10 +30,10 @@ import (
|
|||
"github.com/prometheus/common/config"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
func TestDockerSDRefresh(t *testing.T) {
|
||||
|
|
|
@ -28,9 +28,9 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/prometheus/common/version"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
package moby
|
||||
|
||||
import (
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*dockerMetrics)(nil)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
package moby
|
||||
|
||||
import (
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*dockerswarmMetrics)(nil)
|
||||
|
|
|
@ -26,7 +26,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
// SDMock is the interface for the DigitalOcean mock.
|
||||
|
|
|
@ -20,7 +20,7 @@ import (
|
|||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/client"
|
||||
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -22,8 +22,8 @@ import (
|
|||
"github.com/docker/docker/api/types"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
func TestDockerSwarmNodesSDRefresh(t *testing.T) {
|
||||
|
|
|
@ -23,8 +23,8 @@ import (
|
|||
"github.com/docker/docker/api/types/swarm"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
func TestDockerSwarmSDServicesRefresh(t *testing.T) {
|
||||
|
|
|
@ -23,8 +23,8 @@ import (
|
|||
"github.com/docker/docker/api/types/swarm"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/util/strutil"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/util/strutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
func TestDockerSwarmTasksSDRefresh(t *testing.T) {
|
||||
|
|
|
@ -16,7 +16,7 @@ package nomad
|
|||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
var _ discovery.DiscovererMetrics = (*nomadMetrics)(nil)
|
||||
|
|
|
@ -28,9 +28,9 @@ import (
|
|||
"github.com/prometheus/common/config"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery/refresh"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -26,7 +26,7 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/v2/discovery"
|
||||
)
|
||||
|
||||
type NomadSDTestSuite struct {
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/gophercloud/gophercloud/pagination"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/v2/discovery/targetgroup"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue