diff --git a/BUILD b/BUILD index 120aad21a06..9dd669e735b 100644 --- a/BUILD +++ b/BUILD @@ -1305,23 +1305,6 @@ grpc_cc_library( ], ) -grpc_cc_library( - name = "grpc_xds_api_header", - hdrs = [ - "src/core/ext/xds/xds_api.h", - "src/core/ext/xds/xds_bootstrap.h", - "src/core/ext/xds/xds_client_stats.h", - ], - external_deps = [ - "upb_lib", - "re2", - ], - language = "c++", - deps = [ - "grpc_base", - ], -) - grpc_cc_library( name = "grpc_xds_client", srcs = [ @@ -1331,8 +1314,15 @@ grpc_cc_library( "src/core/ext/xds/xds_client_stats.cc", ], hdrs = [ + "src/core/ext/xds/xds_api.h", + "src/core/ext/xds/xds_bootstrap.h", "src/core/ext/xds/xds_channel_args.h", "src/core/ext/xds/xds_client.h", + "src/core/ext/xds/xds_client_stats.h", + ], + external_deps = [ + "upb_lib", + "re2", ], language = "c++", deps = [ @@ -1341,7 +1331,6 @@ grpc_cc_library( "grpc_client_channel", "grpc_google_mesh_ca_certificate_provider_factory", "grpc_secure", - "grpc_xds_api_header", ], ) @@ -1422,7 +1411,6 @@ grpc_cc_library( "grpc_base", "grpc_client_channel", "grpc_resolver_xds_header", - "grpc_xds_api_header", ], ) diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc index 6f7279bff05..4363c86c10b 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc @@ -16,18 +16,13 @@ #include -#include -#include -#include +#include +#include +#include -#include "absl/container/inlined_vector.h" -#include "absl/strings/match.h" -#include "absl/strings/numbers.h" +#include "absl/status/status.h" #include "absl/strings/str_cat.h" -#include "absl/strings/str_join.h" -#include "absl/strings/str_split.h" #include "absl/strings/string_view.h" -#include "re2/re2.h" #include @@ -36,7 +31,6 @@ #include "src/core/ext/filters/client_channel/lb_policy_factory.h" #include "src/core/ext/filters/client_channel/lb_policy_registry.h" #include "src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h" -#include "src/core/ext/xds/xds_api.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/orphanable.h" @@ -109,17 +103,13 @@ class XdsClusterManagerLb : public LoadBalancingPolicy { // It is required that the keys of cluster_map have to live at least as long // as the ClusterPicker instance. - ClusterPicker(ClusterMap cluster_map, - RefCountedPtr config) - : cluster_map_(std::move(cluster_map)), config_(std::move(config)) {} + explicit ClusterPicker(ClusterMap cluster_map) + : cluster_map_(std::move(cluster_map)) {} PickResult Pick(PickArgs args) override; private: ClusterMap cluster_map_; - // Take a reference to config so that we can use - // XdsApi::RdsUpdate::RdsRoute::Matchers from it. - RefCountedPtr config_; }; // Each ClusterChild holds a ref to its parent XdsClusterManagerLb. @@ -368,8 +358,7 @@ void XdsClusterManagerLb::UpdateStateLocked() { Ref(DEBUG_LOCATION, "QueuePicker"))); } } - picker = - absl::make_unique(std::move(cluster_map), config_); + picker = absl::make_unique(std::move(cluster_map)); break; } case GRPC_CHANNEL_CONNECTING: