summaryrefslogtreecommitdiff
path: root/vendor/google.golang.org/grpc/balancer/balancer.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/google.golang.org/grpc/balancer/balancer.go')
-rw-r--r--vendor/google.golang.org/grpc/balancer/balancer.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go
index d79560a2e..f391744f7 100644
--- a/vendor/google.golang.org/grpc/balancer/balancer.go
+++ b/vendor/google.golang.org/grpc/balancer/balancer.go
@@ -54,13 +54,14 @@ var (
// an init() function), and is not thread-safe. If multiple Balancers are
// registered with the same name, the one registered last will take effect.
func Register(b Builder) {
- if strings.ToLower(b.Name()) != b.Name() {
+ name := strings.ToLower(b.Name())
+ if name != b.Name() {
// TODO: Skip the use of strings.ToLower() to index the map after v1.59
// is released to switch to case sensitive balancer registry. Also,
// remove this warning and update the docstrings for Register and Get.
logger.Warningf("Balancer registered with name %q. grpc-go will be switching to case sensitive balancer registries soon", b.Name())
}
- m[strings.ToLower(b.Name())] = b
+ m[name] = b
}
// unregisterForTesting deletes the balancer with the given name from the
@@ -232,8 +233,8 @@ type BuildOptions struct {
// implementations which do not communicate with a remote load balancer
// server can ignore this field.
Authority string
- // ChannelzParentID is the parent ClientConn's channelz ID.
- ChannelzParentID *channelz.Identifier
+ // ChannelzParent is the parent ClientConn's channelz channel.
+ ChannelzParent channelz.Identifier
// CustomUserAgent is the custom user agent set on the parent ClientConn.
// The balancer should set the same custom user agent if it creates a
// ClientConn.