From 31df561ba0547b1ce99ef4cf42648116eaf414b8 Mon Sep 17 00:00:00 2001 From: mohanli-ml Date: Thu, 5 May 2022 22:01:34 +0000 Subject: [PATCH] feat(spanner): install grpc rls and xds by default --- spanner/client.go | 5 +++++ spanner/client_enablexds.go | 23 ----------------------- 2 files changed, 5 insertions(+), 23 deletions(-) delete mode 100644 spanner/client_enablexds.go diff --git a/spanner/client.go b/spanner/client.go index fbca1421cf15..377949b2dd4d 100644 --- a/spanner/client.go +++ b/spanner/client.go @@ -34,6 +34,11 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" + + // Install google-c2p resolver, which is required for direct path. + _ "google.golang.org/grpc/xds/googledirectpath" + // Install RLS load balancer policy, which is needed for gRPC RLS. + _ "google.golang.org/grpc/balancer/rls" ) const ( diff --git a/spanner/client_enablexds.go b/spanner/client_enablexds.go deleted file mode 100644 index 145e3843cb56..000000000000 --- a/spanner/client_enablexds.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build enablexds -// +build enablexds - -package spanner - -import ( - // Install google-c2p resolver, which is required for direct path. - _ "google.golang.org/grpc/xds/googledirectpath" -)