Skip to content

Commit

Permalink
Migrate to connectrpc.com/connect
Browse files Browse the repository at this point in the history
  • Loading branch information
pqn committed Nov 21, 2023
1 parent 6c8c192 commit 7f26df4
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 58 deletions.
4 changes: 2 additions & 2 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: v1
plugins:
- name: go
- plugin: buf.build/protocolbuffers/go:v1.31.0
out: gen
opt:
- module=github.com/easyCZ/connect-go-prometheus/gen

- name: connect-go
- plugin: buf.build/connectrpc/go:v1.12.0
out: gen
opt:
- module=github.com/easyCZ/connect-go-prometheus/gen
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"google.golang.org/protobuf/proto"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
)

type streamingConn struct {
Expand Down
2 changes: 1 addition & 1 deletion gen/greet/greet.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

133 changes: 83 additions & 50 deletions gen/greet/greetconnect/greet.connect.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ require (
github.com/bufbuild/connect-go v1.0.0
github.com/prometheus/client_golang v1.13.0
github.com/stretchr/testify v1.4.0
google.golang.org/protobuf v1.28.1
google.golang.org/protobuf v1.31.0
)

require (
connectrpc.com/connect v1.12.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
connectrpc.com/connect v1.12.0 h1:HwKdOY0lGhhoHdsza+hW55aqHEC64pYpObRNoAgn70g=
connectrpc.com/connect v1.12.0/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
Expand Down Expand Up @@ -460,6 +462,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
2 changes: 1 addition & 1 deletion interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"time"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion interceptor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http/httptest"
"testing"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/easyCZ/connect-go-prometheus/gen/greet"
"github.com/easyCZ/connect-go-prometheus/gen/greet/greetconnect"
prom "github.com/prometheus/client_golang/prometheus"
Expand Down
2 changes: 1 addition & 1 deletion metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"testing"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/easyCZ/connect-go-prometheus/gen/greet/greetconnect"
prom "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/testutil"
Expand Down

0 comments on commit 7f26df4

Please sign in to comment.