diff --git a/BUILD b/BUILD
index a02606d4ff0..620cc83130b 100644
--- a/BUILD
+++ b/BUILD
@@ -3002,10 +3002,73 @@ grpc_cc_library(
],
)
+grpc_cc_library(
+ name = "backend_metric_parser",
+ srcs = [
+ "//src/core:load_balancing/backend_metric_parser.cc",
+ ],
+ hdrs = [
+ "//src/core:load_balancing/backend_metric_parser.h",
+ ],
+ external_deps = [
+ "absl/strings",
+ "upb_base_lib",
+ "upb_mem_lib",
+ "upb_message_lib",
+ ],
+ language = "c++",
+ deps = [
+ "gpr_platform",
+ "xds_orca_upb",
+ "//src/core:grpc_backend_metric_data",
+ ],
+)
+
+grpc_cc_library(
+ name = "oob_backend_metric",
+ srcs = [
+ "//src/core:load_balancing/oob_backend_metric.cc",
+ ],
+ hdrs = [
+ "//src/core:load_balancing/oob_backend_metric.h",
+ "//src/core:load_balancing/oob_backend_metric_internal.h",
+ ],
+ external_deps = [
+ "absl/base:core_headers",
+ "absl/status",
+ "absl/strings",
+ "upb_base_lib",
+ "upb_mem_lib",
+ ],
+ language = "c++",
+ deps = [
+ "backend_metric_parser",
+ "debug_location",
+ "exec_ctx",
+ "gpr",
+ "grpc_base",
+ "grpc_client_channel",
+ "grpc_trace",
+ "orphanable",
+ "protobuf_duration_upb",
+ "ref_counted_ptr",
+ "xds_orca_service_upb",
+ "xds_orca_upb",
+ "//src/core:closure",
+ "//src/core:error",
+ "//src/core:grpc_backend_metric_data",
+ "//src/core:iomgr_fwd",
+ "//src/core:pollset_set",
+ "//src/core:slice",
+ "//src/core:subchannel_interface",
+ "//src/core:time",
+ "//src/core:unique_type_name",
+ ],
+)
+
grpc_cc_library(
name = "grpc_client_channel",
srcs = [
- "//src/core:client_channel/backend_metric.cc",
"//src/core:client_channel/backup_poller.cc",
"//src/core:client_channel/channel_connectivity.cc",
"//src/core:client_channel/client_channel_channelz.cc",
@@ -3027,10 +3090,8 @@ grpc_cc_library(
"//src/core:client_channel/subchannel_pool_interface.cc",
"//src/core:client_channel/subchannel_stream_client.cc",
"//src/core:load_balancing/child_policy_handler.cc",
- "//src/core:load_balancing/oob_backend_metric.cc",
],
hdrs = [
- "//src/core:client_channel/backend_metric.h",
"//src/core:client_channel/backup_poller.h",
"//src/core:client_channel/client_channel_channelz.h",
"//src/core:client_channel/client_channel_factory.h",
@@ -3052,8 +3113,6 @@ grpc_cc_library(
"//src/core:client_channel/subchannel_pool_interface.h",
"//src/core:client_channel/subchannel_stream_client.h",
"//src/core:load_balancing/child_policy_handler.h",
- "//src/core:load_balancing/oob_backend_metric.h",
- "//src/core:load_balancing/oob_backend_metric_internal.h",
],
external_deps = [
"absl/base:core_headers",
@@ -3074,6 +3133,7 @@ grpc_cc_library(
language = "c++",
visibility = ["@grpc:client_channel"],
deps = [
+ "backend_metric_parser",
"backoff",
"channel_arg_names",
"config",
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fa742616c6a..5611bf69558 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1776,7 +1776,6 @@ endif()
add_library(grpc
- src/core/client_channel/backend_metric.cc
src/core/client_channel/backup_poller.cc
src/core/client_channel/channel_connectivity.cc
src/core/client_channel/client_channel_channelz.cc
@@ -2497,6 +2496,7 @@ add_library(grpc
src/core/lib/transport/transport_op_string.cc
src/core/lib/uri/uri_parser.cc
src/core/load_balancing/address_filtering.cc
+ src/core/load_balancing/backend_metric_parser.cc
src/core/load_balancing/child_policy_handler.cc
src/core/load_balancing/endpoint_list.cc
src/core/load_balancing/grpclb/client_load_reporting_filter.cc
@@ -2874,7 +2874,6 @@ endif()
add_library(grpc_unsecure
- src/core/client_channel/backend_metric.cc
src/core/client_channel/backup_poller.cc
src/core/client_channel/channel_connectivity.cc
src/core/client_channel/client_channel_channelz.cc
@@ -3225,6 +3224,7 @@ add_library(grpc_unsecure
src/core/lib/transport/transport_op_string.cc
src/core/lib/uri/uri_parser.cc
src/core/load_balancing/address_filtering.cc
+ src/core/load_balancing/backend_metric_parser.cc
src/core/load_balancing/child_policy_handler.cc
src/core/load_balancing/endpoint_list.cc
src/core/load_balancing/grpclb/client_load_reporting_filter.cc
diff --git a/Makefile b/Makefile
index 59acce49c60..8e48808c4f0 100644
--- a/Makefile
+++ b/Makefile
@@ -959,7 +959,6 @@ endif
# deps: ['upb_json_lib', 'upb_textformat_lib', 're2', 'z', 'grpc_abseil', 'cares', 'gpr', 'libssl', 'address_sorting']
# transitive_deps: ['address_sorting', 'gpr', 'grpc_abseil', 'cares', 'z', 're2', 'upb_textformat_lib', 'upb_json_lib', 'utf8_range_lib', 'upb_message_lib', 'upb_mem_lib', 'upb_base_lib', 'libssl']
LIBGRPC_SRC = \
- src/core/client_channel/backend_metric.cc \
src/core/client_channel/backup_poller.cc \
src/core/client_channel/channel_connectivity.cc \
src/core/client_channel/client_channel_channelz.cc \
@@ -1680,6 +1679,7 @@ LIBGRPC_SRC = \
src/core/lib/transport/transport_op_string.cc \
src/core/lib/uri/uri_parser.cc \
src/core/load_balancing/address_filtering.cc \
+ src/core/load_balancing/backend_metric_parser.cc \
src/core/load_balancing/child_policy_handler.cc \
src/core/load_balancing/endpoint_list.cc \
src/core/load_balancing/grpclb/client_load_reporting_filter.cc \
@@ -1891,7 +1891,6 @@ endif
# deps: ['upb_message_lib', 'utf8_range_lib', 'z', 'grpc_abseil', 'cares', 'gpr', 'address_sorting']
# transitive_deps: ['address_sorting', 'gpr', 'grpc_abseil', 'cares', 'z', 'utf8_range_lib', 'upb_message_lib', 'upb_mem_lib', 'upb_base_lib']
LIBGRPC_UNSECURE_SRC = \
- src/core/client_channel/backend_metric.cc \
src/core/client_channel/backup_poller.cc \
src/core/client_channel/channel_connectivity.cc \
src/core/client_channel/client_channel_channelz.cc \
@@ -2242,6 +2241,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/transport/transport_op_string.cc \
src/core/lib/uri/uri_parser.cc \
src/core/load_balancing/address_filtering.cc \
+ src/core/load_balancing/backend_metric_parser.cc \
src/core/load_balancing/child_policy_handler.cc \
src/core/load_balancing/endpoint_list.cc \
src/core/load_balancing/grpclb/client_load_reporting_filter.cc \
diff --git a/Package.swift b/Package.swift
index 60ef86d31a9..20b3e06b2e8 100644
--- a/Package.swift
+++ b/Package.swift
@@ -115,8 +115,6 @@ let package = Package(
"include/grpc/support/thd_id.h",
"include/grpc/support/time.h",
"include/grpc/support/workaround_list.h",
- "src/core/client_channel/backend_metric.cc",
- "src/core/client_channel/backend_metric.h",
"src/core/client_channel/backup_poller.cc",
"src/core/client_channel/backup_poller.h",
"src/core/client_channel/channel_connectivity.cc",
@@ -1851,6 +1849,8 @@ let package = Package(
"src/core/load_balancing/address_filtering.cc",
"src/core/load_balancing/address_filtering.h",
"src/core/load_balancing/backend_metric_data.h",
+ "src/core/load_balancing/backend_metric_parser.cc",
+ "src/core/load_balancing/backend_metric_parser.h",
"src/core/load_balancing/child_policy_handler.cc",
"src/core/load_balancing/child_policy_handler.h",
"src/core/load_balancing/delegating_helper.h",
diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml
index 5a5a3362e01..5674f25ff95 100644
--- a/build_autogenerated.yaml
+++ b/build_autogenerated.yaml
@@ -217,7 +217,6 @@ libs:
- include/grpc/support/time.h
- include/grpc/support/workaround_list.h
headers:
- - src/core/client_channel/backend_metric.h
- src/core/client_channel/backup_poller.h
- src/core/client_channel/client_channel_channelz.h
- src/core/client_channel/client_channel_factory.h
@@ -1157,6 +1156,7 @@ libs:
- src/core/lib/uri/uri_parser.h
- src/core/load_balancing/address_filtering.h
- src/core/load_balancing/backend_metric_data.h
+ - src/core/load_balancing/backend_metric_parser.h
- src/core/load_balancing/child_policy_handler.h
- src/core/load_balancing/delegating_helper.h
- src/core/load_balancing/endpoint_list.h
@@ -1233,7 +1233,6 @@ libs:
- third_party/upb/upb/generated_code_support.h
- third_party/xxhash/xxhash.h
src:
- - src/core/client_channel/backend_metric.cc
- src/core/client_channel/backup_poller.cc
- src/core/client_channel/channel_connectivity.cc
- src/core/client_channel/client_channel_channelz.cc
@@ -1954,6 +1953,7 @@ libs:
- src/core/lib/transport/transport_op_string.cc
- src/core/lib/uri/uri_parser.cc
- src/core/load_balancing/address_filtering.cc
+ - src/core/load_balancing/backend_metric_parser.cc
- src/core/load_balancing/child_policy_handler.cc
- src/core/load_balancing/endpoint_list.cc
- src/core/load_balancing/grpclb/client_load_reporting_filter.cc
@@ -2195,7 +2195,6 @@ libs:
- include/grpc/support/time.h
- include/grpc/support/workaround_list.h
headers:
- - src/core/client_channel/backend_metric.h
- src/core/client_channel/backup_poller.h
- src/core/client_channel/client_channel_channelz.h
- src/core/client_channel/client_channel_factory.h
@@ -2617,6 +2616,7 @@ libs:
- src/core/lib/uri/uri_parser.h
- src/core/load_balancing/address_filtering.h
- src/core/load_balancing/backend_metric_data.h
+ - src/core/load_balancing/backend_metric_parser.h
- src/core/load_balancing/child_policy_handler.h
- src/core/load_balancing/delegating_helper.h
- src/core/load_balancing/endpoint_list.h
@@ -2683,7 +2683,6 @@ libs:
- third_party/upb/upb/wire/reader.h
- third_party/upb/upb/wire/types.h
src:
- - src/core/client_channel/backend_metric.cc
- src/core/client_channel/backup_poller.cc
- src/core/client_channel/channel_connectivity.cc
- src/core/client_channel/client_channel_channelz.cc
@@ -3034,6 +3033,7 @@ libs:
- src/core/lib/transport/transport_op_string.cc
- src/core/lib/uri/uri_parser.cc
- src/core/load_balancing/address_filtering.cc
+ - src/core/load_balancing/backend_metric_parser.cc
- src/core/load_balancing/child_policy_handler.cc
- src/core/load_balancing/endpoint_list.cc
- src/core/load_balancing/grpclb/client_load_reporting_filter.cc
diff --git a/config.m4 b/config.m4
index dcb1c73b8ef..be14075a397 100644
--- a/config.m4
+++ b/config.m4
@@ -41,7 +41,6 @@ if test "$PHP_GRPC" != "no"; then
PHP_SUBST(GRPC_SHARED_LIBADD)
PHP_NEW_EXTENSION(grpc,
- src/core/client_channel/backend_metric.cc \
src/core/client_channel/backup_poller.cc \
src/core/client_channel/channel_connectivity.cc \
src/core/client_channel/client_channel_channelz.cc \
@@ -808,6 +807,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/transport/transport_op_string.cc \
src/core/lib/uri/uri_parser.cc \
src/core/load_balancing/address_filtering.cc \
+ src/core/load_balancing/backend_metric_parser.cc \
src/core/load_balancing/child_policy_handler.cc \
src/core/load_balancing/endpoint_list.cc \
src/core/load_balancing/grpclb/client_load_reporting_filter.cc \
diff --git a/config.w32 b/config.w32
index a07a13e2a2a..390c6555e71 100644
--- a/config.w32
+++ b/config.w32
@@ -6,7 +6,6 @@ ARG_WITH("grpc", "grpc support", "no");
if (PHP_GRPC != "no") {
EXTENSION("grpc",
- "src\\core\\client_channel\\backend_metric.cc " +
"src\\core\\client_channel\\backup_poller.cc " +
"src\\core\\client_channel\\channel_connectivity.cc " +
"src\\core\\client_channel\\client_channel_channelz.cc " +
@@ -773,6 +772,7 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\transport\\transport_op_string.cc " +
"src\\core\\lib\\uri\\uri_parser.cc " +
"src\\core\\load_balancing\\address_filtering.cc " +
+ "src\\core\\load_balancing\\backend_metric_parser.cc " +
"src\\core\\load_balancing\\child_policy_handler.cc " +
"src\\core\\load_balancing\\endpoint_list.cc " +
"src\\core\\load_balancing\\grpclb\\client_load_reporting_filter.cc " +
diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec
index 2429d8100ac..4dbc7d15e72 100644
--- a/gRPC-C++.podspec
+++ b/gRPC-C++.podspec
@@ -257,8 +257,7 @@ Pod::Spec.new do |s|
ss.dependency 'abseil/types/variant', abseil_version
ss.dependency 'abseil/utility/utility', abseil_version
- ss.source_files = 'src/core/client_channel/backend_metric.h',
- 'src/core/client_channel/backup_poller.h',
+ ss.source_files = 'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_channelz.h',
'src/core/client_channel/client_channel_factory.h',
'src/core/client_channel/client_channel_filter.h',
@@ -1261,6 +1260,7 @@ Pod::Spec.new do |s|
'src/core/lib/uri/uri_parser.h',
'src/core/load_balancing/address_filtering.h',
'src/core/load_balancing/backend_metric_data.h',
+ 'src/core/load_balancing/backend_metric_parser.h',
'src/core/load_balancing/child_policy_handler.h',
'src/core/load_balancing/delegating_helper.h',
'src/core/load_balancing/endpoint_list.h',
@@ -1531,8 +1531,7 @@ Pod::Spec.new do |s|
'third_party/zlib/zlib.h',
'third_party/zlib/zutil.h'
- ss.private_header_files = 'src/core/client_channel/backend_metric.h',
- 'src/core/client_channel/backup_poller.h',
+ ss.private_header_files = 'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_channelz.h',
'src/core/client_channel/client_channel_factory.h',
'src/core/client_channel/client_channel_filter.h',
@@ -2517,6 +2516,7 @@ Pod::Spec.new do |s|
'src/core/lib/uri/uri_parser.h',
'src/core/load_balancing/address_filtering.h',
'src/core/load_balancing/backend_metric_data.h',
+ 'src/core/load_balancing/backend_metric_parser.h',
'src/core/load_balancing/child_policy_handler.h',
'src/core/load_balancing/delegating_helper.h',
'src/core/load_balancing/endpoint_list.h',
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index df11c7eb828..febe7515ece 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -228,9 +228,7 @@ Pod::Spec.new do |s|
ss.dependency 'abseil/utility/utility', abseil_version
ss.compiler_flags = '-DBORINGSSL_PREFIX=GRPC -Wno-unreachable-code -Wno-shorten-64-to-32'
- ss.source_files = 'src/core/client_channel/backend_metric.cc',
- 'src/core/client_channel/backend_metric.h',
- 'src/core/client_channel/backup_poller.cc',
+ ss.source_files = 'src/core/client_channel/backup_poller.cc',
'src/core/client_channel/backup_poller.h',
'src/core/client_channel/channel_connectivity.cc',
'src/core/client_channel/client_channel_channelz.cc',
@@ -1960,6 +1958,8 @@ Pod::Spec.new do |s|
'src/core/load_balancing/address_filtering.cc',
'src/core/load_balancing/address_filtering.h',
'src/core/load_balancing/backend_metric_data.h',
+ 'src/core/load_balancing/backend_metric_parser.cc',
+ 'src/core/load_balancing/backend_metric_parser.h',
'src/core/load_balancing/child_policy_handler.cc',
'src/core/load_balancing/child_policy_handler.h',
'src/core/load_balancing/delegating_helper.h',
@@ -2332,8 +2332,7 @@ Pod::Spec.new do |s|
'third_party/zlib/zlib.h',
'third_party/zlib/zutil.c',
'third_party/zlib/zutil.h'
- ss.private_header_files = 'src/core/client_channel/backend_metric.h',
- 'src/core/client_channel/backup_poller.h',
+ ss.private_header_files = 'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_channelz.h',
'src/core/client_channel/client_channel_factory.h',
'src/core/client_channel/client_channel_filter.h',
@@ -3297,6 +3296,7 @@ Pod::Spec.new do |s|
'src/core/lib/uri/uri_parser.h',
'src/core/load_balancing/address_filtering.h',
'src/core/load_balancing/backend_metric_data.h',
+ 'src/core/load_balancing/backend_metric_parser.h',
'src/core/load_balancing/child_policy_handler.h',
'src/core/load_balancing/delegating_helper.h',
'src/core/load_balancing/endpoint_list.h',
diff --git a/grpc.gemspec b/grpc.gemspec
index cf9045b5bc2..14fc0bff42d 100644
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -121,8 +121,6 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/support/thd_id.h )
s.files += %w( include/grpc/support/time.h )
s.files += %w( include/grpc/support/workaround_list.h )
- s.files += %w( src/core/client_channel/backend_metric.cc )
- s.files += %w( src/core/client_channel/backend_metric.h )
s.files += %w( src/core/client_channel/backup_poller.cc )
s.files += %w( src/core/client_channel/backup_poller.h )
s.files += %w( src/core/client_channel/channel_connectivity.cc )
@@ -1853,6 +1851,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/load_balancing/address_filtering.cc )
s.files += %w( src/core/load_balancing/address_filtering.h )
s.files += %w( src/core/load_balancing/backend_metric_data.h )
+ s.files += %w( src/core/load_balancing/backend_metric_parser.cc )
+ s.files += %w( src/core/load_balancing/backend_metric_parser.h )
s.files += %w( src/core/load_balancing/child_policy_handler.cc )
s.files += %w( src/core/load_balancing/child_policy_handler.h )
s.files += %w( src/core/load_balancing/delegating_helper.h )
diff --git a/grpc.gyp b/grpc.gyp
index e3171fcf7a1..f8cb9a8d0ba 100644
--- a/grpc.gyp
+++ b/grpc.gyp
@@ -273,7 +273,6 @@
'address_sorting',
],
'sources': [
- 'src/core/client_channel/backend_metric.cc',
'src/core/client_channel/backup_poller.cc',
'src/core/client_channel/channel_connectivity.cc',
'src/core/client_channel/client_channel_channelz.cc',
@@ -994,6 +993,7 @@
'src/core/lib/transport/transport_op_string.cc',
'src/core/lib/uri/uri_parser.cc',
'src/core/load_balancing/address_filtering.cc',
+ 'src/core/load_balancing/backend_metric_parser.cc',
'src/core/load_balancing/child_policy_handler.cc',
'src/core/load_balancing/endpoint_list.cc',
'src/core/load_balancing/grpclb/client_load_reporting_filter.cc',
@@ -1145,7 +1145,6 @@
'address_sorting',
],
'sources': [
- 'src/core/client_channel/backend_metric.cc',
'src/core/client_channel/backup_poller.cc',
'src/core/client_channel/channel_connectivity.cc',
'src/core/client_channel/client_channel_channelz.cc',
@@ -1496,6 +1495,7 @@
'src/core/lib/transport/transport_op_string.cc',
'src/core/lib/uri/uri_parser.cc',
'src/core/load_balancing/address_filtering.cc',
+ 'src/core/load_balancing/backend_metric_parser.cc',
'src/core/load_balancing/child_policy_handler.cc',
'src/core/load_balancing/endpoint_list.cc',
'src/core/load_balancing/grpclb/client_load_reporting_filter.cc',
diff --git a/package.xml b/package.xml
index 070e57ecb2b..a004f28b9a7 100644
--- a/package.xml
+++ b/package.xml
@@ -103,8 +103,6 @@
-
-
@@ -1835,6 +1833,8 @@
+
+
diff --git a/src/core/BUILD b/src/core/BUILD
index e965464e8fc..0940b3d188b 100644
--- a/src/core/BUILD
+++ b/src/core/BUILD
@@ -5359,6 +5359,7 @@ grpc_cc_library(
"//:grpc_base",
"//:grpc_client_channel",
"//:grpc_trace",
+ "//:oob_backend_metric",
"//:orphanable",
"//:ref_counted_ptr",
"//:server_address",
diff --git a/src/core/client_channel/client_channel_filter.cc b/src/core/client_channel/client_channel_filter.cc
index fdd7a848d60..42ad79f73d5 100644
--- a/src/core/client_channel/client_channel_filter.cc
+++ b/src/core/client_channel/client_channel_filter.cc
@@ -49,7 +49,6 @@
#include
#include
-#include "src/core/client_channel/backend_metric.h"
#include "src/core/client_channel/backup_poller.h"
#include "src/core/client_channel/client_channel_channelz.h"
#include "src/core/client_channel/client_channel_internal.h"
@@ -92,8 +91,6 @@
#include "src/core/lib/promise/promise.h"
#include "src/core/lib/promise/try_seq.h"
#include "src/core/lib/security/credentials/credentials.h"
-#include "src/core/service_config/service_config_call_data.h"
-#include "src/core/service_config/service_config_impl.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/call.h"
@@ -101,11 +98,14 @@
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/lib/transport/error_utils.h"
#include "src/core/lib/transport/metadata_batch.h"
+#include "src/core/load_balancing/backend_metric_parser.h"
#include "src/core/load_balancing/child_policy_handler.h"
#include "src/core/load_balancing/lb_policy_registry.h"
#include "src/core/load_balancing/subchannel_interface.h"
#include "src/core/resolver/endpoint_addresses.h"
#include "src/core/resolver/resolver_registry.h"
+#include "src/core/service_config/service_config_call_data.h"
+#include "src/core/service_config/service_config_impl.h"
//
// Client channel filter
diff --git a/src/core/client_channel/backend_metric.cc b/src/core/load_balancing/backend_metric_parser.cc
similarity index 98%
rename from src/core/client_channel/backend_metric.cc
rename to src/core/load_balancing/backend_metric_parser.cc
index 31423662a18..968fc287b36 100644
--- a/src/core/client_channel/backend_metric.cc
+++ b/src/core/load_balancing/backend_metric_parser.cc
@@ -16,7 +16,7 @@
#include
-#include "src/core/client_channel/backend_metric.h"
+#include "src/core/load_balancing/backend_metric_parser.h"
#include
diff --git a/src/core/client_channel/backend_metric.h b/src/core/load_balancing/backend_metric_parser.h
similarity index 87%
rename from src/core/client_channel/backend_metric.h
rename to src/core/load_balancing/backend_metric_parser.h
index 15670c24ca5..3ee75c9c556 100644
--- a/src/core/client_channel/backend_metric.h
+++ b/src/core/load_balancing/backend_metric_parser.h
@@ -14,8 +14,8 @@
// limitations under the License.
//
-#ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_BACKEND_METRIC_H
-#define GRPC_SRC_CORE_CLIENT_CHANNEL_BACKEND_METRIC_H
+#ifndef GRPC_SRC_CORE_LOAD_BALANCING_BACKEND_METRIC_PARSER_H
+#define GRPC_SRC_CORE_LOAD_BALANCING_BACKEND_METRIC_PARSER_H
#include
@@ -44,4 +44,4 @@ const BackendMetricData* ParseBackendMetricData(
} // namespace grpc_core
-#endif // GRPC_SRC_CORE_CLIENT_CHANNEL_BACKEND_METRIC_H
+#endif // GRPC_SRC_CORE_LOAD_BALANCING_BACKEND_METRIC_PARSER_H
diff --git a/src/core/load_balancing/oob_backend_metric.cc b/src/core/load_balancing/oob_backend_metric.cc
index ac7bcb36154..9156c7aa4e6 100644
--- a/src/core/load_balancing/oob_backend_metric.cc
+++ b/src/core/load_balancing/oob_backend_metric.cc
@@ -38,9 +38,7 @@
#include
#include
-#include "src/core/client_channel/backend_metric.h"
#include "src/core/client_channel/client_channel_channelz.h"
-#include "src/core/load_balancing/oob_backend_metric_internal.h"
#include "src/core/client_channel/subchannel.h"
#include "src/core/client_channel/subchannel_stream_client.h"
#include "src/core/lib/channel/channel_trace.h"
@@ -57,6 +55,8 @@
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/slice/slice.h"
+#include "src/core/load_balancing/backend_metric_parser.h"
+#include "src/core/load_balancing/oob_backend_metric_internal.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/oob_backend_metric.h b/src/core/load_balancing/oob_backend_metric.h
index b31a4c748cb..b90e12889c9 100644
--- a/src/core/load_balancing/oob_backend_metric.h
+++ b/src/core/load_balancing/oob_backend_metric.h
@@ -21,8 +21,8 @@
#include
-#include "src/core/load_balancing/backend_metric_data.h"
#include "src/core/lib/gprpp/time.h"
+#include "src/core/load_balancing/backend_metric_data.h"
#include "src/core/load_balancing/subchannel_interface.h"
namespace grpc_core {
diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py
index 28823ac0bf2..369c5524f67 100644
--- a/src/python/grpcio/grpc_core_dependencies.py
+++ b/src/python/grpcio/grpc_core_dependencies.py
@@ -15,7 +15,6 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_core_dependencies.py.template`!!!
CORE_SOURCE_FILES = [
- 'src/core/client_channel/backend_metric.cc',
'src/core/client_channel/backup_poller.cc',
'src/core/client_channel/channel_connectivity.cc',
'src/core/client_channel/client_channel_channelz.cc',
@@ -782,6 +781,7 @@ CORE_SOURCE_FILES = [
'src/core/lib/transport/transport_op_string.cc',
'src/core/lib/uri/uri_parser.cc',
'src/core/load_balancing/address_filtering.cc',
+ 'src/core/load_balancing/backend_metric_parser.cc',
'src/core/load_balancing/child_policy_handler.cc',
'src/core/load_balancing/endpoint_list.cc',
'src/core/load_balancing/grpclb/client_load_reporting_filter.cc',
diff --git a/test/core/client_channel/lb_policy/BUILD b/test/core/client_channel/lb_policy/BUILD
index ca181c2b2e8..43a135c8168 100644
--- a/test/core/client_channel/lb_policy/BUILD
+++ b/test/core/client_channel/lb_policy/BUILD
@@ -32,6 +32,7 @@ grpc_cc_library(
],
language = "C++",
deps = [
+ "//:oob_backend_metric",
"//src/core:lb_policy",
"//src/core:subchannel_interface",
"//test/core/event_engine:event_engine_test_utils",
diff --git a/test/core/util/BUILD b/test/core/util/BUILD
index e902bd2def0..eeafb48f384 100644
--- a/test/core/util/BUILD
+++ b/test/core/util/BUILD
@@ -312,6 +312,7 @@ grpc_cc_library(
"//:grpc",
"//:grpc_client_channel",
"//:orphanable",
+ "//:oob_backend_metric",
"//:parse_address",
"//:ref_counted_ptr",
"//:uri_parser",
diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal
index 413782870eb..d920c931733 100644
--- a/tools/doxygen/Doxyfile.c++.internal
+++ b/tools/doxygen/Doxyfile.c++.internal
@@ -1081,8 +1081,6 @@ include/grpcpp/support/time.h \
include/grpcpp/support/validate_service_config.h \
include/grpcpp/version_info.h \
include/grpcpp/xds_server_builder.h \
-src/core/client_channel/backend_metric.cc \
-src/core/client_channel/backend_metric.h \
src/core/client_channel/backup_poller.cc \
src/core/client_channel/backup_poller.h \
src/core/client_channel/channel_connectivity.cc \
@@ -2852,6 +2850,8 @@ src/core/lib/uri/uri_parser.h \
src/core/load_balancing/address_filtering.cc \
src/core/load_balancing/address_filtering.h \
src/core/load_balancing/backend_metric_data.h \
+src/core/load_balancing/backend_metric_parser.cc \
+src/core/load_balancing/backend_metric_parser.h \
src/core/load_balancing/child_policy_handler.cc \
src/core/load_balancing/child_policy_handler.h \
src/core/load_balancing/delegating_helper.h \
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index 732cae90a6e..b4d025450a7 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -885,8 +885,6 @@ include/grpc/support/time.h \
include/grpc/support/workaround_list.h \
src/core/README.md \
src/core/client_channel/README.md \
-src/core/client_channel/backend_metric.cc \
-src/core/client_channel/backend_metric.h \
src/core/client_channel/backup_poller.cc \
src/core/client_channel/backup_poller.h \
src/core/client_channel/channel_connectivity.cc \
@@ -2629,6 +2627,8 @@ src/core/lib/uri/uri_parser.h \
src/core/load_balancing/address_filtering.cc \
src/core/load_balancing/address_filtering.h \
src/core/load_balancing/backend_metric_data.h \
+src/core/load_balancing/backend_metric_parser.cc \
+src/core/load_balancing/backend_metric_parser.h \
src/core/load_balancing/child_policy_handler.cc \
src/core/load_balancing/child_policy_handler.h \
src/core/load_balancing/delegating_helper.h \