clientv3: PS: Replace balancer with upstream grpc solution

Addresses comments from: https://github.com/etcd-io/etcd/pull/12671#pullrequestreview-593942302
This commit is contained in:
Piotr Tabor
2021-02-21 23:44:21 +01:00
parent 8d1a8ce044
commit 4a1c24556c
11 changed files with 216 additions and 73 deletions

View File

@@ -208,7 +208,13 @@ func startGRPCProxy(cmd *cobra.Command, args []string) {
}()
client := mustNewClient(lg)
proxyClient := mustNewProxyClient(lg, tlsinfo)
// The proxy client is used for self-healthchecking.
// TODO: The mechanism should be refactored to use internal connection.
var proxyClient *clientv3.Client
if grpcProxyAdvertiseClientURL != "" {
proxyClient = mustNewProxyClient(lg, tlsinfo)
}
httpClient := mustNewHTTPClient(lg)
srvhttp, httpl := mustHTTPListener(lg, m, tlsinfo, client, proxyClient)