From f7ecbb24e152e5d00f8a12976b65fe69b3907667 Mon Sep 17 00:00:00 2001 From: Doug Fawley Date: Tue, 24 Jan 2023 13:12:36 -0800 Subject: [PATCH] Cherry pick: grpclb: rename `grpclbstate` package back to `state` (#5962) (#5963) --- balancer/grpclb/grpclb.go | 2 +- balancer/grpclb/grpclb_test.go | 2 +- balancer/grpclb/{grpclbstate => state}/state.go | 8 ++++---- internal/resolver/dns/dns_resolver.go | 2 +- internal/resolver/dns/dns_resolver_test.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename balancer/grpclb/{grpclbstate => state}/state.go (87%) diff --git a/balancer/grpclb/grpclb.go b/balancer/grpclb/grpclb.go index b0dd72fce141..dd15810d0aeb 100644 --- a/balancer/grpclb/grpclb.go +++ b/balancer/grpclb/grpclb.go @@ -32,7 +32,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/balancer" - "google.golang.org/grpc/balancer/grpclb/grpclbstate" + grpclbstate "google.golang.org/grpc/balancer/grpclb/state" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials" "google.golang.org/grpc/grpclog" diff --git a/balancer/grpclb/grpclb_test.go b/balancer/grpclb/grpclb_test.go index f8fbfe03d5d1..da2df41f2af8 100644 --- a/balancer/grpclb/grpclb_test.go +++ b/balancer/grpclb/grpclb_test.go @@ -36,7 +36,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/balancer" - "google.golang.org/grpc/balancer/grpclb/grpclbstate" + grpclbstate "google.golang.org/grpc/balancer/grpclb/state" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" "google.golang.org/grpc/internal" diff --git a/balancer/grpclb/grpclbstate/state.go b/balancer/grpclb/state/state.go similarity index 87% rename from balancer/grpclb/grpclbstate/state.go rename to balancer/grpclb/state/state.go index cece046be343..4ecfa1c21511 100644 --- a/balancer/grpclb/grpclbstate/state.go +++ b/balancer/grpclb/state/state.go @@ -16,9 +16,9 @@ * */ -// Package grpclbstate declares grpclb types to be set by resolvers wishing to -// pass information to grpclb via resolver.State Attributes. -package grpclbstate +// Package state declares grpclb types to be set by resolvers wishing to pass +// information to grpclb via resolver.State Attributes. +package state import ( "google.golang.org/grpc/resolver" @@ -27,7 +27,7 @@ import ( // keyType is the key to use for storing State in Attributes. type keyType string -const key = keyType("grpc.grpclb.grpclbstate") +const key = keyType("grpc.grpclb.state") // State contains gRPCLB-relevant data passed from the name resolver. type State struct { diff --git a/internal/resolver/dns/dns_resolver.go b/internal/resolver/dns/dns_resolver.go index d51302e65c62..b08ac30adfef 100644 --- a/internal/resolver/dns/dns_resolver.go +++ b/internal/resolver/dns/dns_resolver.go @@ -32,7 +32,7 @@ import ( "sync" "time" - grpclbstate "google.golang.org/grpc/balancer/grpclb/grpclbstate" + grpclbstate "google.golang.org/grpc/balancer/grpclb/state" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal/backoff" "google.golang.org/grpc/internal/envconfig" diff --git a/internal/resolver/dns/dns_resolver_test.go b/internal/resolver/dns/dns_resolver_test.go index bfed6a74ff38..6bfcf299b33c 100644 --- a/internal/resolver/dns/dns_resolver_test.go +++ b/internal/resolver/dns/dns_resolver_test.go @@ -34,7 +34,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "google.golang.org/grpc/balancer" - grpclbstate "google.golang.org/grpc/balancer/grpclb/grpclbstate" + grpclbstate "google.golang.org/grpc/balancer/grpclb/state" "google.golang.org/grpc/internal/envconfig" "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/internal/testutils"