Skip to content

Commit

Permalink
dep:upgrade polaris-go version (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun authored Jun 29, 2023
1 parent 4cd06c9 commit aeeca59
Show file tree
Hide file tree
Showing 6 changed files with 1,230 additions and 75 deletions.
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

0 comments on commit aeeca59

Please sign in to comment.