diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go index 21f60678e3..562fd727fd 100644 --- a/cmd/prometheus/main.go +++ b/cmd/prometheus/main.go @@ -60,12 +60,10 @@ import ( _ "github.com/prometheus/prometheus/discovery/install" // Register service discovery implementations. "github.com/prometheus/prometheus/discovery/legacymanager" "github.com/prometheus/prometheus/discovery/targetgroup" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" "github.com/prometheus/prometheus/notifier" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/logging" - "github.com/prometheus/prometheus/pkg/relabel" - prom_runtime "github.com/prometheus/prometheus/pkg/runtime" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/rules" "github.com/prometheus/prometheus/scrape" @@ -73,6 +71,8 @@ import ( "github.com/prometheus/prometheus/storage/remote" "github.com/prometheus/prometheus/tsdb" "github.com/prometheus/prometheus/tsdb/agent" + "github.com/prometheus/prometheus/util/logging" + prom_runtime "github.com/prometheus/prometheus/util/runtime" "github.com/prometheus/prometheus/util/strutil" "github.com/prometheus/prometheus/web" ) diff --git a/cmd/prometheus/main_test.go b/cmd/prometheus/main_test.go index c8f15b5595..c3ada32b63 100644 --- a/cmd/prometheus/main_test.go +++ b/cmd/prometheus/main_test.go @@ -32,8 +32,8 @@ 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/pkg/labels" "github.com/prometheus/prometheus/rules" ) diff --git a/cmd/promtool/backfill.go b/cmd/promtool/backfill.go index 6cd8fd1f3a..d1c8f96337 100644 --- a/cmd/promtool/backfill.go +++ b/cmd/promtool/backfill.go @@ -22,8 +22,8 @@ import ( "github.com/go-kit/log" "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/textparse" + "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" ) diff --git a/cmd/promtool/backfill_test.go b/cmd/promtool/backfill_test.go index 932d00cca0..c9493f134c 100644 --- a/cmd/promtool/backfill_test.go +++ b/cmd/promtool/backfill_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb" ) diff --git a/cmd/promtool/main.go b/cmd/promtool/main.go index 5ba483566a..7ae656c680 100644 --- a/cmd/promtool/main.go +++ b/cmd/promtool/main.go @@ -49,9 +49,9 @@ import ( _ "github.com/prometheus/prometheus/discovery/install" // Register service discovery implementations. "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/pkg/labels" - "github.com/prometheus/prometheus/pkg/rulefmt" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/scrape" ) diff --git a/cmd/promtool/main_test.go b/cmd/promtool/main_test.go index 0c2eb26d72..1a8a470601 100644 --- a/cmd/promtool/main_test.go +++ b/cmd/promtool/main_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/rulefmt" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/rulefmt" ) func TestQueryRange(t *testing.T) { diff --git a/cmd/promtool/rules.go b/cmd/promtool/rules.go index e05f5ca7ab..7afca02f16 100644 --- a/cmd/promtool/rules.go +++ b/cmd/promtool/rules.go @@ -24,8 +24,8 @@ import ( v1 "github.com/prometheus/client_golang/api/prometheus/v1" "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/timestamp" + "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" diff --git a/cmd/promtool/rules_test.go b/cmd/promtool/rules_test.go index 6e51785edd..10d59d5cc5 100644 --- a/cmd/promtool/rules_test.go +++ b/cmd/promtool/rules_test.go @@ -27,7 +27,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb" ) diff --git a/cmd/promtool/sd.go b/cmd/promtool/sd.go index c1cd8e28ba..f3b2c13b4f 100644 --- a/cmd/promtool/sd.go +++ b/cmd/promtool/sd.go @@ -26,7 +26,7 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/scrape" ) diff --git a/cmd/promtool/sd_test.go b/cmd/promtool/sd_test.go index 793b8ebb38..7f80437cfb 100644 --- a/cmd/promtool/sd_test.go +++ b/cmd/promtool/sd_test.go @@ -20,8 +20,8 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/relabel" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" "github.com/stretchr/testify/require" ) diff --git a/cmd/promtool/tsdb.go b/cmd/promtool/tsdb.go index a3f134fd90..2e5d854dee 100644 --- a/cmd/promtool/tsdb.go +++ b/cmd/promtool/tsdb.go @@ -38,7 +38,7 @@ import ( "github.com/go-kit/log" "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb" "github.com/prometheus/prometheus/tsdb/chunks" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" diff --git a/cmd/promtool/unittest.go b/cmd/promtool/unittest.go index 6378463030..62e2843d4f 100644 --- a/cmd/promtool/unittest.go +++ b/cmd/promtool/unittest.go @@ -30,7 +30,7 @@ import ( "github.com/prometheus/common/model" yaml "gopkg.in/yaml.v2" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/rules" diff --git a/config/config.go b/config/config.go index a247898a9d..502077e684 100644 --- a/config/config.go +++ b/config/config.go @@ -33,8 +33,8 @@ import ( yaml "gopkg.in/yaml.v2" "github.com/prometheus/prometheus/discovery" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/relabel" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" ) var ( diff --git a/config/config_test.go b/config/config_test.go index 4fe5731a2b..e8d52d4aae 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -52,8 +52,8 @@ import ( "github.com/prometheus/prometheus/discovery/uyuni" "github.com/prometheus/prometheus/discovery/xds" "github.com/prometheus/prometheus/discovery/zookeeper" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/relabel" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" ) func mustParseURL(u string) *config.URL { diff --git a/pkg/exemplar/exemplar.go b/model/exemplar/exemplar.go similarity index 97% rename from pkg/exemplar/exemplar.go rename to model/exemplar/exemplar.go index 27ba64d4b8..2e39cf6892 100644 --- a/pkg/exemplar/exemplar.go +++ b/model/exemplar/exemplar.go @@ -13,7 +13,7 @@ package exemplar -import "github.com/prometheus/prometheus/pkg/labels" +import "github.com/prometheus/prometheus/model/labels" // The combined length of the label names and values of an Exemplar's LabelSet MUST NOT exceed 128 UTF-8 characters // https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars diff --git a/pkg/labels/labels.go b/model/labels/labels.go similarity index 100% rename from pkg/labels/labels.go rename to model/labels/labels.go diff --git a/pkg/labels/labels_test.go b/model/labels/labels_test.go similarity index 100% rename from pkg/labels/labels_test.go rename to model/labels/labels_test.go diff --git a/pkg/labels/matcher.go b/model/labels/matcher.go similarity index 100% rename from pkg/labels/matcher.go rename to model/labels/matcher.go diff --git a/pkg/labels/matcher_test.go b/model/labels/matcher_test.go similarity index 100% rename from pkg/labels/matcher_test.go rename to model/labels/matcher_test.go diff --git a/pkg/labels/regexp.go b/model/labels/regexp.go similarity index 100% rename from pkg/labels/regexp.go rename to model/labels/regexp.go diff --git a/pkg/labels/regexp_test.go b/model/labels/regexp_test.go similarity index 100% rename from pkg/labels/regexp_test.go rename to model/labels/regexp_test.go diff --git a/pkg/labels/test_utils.go b/model/labels/test_utils.go similarity index 100% rename from pkg/labels/test_utils.go rename to model/labels/test_utils.go diff --git a/pkg/relabel/relabel.go b/model/relabel/relabel.go similarity index 99% rename from pkg/relabel/relabel.go rename to model/relabel/relabel.go index ec452f5b52..db08f3c85f 100644 --- a/pkg/relabel/relabel.go +++ b/model/relabel/relabel.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) var ( diff --git a/pkg/relabel/relabel_test.go b/model/relabel/relabel_test.go similarity index 99% rename from pkg/relabel/relabel_test.go rename to model/relabel/relabel_test.go index 868699122c..1e50344a08 100644 --- a/pkg/relabel/relabel_test.go +++ b/model/relabel/relabel_test.go @@ -19,7 +19,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) func TestRelabel(t *testing.T) { diff --git a/pkg/rulefmt/rulefmt.go b/model/rulefmt/rulefmt.go similarity index 99% rename from pkg/rulefmt/rulefmt.go rename to model/rulefmt/rulefmt.go index 13fd07c225..6f03347d1c 100644 --- a/pkg/rulefmt/rulefmt.go +++ b/model/rulefmt/rulefmt.go @@ -25,7 +25,7 @@ import ( "github.com/prometheus/common/model" yaml "gopkg.in/yaml.v3" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/template" ) diff --git a/pkg/rulefmt/rulefmt_test.go b/model/rulefmt/rulefmt_test.go similarity index 100% rename from pkg/rulefmt/rulefmt_test.go rename to model/rulefmt/rulefmt_test.go diff --git a/pkg/rulefmt/testdata/bad_annotation.bad.yaml b/model/rulefmt/testdata/bad_annotation.bad.yaml similarity index 100% rename from pkg/rulefmt/testdata/bad_annotation.bad.yaml rename to model/rulefmt/testdata/bad_annotation.bad.yaml diff --git a/pkg/rulefmt/testdata/bad_expr.bad.yaml b/model/rulefmt/testdata/bad_expr.bad.yaml similarity index 100% rename from pkg/rulefmt/testdata/bad_expr.bad.yaml rename to model/rulefmt/testdata/bad_expr.bad.yaml diff --git a/pkg/rulefmt/testdata/bad_field.bad.yaml b/model/rulefmt/testdata/bad_field.bad.yaml similarity index 100% rename from pkg/rulefmt/testdata/bad_field.bad.yaml rename to model/rulefmt/testdata/bad_field.bad.yaml diff --git a/pkg/rulefmt/testdata/bad_lname.bad.yaml b/model/rulefmt/testdata/bad_lname.bad.yaml similarity index 100% rename from pkg/rulefmt/testdata/bad_lname.bad.yaml rename to model/rulefmt/testdata/bad_lname.bad.yaml diff --git a/pkg/rulefmt/testdata/duplicate_grp.bad.yaml b/model/rulefmt/testdata/duplicate_grp.bad.yaml similarity index 100% rename from pkg/rulefmt/testdata/duplicate_grp.bad.yaml rename to model/rulefmt/testdata/duplicate_grp.bad.yaml diff --git a/pkg/rulefmt/testdata/invalid_label_name.bad.yaml b/model/rulefmt/testdata/invalid_label_name.bad.yaml similarity index 100% rename from pkg/rulefmt/testdata/invalid_label_name.bad.yaml rename to model/rulefmt/testdata/invalid_label_name.bad.yaml diff --git a/pkg/rulefmt/testdata/invalid_record_name.bad.yaml b/model/rulefmt/testdata/invalid_record_name.bad.yaml similarity index 100% rename from pkg/rulefmt/testdata/invalid_record_name.bad.yaml rename to model/rulefmt/testdata/invalid_record_name.bad.yaml diff --git a/pkg/rulefmt/testdata/no_rec_alert.bad.yaml b/model/rulefmt/testdata/no_rec_alert.bad.yaml similarity index 100% rename from pkg/rulefmt/testdata/no_rec_alert.bad.yaml rename to model/rulefmt/testdata/no_rec_alert.bad.yaml diff --git a/pkg/rulefmt/testdata/noexpr.bad.yaml b/model/rulefmt/testdata/noexpr.bad.yaml similarity index 100% rename from pkg/rulefmt/testdata/noexpr.bad.yaml rename to model/rulefmt/testdata/noexpr.bad.yaml diff --git a/pkg/rulefmt/testdata/record_and_alert.bad.yaml b/model/rulefmt/testdata/record_and_alert.bad.yaml similarity index 100% rename from pkg/rulefmt/testdata/record_and_alert.bad.yaml rename to model/rulefmt/testdata/record_and_alert.bad.yaml diff --git a/pkg/rulefmt/testdata/test.yaml b/model/rulefmt/testdata/test.yaml similarity index 100% rename from pkg/rulefmt/testdata/test.yaml rename to model/rulefmt/testdata/test.yaml diff --git a/pkg/textparse/README.md b/model/textparse/README.md similarity index 100% rename from pkg/textparse/README.md rename to model/textparse/README.md diff --git a/pkg/textparse/interface.go b/model/textparse/interface.go similarity index 97% rename from pkg/textparse/interface.go rename to model/textparse/interface.go index 557e566622..cff86c0ed8 100644 --- a/pkg/textparse/interface.go +++ b/model/textparse/interface.go @@ -16,8 +16,8 @@ package textparse import ( "mime" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" ) // Parser parses samples from a byte slice of samples in the official diff --git a/pkg/textparse/openmetricslex.l b/model/textparse/openmetricslex.l similarity index 100% rename from pkg/textparse/openmetricslex.l rename to model/textparse/openmetricslex.l diff --git a/pkg/textparse/openmetricslex.l.go b/model/textparse/openmetricslex.l.go similarity index 100% rename from pkg/textparse/openmetricslex.l.go rename to model/textparse/openmetricslex.l.go diff --git a/pkg/textparse/openmetricsparse.go b/model/textparse/openmetricsparse.go similarity index 98% rename from pkg/textparse/openmetricsparse.go rename to model/textparse/openmetricsparse.go index 565efd359d..bbd39e3d55 100644 --- a/pkg/textparse/openmetricsparse.go +++ b/model/textparse/openmetricsparse.go @@ -27,9 +27,9 @@ import ( "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/value" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/value" ) var allowedSuffixes = [][]byte{[]byte("_total"), []byte("_bucket")} diff --git a/pkg/textparse/openmetricsparse_test.go b/model/textparse/openmetricsparse_test.go similarity index 99% rename from pkg/textparse/openmetricsparse_test.go rename to model/textparse/openmetricsparse_test.go index 9a19a2f4d9..b460dd9f54 100644 --- a/pkg/textparse/openmetricsparse_test.go +++ b/model/textparse/openmetricsparse_test.go @@ -19,8 +19,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" ) func TestOpenMetricsParse(t *testing.T) { diff --git a/pkg/textparse/promlex.l b/model/textparse/promlex.l similarity index 100% rename from pkg/textparse/promlex.l rename to model/textparse/promlex.l diff --git a/pkg/textparse/promlex.l.go b/model/textparse/promlex.l.go similarity index 100% rename from pkg/textparse/promlex.l.go rename to model/textparse/promlex.l.go diff --git a/pkg/textparse/promparse.go b/model/textparse/promparse.go similarity index 98% rename from pkg/textparse/promparse.go rename to model/textparse/promparse.go index 3c885af0ba..8dc23a6b01 100644 --- a/pkg/textparse/promparse.go +++ b/model/textparse/promparse.go @@ -28,9 +28,9 @@ import ( "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/value" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/value" ) type promlexer struct { diff --git a/pkg/textparse/promparse_test.go b/model/textparse/promparse_test.go similarity index 99% rename from pkg/textparse/promparse_test.go rename to model/textparse/promparse_test.go index 653f0dd052..b6e57108b3 100644 --- a/pkg/textparse/promparse_test.go +++ b/model/textparse/promparse_test.go @@ -25,7 +25,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) func TestPromParse(t *testing.T) { diff --git a/pkg/textparse/promtestdata.nometa.txt b/model/textparse/promtestdata.nometa.txt similarity index 100% rename from pkg/textparse/promtestdata.nometa.txt rename to model/textparse/promtestdata.nometa.txt diff --git a/pkg/textparse/promtestdata.txt b/model/textparse/promtestdata.txt similarity index 100% rename from pkg/textparse/promtestdata.txt rename to model/textparse/promtestdata.txt diff --git a/pkg/timestamp/timestamp.go b/model/timestamp/timestamp.go similarity index 100% rename from pkg/timestamp/timestamp.go rename to model/timestamp/timestamp.go diff --git a/pkg/value/value.go b/model/value/value.go similarity index 100% rename from pkg/value/value.go rename to model/value/value.go diff --git a/notifier/notifier.go b/notifier/notifier.go index d378beb604..0fca28c339 100644 --- a/notifier/notifier.go +++ b/notifier/notifier.go @@ -41,8 +41,8 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/relabel" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" ) const ( diff --git a/notifier/notifier_test.go b/notifier/notifier_test.go index 807c6bc7f4..4a2747efd3 100644 --- a/notifier/notifier_test.go +++ b/notifier/notifier_test.go @@ -35,8 +35,8 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/relabel" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" ) func TestPostPath(t *testing.T) { diff --git a/pkg/README.md b/pkg/README.md deleted file mode 100644 index 3aa989ffce..0000000000 --- a/pkg/README.md +++ /dev/null @@ -1,3 +0,0 @@ -The `pkg` directory is deprecated. -Please do not add new packages to this directory. -Existing packages will be moved elsewhere eventually. diff --git a/promql/bench_test.go b/promql/bench_test.go index 6eb177250e..a46b4fcf7a 100644 --- a/promql/bench_test.go +++ b/promql/bench_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/util/teststorage" diff --git a/promql/engine.go b/promql/engine.go index 5be7ef3ee6..1525c7b7af 100644 --- a/promql/engine.go +++ b/promql/engine.go @@ -35,9 +35,9 @@ import ( "github.com/prometheus/common/model" "github.com/uber/jaeger-client-go" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/timestamp" - "github.com/prometheus/prometheus/pkg/value" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/timestamp" + "github.com/prometheus/prometheus/model/value" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/util/stats" diff --git a/promql/engine_test.go b/promql/engine_test.go index 0986a22e5d..9d888956bc 100644 --- a/promql/engine_test.go +++ b/promql/engine_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/goleak" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/storage" ) diff --git a/promql/functions.go b/promql/functions.go index 19bcc64497..d3647a1a0f 100644 --- a/promql/functions.go +++ b/promql/functions.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/promql/parser" ) diff --git a/promql/functions_test.go b/promql/functions_test.go index 19ee105da7..589afc5fdc 100644 --- a/promql/functions_test.go +++ b/promql/functions_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/util/teststorage" ) diff --git a/promql/fuzz.go b/promql/fuzz.go index b34fbbc669..7aaebdd6bc 100644 --- a/promql/fuzz.go +++ b/promql/fuzz.go @@ -20,7 +20,7 @@ package promql import ( "io" - "github.com/prometheus/prometheus/pkg/textparse" + "github.com/prometheus/prometheus/model/textparse" "github.com/prometheus/prometheus/promql/parser" ) diff --git a/promql/parser/ast.go b/promql/parser/ast.go index e9fcdae084..fc144cbbc4 100644 --- a/promql/parser/ast.go +++ b/promql/parser/ast.go @@ -19,7 +19,7 @@ import ( "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" ) diff --git a/promql/parser/generated_parser.y b/promql/parser/generated_parser.y index fcf504aca5..433f45259c 100644 --- a/promql/parser/generated_parser.y +++ b/promql/parser/generated_parser.y @@ -20,8 +20,8 @@ import ( "strconv" "time" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/value" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/value" ) %} diff --git a/promql/parser/generated_parser.y.go b/promql/parser/generated_parser.y.go index 71bce62bc5..87f25f024e 100644 --- a/promql/parser/generated_parser.y.go +++ b/promql/parser/generated_parser.y.go @@ -13,8 +13,8 @@ import ( "strconv" "time" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/value" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/value" ) //line promql/parser/generated_parser.y:28 diff --git a/promql/parser/parse.go b/promql/parser/parse.go index 2c44c3c2cf..5b60c5ed51 100644 --- a/promql/parser/parse.go +++ b/promql/parser/parse.go @@ -26,8 +26,8 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/util/strutil" ) diff --git a/promql/parser/parse_test.go b/promql/parser/parse_test.go index 99cc924e04..790064d373 100644 --- a/promql/parser/parse_test.go +++ b/promql/parser/parse_test.go @@ -24,7 +24,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) var testExpr = []struct { diff --git a/promql/parser/printer.go b/promql/parser/printer.go index f5cfe789b1..b21444cbf8 100644 --- a/promql/parser/printer.go +++ b/promql/parser/printer.go @@ -21,7 +21,7 @@ import ( "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) // Tree returns a string of the tree structure of the given node. diff --git a/promql/parser/printer_test.go b/promql/parser/printer_test.go index 2a7e438a22..caaff7e469 100644 --- a/promql/parser/printer_test.go +++ b/promql/parser/printer_test.go @@ -18,7 +18,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) func TestExprString(t *testing.T) { diff --git a/promql/quantile.go b/promql/quantile.go index a25f8917c9..e2de98840c 100644 --- a/promql/quantile.go +++ b/promql/quantile.go @@ -17,7 +17,7 @@ import ( "math" "sort" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) // Helpers to calculate quantiles. diff --git a/promql/test.go b/promql/test.go index d577b25d12..19b2dd8300 100644 --- a/promql/test.go +++ b/promql/test.go @@ -27,9 +27,9 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb" diff --git a/promql/test_test.go b/promql/test_test.go index ec50e57532..845aef2568 100644 --- a/promql/test_test.go +++ b/promql/test_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) func TestLazyLoader_WithSamplesTill(t *testing.T) { diff --git a/promql/value.go b/promql/value.go index ddcc8a1a40..81af1ad9da 100644 --- a/promql/value.go +++ b/promql/value.go @@ -21,7 +21,7 @@ import ( "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" diff --git a/rules/alerting.go b/rules/alerting.go index 57cc252e10..929f7586df 100644 --- a/rules/alerting.go +++ b/rules/alerting.go @@ -28,9 +28,9 @@ import ( "github.com/prometheus/common/model" yaml "gopkg.in/yaml.v2" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/rulefmt" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/rulefmt" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/template" diff --git a/rules/alerting_test.go b/rules/alerting_test.go index 42882f4f65..31139298d6 100644 --- a/rules/alerting_test.go +++ b/rules/alerting_test.go @@ -22,8 +22,8 @@ import ( "github.com/go-kit/log" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/util/teststorage" diff --git a/rules/manager.go b/rules/manager.go index 1e50e10355..7499dbfcaf 100644 --- a/rules/manager.go +++ b/rules/manager.go @@ -29,10 +29,10 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/rulefmt" - "github.com/prometheus/prometheus/pkg/timestamp" - "github.com/prometheus/prometheus/pkg/value" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/rulefmt" + "github.com/prometheus/prometheus/model/timestamp" + "github.com/prometheus/prometheus/model/value" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/storage" diff --git a/rules/manager_test.go b/rules/manager_test.go index b704098429..5d9c602b9e 100644 --- a/rules/manager_test.go +++ b/rules/manager_test.go @@ -30,10 +30,10 @@ import ( "go.uber.org/goleak" yaml "gopkg.in/yaml.v2" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/rulefmt" - "github.com/prometheus/prometheus/pkg/timestamp" - "github.com/prometheus/prometheus/pkg/value" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/rulefmt" + "github.com/prometheus/prometheus/model/timestamp" + "github.com/prometheus/prometheus/model/value" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/storage" diff --git a/rules/recording.go b/rules/recording.go index 0081690b81..0681db9a2d 100644 --- a/rules/recording.go +++ b/rules/recording.go @@ -23,8 +23,8 @@ import ( yaml "gopkg.in/yaml.v2" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/rulefmt" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/rulefmt" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/util/strutil" diff --git a/rules/recording_test.go b/rules/recording_test.go index d6b0b6c2ae..dd06b775fb 100644 --- a/rules/recording_test.go +++ b/rules/recording_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/util/teststorage" diff --git a/scrape/helpers_test.go b/scrape/helpers_test.go index 7a043c0b16..686cf96325 100644 --- a/scrape/helpers_test.go +++ b/scrape/helpers_test.go @@ -17,8 +17,8 @@ import ( "context" "math/rand" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" ) diff --git a/scrape/manager.go b/scrape/manager.go index a4a7e5a506..35d47a86b6 100644 --- a/scrape/manager.go +++ b/scrape/manager.go @@ -27,7 +27,7 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/util/osutil" ) diff --git a/scrape/manager_test.go b/scrape/manager_test.go index 302113875b..6c5091bb62 100644 --- a/scrape/manager_test.go +++ b/scrape/manager_test.go @@ -25,8 +25,8 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/relabel" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" ) func TestPopulateLabels(t *testing.T) { diff --git a/scrape/scrape.go b/scrape/scrape.go index 161ede6ff3..e6e55900b0 100644 --- a/scrape/scrape.go +++ b/scrape/scrape.go @@ -40,14 +40,14 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/pool" - "github.com/prometheus/prometheus/pkg/relabel" - "github.com/prometheus/prometheus/pkg/textparse" - "github.com/prometheus/prometheus/pkg/timestamp" - "github.com/prometheus/prometheus/pkg/value" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" + "github.com/prometheus/prometheus/model/textparse" + "github.com/prometheus/prometheus/model/timestamp" + "github.com/prometheus/prometheus/model/value" "github.com/prometheus/prometheus/storage" + "github.com/prometheus/prometheus/util/pool" ) // ScrapeTimestampTolerance is the tolerance for scrape appends timestamps diff --git a/scrape/scrape_test.go b/scrape/scrape_test.go index e52ea96aa8..5ab5731121 100644 --- a/scrape/scrape_test.go +++ b/scrape/scrape_test.go @@ -38,12 +38,12 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/relabel" - "github.com/prometheus/prometheus/pkg/textparse" - "github.com/prometheus/prometheus/pkg/timestamp" - "github.com/prometheus/prometheus/pkg/value" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" + "github.com/prometheus/prometheus/model/textparse" + "github.com/prometheus/prometheus/model/timestamp" + "github.com/prometheus/prometheus/model/value" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/util/teststorage" "github.com/prometheus/prometheus/util/testutil" diff --git a/scrape/target.go b/scrape/target.go index 38fea83b3e..59d6c9403c 100644 --- a/scrape/target.go +++ b/scrape/target.go @@ -27,10 +27,10 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/relabel" - "github.com/prometheus/prometheus/pkg/textparse" - "github.com/prometheus/prometheus/pkg/value" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" + "github.com/prometheus/prometheus/model/textparse" + "github.com/prometheus/prometheus/model/value" "github.com/prometheus/prometheus/storage" ) diff --git a/scrape/target_test.go b/scrape/target_test.go index fa03c068ea..32ab4669e4 100644 --- a/scrape/target_test.go +++ b/scrape/target_test.go @@ -31,7 +31,7 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) const ( diff --git a/storage/fanout.go b/storage/fanout.go index 17bac242de..2d0d33215f 100644 --- a/storage/fanout.go +++ b/storage/fanout.go @@ -20,8 +20,8 @@ import ( "github.com/go-kit/log/level" "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" ) diff --git a/storage/fanout_test.go b/storage/fanout_test.go index 725ffec490..cc228e6666 100644 --- a/storage/fanout_test.go +++ b/storage/fanout_test.go @@ -21,7 +21,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/util/teststorage" ) diff --git a/storage/generic.go b/storage/generic.go index 817122bc12..6762f32a1a 100644 --- a/storage/generic.go +++ b/storage/generic.go @@ -17,7 +17,7 @@ package storage import ( - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) type genericQuerier interface { diff --git a/storage/interface.go b/storage/interface.go index fb4a2e4141..1c76de86ac 100644 --- a/storage/interface.go +++ b/storage/interface.go @@ -18,8 +18,8 @@ import ( "errors" "fmt" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" ) diff --git a/storage/merge.go b/storage/merge.go index 49757e2c39..01e667751d 100644 --- a/storage/merge.go +++ b/storage/merge.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" diff --git a/storage/merge_test.go b/storage/merge_test.go index 0aabcdb96c..c0b49c836f 100644 --- a/storage/merge_test.go +++ b/storage/merge_test.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/tsdbutil" ) diff --git a/storage/noop.go b/storage/noop.go index c63353b92f..83953ca43f 100644 --- a/storage/noop.go +++ b/storage/noop.go @@ -14,7 +14,7 @@ package storage import ( - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) type noopQuerier struct{} diff --git a/storage/remote/codec.go b/storage/remote/codec.go index 545138da56..a9f6af0f38 100644 --- a/storage/remote/codec.go +++ b/storage/remote/codec.go @@ -26,9 +26,9 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/textparse" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/textparse" "github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" diff --git a/storage/remote/codec_test.go b/storage/remote/codec_test.go index 8aad3afeb3..b5949cd318 100644 --- a/storage/remote/codec_test.go +++ b/storage/remote/codec_test.go @@ -20,8 +20,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/textparse" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/textparse" "github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/storage" ) diff --git a/storage/remote/metadata_watcher_test.go b/storage/remote/metadata_watcher_test.go index d51011a8cb..3660bb9a70 100644 --- a/storage/remote/metadata_watcher_test.go +++ b/storage/remote/metadata_watcher_test.go @@ -22,7 +22,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/textparse" + "github.com/prometheus/prometheus/model/textparse" "github.com/prometheus/prometheus/scrape" ) diff --git a/storage/remote/queue_manager.go b/storage/remote/queue_manager.go index f4e74273b8..e7aafaf3e5 100644 --- a/storage/remote/queue_manager.go +++ b/storage/remote/queue_manager.go @@ -31,8 +31,8 @@ import ( "go.uber.org/atomic" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/relabel" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" "github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/scrape" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/storage/remote/queue_manager_test.go b/storage/remote/queue_manager_test.go index 3706544f0a..64a3d6462b 100644 --- a/storage/remote/queue_manager_test.go +++ b/storage/remote/queue_manager_test.go @@ -38,9 +38,9 @@ import ( "go.uber.org/atomic" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/textparse" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/textparse" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/scrape" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/storage/remote/read.go b/storage/remote/read.go index 7f1d749e63..0717635937 100644 --- a/storage/remote/read.go +++ b/storage/remote/read.go @@ -18,7 +18,7 @@ import ( "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" ) diff --git a/storage/remote/read_handler.go b/storage/remote/read_handler.go index 581b54a521..e1f1df21c1 100644 --- a/storage/remote/read_handler.go +++ b/storage/remote/read_handler.go @@ -23,10 +23,10 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/gate" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/storage" + "github.com/prometheus/prometheus/util/gate" ) type readHandler struct { diff --git a/storage/remote/read_handler_test.go b/storage/remote/read_handler_test.go index 8962a8ba33..86edbe0b97 100644 --- a/storage/remote/read_handler_test.go +++ b/storage/remote/read_handler_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/require" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/storage" diff --git a/storage/remote/read_test.go b/storage/remote/read_test.go index 67c0f6f744..bf3bff1de3 100644 --- a/storage/remote/read_test.go +++ b/storage/remote/read_test.go @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/require" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/storage" ) diff --git a/storage/remote/storage.go b/storage/remote/storage.go index cebbffdd1a..c82db1f9df 100644 --- a/storage/remote/storage.go +++ b/storage/remote/storage.go @@ -27,10 +27,10 @@ import ( "gopkg.in/yaml.v2" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/logging" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/scrape" "github.com/prometheus/prometheus/storage" + "github.com/prometheus/prometheus/util/logging" ) // String constants for instrumentation. diff --git a/storage/remote/write.go b/storage/remote/write.go index b3bd983bcf..bd330fe8b4 100644 --- a/storage/remote/write.go +++ b/storage/remote/write.go @@ -25,8 +25,8 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/wal" ) diff --git a/storage/remote/write_handler.go b/storage/remote/write_handler.go index ba8b3446bc..42e1060385 100644 --- a/storage/remote/write_handler.go +++ b/storage/remote/write_handler.go @@ -22,7 +22,7 @@ import ( "github.com/go-kit/log/level" "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/exemplar" + "github.com/prometheus/prometheus/model/exemplar" "github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/storage" ) diff --git a/storage/remote/write_handler_test.go b/storage/remote/write_handler_test.go index 7d467c8fb8..5eb17d3b87 100644 --- a/storage/remote/write_handler_test.go +++ b/storage/remote/write_handler_test.go @@ -25,8 +25,8 @@ import ( "github.com/go-kit/log" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/storage" ) diff --git a/storage/remote/write_test.go b/storage/remote/write_test.go index 27c568e1cd..9f0954e349 100644 --- a/storage/remote/write_test.go +++ b/storage/remote/write_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/require" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/relabel" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" ) var cfg = config.RemoteWriteConfig{ diff --git a/storage/secondary.go b/storage/secondary.go index 64a83b5e7c..d66a286172 100644 --- a/storage/secondary.go +++ b/storage/secondary.go @@ -16,7 +16,7 @@ package storage import ( "sync" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) // secondaryQuerier is a wrapper that allows a querier to be treated in a best effort manner. diff --git a/storage/series.go b/storage/series.go index d92b4fd18c..3a5790c2a8 100644 --- a/storage/series.go +++ b/storage/series.go @@ -17,7 +17,7 @@ import ( "math" "sort" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/tsdbutil" diff --git a/template/template_test.go b/template/template_test.go index 8cb657867a..063c43b6eb 100644 --- a/template/template_test.go +++ b/template/template_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/promql" ) diff --git a/tsdb/agent/db.go b/tsdb/agent/db.go index 40161a445e..b862494276 100644 --- a/tsdb/agent/db.go +++ b/tsdb/agent/db.go @@ -27,9 +27,9 @@ import ( "github.com/prometheus/common/model" "go.uber.org/atomic" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage/remote" "github.com/prometheus/prometheus/tsdb" diff --git a/tsdb/agent/db_test.go b/tsdb/agent/db_test.go index 464caa75d3..04e264ef6c 100644 --- a/tsdb/agent/db_test.go +++ b/tsdb/agent/db_test.go @@ -31,7 +31,7 @@ import ( dto "github.com/prometheus/client_model/go" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage/remote" "github.com/prometheus/prometheus/tsdb/record" "github.com/prometheus/prometheus/tsdb/tsdbutil" diff --git a/tsdb/agent/series.go b/tsdb/agent/series.go index 80c440ae68..73fcb60099 100644 --- a/tsdb/agent/series.go +++ b/tsdb/agent/series.go @@ -16,7 +16,7 @@ package agent import ( "sync" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/chunks" ) diff --git a/tsdb/block.go b/tsdb/block.go index 0f2cd3ea3a..e4db21f85e 100644 --- a/tsdb/block.go +++ b/tsdb/block.go @@ -28,7 +28,7 @@ import ( "github.com/oklog/ulid" "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/tsdb/block_test.go b/tsdb/block_test.go index 2bfeb841ce..cebcde5787 100644 --- a/tsdb/block_test.go +++ b/tsdb/block_test.go @@ -30,7 +30,7 @@ import ( "github.com/go-kit/log" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/fileutil" diff --git a/tsdb/blockwriter.go b/tsdb/blockwriter.go index a5a5d74743..064cd01c7e 100644 --- a/tsdb/blockwriter.go +++ b/tsdb/blockwriter.go @@ -24,7 +24,7 @@ import ( "github.com/oklog/ulid" "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" ) diff --git a/tsdb/blockwriter_test.go b/tsdb/blockwriter_test.go index 07b500d7ae..a47f3983ed 100644 --- a/tsdb/blockwriter_test.go +++ b/tsdb/blockwriter_test.go @@ -24,7 +24,7 @@ import ( "github.com/go-kit/log" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/tsdbutil" ) diff --git a/tsdb/compact_test.go b/tsdb/compact_test.go index e30f2b190f..bac9bfdfef 100644 --- a/tsdb/compact_test.go +++ b/tsdb/compact_test.go @@ -29,7 +29,7 @@ import ( prom_testutil "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/fileutil" diff --git a/tsdb/db.go b/tsdb/db.go index c3b4af093b..64e2a2bfb9 100644 --- a/tsdb/db.go +++ b/tsdb/db.go @@ -36,7 +36,7 @@ import ( "golang.org/x/sync/errgroup" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/tsdb/db_test.go b/tsdb/db_test.go index 4faf70b321..6120e896b9 100644 --- a/tsdb/db_test.go +++ b/tsdb/db_test.go @@ -40,7 +40,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/goleak" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/tsdb/exemplar.go b/tsdb/exemplar.go index 53cb5c9d9e..516b538e18 100644 --- a/tsdb/exemplar.go +++ b/tsdb/exemplar.go @@ -22,8 +22,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" ) diff --git a/tsdb/exemplar_test.go b/tsdb/exemplar_test.go index 7876d95634..1418dcca98 100644 --- a/tsdb/exemplar_test.go +++ b/tsdb/exemplar_test.go @@ -25,8 +25,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" ) diff --git a/tsdb/head.go b/tsdb/head.go index 02b6b7b4ee..2d96ba942d 100644 --- a/tsdb/head.go +++ b/tsdb/head.go @@ -29,8 +29,8 @@ import ( "go.uber.org/atomic" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/tsdb/head_append.go b/tsdb/head_append.go index a0b38e7282..1f67f86262 100644 --- a/tsdb/head_append.go +++ b/tsdb/head_append.go @@ -21,8 +21,8 @@ import ( "github.com/go-kit/log/level" "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/tsdb/head_bench_test.go b/tsdb/head_bench_test.go index 2f9100d13d..a624291375 100644 --- a/tsdb/head_bench_test.go +++ b/tsdb/head_bench_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) func BenchmarkHeadStripeSeriesCreate(b *testing.B) { diff --git a/tsdb/head_read.go b/tsdb/head_read.go index 1f0f186275..cfe7b30455 100644 --- a/tsdb/head_read.go +++ b/tsdb/head_read.go @@ -21,7 +21,7 @@ import ( "github.com/go-kit/log/level" "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/tsdb/head_test.go b/tsdb/head_test.go index d696b55a89..42f8a1e7ba 100644 --- a/tsdb/head_test.go +++ b/tsdb/head_test.go @@ -37,8 +37,8 @@ import ( "go.uber.org/atomic" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/tsdb/head_wal.go b/tsdb/head_wal.go index 5c63b3f195..5d5c995b3c 100644 --- a/tsdb/head_wal.go +++ b/tsdb/head_wal.go @@ -29,8 +29,8 @@ import ( "github.com/pkg/errors" "go.uber.org/atomic" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/tsdb/index/index.go b/tsdb/index/index.go index f5d69fceb7..8e5eec6ceb 100644 --- a/tsdb/index/index.go +++ b/tsdb/index/index.go @@ -30,7 +30,7 @@ import ( "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/encoding" diff --git a/tsdb/index/index_test.go b/tsdb/index/index_test.go index be5636ed26..c859dbb47e 100644 --- a/tsdb/index/index_test.go +++ b/tsdb/index/index_test.go @@ -28,7 +28,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/goleak" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/tsdb/index/postings.go b/tsdb/index/postings.go index 4a4d5506bf..10312d84d8 100644 --- a/tsdb/index/postings.go +++ b/tsdb/index/postings.go @@ -20,7 +20,7 @@ import ( "sort" "sync" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" ) diff --git a/tsdb/index/postings_test.go b/tsdb/index/postings_test.go index 8e9790f594..8cb76b0ad1 100644 --- a/tsdb/index/postings_test.go +++ b/tsdb/index/postings_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" ) diff --git a/tsdb/mocks_test.go b/tsdb/mocks_test.go index 1c3cc41030..268017caa6 100644 --- a/tsdb/mocks_test.go +++ b/tsdb/mocks_test.go @@ -16,7 +16,7 @@ package tsdb import ( "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/tsdb/querier.go b/tsdb/querier.go index 4c48b9098f..4719470a74 100644 --- a/tsdb/querier.go +++ b/tsdb/querier.go @@ -21,7 +21,7 @@ import ( "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/tsdb/querier_bench_test.go b/tsdb/querier_bench_test.go index ed2d6fb4b1..71dfef35bb 100644 --- a/tsdb/querier_bench_test.go +++ b/tsdb/querier_bench_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) // Make entries ~50B in size, to emulate real-world high cardinality. diff --git a/tsdb/querier_test.go b/tsdb/querier_test.go index 804de3ab91..1198758441 100644 --- a/tsdb/querier_test.go +++ b/tsdb/querier_test.go @@ -29,7 +29,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/tsdb/record/record.go b/tsdb/record/record.go index d6fa30ac00..79b7eaddba 100644 --- a/tsdb/record/record.go +++ b/tsdb/record/record.go @@ -20,7 +20,7 @@ import ( "github.com/pkg/errors" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/encoding" diff --git a/tsdb/record/record_test.go b/tsdb/record/record_test.go index f69989d502..0e241fd2f1 100644 --- a/tsdb/record/record_test.go +++ b/tsdb/record/record_test.go @@ -20,7 +20,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/encoding" "github.com/prometheus/prometheus/tsdb/tombstones" ) diff --git a/tsdb/repair_test.go b/tsdb/repair_test.go index dc0fa598ef..35fb7bbe17 100644 --- a/tsdb/repair_test.go +++ b/tsdb/repair_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/fileutil" "github.com/prometheus/prometheus/tsdb/index" diff --git a/tsdb/test/labels_test.go b/tsdb/test/labels_test.go index 07242181da..354dbf8365 100644 --- a/tsdb/test/labels_test.go +++ b/tsdb/test/labels_test.go @@ -18,7 +18,7 @@ import ( "crypto/rand" "testing" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" ) func BenchmarkMapClone(b *testing.B) { diff --git a/tsdb/wal.go b/tsdb/wal.go index a0672f4052..05661779fe 100644 --- a/tsdb/wal.go +++ b/tsdb/wal.go @@ -32,7 +32,7 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/encoding" diff --git a/tsdb/wal/checkpoint_test.go b/tsdb/wal/checkpoint_test.go index eed29be94a..554a4b5d28 100644 --- a/tsdb/wal/checkpoint_test.go +++ b/tsdb/wal/checkpoint_test.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/record" ) diff --git a/tsdb/wal/watcher.go b/tsdb/wal/watcher.go index accefa7aaf..3c47b58d05 100644 --- a/tsdb/wal/watcher.go +++ b/tsdb/wal/watcher.go @@ -30,7 +30,7 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/tsdb/record" ) diff --git a/tsdb/wal/watcher_test.go b/tsdb/wal/watcher_test.go index d453b9da2c..1c76ea585b 100644 --- a/tsdb/wal/watcher_test.go +++ b/tsdb/wal/watcher_test.go @@ -25,7 +25,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/record" ) diff --git a/tsdb/wal_test.go b/tsdb/wal_test.go index 21d0a8b147..6b57cc230e 100644 --- a/tsdb/wal_test.go +++ b/tsdb/wal_test.go @@ -30,7 +30,7 @@ import ( "github.com/go-kit/log" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/record" diff --git a/pkg/gate/gate.go b/util/gate/gate.go similarity index 100% rename from pkg/gate/gate.go rename to util/gate/gate.go diff --git a/pkg/logging/dedupe.go b/util/logging/dedupe.go similarity index 100% rename from pkg/logging/dedupe.go rename to util/logging/dedupe.go diff --git a/pkg/logging/dedupe_test.go b/util/logging/dedupe_test.go similarity index 100% rename from pkg/logging/dedupe_test.go rename to util/logging/dedupe_test.go diff --git a/pkg/logging/file.go b/util/logging/file.go similarity index 100% rename from pkg/logging/file.go rename to util/logging/file.go diff --git a/pkg/logging/file_test.go b/util/logging/file_test.go similarity index 100% rename from pkg/logging/file_test.go rename to util/logging/file_test.go diff --git a/pkg/logging/ratelimit.go b/util/logging/ratelimit.go similarity index 100% rename from pkg/logging/ratelimit.go rename to util/logging/ratelimit.go diff --git a/pkg/modtimevfs/modtimevfs.go b/util/modtimevfs/modtimevfs.go similarity index 100% rename from pkg/modtimevfs/modtimevfs.go rename to util/modtimevfs/modtimevfs.go diff --git a/pkg/pool/pool.go b/util/pool/pool.go similarity index 100% rename from pkg/pool/pool.go rename to util/pool/pool.go diff --git a/pkg/pool/pool_test.go b/util/pool/pool_test.go similarity index 100% rename from pkg/pool/pool_test.go rename to util/pool/pool_test.go diff --git a/pkg/runtime/limits_default.go b/util/runtime/limits_default.go similarity index 100% rename from pkg/runtime/limits_default.go rename to util/runtime/limits_default.go diff --git a/pkg/runtime/limits_windows.go b/util/runtime/limits_windows.go similarity index 100% rename from pkg/runtime/limits_windows.go rename to util/runtime/limits_windows.go diff --git a/pkg/runtime/statfs.go b/util/runtime/statfs.go similarity index 100% rename from pkg/runtime/statfs.go rename to util/runtime/statfs.go diff --git a/pkg/runtime/statfs_default.go b/util/runtime/statfs_default.go similarity index 100% rename from pkg/runtime/statfs_default.go rename to util/runtime/statfs_default.go diff --git a/pkg/runtime/statfs_linux_386.go b/util/runtime/statfs_linux_386.go similarity index 99% rename from pkg/runtime/statfs_linux_386.go rename to util/runtime/statfs_linux_386.go index 7494a0adf5..b45eecdd37 100644 --- a/pkg/runtime/statfs_linux_386.go +++ b/util/runtime/statfs_linux_386.go @@ -23,6 +23,7 @@ import ( // Statfs returns the file system type (Unix only) func Statfs(path string) string { + // Types of file systems that may be returned by `statfs` fsTypes := map[int32]string{ 0xadf5: "ADFS_SUPER_MAGIC", diff --git a/pkg/runtime/statfs_uint32.go b/util/runtime/statfs_uint32.go similarity index 99% rename from pkg/runtime/statfs_uint32.go rename to util/runtime/statfs_uint32.go index 72d670a396..fa10ebc967 100644 --- a/pkg/runtime/statfs_uint32.go +++ b/util/runtime/statfs_uint32.go @@ -23,6 +23,7 @@ import ( // Statfs returns the file system type (Unix only) func Statfs(path string) string { + // Types of file systems that may be returned by `statfs` fsTypes := map[uint32]string{ 0xadf5: "ADFS_SUPER_MAGIC", diff --git a/pkg/runtime/uname_default.go b/util/runtime/uname_default.go similarity index 100% rename from pkg/runtime/uname_default.go rename to util/runtime/uname_default.go diff --git a/pkg/runtime/uname_linux.go b/util/runtime/uname_linux.go similarity index 100% rename from pkg/runtime/uname_linux.go rename to util/runtime/uname_linux.go diff --git a/pkg/runtime/vmlimits_default.go b/util/runtime/vmlimits_default.go similarity index 100% rename from pkg/runtime/vmlimits_default.go rename to util/runtime/vmlimits_default.go diff --git a/pkg/runtime/vmlimits_openbsd.go b/util/runtime/vmlimits_openbsd.go similarity index 100% rename from pkg/runtime/vmlimits_openbsd.go rename to util/runtime/vmlimits_openbsd.go diff --git a/util/teststorage/storage.go b/util/teststorage/storage.go index d4efcac436..a829894778 100644 --- a/util/teststorage/storage.go +++ b/util/teststorage/storage.go @@ -21,8 +21,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb" "github.com/prometheus/prometheus/util/testutil" diff --git a/web/api/v1/api.go b/web/api/v1/api.go index dc9c01d9a9..39d07383c3 100644 --- a/web/api/v1/api.go +++ b/web/api/v1/api.go @@ -39,10 +39,10 @@ import ( "github.com/prometheus/common/route" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/textparse" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/textparse" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/rules" diff --git a/web/api/v1/api_test.go b/web/api/v1/api_test.go index a04a3d8dbc..5112201f44 100644 --- a/web/api/v1/api_test.go +++ b/web/api/v1/api_test.go @@ -40,10 +40,10 @@ import ( "github.com/stretchr/testify/require" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/exemplar" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/textparse" - "github.com/prometheus/prometheus/pkg/timestamp" + "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/textparse" + "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql/parser" diff --git a/web/federate.go b/web/federate.go index f97579ad4a..c7a2ff61d7 100644 --- a/web/federate.go +++ b/web/federate.go @@ -26,9 +26,9 @@ import ( "github.com/prometheus/common/expfmt" "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/pkg/timestamp" - "github.com/prometheus/prometheus/pkg/value" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/timestamp" + "github.com/prometheus/prometheus/model/value" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/storage" diff --git a/web/federate_test.go b/web/federate_test.go index 35a02bb446..201109e887 100644 --- a/web/federate_test.go +++ b/web/federate_test.go @@ -28,7 +28,7 @@ import ( "github.com/stretchr/testify/require" "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb" diff --git a/web/ui/assets_generate.go b/web/ui/assets_generate.go index 884329bd02..47f1a43c0a 100644 --- a/web/ui/assets_generate.go +++ b/web/ui/assets_generate.go @@ -22,7 +22,7 @@ import ( "github.com/shurcooL/vfsgen" - "github.com/prometheus/prometheus/pkg/modtimevfs" + "github.com/prometheus/prometheus/util/modtimevfs" "github.com/prometheus/prometheus/web/ui" )