diff --git a/BUILD b/BUILD index a3eb58fab04..d92542d4120 100644 --- a/BUILD +++ b/BUILD @@ -2769,6 +2769,7 @@ grpc_cc_library( "//src/core:ext/filters/client_channel/client_channel.h", "//src/core:ext/filters/client_channel/client_channel_channelz.h", "//src/core:ext/filters/client_channel/client_channel_factory.h", + "//src/core:ext/filters/client_channel/client_channel_internal.h", "//src/core:ext/filters/client_channel/client_channel_service_config.h", "//src/core:ext/filters/client_channel/config_selector.h", "//src/core:ext/filters/client_channel/connector.h", @@ -2776,7 +2777,6 @@ grpc_cc_library( "//src/core:ext/filters/client_channel/global_subchannel_pool.h", "//src/core:ext/filters/client_channel/health/health_check_client.h", "//src/core:ext/filters/client_channel/http_proxy.h", - "//src/core:ext/filters/client_channel/lb_call_state_internal.h", "//src/core:ext/filters/client_channel/lb_policy/child_policy_handler.h", "//src/core:ext/filters/client_channel/lb_policy/oob_backend_metric.h", "//src/core:ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h", diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index ead6d3e1f53..8c916906833 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -335,6 +335,7 @@ libs: - src/core/ext/filters/client_channel/client_channel.h - src/core/ext/filters/client_channel/client_channel_channelz.h - src/core/ext/filters/client_channel/client_channel_factory.h + - src/core/ext/filters/client_channel/client_channel_internal.h - src/core/ext/filters/client_channel/client_channel_service_config.h - src/core/ext/filters/client_channel/config_selector.h - src/core/ext/filters/client_channel/connector.h @@ -342,7 +343,6 @@ libs: - src/core/ext/filters/client_channel/global_subchannel_pool.h - src/core/ext/filters/client_channel/health/health_check_client.h - src/core/ext/filters/client_channel/http_proxy.h - - src/core/ext/filters/client_channel/lb_call_state_internal.h - src/core/ext/filters/client_channel/lb_policy/address_filtering.h - src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h - src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h @@ -2005,6 +2005,7 @@ libs: - src/core/ext/filters/client_channel/client_channel.h - src/core/ext/filters/client_channel/client_channel_channelz.h - src/core/ext/filters/client_channel/client_channel_factory.h + - src/core/ext/filters/client_channel/client_channel_internal.h - src/core/ext/filters/client_channel/client_channel_service_config.h - src/core/ext/filters/client_channel/config_selector.h - src/core/ext/filters/client_channel/connector.h @@ -2012,7 +2013,6 @@ libs: - src/core/ext/filters/client_channel/global_subchannel_pool.h - src/core/ext/filters/client_channel/health/health_check_client.h - src/core/ext/filters/client_channel/http_proxy.h - - src/core/ext/filters/client_channel/lb_call_state_internal.h - src/core/ext/filters/client_channel/lb_policy/address_filtering.h - src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h - src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index a687bdb08f5..300198da9a7 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -248,6 +248,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/client_channel.h', 'src/core/ext/filters/client_channel/client_channel_channelz.h', 'src/core/ext/filters/client_channel/client_channel_factory.h', + 'src/core/ext/filters/client_channel/client_channel_internal.h', 'src/core/ext/filters/client_channel/client_channel_service_config.h', 'src/core/ext/filters/client_channel/config_selector.h', 'src/core/ext/filters/client_channel/connector.h', @@ -255,7 +256,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/global_subchannel_pool.h', 'src/core/ext/filters/client_channel/health/health_check_client.h', 'src/core/ext/filters/client_channel/http_proxy.h', - 'src/core/ext/filters/client_channel/lb_call_state_internal.h', 'src/core/ext/filters/client_channel/lb_policy/address_filtering.h', 'src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h', 'src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h', @@ -1199,6 +1199,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/client_channel.h', 'src/core/ext/filters/client_channel/client_channel_channelz.h', 'src/core/ext/filters/client_channel/client_channel_factory.h', + 'src/core/ext/filters/client_channel/client_channel_internal.h', 'src/core/ext/filters/client_channel/client_channel_service_config.h', 'src/core/ext/filters/client_channel/config_selector.h', 'src/core/ext/filters/client_channel/connector.h', @@ -1206,7 +1207,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/global_subchannel_pool.h', 'src/core/ext/filters/client_channel/health/health_check_client.h', 'src/core/ext/filters/client_channel/http_proxy.h', - 'src/core/ext/filters/client_channel/lb_call_state_internal.h', 'src/core/ext/filters/client_channel/lb_policy/address_filtering.h', 'src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h', 'src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 00567f9deda..8f49976734d 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -225,6 +225,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/client_channel_channelz.h', 'src/core/ext/filters/client_channel/client_channel_factory.cc', 'src/core/ext/filters/client_channel/client_channel_factory.h', + 'src/core/ext/filters/client_channel/client_channel_internal.h', 'src/core/ext/filters/client_channel/client_channel_plugin.cc', 'src/core/ext/filters/client_channel/client_channel_service_config.cc', 'src/core/ext/filters/client_channel/client_channel_service_config.h', @@ -239,7 +240,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/health/health_check_client.h', 'src/core/ext/filters/client_channel/http_proxy.cc', 'src/core/ext/filters/client_channel/http_proxy.h', - 'src/core/ext/filters/client_channel/lb_call_state_internal.h', 'src/core/ext/filters/client_channel/lb_policy/address_filtering.cc', 'src/core/ext/filters/client_channel/lb_policy/address_filtering.h', 'src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h', @@ -1905,6 +1905,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/client_channel.h', 'src/core/ext/filters/client_channel/client_channel_channelz.h', 'src/core/ext/filters/client_channel/client_channel_factory.h', + 'src/core/ext/filters/client_channel/client_channel_internal.h', 'src/core/ext/filters/client_channel/client_channel_service_config.h', 'src/core/ext/filters/client_channel/config_selector.h', 'src/core/ext/filters/client_channel/connector.h', @@ -1912,7 +1913,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/global_subchannel_pool.h', 'src/core/ext/filters/client_channel/health/health_check_client.h', 'src/core/ext/filters/client_channel/http_proxy.h', - 'src/core/ext/filters/client_channel/lb_call_state_internal.h', 'src/core/ext/filters/client_channel/lb_policy/address_filtering.h', 'src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h', 'src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h', diff --git a/grpc.gemspec b/grpc.gemspec index 9238063974c..9c82772538d 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -134,6 +134,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/client_channel_channelz.h ) s.files += %w( src/core/ext/filters/client_channel/client_channel_factory.cc ) s.files += %w( src/core/ext/filters/client_channel/client_channel_factory.h ) + s.files += %w( src/core/ext/filters/client_channel/client_channel_internal.h ) s.files += %w( src/core/ext/filters/client_channel/client_channel_plugin.cc ) s.files += %w( src/core/ext/filters/client_channel/client_channel_service_config.cc ) s.files += %w( src/core/ext/filters/client_channel/client_channel_service_config.h ) @@ -148,7 +149,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/health/health_check_client.h ) s.files += %w( src/core/ext/filters/client_channel/http_proxy.cc ) s.files += %w( src/core/ext/filters/client_channel/http_proxy.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_call_state_internal.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/address_filtering.cc ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/address_filtering.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h ) diff --git a/package.xml b/package.xml index a66d82c92d7..5cba8e170de 100644 --- a/package.xml +++ b/package.xml @@ -116,6 +116,7 @@ + @@ -130,7 +131,6 @@ - diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index bf6e3850b5b..1a42ca33c26 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "absl/cleanup/cleanup.h" @@ -48,6 +49,7 @@ #include "src/core/ext/filters/client_channel/backend_metric.h" #include "src/core/ext/filters/client_channel/backup_poller.h" #include "src/core/ext/filters/client_channel/client_channel_channelz.h" +#include "src/core/ext/filters/client_channel/client_channel_internal.h" #include "src/core/ext/filters/client_channel/client_channel_service_config.h" #include "src/core/ext/filters/client_channel/config_selector.h" #include "src/core/ext/filters/client_channel/dynamic_filters.h" @@ -68,6 +70,7 @@ #include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/sync.h" +#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/handshaker/proxy_mapper_registry.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -2341,6 +2344,25 @@ void ClientChannel::FilterBasedCallData:: error); } +// +// ClientChannel::LoadBalancedCall::LbCallState +// + +class ClientChannel::LoadBalancedCall::LbCallState + : public ClientChannelLbCallState { + public: + explicit LbCallState(LoadBalancedCall* lb_call) : lb_call_(lb_call) {} + + void* Alloc(size_t size) override { return lb_call_->arena()->Alloc(size); } + + // Internal API to allow first-party LB policies to access per-call + // attributes set by the ConfigSelector. + absl::string_view GetCallAttribute(UniqueTypeName type) override; + + private: + LoadBalancedCall* lb_call_; +}; + // // ClientChannel::LoadBalancedCall::Metadata // diff --git a/src/core/ext/filters/client_channel/client_channel.h b/src/core/ext/filters/client_channel/client_channel.h index 53e836349c3..def4a5cf4d2 100644 --- a/src/core/ext/filters/client_channel/client_channel.h +++ b/src/core/ext/filters/client_channel/client_channel.h @@ -25,7 +25,6 @@ #include #include #include -#include #include "absl/base/thread_annotations.h" #include "absl/container/flat_hash_set.h" @@ -40,7 +39,6 @@ #include "src/core/ext/filters/client_channel/client_channel_factory.h" #include "src/core/ext/filters/client_channel/config_selector.h" #include "src/core/ext/filters/client_channel/dynamic_filters.h" -#include "src/core/ext/filters/client_channel/lb_call_state_internal.h" #include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" #include "src/core/ext/filters/client_channel/subchannel.h" #include "src/core/ext/filters/client_channel/subchannel_pool_interface.h" @@ -56,7 +54,6 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" @@ -67,8 +64,6 @@ #include "src/core/lib/resolver/resolver.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/service_config/service_config.h" -#include "src/core/lib/service_config/service_config_call_data.h" -#include "src/core/lib/service_config/service_config_parser.h" #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/transport/connectivity_state.h" @@ -372,21 +367,6 @@ class ClientChannel { class ClientChannel::LoadBalancedCall : public InternallyRefCounted { public: - // TODO(roth): Make this private. - class LbCallState : public LbCallStateInternal { - public: - explicit LbCallState(LoadBalancedCall* lb_call) : lb_call_(lb_call) {} - - void* Alloc(size_t size) override { return lb_call_->arena()->Alloc(size); } - - // Internal API to allow first-party LB policies to access per-call - // attributes set by the ConfigSelector. - absl::string_view GetCallAttribute(UniqueTypeName type) override; - - private: - LoadBalancedCall* lb_call_; - }; - LoadBalancedCall( ClientChannel* chand, grpc_call_context_element* call_context, ConfigSelector::CallDispatchController* call_dispatch_controller, @@ -439,6 +419,7 @@ class ClientChannel::LoadBalancedCall absl::string_view peer_address); private: + class LbCallState; class Metadata; class BackendMetricAccessor; @@ -612,70 +593,6 @@ class ClientChannel::FilterBasedLoadBalancedCall grpc_transport_stream_op_batch* pending_batches_[MAX_PENDING_BATCHES] = {}; }; -// A sub-class of ServiceConfigCallData used to access the -// CallDispatchController. Allocated on the arena, stored in the call -// context, and destroyed when the call is destroyed. -// TODO(roth): Combine this with lb_call_state_internal.h. -class ClientChannelServiceConfigCallData : public ServiceConfigCallData { - public: - ClientChannelServiceConfigCallData( - RefCountedPtr service_config, - const ServiceConfigParser::ParsedConfigVector* method_configs, - ServiceConfigCallData::CallAttributes call_attributes, - ConfigSelector::CallDispatchController* call_dispatch_controller, - grpc_call_context_element* call_context) - : ServiceConfigCallData(std::move(service_config), method_configs, - std::move(call_attributes)), - call_dispatch_controller_(call_dispatch_controller) { - call_context[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value = this; - call_context[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].destroy = Destroy; - } - - ConfigSelector::CallDispatchController* call_dispatch_controller() { - return &call_dispatch_controller_; - } - - private: - // A wrapper for the CallDispatchController returned by the ConfigSelector. - // Handles the case where the ConfigSelector doees not return any - // CallDispatchController. - // Also ensures that we call Commit() at most once, which allows the - // client channel code to call Commit() when the call is complete in case - // it wasn't called earlier, without needing to know whether or not it was. - class CallDispatchControllerWrapper - : public ConfigSelector::CallDispatchController { - public: - explicit CallDispatchControllerWrapper( - ConfigSelector::CallDispatchController* call_dispatch_controller) - : call_dispatch_controller_(call_dispatch_controller) {} - - bool ShouldRetry() override { - if (call_dispatch_controller_ != nullptr) { - return call_dispatch_controller_->ShouldRetry(); - } - return true; - } - - void Commit() override { - if (call_dispatch_controller_ != nullptr && !commit_called_) { - call_dispatch_controller_->Commit(); - commit_called_ = true; - } - } - - private: - ConfigSelector::CallDispatchController* call_dispatch_controller_; - bool commit_called_ = false; - }; - - static void Destroy(void* ptr) { - auto* self = static_cast(ptr); - self->~ClientChannelServiceConfigCallData(); - } - - CallDispatchControllerWrapper call_dispatch_controller_; -}; - } // namespace grpc_core #endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H diff --git a/src/core/ext/filters/client_channel/client_channel_internal.h b/src/core/ext/filters/client_channel/client_channel_internal.h new file mode 100644 index 00000000000..a2eaf1bf968 --- /dev/null +++ b/src/core/ext/filters/client_channel/client_channel_internal.h @@ -0,0 +1,114 @@ +// +// Copyright 2015 gRPC authors. +// +// 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. +// + +#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_INTERNAL_H +#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_INTERNAL_H + +#include + +#include + +#include "absl/strings/string_view.h" + +#include "src/core/ext/filters/client_channel/config_selector.h" +#include "src/core/lib/channel/context.h" +#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/gprpp/unique_type_name.h" +#include "src/core/lib/load_balancing/lb_policy.h" +#include "src/core/lib/service_config/service_config.h" +#include "src/core/lib/service_config/service_config_call_data.h" +#include "src/core/lib/service_config/service_config_parser.h" + +// +// This file contains internal interfaces used to allow various plugins +// (filters, LB policies, etc) to access internal data provided by the +// ClientChannel that is not normally accessible via external APIs. +// + +namespace grpc_core { + +// Internal type for LB call state interface. Provides an interface for +// LB policies to access internal call attributes. +class ClientChannelLbCallState : public LoadBalancingPolicy::CallState { + public: + virtual absl::string_view GetCallAttribute(UniqueTypeName type) = 0; +}; + +// Internal type for ServiceConfigCallData. Provides access to the +// CallDispatchController. +class ClientChannelServiceConfigCallData : public ServiceConfigCallData { + public: + ClientChannelServiceConfigCallData( + RefCountedPtr service_config, + const ServiceConfigParser::ParsedConfigVector* method_configs, + ServiceConfigCallData::CallAttributes call_attributes, + ConfigSelector::CallDispatchController* call_dispatch_controller, + grpc_call_context_element* call_context) + : ServiceConfigCallData(std::move(service_config), method_configs, + std::move(call_attributes)), + call_dispatch_controller_(call_dispatch_controller) { + call_context[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value = this; + call_context[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].destroy = Destroy; + } + + ConfigSelector::CallDispatchController* call_dispatch_controller() { + return &call_dispatch_controller_; + } + + private: + // A wrapper for the CallDispatchController returned by the ConfigSelector. + // Handles the case where the ConfigSelector doees not return any + // CallDispatchController. + // Also ensures that we call Commit() at most once, which allows the + // client channel code to call Commit() when the call is complete in case + // it wasn't called earlier, without needing to know whether or not it was. + class CallDispatchControllerWrapper + : public ConfigSelector::CallDispatchController { + public: + explicit CallDispatchControllerWrapper( + ConfigSelector::CallDispatchController* call_dispatch_controller) + : call_dispatch_controller_(call_dispatch_controller) {} + + bool ShouldRetry() override { + if (call_dispatch_controller_ != nullptr) { + return call_dispatch_controller_->ShouldRetry(); + } + return true; + } + + void Commit() override { + if (call_dispatch_controller_ != nullptr && !commit_called_) { + call_dispatch_controller_->Commit(); + commit_called_ = true; + } + } + + private: + ConfigSelector::CallDispatchController* call_dispatch_controller_; + bool commit_called_ = false; + }; + + static void Destroy(void* ptr) { + auto* self = static_cast(ptr); + self->~ClientChannelServiceConfigCallData(); + } + + CallDispatchControllerWrapper call_dispatch_controller_; +}; + +} // namespace grpc_core + +#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_INTERNAL_H diff --git a/src/core/ext/filters/client_channel/lb_call_state_internal.h b/src/core/ext/filters/client_channel/lb_call_state_internal.h deleted file mode 100644 index 9d934becc16..00000000000 --- a/src/core/ext/filters/client_channel/lb_call_state_internal.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2015 gRPC authors. -// -// 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. -// - -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_CALL_STATE_INTERNAL_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_CALL_STATE_INTERNAL_H - -#include - -#include "absl/strings/string_view.h" - -#include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/load_balancing/lb_policy.h" - -namespace grpc_core { - -// -// LbCallStateInternal -// -class LbCallStateInternal : public LoadBalancingPolicy::CallState { - public: - virtual absl::string_view GetCallAttribute(UniqueTypeName type) = 0; -}; - -} // namespace grpc_core - -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_CALL_STATE_INTERNAL_H diff --git a/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc b/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc index 6f924b03e49..2e7f4389873 100644 --- a/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +++ b/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc @@ -44,7 +44,7 @@ #include #include -#include "src/core/ext/filters/client_channel/client_channel.h" +#include "src/core/ext/filters/client_channel/client_channel_internal.h" #include "src/core/ext/filters/client_channel/lb_policy/subchannel_list.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" @@ -340,8 +340,7 @@ class RingHash : public LoadBalancingPolicy { // RingHash::PickResult RingHash::Picker::Pick(PickArgs args) { - auto* call_state = static_cast( - args.call_state); + auto* call_state = static_cast(args.call_state); auto hash = call_state->GetCallAttribute(RequestHashAttributeName()); uint64_t h; if (!absl::SimpleAtoi(hash, &h)) { 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 d0537c15d33..e566deb5062 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 @@ -37,7 +37,7 @@ #include #include -#include "src/core/ext/filters/client_channel/client_channel.h" +#include "src/core/ext/filters/client_channel/client_channel_internal.h" #include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" #include "src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h" #include "src/core/lib/channel/channel_args.h" @@ -229,8 +229,7 @@ class XdsClusterManagerLb : public LoadBalancingPolicy { XdsClusterManagerLb::PickResult XdsClusterManagerLb::ClusterPicker::Pick( PickArgs args) { - auto* call_state = static_cast( - args.call_state); + auto* call_state = static_cast(args.call_state); auto cluster_name = call_state->GetCallAttribute(XdsClusterAttributeTypeName()); auto it = cluster_map_.find(std::string(cluster_name)); diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc index 8dfbf279c56..4133bed11d0 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc +++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc @@ -43,7 +43,7 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_call_state_internal.h" +#include "src/core/ext/filters/client_channel/client_channel_internal.h" #include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" #include "src/core/ext/filters/stateful_session/stateful_session_filter.h" #include "src/core/ext/xds/xds_health_status.h" @@ -369,7 +369,7 @@ XdsOverrideHostLb::Picker::PickOverridenHost(absl::string_view override_host) { LoadBalancingPolicy::PickResult XdsOverrideHostLb::Picker::Pick( LoadBalancingPolicy::PickArgs args) { - auto* call_state = static_cast(args.call_state); + auto* call_state = static_cast(args.call_state); auto override_host = call_state->GetCallAttribute(XdsOverrideHostTypeName()); auto overridden_host_pick = PickOverridenHost(override_host); if (overridden_host_pick.has_value()) { diff --git a/src/core/ext/filters/client_channel/retry_filter.cc b/src/core/ext/filters/client_channel/retry_filter.cc index eaa711f6a7a..4b9c21121c7 100644 --- a/src/core/ext/filters/client_channel/retry_filter.cc +++ b/src/core/ext/filters/client_channel/retry_filter.cc @@ -42,6 +42,7 @@ #include #include "src/core/ext/filters/client_channel/client_channel.h" +#include "src/core/ext/filters/client_channel/client_channel_internal.h" #include "src/core/ext/filters/client_channel/config_selector.h" #include "src/core/ext/filters/client_channel/retry_service_config.h" #include "src/core/ext/filters/client_channel/retry_throttle.h" diff --git a/test/core/client_channel/lb_policy/lb_policy_test_lib.h b/test/core/client_channel/lb_policy/lb_policy_test_lib.h index 18c781d0f46..317f035f93c 100644 --- a/test/core/client_channel/lb_policy/lb_policy_test_lib.h +++ b/test/core/client_channel/lb_policy/lb_policy_test_lib.h @@ -51,7 +51,7 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_call_state_internal.h" +#include "src/core/ext/filters/client_channel/client_channel_internal.h" #include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" #include "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h" #include "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h" @@ -462,7 +462,7 @@ class LoadBalancingPolicyTest : public ::testing::Test { }; // A fake CallState implementation, for use in PickArgs. - class FakeCallState : public LbCallStateInternal { + class FakeCallState : public ClientChannelLbCallState { public: explicit FakeCallState( const std::map& attributes) { diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 253b7b3ca0e..52f7208b19e 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1091,6 +1091,7 @@ src/core/ext/filters/client_channel/client_channel_channelz.cc \ src/core/ext/filters/client_channel/client_channel_channelz.h \ src/core/ext/filters/client_channel/client_channel_factory.cc \ src/core/ext/filters/client_channel/client_channel_factory.h \ +src/core/ext/filters/client_channel/client_channel_internal.h \ src/core/ext/filters/client_channel/client_channel_plugin.cc \ src/core/ext/filters/client_channel/client_channel_service_config.cc \ src/core/ext/filters/client_channel/client_channel_service_config.h \ @@ -1105,7 +1106,6 @@ src/core/ext/filters/client_channel/health/health_check_client.cc \ src/core/ext/filters/client_channel/health/health_check_client.h \ src/core/ext/filters/client_channel/http_proxy.cc \ src/core/ext/filters/client_channel/http_proxy.h \ -src/core/ext/filters/client_channel/lb_call_state_internal.h \ src/core/ext/filters/client_channel/lb_policy/address_filtering.cc \ src/core/ext/filters/client_channel/lb_policy/address_filtering.h \ src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 676f971734e..67cf236f279 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -897,6 +897,7 @@ src/core/ext/filters/client_channel/client_channel_channelz.cc \ src/core/ext/filters/client_channel/client_channel_channelz.h \ src/core/ext/filters/client_channel/client_channel_factory.cc \ src/core/ext/filters/client_channel/client_channel_factory.h \ +src/core/ext/filters/client_channel/client_channel_internal.h \ src/core/ext/filters/client_channel/client_channel_plugin.cc \ src/core/ext/filters/client_channel/client_channel_service_config.cc \ src/core/ext/filters/client_channel/client_channel_service_config.h \ @@ -911,7 +912,6 @@ src/core/ext/filters/client_channel/health/health_check_client.cc \ src/core/ext/filters/client_channel/health/health_check_client.h \ src/core/ext/filters/client_channel/http_proxy.cc \ src/core/ext/filters/client_channel/http_proxy.h \ -src/core/ext/filters/client_channel/lb_call_state_internal.h \ src/core/ext/filters/client_channel/lb_policy/address_filtering.cc \ src/core/ext/filters/client_channel/lb_policy/address_filtering.h \ src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h \