Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dep:upgrade polaris-go version #52

Merged
merged 3 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/polarismesh/polaris-go"
"github.com/polarismesh/polaris-go/api"
"github.com/polarismesh/polaris-go/pkg/model"
v1 "github.com/polarismesh/polaris-go/pkg/model/pb/v1"
"github.com/polarismesh/specification/source/go/api/v1/traffic_manage"
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/balancer/base"
"google.golang.org/grpc/connectivity"
Expand Down Expand Up @@ -506,7 +506,7 @@ func (pnp *polarisNamingPicker) addTrafficLabels(info balancer.PickInfo, insReq
return ErrorPolarisServiceRouteRuleEmpty
}

routeRule := resp.GetValue().(*v1.Routing)
routeRule := resp.GetValue().(*traffic_manage.Routing)
labels := make([]string, 0, 4)
labels = append(labels, collectRouteLabels(routeRule.GetInbounds())...)
labels = append(labels, collectRouteLabels(routeRule.GetInbounds())...)
Expand All @@ -532,7 +532,7 @@ func (pnp *polarisNamingPicker) addTrafficLabels(info balancer.PickInfo, insReq
return nil
}

func collectRouteLabels(routings []*v1.Route) []string {
func collectRouteLabels(routings []*traffic_manage.Route) []string {
ret := make([]string, 0, 4)

for i := range routings {
Expand Down
22 changes: 16 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
module github.com/polarismesh/grpc-go-polaris

go 1.13
go 1.15

require (
github.com/golang/protobuf v1.5.2
github.com/dlclark/regexp2 v1.10.0 // indirect
github.com/golang/protobuf v1.5.3
github.com/google/uuid v1.3.0
github.com/polarismesh/polaris-go v1.3.0
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4
google.golang.org/grpc v1.46.2
google.golang.org/protobuf v1.28.0
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/polarismesh/polaris-go v1.5.1
github.com/polarismesh/specification v1.3.2-alpha.5
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/net v0.11.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20230628200519-e449d1ea0e82 // indirect
google.golang.org/grpc v1.56.1
google.golang.org/protobuf v1.31.0
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
)
Loading