Skip to content

Commit

Permalink
Merge pull request #134 from grafana/pkw/buf-remote-packages
Browse files Browse the repository at this point in the history
Migrate to Buf remote packages
  • Loading branch information
codebien authored Jul 31, 2023
2 parents e8b10ad + d86fcd0 commit 0ca7b4c
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 22 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ module github.com/grafana/xk6-output-prometheus-remote
go 1.18

require (
buf.build/gen/go/prometheus/prometheus/protocolbuffers/go v1.31.0-20230627135113-9a12bc2590d2.1
github.com/golang/snappy v0.0.4
github.com/mstoykov/atlas v0.0.0-20220811071828-388f114305dd
github.com/prometheus/client_golang v1.14.1-0.20221122130035-8b6e68085b10
github.com/prometheus/client_model v0.3.0
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.4
go.buf.build/grpc/go/prometheus/prometheus v1.4.4
go.k6.io/k6 v0.45.1-0.20230719100510-ac9c6bc85d13
google.golang.org/protobuf v1.30.0
google.golang.org/protobuf v1.31.0
gopkg.in/guregu/null.v3 v3.3.0
)

require (
buf.build/gen/go/gogo/protobuf/protocolbuffers/go v1.31.0-20210810001428-4df00b267f94.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand All @@ -31,8 +32,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/spf13/afero v1.1.2 // indirect
go.buf.build/grpc/go/gogo/protobuf v1.4.9 // indirect
github.com/spf13/afero v1.9.2 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/text v0.10.0 // indirect
golang.org/x/time v0.3.0 // indirect
Expand Down
85 changes: 75 additions & 10 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/remote/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"net/url"
"time"

prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
"github.com/golang/snappy"
prompb "go.buf.build/grpc/go/prometheus/prometheus"
"google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/remote/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (

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

prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
"github.com/golang/snappy"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
prompb "go.buf.build/grpc/go/prometheus/prometheus"
"google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/remotewrite/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package remotewrite
import (
"sort"

prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
"github.com/mstoykov/atlas"
prompb "go.buf.build/grpc/go/prometheus/prometheus"
"go.k6.io/k6/metrics"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/remotewrite/prometheus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"testing"
"time"

prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
prompb "go.buf.build/grpc/go/prometheus/prometheus"
"go.k6.io/k6/metrics"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/remotewrite/remotewrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"go.k6.io/k6/metrics"
"go.k6.io/k6/output"

prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
"github.com/sirupsen/logrus"
prompb "go.buf.build/grpc/go/prometheus/prometheus"
)

var _ output.Output = new(Output)
Expand Down
2 changes: 1 addition & 1 deletion pkg/remotewrite/remotewrite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"testing"
"time"

prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
prompb "go.buf.build/grpc/go/prometheus/prometheus"
"go.k6.io/k6/lib/testutils"
"go.k6.io/k6/lib/types"
"go.k6.io/k6/metrics"
Expand Down
2 changes: 1 addition & 1 deletion pkg/remotewrite/trend.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"sort"
"time"

prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
"github.com/prometheus/client_golang/prometheus"
dto "github.com/prometheus/client_model/go"
prompb "go.buf.build/grpc/go/prometheus/prometheus"
"go.k6.io/k6/metrics"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/remotewrite/trend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"testing"
"time"

prompb "buf.build/gen/go/prometheus/prometheus/protocolbuffers/go"
dto "github.com/prometheus/client_model/go"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
prompb "go.buf.build/grpc/go/prometheus/prometheus"
"go.k6.io/k6/metrics"
"google.golang.org/protobuf/encoding/protojson"
)
Expand Down

0 comments on commit 0ca7b4c

Please sign in to comment.