Skip to content

Commit

Permalink
grpclb: sync messages.proto and update client load reporting (#2101)
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl authored Jun 4, 2018
1 parent 130c87f commit 70e9c28
Show file tree
Hide file tree
Showing 6 changed files with 334 additions and 426 deletions.
5 changes: 3 additions & 2 deletions grpclb.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"sync"
"time"

durationpb "github.com/golang/protobuf/ptypes/duration"
"golang.org/x/net/context"
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/connectivity"
Expand All @@ -38,7 +39,7 @@ const (
grpclbName = "grpclb"
)

func convertDuration(d *lbpb.Duration) time.Duration {
func convertDuration(d *durationpb.Duration) time.Duration {
if d == nil {
return 0
}
Expand Down Expand Up @@ -138,7 +139,7 @@ func (b *lbBuilder) Build(cc balancer.ClientConn, opt balancer.BuildOptions) bal
subConns: make(map[resolver.Address]balancer.SubConn),
scStates: make(map[balancer.SubConn]connectivity.State),
picker: &errPicker{err: balancer.ErrNoSubConnAvailable},
clientStats: &rpcStats{},
clientStats: newRPCStats(),
}

return lb
Expand Down
Loading

0 comments on commit 70e9c28

Please sign in to comment.