Move packages out of deprecated pkg directory

This creates a new `model` directory and moves all data-model related
packages over there:
  exemplar labels relabel rulefmt textparse timestamp value

All the others are more or less utilities and have been moved to `util`:
  gate logging modetimevfs pool runtime

Signed-off-by: beorn7 <beorn@grafana.com>
This commit is contained in:
beorn7 2021-11-08 15:23:17 +01:00
parent 4caae4e4a6
commit c954cd9d1d
168 changed files with 207 additions and 208 deletions

View file

@ -60,12 +60,10 @@ import (
_ "github.com/prometheus/prometheus/discovery/install" // Register service discovery implementations. _ "github.com/prometheus/prometheus/discovery/install" // Register service discovery implementations.
"github.com/prometheus/prometheus/discovery/legacymanager" "github.com/prometheus/prometheus/discovery/legacymanager"
"github.com/prometheus/prometheus/discovery/targetgroup" "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/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/promql"
"github.com/prometheus/prometheus/rules" "github.com/prometheus/prometheus/rules"
"github.com/prometheus/prometheus/scrape" "github.com/prometheus/prometheus/scrape"
@ -73,6 +71,8 @@ import (
"github.com/prometheus/prometheus/storage/remote" "github.com/prometheus/prometheus/storage/remote"
"github.com/prometheus/prometheus/tsdb" "github.com/prometheus/prometheus/tsdb"
"github.com/prometheus/prometheus/tsdb/agent" "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/util/strutil"
"github.com/prometheus/prometheus/web" "github.com/prometheus/prometheus/web"
) )

View file

@ -32,8 +32,8 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/notifier" "github.com/prometheus/prometheus/notifier"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/rules" "github.com/prometheus/prometheus/rules"
) )

View file

@ -22,8 +22,8 @@ import (
"github.com/go-kit/log" "github.com/go-kit/log"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/textparse" "github.com/prometheus/prometheus/model/textparse"
"github.com/prometheus/prometheus/tsdb" "github.com/prometheus/prometheus/tsdb"
tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors"
) )

View file

@ -24,7 +24,7 @@ import (
"github.com/stretchr/testify/require" "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/storage"
"github.com/prometheus/prometheus/tsdb" "github.com/prometheus/prometheus/tsdb"
) )

View file

@ -49,9 +49,9 @@ import (
_ "github.com/prometheus/prometheus/discovery/install" // Register service discovery implementations. _ "github.com/prometheus/prometheus/discovery/install" // Register service discovery implementations.
"github.com/prometheus/prometheus/discovery/kubernetes" "github.com/prometheus/prometheus/discovery/kubernetes"
"github.com/prometheus/prometheus/discovery/targetgroup" "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/notifier"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/rulefmt"
"github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/scrape" "github.com/prometheus/prometheus/scrape"
) )

View file

@ -23,8 +23,8 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/rulefmt" "github.com/prometheus/prometheus/model/rulefmt"
) )
func TestQueryRange(t *testing.T) { func TestQueryRange(t *testing.T) {

View file

@ -24,8 +24,8 @@ import (
v1 "github.com/prometheus/client_golang/api/prometheus/v1" v1 "github.com/prometheus/client_golang/api/prometheus/v1"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/rules" "github.com/prometheus/prometheus/rules"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/tsdb" "github.com/prometheus/prometheus/tsdb"

View file

@ -27,7 +27,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/tsdb" "github.com/prometheus/prometheus/tsdb"
) )

View file

@ -26,7 +26,7 @@ import (
"github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery"
"github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/scrape" "github.com/prometheus/prometheus/scrape"
) )

View file

@ -20,8 +20,8 @@ import (
"github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/relabel" "github.com/prometheus/prometheus/model/relabel"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )

View file

@ -38,7 +38,7 @@ import (
"github.com/go-kit/log" "github.com/go-kit/log"
"github.com/pkg/errors" "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"
"github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/chunks"
tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors"

View file

@ -30,7 +30,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
yaml "gopkg.in/yaml.v2" 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"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/rules" "github.com/prometheus/prometheus/rules"

View file

@ -33,8 +33,8 @@ import (
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/yaml.v2"
"github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/relabel" "github.com/prometheus/prometheus/model/relabel"
) )
var ( var (

View file

@ -52,8 +52,8 @@ import (
"github.com/prometheus/prometheus/discovery/uyuni" "github.com/prometheus/prometheus/discovery/uyuni"
"github.com/prometheus/prometheus/discovery/xds" "github.com/prometheus/prometheus/discovery/xds"
"github.com/prometheus/prometheus/discovery/zookeeper" "github.com/prometheus/prometheus/discovery/zookeeper"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/relabel" "github.com/prometheus/prometheus/model/relabel"
) )
func mustParseURL(u string) *config.URL { func mustParseURL(u string) *config.URL {

View file

@ -13,7 +13,7 @@
package exemplar 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 // 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 // https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars

View file

@ -22,7 +22,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
) )
var ( var (

View file

@ -19,7 +19,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
) )
func TestRelabel(t *testing.T) { func TestRelabel(t *testing.T) {

View file

@ -25,7 +25,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
yaml "gopkg.in/yaml.v3" 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/promql/parser"
"github.com/prometheus/prometheus/template" "github.com/prometheus/prometheus/template"
) )

View file

@ -16,8 +16,8 @@ package textparse
import ( import (
"mime" "mime"
"github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/model/exemplar"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
) )
// Parser parses samples from a byte slice of samples in the official // Parser parses samples from a byte slice of samples in the official

View file

@ -27,9 +27,9 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/model/exemplar"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/value" "github.com/prometheus/prometheus/model/value"
) )
var allowedSuffixes = [][]byte{[]byte("_total"), []byte("_bucket")} var allowedSuffixes = [][]byte{[]byte("_total"), []byte("_bucket")}

View file

@ -19,8 +19,8 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/model/exemplar"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
) )
func TestOpenMetricsParse(t *testing.T) { func TestOpenMetricsParse(t *testing.T) {

View file

@ -28,9 +28,9 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/model/exemplar"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/value" "github.com/prometheus/prometheus/model/value"
) )
type promlexer struct { type promlexer struct {

View file

@ -25,7 +25,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
) )
func TestPromParse(t *testing.T) { func TestPromParse(t *testing.T) {

View file

@ -41,8 +41,8 @@ import (
"github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/relabel" "github.com/prometheus/prometheus/model/relabel"
) )
const ( const (

View file

@ -35,8 +35,8 @@ import (
"github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/relabel" "github.com/prometheus/prometheus/model/relabel"
) )
func TestPostPath(t *testing.T) { func TestPostPath(t *testing.T) {

View file

@ -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.

View file

@ -21,7 +21,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/util/teststorage" "github.com/prometheus/prometheus/util/teststorage"

View file

@ -35,9 +35,9 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/uber/jaeger-client-go" "github.com/uber/jaeger-client-go"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/pkg/value" "github.com/prometheus/prometheus/model/value"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/util/stats" "github.com/prometheus/prometheus/util/stats"

View file

@ -26,8 +26,8 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"go.uber.org/goleak" "go.uber.org/goleak"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
) )

View file

@ -24,7 +24,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
) )

View file

@ -21,8 +21,8 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/util/teststorage" "github.com/prometheus/prometheus/util/teststorage"
) )

View file

@ -20,7 +20,7 @@ package promql
import ( import (
"io" "io"
"github.com/prometheus/prometheus/pkg/textparse" "github.com/prometheus/prometheus/model/textparse"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
) )

View file

@ -19,7 +19,7 @@ import (
"github.com/pkg/errors" "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/storage"
) )

View file

@ -20,8 +20,8 @@ import (
"strconv" "strconv"
"time" "time"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/value" "github.com/prometheus/prometheus/model/value"
) )
%} %}

View file

@ -13,8 +13,8 @@ import (
"strconv" "strconv"
"time" "time"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/value" "github.com/prometheus/prometheus/model/value"
) )
//line promql/parser/generated_parser.y:28 //line promql/parser/generated_parser.y:28

View file

@ -26,8 +26,8 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/util/strutil" "github.com/prometheus/prometheus/util/strutil"
) )

View file

@ -24,7 +24,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
) )
var testExpr = []struct { var testExpr = []struct {

View file

@ -21,7 +21,7 @@ import (
"github.com/prometheus/common/model" "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. // Tree returns a string of the tree structure of the given node.

View file

@ -18,7 +18,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
) )
func TestExprString(t *testing.T) { func TestExprString(t *testing.T) {

View file

@ -17,7 +17,7 @@ import (
"math" "math"
"sort" "sort"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
) )
// Helpers to calculate quantiles. // Helpers to calculate quantiles.

View file

@ -27,9 +27,9 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/model/exemplar"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/tsdb" "github.com/prometheus/prometheus/tsdb"

View file

@ -20,7 +20,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
) )
func TestLazyLoader_WithSamplesTill(t *testing.T) { func TestLazyLoader_WithSamplesTill(t *testing.T) {

View file

@ -21,7 +21,7 @@ import (
"github.com/pkg/errors" "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/promql/parser"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunkenc"

View file

@ -28,9 +28,9 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/yaml.v2"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/rulefmt" "github.com/prometheus/prometheus/model/rulefmt"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/template" "github.com/prometheus/prometheus/template"

View file

@ -22,8 +22,8 @@ import (
"github.com/go-kit/log" "github.com/go-kit/log"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/util/teststorage" "github.com/prometheus/prometheus/util/teststorage"

View file

@ -29,10 +29,10 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/rulefmt" "github.com/prometheus/prometheus/model/rulefmt"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/pkg/value" "github.com/prometheus/prometheus/model/value"
"github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"

View file

@ -30,10 +30,10 @@ import (
"go.uber.org/goleak" "go.uber.org/goleak"
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/yaml.v2"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/rulefmt" "github.com/prometheus/prometheus/model/rulefmt"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/pkg/value" "github.com/prometheus/prometheus/model/value"
"github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"

View file

@ -23,8 +23,8 @@ import (
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/yaml.v2"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/rulefmt" "github.com/prometheus/prometheus/model/rulefmt"
"github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/util/strutil" "github.com/prometheus/prometheus/util/strutil"

View file

@ -21,8 +21,8 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/util/teststorage" "github.com/prometheus/prometheus/util/teststorage"

View file

@ -17,8 +17,8 @@ import (
"context" "context"
"math/rand" "math/rand"
"github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/model/exemplar"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
) )

View file

@ -27,7 +27,7 @@ import (
"github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery/targetgroup" "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/storage"
"github.com/prometheus/prometheus/util/osutil" "github.com/prometheus/prometheus/util/osutil"
) )

View file

@ -25,8 +25,8 @@ import (
"github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/relabel" "github.com/prometheus/prometheus/model/relabel"
) )
func TestPopulateLabels(t *testing.T) { func TestPopulateLabels(t *testing.T) {

View file

@ -40,14 +40,14 @@ import (
"github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/model/exemplar"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/pool" "github.com/prometheus/prometheus/model/relabel"
"github.com/prometheus/prometheus/pkg/relabel" "github.com/prometheus/prometheus/model/textparse"
"github.com/prometheus/prometheus/pkg/textparse" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/value"
"github.com/prometheus/prometheus/pkg/value"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/util/pool"
) )
// ScrapeTimestampTolerance is the tolerance for scrape appends timestamps // ScrapeTimestampTolerance is the tolerance for scrape appends timestamps

View file

@ -38,12 +38,12 @@ import (
"github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/model/exemplar"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/relabel" "github.com/prometheus/prometheus/model/relabel"
"github.com/prometheus/prometheus/pkg/textparse" "github.com/prometheus/prometheus/model/textparse"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/pkg/value" "github.com/prometheus/prometheus/model/value"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/util/teststorage" "github.com/prometheus/prometheus/util/teststorage"
"github.com/prometheus/prometheus/util/testutil" "github.com/prometheus/prometheus/util/testutil"

View file

@ -27,10 +27,10 @@ import (
"github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/relabel" "github.com/prometheus/prometheus/model/relabel"
"github.com/prometheus/prometheus/pkg/textparse" "github.com/prometheus/prometheus/model/textparse"
"github.com/prometheus/prometheus/pkg/value" "github.com/prometheus/prometheus/model/value"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
) )

View file

@ -31,7 +31,7 @@ import (
"github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
) )
const ( const (

View file

@ -20,8 +20,8 @@ import (
"github.com/go-kit/log/level" "github.com/go-kit/log/level"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/model/exemplar"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors"
) )

View file

@ -21,7 +21,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/require" "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/storage"
"github.com/prometheus/prometheus/util/teststorage" "github.com/prometheus/prometheus/util/teststorage"
) )

View file

@ -17,7 +17,7 @@
package storage package storage
import ( import (
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
) )
type genericQuerier interface { type genericQuerier interface {

View file

@ -18,8 +18,8 @@ import (
"errors" "errors"
"fmt" "fmt"
"github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/model/exemplar"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunkenc"
"github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/chunks"
) )

View file

@ -22,7 +22,7 @@ import (
"github.com/pkg/errors" "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/chunkenc"
"github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/chunks"
tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors"

View file

@ -23,7 +23,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/stretchr/testify/require" "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/chunkenc"
"github.com/prometheus/prometheus/tsdb/tsdbutil" "github.com/prometheus/prometheus/tsdb/tsdbutil"
) )

View file

@ -14,7 +14,7 @@
package storage package storage
import ( import (
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
) )
type noopQuerier struct{} type noopQuerier struct{}

View file

@ -26,9 +26,9 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/model/exemplar"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/textparse" "github.com/prometheus/prometheus/model/textparse"
"github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/prompb"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/chunkenc"

View file

@ -20,8 +20,8 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/textparse" "github.com/prometheus/prometheus/model/textparse"
"github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/prompb"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
) )

View file

@ -22,7 +22,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/pkg/textparse" "github.com/prometheus/prometheus/model/textparse"
"github.com/prometheus/prometheus/scrape" "github.com/prometheus/prometheus/scrape"
) )

View file

@ -31,8 +31,8 @@ import (
"go.uber.org/atomic" "go.uber.org/atomic"
"github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/relabel" "github.com/prometheus/prometheus/model/relabel"
"github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/prompb"
"github.com/prometheus/prometheus/scrape" "github.com/prometheus/prometheus/scrape"
"github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/chunks"

View file

@ -38,9 +38,9 @@ import (
"go.uber.org/atomic" "go.uber.org/atomic"
"github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/textparse" "github.com/prometheus/prometheus/model/textparse"
"github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/prompb"
"github.com/prometheus/prometheus/scrape" "github.com/prometheus/prometheus/scrape"
"github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/chunks"

View file

@ -18,7 +18,7 @@ import (
"github.com/pkg/errors" "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/storage"
) )

View file

@ -23,10 +23,10 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/pkg/gate" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/prompb"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/util/gate"
) )
type readHandler struct { type readHandler struct {

View file

@ -26,7 +26,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/config" "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/prompb"
"github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"

View file

@ -27,7 +27,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/prometheus/prometheus/config" "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/prompb"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
) )

Some files were not shown because too many files have changed in this diff Show more