Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 0ca7b4c

Browse files
authored
Merge pull request #134 from grafana/pkw/buf-remote-packages
Migrate to Buf remote packages
2 parents e8b10ad + d86fcd0 commit 0ca7b4c

File tree

10 files changed

+87
-22
lines changed

10 files changed

+87
-22
lines changed

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@ module github.com/grafana/xk6-output-prometheus-remote
33
go 1.18
44

55
require (
6+
buf.build/gen/go/prometheus/prometheus/protocolbuffers/go v1.31.0-20230627135113-9a12bc2590d2.1
67
github.com/golang/snappy v0.0.4
78
github.com/mstoykov/atlas v0.0.0-20220811071828-388f114305dd
89
github.com/prometheus/client_golang v1.14.1-0.20221122130035-8b6e68085b10
910
github.com/prometheus/client_model v0.3.0
1011
github.com/sirupsen/logrus v1.9.3
1112
github.com/stretchr/testify v1.8.4
12-
go.buf.build/grpc/go/prometheus/prometheus v1.4.4
1313
go.k6.io/k6 v0.45.1-0.20230719100510-ac9c6bc85d13
14-
google.golang.org/protobuf v1.30.0
14+
google.golang.org/protobuf v1.31.0
1515
gopkg.in/guregu/null.v3 v3.3.0
1616
)
1717

1818
require (
19+
buf.build/gen/go/gogo/protobuf/protocolbuffers/go v1.31.0-20210810001428-4df00b267f94.1 // indirect
1920
github.com/beorn7/perks v1.0.1 // indirect
2021
github.com/cespare/xxhash/v2 v2.2.0 // indirect
2122
github.com/davecgh/go-spew v1.1.1 // indirect
@@ -31,8 +32,7 @@ require (
3132
github.com/pmezard/go-difflib v1.0.0 // indirect
3233
github.com/prometheus/common v0.37.0 // indirect
3334
github.com/prometheus/procfs v0.8.0 // indirect
34-
github.com/spf13/afero v1.1.2 // indirect
35-
go.buf.build/grpc/go/gogo/protobuf v1.4.9 // indirect
35+
github.com/spf13/afero v1.9.2 // indirect
3636
golang.org/x/sys v0.9.0 // indirect
3737
golang.org/x/text v0.10.0 // indirect
3838
golang.org/x/time v0.3.0 // indirect

go.sum

Lines changed: 75 additions & 10 deletions
Large diffs are not rendered by default.

pkg/remote/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"net/url"
1212
"time"
1313

14+
prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
1415
"github.com/golang/snappy"
15-
prompb "go.buf.build/grpc/go/prometheus/prometheus"
1616
"google.golang.org/protobuf/proto"
1717
)
1818

pkg/remote/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import (
1212

1313
"github.com/grafana/xk6-output-prometheus-remote/pkg/stale"
1414

15+
prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
1516
"github.com/golang/snappy"
1617
"github.com/stretchr/testify/assert"
1718
"github.com/stretchr/testify/require"
18-
prompb "go.buf.build/grpc/go/prometheus/prometheus"
1919
"google.golang.org/protobuf/proto"
2020
)
2121

pkg/remotewrite/prometheus.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package remotewrite
33
import (
44
"sort"
55

6+
prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
67
"github.com/mstoykov/atlas"
7-
prompb "go.buf.build/grpc/go/prometheus/prometheus"
88
"go.k6.io/k6/metrics"
99
)
1010

pkg/remotewrite/prometheus_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"testing"
66
"time"
77

8+
prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
89
"github.com/stretchr/testify/assert"
910
"github.com/stretchr/testify/require"
10-
prompb "go.buf.build/grpc/go/prometheus/prometheus"
1111
"go.k6.io/k6/metrics"
1212
)
1313

pkg/remotewrite/remotewrite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
"go.k6.io/k6/metrics"
1414
"go.k6.io/k6/output"
1515

16+
prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
1617
"github.com/sirupsen/logrus"
17-
prompb "go.buf.build/grpc/go/prometheus/prometheus"
1818
)
1919

2020
var _ output.Output = new(Output)

pkg/remotewrite/remotewrite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import (
77
"testing"
88
"time"
99

10+
prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
1011
"github.com/sirupsen/logrus"
1112
"github.com/stretchr/testify/assert"
1213
"github.com/stretchr/testify/require"
13-
prompb "go.buf.build/grpc/go/prometheus/prometheus"
1414
"go.k6.io/k6/lib/testutils"
1515
"go.k6.io/k6/lib/types"
1616
"go.k6.io/k6/metrics"

pkg/remotewrite/trend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"sort"
66
"time"
77

8+
prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
89
"github.com/prometheus/client_golang/prometheus"
910
dto "github.com/prometheus/client_model/go"
10-
prompb "go.buf.build/grpc/go/prometheus/prometheus"
1111
"go.k6.io/k6/metrics"
1212
)
1313

pkg/remotewrite/trend_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import (
55
"testing"
66
"time"
77

8+
prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
89
dto "github.com/prometheus/client_model/go"
910
"github.com/stretchr/testify/assert"
1011
"github.com/stretchr/testify/require"
11-
prompb "go.buf.build/grpc/go/prometheus/prometheus"
1212
"go.k6.io/k6/metrics"
1313
"google.golang.org/protobuf/encoding/protojson"
1414
)

0 commit comments

Comments
 (0)