From 55b365f287fda218e1e05b1b83a89f8473d1900d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 6 Jan 2022 10:53:40 -0800 Subject: [PATCH] Move resolver code around a little (#27846) * move service config * service config should not depend on grpc_base * move resolver, deal with fallout * Automated change: Fix sanity tests * fix * fix * Automated change: Fix sanity tests * review feedback * review feedback * fix * Automated change: Fix sanity tests * fix * Automated change: Fix sanity tests * fix vis * fix * fixes * Automated change: Fix sanity tests * visibility * fix Co-authored-by: ctiller --- BUILD | 245 +++++++++++++++--- CMakeLists.txt | 20 +- Makefile | 20 +- build_autogenerated.yaml | 50 ++-- config.m4 | 13 +- config.w32 | 13 +- gRPC-C++.podspec | 30 ++- gRPC-Core.podspec | 40 +-- grpc.gemspec | 25 +- grpc.gyp | 20 +- package.xml | 25 +- .../filters/client_channel/client_channel.cc | 6 +- .../filters/client_channel/client_channel.h | 8 +- .../client_channel/client_channel_plugin.cc | 2 +- .../filters/client_channel/config_selector.h | 6 +- .../client_channel/http_connect_handshaker.cc | 2 +- .../ext/filters/client_channel/lb_policy.h | 2 +- .../lb_policy/address_filtering.h | 2 +- .../client_channel/lb_policy/grpclb/grpclb.cc | 2 +- .../grpclb/grpclb_balancer_addresses.h | 2 +- .../lb_policy/grpclb/grpclb_channel.h | 2 +- .../lb_policy/grpclb/grpclb_channel_secure.cc | 2 +- .../lb_policy/pick_first/pick_first.cc | 2 +- .../client_channel/lb_policy/rls/rls.cc | 2 +- .../lb_policy/subchannel_list.h | 2 +- .../client_channel/lb_policy/xds/xds.h | 2 +- .../lb_policy/xds/xds_cluster_resolver.cc | 4 +- .../resolver/binder/binder_resolver.cc | 4 +- .../resolver/dns/c_ares/dns_resolver_ares.cc | 6 +- .../resolver/dns/c_ares/grpc_ares_wrapper.h | 2 +- .../dns/c_ares/grpc_ares_wrapper_windows.cc | 2 +- .../resolver/dns/native/dns_resolver.cc | 4 +- .../resolver/fake/fake_resolver.cc | 4 +- .../resolver/fake/fake_resolver.h | 3 +- .../google_c2p/google_c2p_resolver.cc | 2 +- .../resolver/sockaddr/sockaddr_resolver.cc | 4 +- .../resolver/xds/xds_resolver.cc | 2 +- .../client_channel/resolver_result_parsing.cc | 2 +- .../client_channel/resolver_result_parsing.h | 4 +- .../filters/client_channel/retry_filter.cc | 4 +- .../client_channel/retry_service_config.cc | 2 +- .../client_channel/retry_service_config.h | 2 +- .../service_config_channel_arg_filter.cc | 2 +- .../fault_injection/fault_injection_filter.cc | 2 +- .../fault_injection/service_config_parser.h | 2 +- .../message_size/message_size_filter.cc | 2 +- .../message_size/message_size_filter.h | 2 +- src/core/ext/filters/rbac/rbac_filter.cc | 2 +- .../filters/rbac/rbac_service_config_parser.h | 2 +- .../server_config_selector.h | 2 +- .../server_config_selector_filter.cc | 2 +- .../chttp2/client/insecure/channel_create.cc | 2 +- .../client/secure/secure_channel_create.cc | 2 +- src/core/ext/xds/xds_api.cc | 1 + src/core/ext/xds/xds_api.h | 4 + src/core/ext/xds/xds_endpoint.cc | 1 + src/core/ext/xds/xds_endpoint.h | 2 +- src/core/ext/xds/xds_listener.cc | 1 + src/core/ext/xds/xds_server_config_fetcher.cc | 1 + src/core/lib/address_utils/parse_address.cc | 20 ++ src/core/lib/address_utils/parse_address.h | 5 + src/core/lib/address_utils/sockaddr_utils.cc | 69 +++-- src/core/lib/address_utils/sockaddr_utils.h | 17 +- src/core/lib/channel/channel_args.cc | 1 - src/core/lib/channel/channelz.cc | 1 + .../event_engine/resolved_address_internal.cc | 6 + .../event_engine/resolved_address_internal.h | 2 + src/core/lib/iomgr/resolve_address.h | 17 +- src/core/lib/iomgr/resolved_address.h | 39 +++ .../iomgr/tcp_server_utils_posix_common.cc | 1 + .../iomgr/tcp_server_utils_posix_ifaddrs.cc | 1 + src/core/lib/iomgr/unix_sockets_posix.cc | 18 -- src/core/lib/iomgr/unix_sockets_posix.h | 3 - src/core/lib/iomgr/unix_sockets_posix_noop.cc | 5 - .../resolver}/resolver.cc | 2 +- .../resolver}/resolver.h | 12 +- .../resolver}/resolver_factory.h | 15 +- .../resolver}/resolver_registry.cc | 5 +- .../resolver}/resolver_registry.h | 9 +- .../resolver}/server_address.cc | 2 +- .../resolver}/server_address.h | 8 +- .../lib/security/authorization/matchers.cc | 1 + .../service_config/service_config.cc | 4 +- .../service_config/service_config.h | 8 +- .../service_config/service_config_call_data.h | 10 +- .../service_config/service_config_parser.cc | 2 +- .../service_config/service_config_parser.h | 6 +- src/cpp/common/validate_service_config.cc | 2 +- .../grpcio/grpc/_cython/_cygrpc/iomgr.pxd.pxi | 4 +- src/python/grpcio/grpc_core_dependencies.py | 10 +- .../core/address_utils/sockaddr_utils_test.cc | 2 + .../resolvers/binder_resolver_test.cc | 3 +- .../dns_resolver_connectivity_test.cc | 6 +- .../resolvers/dns_resolver_cooldown_test.cc | 4 +- .../resolvers/dns_resolver_test.cc | 2 +- .../resolvers/fake_resolver_test.cc | 4 +- .../resolvers/sockaddr_resolver_test.cc | 2 +- .../rls_lb_config_parser_test.cc | 2 +- .../client_channel/service_config_test.cc | 4 +- test/core/end2end/fuzzers/api_fuzzer.cc | 2 +- test/core/end2end/goaway_server_test.cc | 2 +- .../rbac/rbac_service_config_parser_test.cc | 2 +- test/core/surface/channel_create_test.cc | 2 +- .../surface/secure_channel_create_test.cc | 2 +- test/cpp/client/client_channel_stress_test.cc | 2 +- ...channel_with_active_connect_stress_test.cc | 2 +- test/cpp/end2end/client_lb_end2end_test.cc | 4 +- test/cpp/end2end/grpclb_end2end_test.cc | 4 +- .../end2end/service_config_end2end_test.cc | 2 +- test/cpp/end2end/xds/xds_end2end_test.cc | 2 +- test/cpp/naming/address_sorting_test.cc | 6 +- test/cpp/naming/cancel_ares_query_test.cc | 5 +- test/cpp/naming/resolver_component_test.cc | 6 +- tools/doxygen/Doxyfile.c++.internal | 25 +- tools/doxygen/Doxyfile.core.internal | 25 +- 115 files changed, 638 insertions(+), 417 deletions(-) create mode 100644 src/core/lib/iomgr/resolved_address.h rename src/core/{ext/filters/client_channel => lib/resolver}/resolver.cc (97%) rename src/core/{ext/filters/client_channel => lib/resolver}/resolver.h (92%) rename src/core/{ext/filters/client_channel => lib/resolver}/resolver_factory.h (83%) rename src/core/{ext/filters/client_channel => lib/resolver}/resolver_registry.cc (98%) rename src/core/{ext/filters/client_channel => lib/resolver}/resolver_registry.h (91%) rename src/core/{ext/filters/client_channel => lib/resolver}/server_address.cc (98%) rename src/core/{ext/filters/client_channel => lib/resolver}/server_address.h (94%) rename src/core/{ext => lib}/service_config/service_config.cc (98%) rename src/core/{ext => lib}/service_config/service_config.h (95%) rename src/core/{ext => lib}/service_config/service_config_call_data.h (87%) rename src/core/{ext => lib}/service_config/service_config_parser.cc (98%) rename src/core/{ext => lib}/service_config/service_config_parser.h (94%) diff --git a/BUILD b/BUILD index e03cd6ac120..15f3f9f283a 100644 --- a/BUILD +++ b/BUILD @@ -618,6 +618,7 @@ grpc_cc_library( "grpc_base", "grpc_client_channel", "grpc_codegen", + "iomgr_port", "orphanable", "slice_refcount", ], @@ -1652,6 +1653,51 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "sockaddr_utils", + srcs = [ + "src/core/lib/address_utils/sockaddr_utils.cc", + ], + hdrs = [ + "src/core/lib/address_utils/sockaddr_utils.h", + ], + external_deps = [ + "absl/strings", + "absl/strings:str_format", + ], + visibility = ["@grpc:alt_grpc_base_legacy"], + deps = [ + "gpr_base", + "grpc_sockaddr", + "resolved_address", + ], +) + +grpc_cc_library( + name = "iomgr_port", + hdrs = [ + "src/core/lib/iomgr/port.h", + ], +) + +grpc_cc_library( + name = "grpc_sockaddr", + srcs = [ + "src/core/lib/event_engine/sockaddr.cc", + ], + hdrs = [ + "src/core/lib/event_engine/sockaddr.h", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_utils.h", + ], + deps = [ + "gpr_platform", + "iomgr_port", + ], +) + grpc_cc_library( name = "avl", hdrs = [ @@ -1683,39 +1729,37 @@ grpc_cc_library( ) grpc_cc_library( - name = "default_event_engine_factory", + name = "uri_parser", srcs = [ - "src/core/lib/event_engine/event_engine_factory.cc", + "src/core/lib/uri/uri_parser.cc", + ], + hdrs = [ + "src/core/lib/uri/uri_parser.h", ], - hdrs = [], external_deps = [ - # TODO(hork): uv, in a subsequent PR + "absl/status:statusor", + "absl/strings", + "absl/strings:str_format", ], + visibility = ["@grpc:alt_grpc_base_legacy"], deps = [ - "event_engine_base", "gpr_base", - "gpr_platform", ], ) grpc_cc_library( - name = "channel_args", + name = "default_event_engine_factory", srcs = [ - "src/core/lib/channel/channel_args.cc", - ], - hdrs = [ - "src/core/lib/channel/channel_args.h", + "src/core/lib/event_engine/event_engine_factory.cc", ], + hdrs = [], external_deps = [ - "absl/strings", - "absl/strings:str_format", + # TODO(hork): uv, in a subsequent PR ], deps = [ - "channel_stack_type", + "event_engine_base", "gpr_base", - "gpr_codegen", - "grpc_codegen", - "useful", + "gpr_platform", ], ) @@ -1737,7 +1781,6 @@ grpc_cc_library( name = "grpc_base", srcs = [ "src/core/lib/address_utils/parse_address.cc", - "src/core/lib/address_utils/sockaddr_utils.cc", "src/core/lib/backoff/backoff.cc", "src/core/lib/channel/channel_stack.cc", "src/core/lib/channel/channel_stack_builder.cc", @@ -1875,7 +1918,6 @@ grpc_cc_library( "src/core/lib/transport/timeout_encoding.cc", "src/core/lib/transport/transport.cc", "src/core/lib/transport/transport_op_string.cc", - "src/core/lib/uri/uri_parser.cc", ] + # TODO(hork): delete the iomgr glue code when EventEngine is fully # integrated, or when it becomes obvious the glue code is unnecessary. @@ -1893,7 +1935,6 @@ grpc_cc_library( "src/core/lib/transport/error_utils.h", "src/core/lib/transport/http2_errors.h", "src/core/lib/address_utils/parse_address.h", - "src/core/lib/address_utils/sockaddr_utils.h", "src/core/lib/backoff/backoff.h", "src/core/lib/channel/call_tracer.h", "src/core/lib/channel/channel_stack.h", @@ -1948,7 +1989,6 @@ grpc_cc_library( "src/core/lib/iomgr/pollset_set_custom.h", "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/port.h", "src/core/lib/iomgr/python_util.h", "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/resolve_address_impl.h", @@ -1960,7 +2000,6 @@ grpc_cc_library( "src/core/lib/iomgr/sockaddr_windows.h", "src/core/lib/iomgr/socket_factory_posix.h", "src/core/lib/iomgr/socket_mutator.h", - "src/core/lib/iomgr/socket_utils.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/sys_epoll_wrapper.h", @@ -2008,7 +2047,6 @@ grpc_cc_library( "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", "src/core/lib/transport/transport_impl.h", - "src/core/lib/uri/uri_parser.h", ] + # TODO(ctiller): remove these # These headers used to be vended by this target, but they have been split @@ -2070,16 +2108,21 @@ grpc_cc_library( "gpr_codegen", "gpr_tls", "grpc_codegen", + "grpc_sockaddr", "grpc_trace", + "iomgr_port", "json", "memory_quota", "orphanable", "ref_counted", "ref_counted_ptr", + "resolved_address", "resource_quota", "slice", "slice_refcount", + "sockaddr_utils", "table", + "uri_parser", "useful", ], ) @@ -2145,13 +2188,13 @@ grpc_cc_library( grpc_cc_library( name = "grpc_service_config", srcs = [ - "src/core/ext/service_config/service_config.cc", - "src/core/ext/service_config/service_config_parser.cc", + "src/core/lib/service_config/service_config.cc", + "src/core/lib/service_config/service_config_parser.cc", ], hdrs = [ - "src/core/ext/service_config/service_config.h", - "src/core/ext/service_config/service_config_call_data.h", - "src/core/ext/service_config/service_config_parser.h", + "src/core/lib/service_config/service_config.h", + "src/core/lib/service_config/service_config_call_data.h", + "src/core/lib/service_config/service_config_parser.h", ], external_deps = [ "absl/container:inlined_vector", @@ -2161,8 +2204,86 @@ grpc_cc_library( deps = [ "error", "gpr_base", - "grpc_base", "json", + "slice", + ], +) + +grpc_cc_library( + name = "server_address", + srcs = [ + "src/core/lib/resolver/server_address.cc", + ], + hdrs = [ + "src/core/lib/resolver/server_address.h", + ], + external_deps = [ + "absl/strings", + "absl/strings:str_format", + ], + language = "c++", + visibility = ["@grpc:client_channel"], + deps = [ + "channel_args", + "gpr_platform", + "resolved_address", + "sockaddr_utils", + ], +) + +grpc_cc_library( + name = "grpc_resolver", + srcs = [ + "src/core/lib/resolver/resolver.cc", + "src/core/lib/resolver/resolver_registry.cc", + ], + hdrs = [ + "src/core/lib/resolver/resolver.h", + "src/core/lib/resolver/resolver_factory.h", + "src/core/lib/resolver/resolver_registry.h", + ], + external_deps = [ + "absl/strings", + "absl/strings:str_format", + ], + language = "c++", + visibility = ["@grpc:client_channel"], + deps = [ + "gpr_base", + "grpc_service_config", + "orphanable", + "server_address", + "uri_parser", + ], +) + +grpc_cc_library( + name = "channel_args", + srcs = [ + "src/core/lib/channel/channel_args.cc", + ], + hdrs = [ + "src/core/lib/channel/channel_args.h", + ], + external_deps = [ + "absl/strings", + "absl/strings:str_format", + ], + language = "c++", + deps = [ + "channel_stack_type", + "gpr_base", + "grpc_codegen", + "useful", + ], +) + +grpc_cc_library( + name = "resolved_address", + hdrs = ["src/core/lib/iomgr/resolved_address.h"], + language = "c++", + deps = [ + "gpr_platform", ], ) @@ -2187,13 +2308,10 @@ grpc_cc_library( "src/core/ext/filters/client_channel/lb_policy_registry.cc", "src/core/ext/filters/client_channel/local_subchannel_pool.cc", "src/core/ext/filters/client_channel/proxy_mapper_registry.cc", - "src/core/ext/filters/client_channel/resolver.cc", - "src/core/ext/filters/client_channel/resolver_registry.cc", "src/core/ext/filters/client_channel/resolver_result_parsing.cc", "src/core/ext/filters/client_channel/retry_filter.cc", "src/core/ext/filters/client_channel/retry_service_config.cc", "src/core/ext/filters/client_channel/retry_throttle.cc", - "src/core/ext/filters/client_channel/server_address.cc", "src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc", "src/core/ext/filters/client_channel/subchannel.cc", "src/core/ext/filters/client_channel/subchannel_pool_interface.cc", @@ -2218,14 +2336,10 @@ grpc_cc_library( "src/core/ext/filters/client_channel/local_subchannel_pool.h", "src/core/ext/filters/client_channel/proxy_mapper.h", "src/core/ext/filters/client_channel/proxy_mapper_registry.h", - "src/core/ext/filters/client_channel/resolver.h", - "src/core/ext/filters/client_channel/resolver_factory.h", - "src/core/ext/filters/client_channel/resolver_registry.h", "src/core/ext/filters/client_channel/resolver_result_parsing.h", "src/core/ext/filters/client_channel/retry_filter.h", "src/core/ext/filters/client_channel/retry_service_config.h", "src/core/ext/filters/client_channel/retry_throttle.h", - "src/core/ext/filters/client_channel/server_address.h", "src/core/ext/filters/client_channel/subchannel.h", "src/core/ext/filters/client_channel/subchannel_interface.h", "src/core/ext/filters/client_channel/subchannel_pool_interface.h", @@ -2249,6 +2363,7 @@ grpc_cc_library( "grpc_client_authority_filter", "grpc_deadline_filter", "grpc_health_upb", + "grpc_resolver", "grpc_service_config", "grpc_trace", "handshaker_registry", @@ -2257,7 +2372,10 @@ grpc_cc_library( "orphanable", "ref_counted", "ref_counted_ptr", + "server_address", "slice", + "sockaddr_utils", + "uri_parser", "useful", "xds_orca_upb", ], @@ -2536,12 +2654,15 @@ grpc_cc_library( "grpc_grpclb_balancer_addresses", "grpc_lb_upb", "grpc_resolver_fake", + "grpc_sockaddr", "grpc_transport_chttp2_client_insecure", "orphanable", "protobuf_duration_upb", "protobuf_timestamp_upb", "ref_counted_ptr", + "server_address", "slice", + "sockaddr_utils", ], ) @@ -2579,12 +2700,15 @@ grpc_cc_library( "grpc_lb_upb", "grpc_resolver_fake", "grpc_secure", + "grpc_sockaddr", "grpc_transport_chttp2_client_secure", "orphanable", "protobuf_duration_upb", "protobuf_timestamp_upb", "ref_counted_ptr", + "server_address", "slice", + "sockaddr_utils", ], ) @@ -2613,12 +2737,14 @@ grpc_cc_library( "grpc_base", "grpc_client_channel", "grpc_codegen", + "grpc_resolver", "grpc_secure", "json", "json_util", "orphanable", "ref_counted", "rls_upb", + "uri_parser", ], ) @@ -2702,6 +2828,7 @@ grpc_cc_library( "grpc_matchers", "grpc_rbac_filter", "grpc_secure", + "grpc_sockaddr", "grpc_transport_chttp2_client_secure", "json", "json_util", @@ -2714,6 +2841,8 @@ grpc_cc_library( "ref_counted_ptr", "slice", "slice_refcount", + "sockaddr_utils", + "uri_parser", "xds_type_upb", "xds_type_upbdefs", ], @@ -2751,9 +2880,12 @@ grpc_cc_library( "grpc_base", "grpc_server_config_selector", "grpc_server_config_selector_filter", + "grpc_sockaddr", "grpc_xds_channel_stack_modifier", "grpc_xds_client", "slice_refcount", + "sockaddr_utils", + "uri_parser", ], ) @@ -2838,10 +2970,13 @@ grpc_cc_library( "grpc_lb_policy_ring_hash", "grpc_lb_xds_channel_args", "grpc_lb_xds_common", + "grpc_resolver", "grpc_resolver_fake", "grpc_xds_client", "orphanable", "ref_counted_ptr", + "server_address", + "uri_parser", ], ) @@ -2930,6 +3065,8 @@ grpc_cc_library( "grpc_base", "grpc_client_channel", "grpc_lb_subchannel_list", + "server_address", + "sockaddr_utils", ], ) @@ -2953,6 +3090,7 @@ grpc_cc_library( "grpc_lb_subchannel_list", "grpc_trace", "ref_counted_ptr", + "sockaddr_utils", ], ) @@ -2969,6 +3107,8 @@ grpc_cc_library( "grpc_lb_subchannel_list", "grpc_trace", "ref_counted_ptr", + "server_address", + "sockaddr_utils", ], ) @@ -3034,7 +3174,9 @@ grpc_cc_library( "grpc++_base", "grpc_base", "grpc_secure", + "grpc_sockaddr", "slice", + "uri_parser", ], alwayslink = 1, ) @@ -3054,6 +3196,7 @@ grpc_cc_library( "gpr_codegen", "grpc++", "grpc_base", + "grpc_sockaddr", ], ) @@ -3178,7 +3321,9 @@ grpc_cc_library( "gpr_base", "grpc_base", "grpc_client_channel", + "grpc_resolver", "grpc_resolver_dns_selection", + "server_address", ], ) @@ -3212,9 +3357,14 @@ grpc_cc_library( "grpc_base", "grpc_client_channel", "grpc_grpclb_balancer_addresses", + "grpc_resolver", "grpc_resolver_dns_selection", "grpc_service_config", + "grpc_sockaddr", + "iomgr_port", "json", + "server_address", + "sockaddr_utils", ], ) @@ -3231,6 +3381,8 @@ grpc_cc_library( "gpr_base", "grpc_base", "grpc_client_channel", + "grpc_resolver", + "server_address", "slice", ], ) @@ -3248,6 +3400,9 @@ grpc_cc_library( "gpr_base", "grpc_base", "grpc_client_channel", + "grpc_resolver", + "iomgr_port", + "server_address", "slice", ], ) @@ -3265,6 +3420,8 @@ grpc_cc_library( "gpr_base", "grpc_base", "grpc_client_channel", + "grpc_resolver", + "server_address", "slice", "useful", ], @@ -3294,6 +3451,7 @@ grpc_cc_library( "grpc_base", "grpc_client_channel", "grpc_lb_policy_ring_hash", + "grpc_resolver", "grpc_xds_client", ], ) @@ -3309,6 +3467,7 @@ grpc_cc_library( "gpr_base", "grpc_base", "grpc_client_channel", + "grpc_resolver", "grpc_xds_client", ], ) @@ -3438,6 +3597,7 @@ grpc_cc_library( "grpc_client_channel", "grpc_codegen", "grpc_lb_xds_channel_args", + "grpc_sockaddr", "grpc_trace", "grpc_transport_chttp2_alpn", "json", @@ -3445,8 +3605,10 @@ grpc_cc_library( "ref_counted_ptr", "slice", "slice_refcount", + "sockaddr_utils", "tsi", "tsi_interface", + "uri_parser", "useful", ], ) @@ -3512,6 +3674,7 @@ grpc_cc_library( "grpc_base", "grpc_matchers", "grpc_secure", + "sockaddr_utils", ], ) @@ -3580,6 +3743,7 @@ grpc_cc_library( "grpc_base", "grpc_mock_cel", "grpc_rbac_engine", + "sockaddr_utils", ], ) @@ -3710,6 +3874,7 @@ grpc_cc_library( "resource_quota_trace", "slice", "slice_refcount", + "uri_parser", "useful", ], ) @@ -3745,6 +3910,7 @@ grpc_cc_library( "grpc_client_channel", "grpc_transport_chttp2", "slice", + "sockaddr_utils", ], ) @@ -3756,9 +3922,11 @@ grpc_cc_library( ], language = "c++", deps = [ + "channel_args", "gpr_base", "grpc_base", "grpc_client_channel", + "grpc_resolver", "grpc_transport_chttp2", "grpc_transport_chttp2_client_connector", ], @@ -3775,10 +3943,13 @@ grpc_cc_library( "gpr_base", "grpc_base", "grpc_client_channel", + "grpc_resolver", "grpc_secure", "grpc_transport_chttp2", "grpc_transport_chttp2_client_connector", "slice", + "sockaddr_utils", + "uri_parser", ], ) @@ -3806,6 +3977,8 @@ grpc_cc_library( "ref_counted", "ref_counted_ptr", "slice", + "sockaddr_utils", + "uri_parser", ], ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 009b027a291..2c7e2e8189d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1574,7 +1574,6 @@ add_library(grpc src/core/ext/filters/client_channel/lb_policy_registry.cc src/core/ext/filters/client_channel/local_subchannel_pool.cc src/core/ext/filters/client_channel/proxy_mapper_registry.cc - src/core/ext/filters/client_channel/resolver.cc src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc @@ -1590,12 +1589,10 @@ add_library(grpc src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc - src/core/ext/filters/client_channel/resolver_registry.cc src/core/ext/filters/client_channel/resolver_result_parsing.cc src/core/ext/filters/client_channel/retry_filter.cc src/core/ext/filters/client_channel/retry_service_config.cc src/core/ext/filters/client_channel/retry_throttle.cc - src/core/ext/filters/client_channel/server_address.cc src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_pool_interface.cc @@ -1616,8 +1613,6 @@ add_library(grpc src/core/ext/filters/rbac/rbac_service_config_parser.cc src/core/ext/filters/server_config_selector/server_config_selector.cc src/core/ext/filters/server_config_selector/server_config_selector_filter.cc - src/core/ext/service_config/service_config.cc - src/core/ext/service_config/service_config_parser.cc src/core/ext/transport/chttp2/alpn/alpn.cc src/core/ext/transport/chttp2/client/chttp2_connector.cc src/core/ext/transport/chttp2/client/insecure/channel_create.cc @@ -2013,6 +2008,9 @@ add_library(grpc src/core/lib/json/json_writer.cc src/core/lib/matchers/matchers.cc src/core/lib/promise/activity.cc + src/core/lib/resolver/resolver.cc + src/core/lib/resolver/resolver_registry.cc + src/core/lib/resolver/server_address.cc src/core/lib/resource_quota/api.cc src/core/lib/resource_quota/arena.cc src/core/lib/resource_quota/memory_quota.cc @@ -2078,6 +2076,8 @@ add_library(grpc src/core/lib/security/transport/server_auth_filter.cc src/core/lib/security/transport/tsi_error.cc src/core/lib/security/util/json_util.cc + src/core/lib/service_config/service_config.cc + src/core/lib/service_config/service_config_parser.cc src/core/lib/slice/b64.cc src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc @@ -2455,7 +2455,6 @@ add_library(grpc_unsecure src/core/ext/filters/client_channel/lb_policy_registry.cc src/core/ext/filters/client_channel/local_subchannel_pool.cc src/core/ext/filters/client_channel/proxy_mapper_registry.cc - src/core/ext/filters/client_channel/resolver.cc src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc @@ -2469,12 +2468,10 @@ add_library(grpc_unsecure src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc - src/core/ext/filters/client_channel/resolver_registry.cc src/core/ext/filters/client_channel/resolver_result_parsing.cc src/core/ext/filters/client_channel/retry_filter.cc src/core/ext/filters/client_channel/retry_service_config.cc src/core/ext/filters/client_channel/retry_throttle.cc - src/core/ext/filters/client_channel/server_address.cc src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_pool_interface.cc @@ -2491,8 +2488,6 @@ add_library(grpc_unsecure src/core/ext/filters/http/server/http_server_filter.cc src/core/ext/filters/max_age/max_age_filter.cc src/core/ext/filters/message_size/message_size_filter.cc - src/core/ext/service_config/service_config.cc - src/core/ext/service_config/service_config_parser.cc src/core/ext/transport/chttp2/alpn/alpn.cc src/core/ext/transport/chttp2/client/chttp2_connector.cc src/core/ext/transport/chttp2/client/insecure/channel_create.cc @@ -2659,6 +2654,9 @@ add_library(grpc_unsecure src/core/lib/json/json_util.cc src/core/lib/json/json_writer.cc src/core/lib/promise/activity.cc + src/core/lib/resolver/resolver.cc + src/core/lib/resolver/resolver_registry.cc + src/core/lib/resolver/server_address.cc src/core/lib/resource_quota/api.cc src/core/lib/resource_quota/arena.cc src/core/lib/resource_quota/memory_quota.cc @@ -2666,6 +2664,8 @@ add_library(grpc_unsecure src/core/lib/resource_quota/thread_quota.cc src/core/lib/resource_quota/trace.cc src/core/lib/security/authorization/authorization_policy_provider_null_vtable.cc + src/core/lib/service_config/service_config.cc + src/core/lib/service_config/service_config_parser.cc src/core/lib/slice/b64.cc src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc diff --git a/Makefile b/Makefile index 84b80a2392d..f7f9f53d752 100644 --- a/Makefile +++ b/Makefile @@ -1058,7 +1058,6 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/lb_policy_registry.cc \ src/core/ext/filters/client_channel/local_subchannel_pool.cc \ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \ - src/core/ext/filters/client_channel/resolver.cc \ src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc \ @@ -1074,12 +1073,10 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc \ src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc \ src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc \ - src/core/ext/filters/client_channel/resolver_registry.cc \ src/core/ext/filters/client_channel/resolver_result_parsing.cc \ src/core/ext/filters/client_channel/retry_filter.cc \ src/core/ext/filters/client_channel/retry_service_config.cc \ src/core/ext/filters/client_channel/retry_throttle.cc \ - src/core/ext/filters/client_channel/server_address.cc \ src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ @@ -1100,8 +1097,6 @@ LIBGRPC_SRC = \ src/core/ext/filters/rbac/rbac_service_config_parser.cc \ src/core/ext/filters/server_config_selector/server_config_selector.cc \ src/core/ext/filters/server_config_selector/server_config_selector_filter.cc \ - src/core/ext/service_config/service_config.cc \ - src/core/ext/service_config/service_config_parser.cc \ src/core/ext/transport/chttp2/alpn/alpn.cc \ src/core/ext/transport/chttp2/client/chttp2_connector.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \ @@ -1497,6 +1492,9 @@ LIBGRPC_SRC = \ src/core/lib/json/json_writer.cc \ src/core/lib/matchers/matchers.cc \ src/core/lib/promise/activity.cc \ + src/core/lib/resolver/resolver.cc \ + src/core/lib/resolver/resolver_registry.cc \ + src/core/lib/resolver/server_address.cc \ src/core/lib/resource_quota/api.cc \ src/core/lib/resource_quota/arena.cc \ src/core/lib/resource_quota/memory_quota.cc \ @@ -1562,6 +1560,8 @@ LIBGRPC_SRC = \ src/core/lib/security/transport/server_auth_filter.cc \ src/core/lib/security/transport/tsi_error.cc \ src/core/lib/security/util/json_util.cc \ + src/core/lib/service_config/service_config.cc \ + src/core/lib/service_config/service_config_parser.cc \ src/core/lib/slice/b64.cc \ src/core/lib/slice/percent_encoding.cc \ src/core/lib/slice/slice.cc \ @@ -1787,7 +1787,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/client_channel/lb_policy_registry.cc \ src/core/ext/filters/client_channel/local_subchannel_pool.cc \ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \ - src/core/ext/filters/client_channel/resolver.cc \ src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc \ @@ -1801,12 +1800,10 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc \ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \ src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc \ - src/core/ext/filters/client_channel/resolver_registry.cc \ src/core/ext/filters/client_channel/resolver_result_parsing.cc \ src/core/ext/filters/client_channel/retry_filter.cc \ src/core/ext/filters/client_channel/retry_service_config.cc \ src/core/ext/filters/client_channel/retry_throttle.cc \ - src/core/ext/filters/client_channel/server_address.cc \ src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ @@ -1823,8 +1820,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/http/server/http_server_filter.cc \ src/core/ext/filters/max_age/max_age_filter.cc \ src/core/ext/filters/message_size/message_size_filter.cc \ - src/core/ext/service_config/service_config.cc \ - src/core/ext/service_config/service_config_parser.cc \ src/core/ext/transport/chttp2/alpn/alpn.cc \ src/core/ext/transport/chttp2/client/chttp2_connector.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \ @@ -1991,6 +1986,9 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/json/json_util.cc \ src/core/lib/json/json_writer.cc \ src/core/lib/promise/activity.cc \ + src/core/lib/resolver/resolver.cc \ + src/core/lib/resolver/resolver_registry.cc \ + src/core/lib/resolver/server_address.cc \ src/core/lib/resource_quota/api.cc \ src/core/lib/resource_quota/arena.cc \ src/core/lib/resource_quota/memory_quota.cc \ @@ -1998,6 +1996,8 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/resource_quota/thread_quota.cc \ src/core/lib/resource_quota/trace.cc \ src/core/lib/security/authorization/authorization_policy_provider_null_vtable.cc \ + src/core/lib/service_config/service_config.cc \ + src/core/lib/service_config/service_config_parser.cc \ src/core/lib/slice/b64.cc \ src/core/lib/slice/percent_encoding.cc \ src/core/lib/slice/slice.cc \ diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index e3833d165ec..5a5acfece2e 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -437,19 +437,15 @@ libs: - src/core/ext/filters/client_channel/local_subchannel_pool.h - src/core/ext/filters/client_channel/proxy_mapper.h - src/core/ext/filters/client_channel/proxy_mapper_registry.h - - src/core/ext/filters/client_channel/resolver.h - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h - src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h - src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h - src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h - - src/core/ext/filters/client_channel/resolver_factory.h - - src/core/ext/filters/client_channel/resolver_registry.h - src/core/ext/filters/client_channel/resolver_result_parsing.h - src/core/ext/filters/client_channel/retry_filter.h - src/core/ext/filters/client_channel/retry_service_config.h - src/core/ext/filters/client_channel/retry_throttle.h - - src/core/ext/filters/client_channel/server_address.h - src/core/ext/filters/client_channel/subchannel.h - src/core/ext/filters/client_channel/subchannel_interface.h - src/core/ext/filters/client_channel/subchannel_pool_interface.h @@ -468,9 +464,6 @@ libs: - src/core/ext/filters/rbac/rbac_service_config_parser.h - src/core/ext/filters/server_config_selector/server_config_selector.h - src/core/ext/filters/server_config_selector/server_config_selector_filter.h - - src/core/ext/service_config/service_config.h - - src/core/ext/service_config/service_config_call_data.h - - src/core/ext/service_config/service_config_parser.h - src/core/ext/transport/chttp2/alpn/alpn.h - src/core/ext/transport/chttp2/client/chttp2_connector.h - src/core/ext/transport/chttp2/server/chttp2_server.h @@ -826,6 +819,7 @@ libs: - src/core/lib/iomgr/resolve_address_impl.h - src/core/lib/iomgr/resolve_address_posix.h - src/core/lib/iomgr/resolve_address_windows.h + - src/core/lib/iomgr/resolved_address.h - src/core/lib/iomgr/sockaddr.h - src/core/lib/iomgr/sockaddr_posix.h - src/core/lib/iomgr/sockaddr_windows.h @@ -868,6 +862,10 @@ libs: - src/core/lib/promise/poll.h - src/core/lib/promise/race.h - src/core/lib/promise/seq.h + - src/core/lib/resolver/resolver.h + - src/core/lib/resolver/resolver_factory.h + - src/core/lib/resolver/resolver_registry.h + - src/core/lib/resolver/server_address.h - src/core/lib/resource_quota/api.h - src/core/lib/resource_quota/arena.h - src/core/lib/resource_quota/memory_quota.h @@ -925,6 +923,9 @@ libs: - src/core/lib/security/transport/security_handshaker.h - src/core/lib/security/transport/tsi_error.h - src/core/lib/security/util/json_util.h + - src/core/lib/service_config/service_config.h + - src/core/lib/service_config/service_config_call_data.h + - src/core/lib/service_config/service_config_parser.h - src/core/lib/slice/b64.h - src/core/lib/slice/percent_encoding.h - src/core/lib/slice/slice.h @@ -1029,7 +1030,6 @@ libs: - src/core/ext/filters/client_channel/lb_policy_registry.cc - src/core/ext/filters/client_channel/local_subchannel_pool.cc - src/core/ext/filters/client_channel/proxy_mapper_registry.cc - - src/core/ext/filters/client_channel/resolver.cc - src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc - src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc @@ -1045,12 +1045,10 @@ libs: - src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc - src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc - src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc - - src/core/ext/filters/client_channel/resolver_registry.cc - src/core/ext/filters/client_channel/resolver_result_parsing.cc - src/core/ext/filters/client_channel/retry_filter.cc - src/core/ext/filters/client_channel/retry_service_config.cc - src/core/ext/filters/client_channel/retry_throttle.cc - - src/core/ext/filters/client_channel/server_address.cc - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc - src/core/ext/filters/client_channel/subchannel.cc - src/core/ext/filters/client_channel/subchannel_pool_interface.cc @@ -1071,8 +1069,6 @@ libs: - src/core/ext/filters/rbac/rbac_service_config_parser.cc - src/core/ext/filters/server_config_selector/server_config_selector.cc - src/core/ext/filters/server_config_selector/server_config_selector_filter.cc - - src/core/ext/service_config/service_config.cc - - src/core/ext/service_config/service_config_parser.cc - src/core/ext/transport/chttp2/alpn/alpn.cc - src/core/ext/transport/chttp2/client/chttp2_connector.cc - src/core/ext/transport/chttp2/client/insecure/channel_create.cc @@ -1468,6 +1464,9 @@ libs: - src/core/lib/json/json_writer.cc - src/core/lib/matchers/matchers.cc - src/core/lib/promise/activity.cc + - src/core/lib/resolver/resolver.cc + - src/core/lib/resolver/resolver_registry.cc + - src/core/lib/resolver/server_address.cc - src/core/lib/resource_quota/api.cc - src/core/lib/resource_quota/arena.cc - src/core/lib/resource_quota/memory_quota.cc @@ -1533,6 +1532,8 @@ libs: - src/core/lib/security/transport/server_auth_filter.cc - src/core/lib/security/transport/tsi_error.cc - src/core/lib/security/util/json_util.cc + - src/core/lib/service_config/service_config.cc + - src/core/lib/service_config/service_config_parser.cc - src/core/lib/slice/b64.cc - src/core/lib/slice/percent_encoding.cc - src/core/lib/slice/slice.cc @@ -1788,18 +1789,14 @@ libs: - src/core/ext/filters/client_channel/local_subchannel_pool.h - src/core/ext/filters/client_channel/proxy_mapper.h - src/core/ext/filters/client_channel/proxy_mapper_registry.h - - src/core/ext/filters/client_channel/resolver.h - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h - src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h - src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h - - src/core/ext/filters/client_channel/resolver_factory.h - - src/core/ext/filters/client_channel/resolver_registry.h - src/core/ext/filters/client_channel/resolver_result_parsing.h - src/core/ext/filters/client_channel/retry_filter.h - src/core/ext/filters/client_channel/retry_service_config.h - src/core/ext/filters/client_channel/retry_throttle.h - - src/core/ext/filters/client_channel/server_address.h - src/core/ext/filters/client_channel/subchannel.h - src/core/ext/filters/client_channel/subchannel_interface.h - src/core/ext/filters/client_channel/subchannel_pool_interface.h @@ -1814,9 +1811,6 @@ libs: - src/core/ext/filters/http/server/http_server_filter.h - src/core/ext/filters/max_age/max_age_filter.h - src/core/ext/filters/message_size/message_size_filter.h - - src/core/ext/service_config/service_config.h - - src/core/ext/service_config/service_config_call_data.h - - src/core/ext/service_config/service_config_parser.h - src/core/ext/transport/chttp2/alpn/alpn.h - src/core/ext/transport/chttp2/client/chttp2_connector.h - src/core/ext/transport/chttp2/server/chttp2_server.h @@ -1944,6 +1938,7 @@ libs: - src/core/lib/iomgr/resolve_address_impl.h - src/core/lib/iomgr/resolve_address_posix.h - src/core/lib/iomgr/resolve_address_windows.h + - src/core/lib/iomgr/resolved_address.h - src/core/lib/iomgr/sockaddr.h - src/core/lib/iomgr/sockaddr_posix.h - src/core/lib/iomgr/sockaddr_windows.h @@ -1985,12 +1980,19 @@ libs: - src/core/lib/promise/poll.h - src/core/lib/promise/race.h - src/core/lib/promise/seq.h + - src/core/lib/resolver/resolver.h + - src/core/lib/resolver/resolver_factory.h + - src/core/lib/resolver/resolver_registry.h + - src/core/lib/resolver/server_address.h - src/core/lib/resource_quota/api.h - src/core/lib/resource_quota/arena.h - src/core/lib/resource_quota/memory_quota.h - src/core/lib/resource_quota/resource_quota.h - src/core/lib/resource_quota/thread_quota.h - src/core/lib/resource_quota/trace.h + - src/core/lib/service_config/service_config.h + - src/core/lib/service_config/service_config_call_data.h + - src/core/lib/service_config/service_config_parser.h - src/core/lib/slice/b64.h - src/core/lib/slice/percent_encoding.h - src/core/lib/slice/slice.h @@ -2063,7 +2065,6 @@ libs: - src/core/ext/filters/client_channel/lb_policy_registry.cc - src/core/ext/filters/client_channel/local_subchannel_pool.cc - src/core/ext/filters/client_channel/proxy_mapper_registry.cc - - src/core/ext/filters/client_channel/resolver.cc - src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc - src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc @@ -2077,12 +2078,10 @@ libs: - src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc - src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc - src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc - - src/core/ext/filters/client_channel/resolver_registry.cc - src/core/ext/filters/client_channel/resolver_result_parsing.cc - src/core/ext/filters/client_channel/retry_filter.cc - src/core/ext/filters/client_channel/retry_service_config.cc - src/core/ext/filters/client_channel/retry_throttle.cc - - src/core/ext/filters/client_channel/server_address.cc - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc - src/core/ext/filters/client_channel/subchannel.cc - src/core/ext/filters/client_channel/subchannel_pool_interface.cc @@ -2099,8 +2098,6 @@ libs: - src/core/ext/filters/http/server/http_server_filter.cc - src/core/ext/filters/max_age/max_age_filter.cc - src/core/ext/filters/message_size/message_size_filter.cc - - src/core/ext/service_config/service_config.cc - - src/core/ext/service_config/service_config_parser.cc - src/core/ext/transport/chttp2/alpn/alpn.cc - src/core/ext/transport/chttp2/client/chttp2_connector.cc - src/core/ext/transport/chttp2/client/insecure/channel_create.cc @@ -2267,6 +2264,9 @@ libs: - src/core/lib/json/json_util.cc - src/core/lib/json/json_writer.cc - src/core/lib/promise/activity.cc + - src/core/lib/resolver/resolver.cc + - src/core/lib/resolver/resolver_registry.cc + - src/core/lib/resolver/server_address.cc - src/core/lib/resource_quota/api.cc - src/core/lib/resource_quota/arena.cc - src/core/lib/resource_quota/memory_quota.cc @@ -2274,6 +2274,8 @@ libs: - src/core/lib/resource_quota/thread_quota.cc - src/core/lib/resource_quota/trace.cc - src/core/lib/security/authorization/authorization_policy_provider_null_vtable.cc + - src/core/lib/service_config/service_config.cc + - src/core/lib/service_config/service_config_parser.cc - src/core/lib/slice/b64.cc - src/core/lib/slice/percent_encoding.cc - src/core/lib/slice/slice.cc diff --git a/config.m4 b/config.m4 index 38fa766c79e..a37f45d7a9d 100644 --- a/config.m4 +++ b/config.m4 @@ -76,7 +76,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/client_channel/lb_policy_registry.cc \ src/core/ext/filters/client_channel/local_subchannel_pool.cc \ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \ - src/core/ext/filters/client_channel/resolver.cc \ src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc \ @@ -92,12 +91,10 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc \ src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc \ src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc \ - src/core/ext/filters/client_channel/resolver_registry.cc \ src/core/ext/filters/client_channel/resolver_result_parsing.cc \ src/core/ext/filters/client_channel/retry_filter.cc \ src/core/ext/filters/client_channel/retry_service_config.cc \ src/core/ext/filters/client_channel/retry_throttle.cc \ - src/core/ext/filters/client_channel/server_address.cc \ src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ @@ -118,8 +115,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/rbac/rbac_service_config_parser.cc \ src/core/ext/filters/server_config_selector/server_config_selector.cc \ src/core/ext/filters/server_config_selector/server_config_selector_filter.cc \ - src/core/ext/service_config/service_config.cc \ - src/core/ext/service_config/service_config_parser.cc \ src/core/ext/transport/chttp2/alpn/alpn.cc \ src/core/ext/transport/chttp2/client/chttp2_connector.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \ @@ -559,6 +554,9 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/profiling/basic_timers.cc \ src/core/lib/profiling/stap_timers.cc \ src/core/lib/promise/activity.cc \ + src/core/lib/resolver/resolver.cc \ + src/core/lib/resolver/resolver_registry.cc \ + src/core/lib/resolver/server_address.cc \ src/core/lib/resource_quota/api.cc \ src/core/lib/resource_quota/arena.cc \ src/core/lib/resource_quota/memory_quota.cc \ @@ -624,6 +622,8 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/security/transport/server_auth_filter.cc \ src/core/lib/security/transport/tsi_error.cc \ src/core/lib/security/util/json_util.cc \ + src/core/lib/service_config/service_config.cc \ + src/core/lib/service_config/service_config_parser.cc \ src/core/lib/slice/b64.cc \ src/core/lib/slice/percent_encoding.cc \ src/core/lib/slice/slice.cc \ @@ -1142,7 +1142,6 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/message_size) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/rbac) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/server_config_selector) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/service_config) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/alpn) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client/insecure) @@ -1257,6 +1256,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/matchers) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/profiling) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/promise) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/resolver) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/resource_quota) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/authorization) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/context) @@ -1284,6 +1284,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/security_connector/tls) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/transport) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/util) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/service_config) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/slice) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/surface) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/transport) diff --git a/config.w32 b/config.w32 index edfd3a99bae..0b84e9b3f75 100644 --- a/config.w32 +++ b/config.w32 @@ -42,7 +42,6 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\client_channel\\lb_policy_registry.cc " + "src\\core\\ext\\filters\\client_channel\\local_subchannel_pool.cc " + "src\\core\\ext\\filters\\client_channel\\proxy_mapper_registry.cc " + - "src\\core\\ext\\filters\\client_channel\\resolver.cc " + "src\\core\\ext\\filters\\client_channel\\resolver\\binder\\binder_resolver.cc " + "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\dns_resolver_ares.cc " + "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_ev_driver_event_engine.cc " + @@ -58,12 +57,10 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\client_channel\\resolver\\google_c2p\\google_c2p_resolver.cc " + "src\\core\\ext\\filters\\client_channel\\resolver\\sockaddr\\sockaddr_resolver.cc " + "src\\core\\ext\\filters\\client_channel\\resolver\\xds\\xds_resolver.cc " + - "src\\core\\ext\\filters\\client_channel\\resolver_registry.cc " + "src\\core\\ext\\filters\\client_channel\\resolver_result_parsing.cc " + "src\\core\\ext\\filters\\client_channel\\retry_filter.cc " + "src\\core\\ext\\filters\\client_channel\\retry_service_config.cc " + "src\\core\\ext\\filters\\client_channel\\retry_throttle.cc " + - "src\\core\\ext\\filters\\client_channel\\server_address.cc " + "src\\core\\ext\\filters\\client_channel\\service_config_channel_arg_filter.cc " + "src\\core\\ext\\filters\\client_channel\\subchannel.cc " + "src\\core\\ext\\filters\\client_channel\\subchannel_pool_interface.cc " + @@ -84,8 +81,6 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\rbac\\rbac_service_config_parser.cc " + "src\\core\\ext\\filters\\server_config_selector\\server_config_selector.cc " + "src\\core\\ext\\filters\\server_config_selector\\server_config_selector_filter.cc " + - "src\\core\\ext\\service_config\\service_config.cc " + - "src\\core\\ext\\service_config\\service_config_parser.cc " + "src\\core\\ext\\transport\\chttp2\\alpn\\alpn.cc " + "src\\core\\ext\\transport\\chttp2\\client\\chttp2_connector.cc " + "src\\core\\ext\\transport\\chttp2\\client\\insecure\\channel_create.cc " + @@ -525,6 +520,9 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\profiling\\basic_timers.cc " + "src\\core\\lib\\profiling\\stap_timers.cc " + "src\\core\\lib\\promise\\activity.cc " + + "src\\core\\lib\\resolver\\resolver.cc " + + "src\\core\\lib\\resolver\\resolver_registry.cc " + + "src\\core\\lib\\resolver\\server_address.cc " + "src\\core\\lib\\resource_quota\\api.cc " + "src\\core\\lib\\resource_quota\\arena.cc " + "src\\core\\lib\\resource_quota\\memory_quota.cc " + @@ -590,6 +588,8 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\security\\transport\\server_auth_filter.cc " + "src\\core\\lib\\security\\transport\\tsi_error.cc " + "src\\core\\lib\\security\\util\\json_util.cc " + + "src\\core\\lib\\service_config\\service_config.cc " + + "src\\core\\lib\\service_config\\service_config_parser.cc " + "src\\core\\lib\\slice\\b64.cc " + "src\\core\\lib\\slice\\percent_encoding.cc " + "src\\core\\lib\\slice\\slice.cc " + @@ -1141,7 +1141,6 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\message_size"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\rbac"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\server_config_selector"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\service_config"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\alpn"); @@ -1365,6 +1364,7 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\matchers"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\profiling"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\promise"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\resolver"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\resource_quota"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\authorization"); @@ -1393,6 +1393,7 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\security_connector\\tls"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\transport"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\util"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\service_config"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\slice"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\surface"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\transport"); diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index b30706c098c..92471975c7f 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -244,19 +244,15 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/local_subchannel_pool.h', 'src/core/ext/filters/client_channel/proxy_mapper.h', 'src/core/ext/filters/client_channel/proxy_mapper_registry.h', - 'src/core/ext/filters/client_channel/resolver.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h', 'src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h', 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h', 'src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h', - 'src/core/ext/filters/client_channel/resolver_factory.h', - 'src/core/ext/filters/client_channel/resolver_registry.h', 'src/core/ext/filters/client_channel/resolver_result_parsing.h', 'src/core/ext/filters/client_channel/retry_filter.h', 'src/core/ext/filters/client_channel/retry_service_config.h', 'src/core/ext/filters/client_channel/retry_throttle.h', - 'src/core/ext/filters/client_channel/server_address.h', 'src/core/ext/filters/client_channel/subchannel.h', 'src/core/ext/filters/client_channel/subchannel_interface.h', 'src/core/ext/filters/client_channel/subchannel_pool_interface.h', @@ -275,9 +271,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/rbac/rbac_service_config_parser.h', 'src/core/ext/filters/server_config_selector/server_config_selector.h', 'src/core/ext/filters/server_config_selector/server_config_selector_filter.h', - 'src/core/ext/service_config/service_config.h', - 'src/core/ext/service_config/service_config_call_data.h', - 'src/core/ext/service_config/service_config_parser.h', 'src/core/ext/transport/binder/client/binder_connector.cc', 'src/core/ext/transport/binder/client/binder_connector.h', 'src/core/ext/transport/binder/client/channel_create.cc', @@ -698,6 +691,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/resolve_address_impl.h', 'src/core/lib/iomgr/resolve_address_posix.h', 'src/core/lib/iomgr/resolve_address_windows.h', + 'src/core/lib/iomgr/resolved_address.h', 'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_windows.h', @@ -741,6 +735,10 @@ Pod::Spec.new do |s| 'src/core/lib/promise/poll.h', 'src/core/lib/promise/race.h', 'src/core/lib/promise/seq.h', + 'src/core/lib/resolver/resolver.h', + 'src/core/lib/resolver/resolver_factory.h', + 'src/core/lib/resolver/resolver_registry.h', + 'src/core/lib/resolver/server_address.h', 'src/core/lib/resource_quota/api.h', 'src/core/lib/resource_quota/arena.h', 'src/core/lib/resource_quota/memory_quota.h', @@ -798,6 +796,9 @@ Pod::Spec.new do |s| 'src/core/lib/security/transport/security_handshaker.h', 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/json_util.h', + 'src/core/lib/service_config/service_config.h', + 'src/core/lib/service_config/service_config_call_data.h', + 'src/core/lib/service_config/service_config_parser.h', 'src/core/lib/slice/b64.h', 'src/core/lib/slice/percent_encoding.h', 'src/core/lib/slice/slice.h', @@ -999,19 +1000,15 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/local_subchannel_pool.h', 'src/core/ext/filters/client_channel/proxy_mapper.h', 'src/core/ext/filters/client_channel/proxy_mapper_registry.h', - 'src/core/ext/filters/client_channel/resolver.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h', 'src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h', 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h', 'src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h', - 'src/core/ext/filters/client_channel/resolver_factory.h', - 'src/core/ext/filters/client_channel/resolver_registry.h', 'src/core/ext/filters/client_channel/resolver_result_parsing.h', 'src/core/ext/filters/client_channel/retry_filter.h', 'src/core/ext/filters/client_channel/retry_service_config.h', 'src/core/ext/filters/client_channel/retry_throttle.h', - 'src/core/ext/filters/client_channel/server_address.h', 'src/core/ext/filters/client_channel/subchannel.h', 'src/core/ext/filters/client_channel/subchannel_interface.h', 'src/core/ext/filters/client_channel/subchannel_pool_interface.h', @@ -1030,9 +1027,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/rbac/rbac_service_config_parser.h', 'src/core/ext/filters/server_config_selector/server_config_selector.h', 'src/core/ext/filters/server_config_selector/server_config_selector_filter.h', - 'src/core/ext/service_config/service_config.h', - 'src/core/ext/service_config/service_config_call_data.h', - 'src/core/ext/service_config/service_config_parser.h', 'src/core/ext/transport/binder/client/binder_connector.h', 'src/core/ext/transport/binder/client/channel_create_impl.h', 'src/core/ext/transport/binder/client/connection_id_generator.h', @@ -1435,6 +1429,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/resolve_address_impl.h', 'src/core/lib/iomgr/resolve_address_posix.h', 'src/core/lib/iomgr/resolve_address_windows.h', + 'src/core/lib/iomgr/resolved_address.h', 'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_windows.h', @@ -1478,6 +1473,10 @@ Pod::Spec.new do |s| 'src/core/lib/promise/poll.h', 'src/core/lib/promise/race.h', 'src/core/lib/promise/seq.h', + 'src/core/lib/resolver/resolver.h', + 'src/core/lib/resolver/resolver_factory.h', + 'src/core/lib/resolver/resolver_registry.h', + 'src/core/lib/resolver/server_address.h', 'src/core/lib/resource_quota/api.h', 'src/core/lib/resource_quota/arena.h', 'src/core/lib/resource_quota/memory_quota.h', @@ -1535,6 +1534,9 @@ Pod::Spec.new do |s| 'src/core/lib/security/transport/security_handshaker.h', 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/json_util.h', + 'src/core/lib/service_config/service_config.h', + 'src/core/lib/service_config/service_config_call_data.h', + 'src/core/lib/service_config/service_config_parser.h', 'src/core/lib/slice/b64.h', 'src/core/lib/slice/percent_encoding.h', 'src/core/lib/slice/slice.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 96fe52e7fe5..c4364e0f9f1 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -257,8 +257,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/proxy_mapper.h', 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc', 'src/core/ext/filters/client_channel/proxy_mapper_registry.h', - 'src/core/ext/filters/client_channel/resolver.cc', - 'src/core/ext/filters/client_channel/resolver.h', 'src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h', @@ -279,9 +277,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc', 'src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc', 'src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h', - 'src/core/ext/filters/client_channel/resolver_factory.h', - 'src/core/ext/filters/client_channel/resolver_registry.cc', - 'src/core/ext/filters/client_channel/resolver_registry.h', 'src/core/ext/filters/client_channel/resolver_result_parsing.cc', 'src/core/ext/filters/client_channel/resolver_result_parsing.h', 'src/core/ext/filters/client_channel/retry_filter.cc', @@ -290,8 +285,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/retry_service_config.h', 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/retry_throttle.h', - 'src/core/ext/filters/client_channel/server_address.cc', - 'src/core/ext/filters/client_channel/server_address.h', 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel.h', @@ -330,11 +323,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/server_config_selector/server_config_selector.h', 'src/core/ext/filters/server_config_selector/server_config_selector_filter.cc', 'src/core/ext/filters/server_config_selector/server_config_selector_filter.h', - 'src/core/ext/service_config/service_config.cc', - 'src/core/ext/service_config/service_config.h', - 'src/core/ext/service_config/service_config_call_data.h', - 'src/core/ext/service_config/service_config_parser.cc', - 'src/core/ext/service_config/service_config_parser.h', 'src/core/ext/transport/chttp2/alpn/alpn.cc', 'src/core/ext/transport/chttp2/alpn/alpn.h', 'src/core/ext/transport/chttp2/client/chttp2_connector.cc', @@ -1114,6 +1102,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/resolve_address_posix.h', 'src/core/lib/iomgr/resolve_address_windows.cc', 'src/core/lib/iomgr/resolve_address_windows.h', + 'src/core/lib/iomgr/resolved_address.h', 'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_windows.h', @@ -1199,6 +1188,13 @@ Pod::Spec.new do |s| 'src/core/lib/promise/poll.h', 'src/core/lib/promise/race.h', 'src/core/lib/promise/seq.h', + 'src/core/lib/resolver/resolver.cc', + 'src/core/lib/resolver/resolver.h', + 'src/core/lib/resolver/resolver_factory.h', + 'src/core/lib/resolver/resolver_registry.cc', + 'src/core/lib/resolver/resolver_registry.h', + 'src/core/lib/resolver/server_address.cc', + 'src/core/lib/resolver/server_address.h', 'src/core/lib/resource_quota/api.cc', 'src/core/lib/resource_quota/api.h', 'src/core/lib/resource_quota/arena.cc', @@ -1321,6 +1317,11 @@ Pod::Spec.new do |s| 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/json_util.cc', 'src/core/lib/security/util/json_util.h', + 'src/core/lib/service_config/service_config.cc', + 'src/core/lib/service_config/service_config.h', + 'src/core/lib/service_config/service_config_call_data.h', + 'src/core/lib/service_config/service_config_parser.cc', + 'src/core/lib/service_config/service_config_parser.h', 'src/core/lib/slice/b64.cc', 'src/core/lib/slice/b64.h', 'src/core/lib/slice/percent_encoding.cc', @@ -1566,19 +1567,15 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/local_subchannel_pool.h', 'src/core/ext/filters/client_channel/proxy_mapper.h', 'src/core/ext/filters/client_channel/proxy_mapper_registry.h', - 'src/core/ext/filters/client_channel/resolver.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h', 'src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h', 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h', 'src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h', - 'src/core/ext/filters/client_channel/resolver_factory.h', - 'src/core/ext/filters/client_channel/resolver_registry.h', 'src/core/ext/filters/client_channel/resolver_result_parsing.h', 'src/core/ext/filters/client_channel/retry_filter.h', 'src/core/ext/filters/client_channel/retry_service_config.h', 'src/core/ext/filters/client_channel/retry_throttle.h', - 'src/core/ext/filters/client_channel/server_address.h', 'src/core/ext/filters/client_channel/subchannel.h', 'src/core/ext/filters/client_channel/subchannel_interface.h', 'src/core/ext/filters/client_channel/subchannel_pool_interface.h', @@ -1597,9 +1594,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/rbac/rbac_service_config_parser.h', 'src/core/ext/filters/server_config_selector/server_config_selector.h', 'src/core/ext/filters/server_config_selector/server_config_selector_filter.h', - 'src/core/ext/service_config/service_config.h', - 'src/core/ext/service_config/service_config_call_data.h', - 'src/core/ext/service_config/service_config_parser.h', 'src/core/ext/transport/chttp2/alpn/alpn.h', 'src/core/ext/transport/chttp2/client/chttp2_connector.h', 'src/core/ext/transport/chttp2/server/chttp2_server.h', @@ -1982,6 +1976,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/resolve_address_impl.h', 'src/core/lib/iomgr/resolve_address_posix.h', 'src/core/lib/iomgr/resolve_address_windows.h', + 'src/core/lib/iomgr/resolved_address.h', 'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_windows.h', @@ -2025,6 +2020,10 @@ Pod::Spec.new do |s| 'src/core/lib/promise/poll.h', 'src/core/lib/promise/race.h', 'src/core/lib/promise/seq.h', + 'src/core/lib/resolver/resolver.h', + 'src/core/lib/resolver/resolver_factory.h', + 'src/core/lib/resolver/resolver_registry.h', + 'src/core/lib/resolver/server_address.h', 'src/core/lib/resource_quota/api.h', 'src/core/lib/resource_quota/arena.h', 'src/core/lib/resource_quota/memory_quota.h', @@ -2082,6 +2081,9 @@ Pod::Spec.new do |s| 'src/core/lib/security/transport/security_handshaker.h', 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/json_util.h', + 'src/core/lib/service_config/service_config.h', + 'src/core/lib/service_config/service_config_call_data.h', + 'src/core/lib/service_config/service_config_parser.h', 'src/core/lib/slice/b64.h', 'src/core/lib/slice/percent_encoding.h', 'src/core/lib/slice/slice.h', diff --git a/grpc.gemspec b/grpc.gemspec index b7c78bc1948..bcb44841701 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -176,8 +176,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/proxy_mapper.h ) s.files += %w( src/core/ext/filters/client_channel/proxy_mapper_registry.cc ) s.files += %w( src/core/ext/filters/client_channel/proxy_mapper_registry.h ) - s.files += %w( src/core/ext/filters/client_channel/resolver.cc ) - s.files += %w( src/core/ext/filters/client_channel/resolver.h ) s.files += %w( src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc ) s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc ) s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h ) @@ -198,9 +196,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc ) s.files += %w( src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc ) s.files += %w( src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h ) - s.files += %w( src/core/ext/filters/client_channel/resolver_factory.h ) - s.files += %w( src/core/ext/filters/client_channel/resolver_registry.cc ) - s.files += %w( src/core/ext/filters/client_channel/resolver_registry.h ) s.files += %w( src/core/ext/filters/client_channel/resolver_result_parsing.cc ) s.files += %w( src/core/ext/filters/client_channel/resolver_result_parsing.h ) s.files += %w( src/core/ext/filters/client_channel/retry_filter.cc ) @@ -209,8 +204,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/retry_service_config.h ) s.files += %w( src/core/ext/filters/client_channel/retry_throttle.cc ) s.files += %w( src/core/ext/filters/client_channel/retry_throttle.h ) - s.files += %w( src/core/ext/filters/client_channel/server_address.cc ) - s.files += %w( src/core/ext/filters/client_channel/server_address.h ) s.files += %w( src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc ) s.files += %w( src/core/ext/filters/client_channel/subchannel.cc ) s.files += %w( src/core/ext/filters/client_channel/subchannel.h ) @@ -249,11 +242,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/server_config_selector/server_config_selector.h ) s.files += %w( src/core/ext/filters/server_config_selector/server_config_selector_filter.cc ) s.files += %w( src/core/ext/filters/server_config_selector/server_config_selector_filter.h ) - s.files += %w( src/core/ext/service_config/service_config.cc ) - s.files += %w( src/core/ext/service_config/service_config.h ) - s.files += %w( src/core/ext/service_config/service_config_call_data.h ) - s.files += %w( src/core/ext/service_config/service_config_parser.cc ) - s.files += %w( src/core/ext/service_config/service_config_parser.h ) s.files += %w( src/core/ext/transport/chttp2/alpn/alpn.cc ) s.files += %w( src/core/ext/transport/chttp2/alpn/alpn.h ) s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.cc ) @@ -1033,6 +1021,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/resolve_address_posix.h ) s.files += %w( src/core/lib/iomgr/resolve_address_windows.cc ) s.files += %w( src/core/lib/iomgr/resolve_address_windows.h ) + s.files += %w( src/core/lib/iomgr/resolved_address.h ) s.files += %w( src/core/lib/iomgr/sockaddr.h ) s.files += %w( src/core/lib/iomgr/sockaddr_posix.h ) s.files += %w( src/core/lib/iomgr/sockaddr_windows.h ) @@ -1118,6 +1107,13 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/promise/poll.h ) s.files += %w( src/core/lib/promise/race.h ) s.files += %w( src/core/lib/promise/seq.h ) + s.files += %w( src/core/lib/resolver/resolver.cc ) + s.files += %w( src/core/lib/resolver/resolver.h ) + s.files += %w( src/core/lib/resolver/resolver_factory.h ) + s.files += %w( src/core/lib/resolver/resolver_registry.cc ) + s.files += %w( src/core/lib/resolver/resolver_registry.h ) + s.files += %w( src/core/lib/resolver/server_address.cc ) + s.files += %w( src/core/lib/resolver/server_address.h ) s.files += %w( src/core/lib/resource_quota/api.cc ) s.files += %w( src/core/lib/resource_quota/api.h ) s.files += %w( src/core/lib/resource_quota/arena.cc ) @@ -1240,6 +1236,11 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/security/transport/tsi_error.h ) s.files += %w( src/core/lib/security/util/json_util.cc ) s.files += %w( src/core/lib/security/util/json_util.h ) + s.files += %w( src/core/lib/service_config/service_config.cc ) + s.files += %w( src/core/lib/service_config/service_config.h ) + s.files += %w( src/core/lib/service_config/service_config_call_data.h ) + s.files += %w( src/core/lib/service_config/service_config_parser.cc ) + s.files += %w( src/core/lib/service_config/service_config_parser.h ) s.files += %w( src/core/lib/slice/b64.cc ) s.files += %w( src/core/lib/slice/b64.h ) s.files += %w( src/core/lib/slice/percent_encoding.cc ) diff --git a/grpc.gyp b/grpc.gyp index 8252126b6cb..787f06a2bd8 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -506,7 +506,6 @@ 'src/core/ext/filters/client_channel/lb_policy_registry.cc', 'src/core/ext/filters/client_channel/local_subchannel_pool.cc', 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc', - 'src/core/ext/filters/client_channel/resolver.cc', 'src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc', @@ -522,12 +521,10 @@ 'src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc', 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc', 'src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc', - 'src/core/ext/filters/client_channel/resolver_registry.cc', 'src/core/ext/filters/client_channel/resolver_result_parsing.cc', 'src/core/ext/filters/client_channel/retry_filter.cc', 'src/core/ext/filters/client_channel/retry_service_config.cc', 'src/core/ext/filters/client_channel/retry_throttle.cc', - 'src/core/ext/filters/client_channel/server_address.cc', 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', @@ -548,8 +545,6 @@ 'src/core/ext/filters/rbac/rbac_service_config_parser.cc', 'src/core/ext/filters/server_config_selector/server_config_selector.cc', 'src/core/ext/filters/server_config_selector/server_config_selector_filter.cc', - 'src/core/ext/service_config/service_config.cc', - 'src/core/ext/service_config/service_config_parser.cc', 'src/core/ext/transport/chttp2/alpn/alpn.cc', 'src/core/ext/transport/chttp2/client/chttp2_connector.cc', 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc', @@ -945,6 +940,9 @@ 'src/core/lib/json/json_writer.cc', 'src/core/lib/matchers/matchers.cc', 'src/core/lib/promise/activity.cc', + 'src/core/lib/resolver/resolver.cc', + 'src/core/lib/resolver/resolver_registry.cc', + 'src/core/lib/resolver/server_address.cc', 'src/core/lib/resource_quota/api.cc', 'src/core/lib/resource_quota/arena.cc', 'src/core/lib/resource_quota/memory_quota.cc', @@ -1010,6 +1008,8 @@ 'src/core/lib/security/transport/server_auth_filter.cc', 'src/core/lib/security/transport/tsi_error.cc', 'src/core/lib/security/util/json_util.cc', + 'src/core/lib/service_config/service_config.cc', + 'src/core/lib/service_config/service_config_parser.cc', 'src/core/lib/slice/b64.cc', 'src/core/lib/slice/percent_encoding.cc', 'src/core/lib/slice/slice.cc', @@ -1207,7 +1207,6 @@ 'src/core/ext/filters/client_channel/lb_policy_registry.cc', 'src/core/ext/filters/client_channel/local_subchannel_pool.cc', 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc', - 'src/core/ext/filters/client_channel/resolver.cc', 'src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc', @@ -1221,12 +1220,10 @@ 'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc', 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc', 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc', - 'src/core/ext/filters/client_channel/resolver_registry.cc', 'src/core/ext/filters/client_channel/resolver_result_parsing.cc', 'src/core/ext/filters/client_channel/retry_filter.cc', 'src/core/ext/filters/client_channel/retry_service_config.cc', 'src/core/ext/filters/client_channel/retry_throttle.cc', - 'src/core/ext/filters/client_channel/server_address.cc', 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', @@ -1243,8 +1240,6 @@ 'src/core/ext/filters/http/server/http_server_filter.cc', 'src/core/ext/filters/max_age/max_age_filter.cc', 'src/core/ext/filters/message_size/message_size_filter.cc', - 'src/core/ext/service_config/service_config.cc', - 'src/core/ext/service_config/service_config_parser.cc', 'src/core/ext/transport/chttp2/alpn/alpn.cc', 'src/core/ext/transport/chttp2/client/chttp2_connector.cc', 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc', @@ -1411,6 +1406,9 @@ 'src/core/lib/json/json_util.cc', 'src/core/lib/json/json_writer.cc', 'src/core/lib/promise/activity.cc', + 'src/core/lib/resolver/resolver.cc', + 'src/core/lib/resolver/resolver_registry.cc', + 'src/core/lib/resolver/server_address.cc', 'src/core/lib/resource_quota/api.cc', 'src/core/lib/resource_quota/arena.cc', 'src/core/lib/resource_quota/memory_quota.cc', @@ -1418,6 +1416,8 @@ 'src/core/lib/resource_quota/thread_quota.cc', 'src/core/lib/resource_quota/trace.cc', 'src/core/lib/security/authorization/authorization_policy_provider_null_vtable.cc', + 'src/core/lib/service_config/service_config.cc', + 'src/core/lib/service_config/service_config_parser.cc', 'src/core/lib/slice/b64.cc', 'src/core/lib/slice/percent_encoding.cc', 'src/core/lib/slice/slice.cc', diff --git a/package.xml b/package.xml index 1db62b17410..2e9ef42a538 100644 --- a/package.xml +++ b/package.xml @@ -156,8 +156,6 @@ - - @@ -178,9 +176,6 @@ - - - @@ -189,8 +184,6 @@ - - @@ -229,11 +222,6 @@ - - - - - @@ -1013,6 +1001,7 @@ + @@ -1098,6 +1087,13 @@ + + + + + + + @@ -1220,6 +1216,11 @@ + + + + + diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index db76cbf5fe6..00c2b82979e 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -48,13 +48,10 @@ #include "src/core/ext/filters/client_channel/lb_policy_registry.h" #include "src/core/ext/filters/client_channel/local_subchannel_pool.h" #include "src/core/ext/filters/client_channel/proxy_mapper_registry.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/ext/filters/client_channel/resolver_result_parsing.h" #include "src/core/ext/filters/client_channel/retry_filter.h" #include "src/core/ext/filters/client_channel/subchannel.h" #include "src/core/ext/filters/deadline/deadline_filter.h" -#include "src/core/ext/service_config/service_config.h" -#include "src/core/ext/service_config/service_config_call_data.h" #include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/connected_channel.h" @@ -65,6 +62,9 @@ #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/iomgr/work_serializer.h" #include "src/core/lib/profiling/timers.h" +#include "src/core/lib/resolver/resolver_registry.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/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/surface/channel.h" diff --git a/src/core/ext/filters/client_channel/client_channel.h b/src/core/ext/filters/client_channel/client_channel.h index 5c4dc5b87e1..870925eff36 100644 --- a/src/core/ext/filters/client_channel/client_channel.h +++ b/src/core/ext/filters/client_channel/client_channel.h @@ -33,14 +33,10 @@ #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_policy.h" -#include "src/core/ext/filters/client_channel/resolver.h" #include "src/core/ext/filters/client_channel/resolver_result_parsing.h" #include "src/core/ext/filters/client_channel/retry_throttle.h" #include "src/core/ext/filters/client_channel/subchannel.h" #include "src/core/ext/filters/client_channel/subchannel_pool_interface.h" -#include "src/core/ext/service_config/service_config.h" -#include "src/core/ext/service_config/service_config_call_data.h" -#include "src/core/ext/service_config/service_config_parser.h" #include "src/core/lib/channel/call_tracer.h" #include "src/core/lib/channel/context.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" @@ -48,6 +44,10 @@ #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/resolver.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/surface/channel.h" #include "src/core/lib/transport/connectivity_state.h" diff --git a/src/core/ext/filters/client_channel/client_channel_plugin.cc b/src/core/ext/filters/client_channel/client_channel_plugin.cc index 31a084cd40e..abd225bcd55 100644 --- a/src/core/ext/filters/client_channel/client_channel_plugin.cc +++ b/src/core/ext/filters/client_channel/client_channel_plugin.cc @@ -32,11 +32,11 @@ #include "src/core/ext/filters/client_channel/http_proxy.h" #include "src/core/ext/filters/client_channel/lb_policy_registry.h" #include "src/core/ext/filters/client_channel/proxy_mapper_registry.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/ext/filters/client_channel/resolver_result_parsing.h" #include "src/core/ext/filters/client_channel/retry_service_config.h" #include "src/core/ext/filters/client_channel/retry_throttle.h" #include "src/core/lib/config/core_configuration.h" +#include "src/core/lib/resolver/resolver_registry.h" void grpc_client_channel_init(void) { grpc_core::internal::ClientChannelServiceConfigParser::Register(); diff --git a/src/core/ext/filters/client_channel/config_selector.h b/src/core/ext/filters/client_channel/config_selector.h index 655afa03a2d..7654069811b 100644 --- a/src/core/ext/filters/client_channel/config_selector.h +++ b/src/core/ext/filters/client_channel/config_selector.h @@ -27,13 +27,13 @@ #include -#include "src/core/ext/service_config/service_config.h" -#include "src/core/ext/service_config/service_config_call_data.h" -#include "src/core/ext/service_config/service_config_parser.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.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/transport/metadata_batch.h" // Channel arg key for ConfigSelector. diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.cc b/src/core/ext/filters/client_channel/http_connect_handshaker.cc index 8fbd09fee68..57072f3205d 100644 --- a/src/core/ext/filters/client_channel/http_connect_handshaker.cc +++ b/src/core/ext/filters/client_channel/http_connect_handshaker.cc @@ -30,7 +30,6 @@ #include #include "src/core/ext/filters/client_channel/client_channel.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/handshaker.h" #include "src/core/lib/channel/handshaker_registry.h" @@ -39,6 +38,7 @@ #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/http/format_request.h" #include "src/core/lib/http/parser.h" +#include "src/core/lib/resolver/resolver_registry.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/uri/uri_parser.h" diff --git a/src/core/ext/filters/client_channel/lb_policy.h b/src/core/ext/filters/client_channel/lb_policy.h index 151be9af267..ac4c740b033 100644 --- a/src/core/ext/filters/client_channel/lb_policy.h +++ b/src/core/ext/filters/client_channel/lb_policy.h @@ -27,12 +27,12 @@ #include "absl/strings/string_view.h" #include "absl/types/variant.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/ext/filters/client_channel/subchannel_interface.h" #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/transport/connectivity_state.h" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/lb_policy/address_filtering.h b/src/core/ext/filters/client_channel/lb_policy/address_filtering.h index 8c400fa44c2..1e384d9bd6a 100644 --- a/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +++ b/src/core/ext/filters/client_channel/lb_policy/address_filtering.h @@ -25,7 +25,7 @@ #include "absl/status/statusor.h" -#include "src/core/ext/filters/client_channel/server_address.h" +#include "src/core/lib/resolver/server_address.h" // The resolver returns a flat list of addresses. When a hierarchy of // LB policies is in use, each leaf of the hierarchy will need a diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index 180ee0145f5..a4f0b012dff 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -80,7 +80,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/fake/fake_resolver.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/backoff/backoff.h" @@ -96,6 +95,7 @@ #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" #include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/surface/call.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h index f95341e3f40..32ee1dd8808 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h @@ -21,7 +21,7 @@ #include -#include "src/core/ext/filters/client_channel/server_address.h" +#include "src/core/lib/resolver/server_address.h" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h index 8ea48852855..d737b9ecb4b 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h @@ -23,7 +23,7 @@ #include -#include "src/core/ext/filters/client_channel/server_address.h" +#include "src/core/lib/resolver/server_address.h" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc index a4a67ea15d2..2707eead7b9 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc @@ -29,10 +29,10 @@ #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h" #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/string.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/slice/slice_internal.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc index 729449505ac..a0b83d78683 100644 --- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +++ b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc @@ -22,11 +22,11 @@ #include "src/core/ext/filters/client_channel/lb_policy/subchannel_list.h" #include "src/core/ext/filters/client_channel/lb_policy_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/ext/filters/client_channel/subchannel.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/sync.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/error_utils.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc b/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc index a8c13c74e60..67d26a7f765 100644 --- a/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +++ b/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc @@ -52,7 +52,6 @@ #include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" #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_registry.h" #include "src/core/lib/backoff/backoff.h" #include "src/core/lib/gpr/env.h" #include "src/core/lib/gpr/string.h" @@ -64,6 +63,7 @@ #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_util.h" +#include "src/core/lib/resolver/resolver_registry.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/surface/call.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h index 2998eff989e..d015bc728c2 100644 --- a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +++ b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h @@ -28,7 +28,6 @@ #include #include "src/core/ext/filters/client_channel/lb_policy_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/ext/filters/client_channel/subchannel_interface.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" @@ -38,6 +37,7 @@ #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/closure.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/transport/connectivity_state.h" // Code for maintaining a list of subchannels within an LB policy. diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds.h b/src/core/ext/filters/client_channel/lb_policy/xds/xds.h index 7546f5b5fee..85c9642d31e 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds.h +++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds.h @@ -19,9 +19,9 @@ #include -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/ext/xds/xds_client_stats.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/resolver/server_address.h" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc index 90f422025ff..d73a7441e36 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc @@ -34,8 +34,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/fake/fake_resolver.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/ext/xds/xds_channel_args.h" #include "src/core/ext/xds/xds_client.h" #include "src/core/ext/xds/xds_client_stats.h" @@ -45,6 +43,8 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/resolver_registry.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/uri/uri_parser.h" diff --git a/src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc b/src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc index 1a346c11909..263164ae8b0 100644 --- a/src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc +++ b/src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc @@ -23,11 +23,11 @@ #include #include -#include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/string.h" +#include "src/core/lib/resolver/resolver_registry.h" +#include "src/core/lib/resolver/server_address.h" namespace grpc_core { namespace { diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc index 3881917d048..08c67c4cf2f 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc @@ -35,9 +35,6 @@ #include "src/core/ext/filters/client_channel/lb_policy_registry.h" #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" #include "src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" -#include "src/core/ext/service_config/service_config.h" #include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/string.h" @@ -48,6 +45,9 @@ #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/iomgr/work_serializer.h" #include "src/core/lib/json/json.h" +#include "src/core/lib/resolver/resolver_registry.h" +#include "src/core/lib/resolver/server_address.h" +#include "src/core/lib/service_config/service_config.h" #include "src/core/lib/transport/error_utils.h" #define GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS 1 diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h index 95b0a938e6d..bc35060bc97 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h @@ -23,11 +23,11 @@ #include -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/server_address.h" #define GRPC_DNS_ARES_DEFAULT_QUERY_TIMEOUT_MS 120000 diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc index f76c6a4a12b..5269a06e26f 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc @@ -24,10 +24,10 @@ #include #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/iomgr/socket_windows.h" +#include "src/core/lib/resolver/server_address.h" bool grpc_ares_query_ipv6() { return grpc_ipv6_loopback_available(); } diff --git a/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc b/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc index 30e7f7b626a..6d3acc3fbd6 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc @@ -29,8 +29,6 @@ #include #include "src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/string.h" @@ -38,6 +36,8 @@ #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/resolver_registry.h" +#include "src/core/lib/resolver/server_address.h" #define GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS 1 #define GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER 1.6 diff --git a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc index fa65486acb1..ebaf478d2b1 100644 --- a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +++ b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc @@ -30,8 +30,6 @@ #include #include -#include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/string.h" @@ -40,6 +38,8 @@ #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" #include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/resolver_registry.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" diff --git a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h index 94d7c22c52c..c1feaf16282 100644 --- a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +++ b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h @@ -19,10 +19,11 @@ #include -#include "src/core/ext/filters/client_channel/resolver.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/lib/resolver/resolver.h" #define GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR \ "grpc.fake_resolver.response_generator" diff --git a/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc b/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc index cb01a3e3c2b..ad6b273a8b5 100644 --- a/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +++ b/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc @@ -18,12 +18,12 @@ #include -#include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/ext/xds/xds_client.h" #include "src/core/lib/gpr/env.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/http/httpcli.h" #include "src/core/lib/iomgr/polling_entity.h" +#include "src/core/lib/resolver/resolver_registry.h" #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc b/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc index 245752392e0..9814cf2f392 100644 --- a/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +++ b/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc @@ -28,13 +28,13 @@ #include #include -#include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/resolver/resolver_registry.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" diff --git a/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc b/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc index da44bc7589e..0e85e3312f1 100644 --- a/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +++ b/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc @@ -28,7 +28,6 @@ #include "src/core/ext/filters/client_channel/config_selector.h" #include "src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/ext/xds/xds_channel_args.h" #include "src/core/ext/xds/xds_client.h" #include "src/core/ext/xds/xds_http_filters.h" @@ -38,6 +37,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/resolver/resolver_registry.h" #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/timeout_encoding.h" diff --git a/src/core/ext/filters/client_channel/resolver_result_parsing.cc b/src/core/ext/filters/client_channel/resolver_result_parsing.cc index 4154ee78fbf..17b734fad34 100644 --- a/src/core/ext/filters/client_channel/resolver_result_parsing.cc +++ b/src/core/ext/filters/client_channel/resolver_result_parsing.cc @@ -31,12 +31,12 @@ #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/lb_policy_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/json/json_util.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/uri/uri_parser.h" // As per the retry design, we do not allow more than 5 retry attempts. diff --git a/src/core/ext/filters/client_channel/resolver_result_parsing.h b/src/core/ext/filters/client_channel/resolver_result_parsing.h index 21b619af66b..56979cb1531 100644 --- a/src/core/ext/filters/client_channel/resolver_result_parsing.h +++ b/src/core/ext/filters/client_channel/resolver_result_parsing.h @@ -23,13 +23,13 @@ #include "src/core/ext/filters/client_channel/lb_policy.h" #include "src/core/ext/filters/client_channel/lb_policy_factory.h" -#include "src/core/ext/filters/client_channel/resolver.h" -#include "src/core/ext/service_config/service_config_parser.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" // for grpc_millis #include "src/core/lib/json/json.h" +#include "src/core/lib/resolver/resolver.h" +#include "src/core/lib/service_config/service_config_parser.h" namespace grpc_core { namespace internal { diff --git a/src/core/ext/filters/client_channel/retry_filter.cc b/src/core/ext/filters/client_channel/retry_filter.cc index d618334d5c0..ef5febd3abf 100644 --- a/src/core/ext/filters/client_channel/retry_filter.cc +++ b/src/core/ext/filters/client_channel/retry_filter.cc @@ -28,14 +28,14 @@ #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/retry_service_config.h" #include "src/core/ext/filters/client_channel/retry_throttle.h" -#include "src/core/ext/service_config/service_config.h" -#include "src/core/ext/service_config/service_config_call_data.h" #include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/gprpp/manual_constructor.h" #include "src/core/lib/iomgr/polling_entity.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/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/transport/error_utils.h" diff --git a/src/core/ext/filters/client_channel/retry_service_config.cc b/src/core/ext/filters/client_channel/retry_service_config.cc index 7d83a949b81..d5bd37fa994 100644 --- a/src/core/ext/filters/client_channel/retry_service_config.cc +++ b/src/core/ext/filters/client_channel/retry_service_config.cc @@ -31,12 +31,12 @@ #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/lb_policy_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/json/json_util.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/uri/uri_parser.h" // As per the retry design, we do not allow more than 5 retry attempts. diff --git a/src/core/ext/filters/client_channel/retry_service_config.h b/src/core/ext/filters/client_channel/retry_service_config.h index 8febc5e3345..e73f09463f9 100644 --- a/src/core/ext/filters/client_channel/retry_service_config.h +++ b/src/core/ext/filters/client_channel/retry_service_config.h @@ -22,9 +22,9 @@ #include #include "src/core/ext/filters/client_channel/retry_throttle.h" -#include "src/core/ext/service_config/service_config_parser.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/iomgr/exec_ctx.h" // for grpc_millis +#include "src/core/lib/service_config/service_config_parser.h" namespace grpc_core { namespace internal { diff --git a/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc b/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc index 19054299608..d540ae2e87f 100644 --- a/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +++ b/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc @@ -19,11 +19,11 @@ #include -#include "src/core/ext/service_config/service_config_call_data.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack_builder.h" #include "src/core/lib/config/core_configuration.h" +#include "src/core/lib/service_config/service_config_call_data.h" namespace grpc_core { diff --git a/src/core/ext/filters/fault_injection/fault_injection_filter.cc b/src/core/ext/filters/fault_injection/fault_injection_filter.cc index bf861d05a4f..0eadf539556 100644 --- a/src/core/ext/filters/fault_injection/fault_injection_filter.cc +++ b/src/core/ext/filters/fault_injection/fault_injection_filter.cc @@ -26,12 +26,12 @@ #include #include "src/core/ext/filters/fault_injection/service_config_parser.h" -#include "src/core/ext/service_config/service_config_call_data.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/service_config/service_config_call_data.h" #include "src/core/lib/transport/status_conversion.h" namespace grpc_core { diff --git a/src/core/ext/filters/fault_injection/service_config_parser.h b/src/core/ext/filters/fault_injection/service_config_parser.h index abf9165905f..af60237ef10 100644 --- a/src/core/ext/filters/fault_injection/service_config_parser.h +++ b/src/core/ext/filters/fault_injection/service_config_parser.h @@ -21,8 +21,8 @@ #include -#include "src/core/ext/service_config/service_config_parser.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/service_config/service_config_parser.h" namespace grpc_core { diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc index edb256c3037..5fb92c45403 100644 --- a/src/core/ext/filters/message_size/message_size_filter.cc +++ b/src/core/ext/filters/message_size/message_size_filter.cc @@ -27,13 +27,13 @@ #include #include -#include "src/core/ext/service_config/service_config_call_data.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack_builder.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/service_config/service_config_call_data.h" #include "src/core/lib/surface/call.h" static void recv_message_ready(void* user_data, grpc_error_handle error); diff --git a/src/core/ext/filters/message_size/message_size_filter.h b/src/core/ext/filters/message_size/message_size_filter.h index b196534394f..ec011f50498 100644 --- a/src/core/ext/filters/message_size/message_size_filter.h +++ b/src/core/ext/filters/message_size/message_size_filter.h @@ -19,8 +19,8 @@ #include -#include "src/core/ext/service_config/service_config_parser.h" #include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/service_config/service_config_parser.h" extern const grpc_channel_filter grpc_message_size_filter; diff --git a/src/core/ext/filters/rbac/rbac_filter.cc b/src/core/ext/filters/rbac/rbac_filter.cc index 5cac6cd462d..1435a049e20 100644 --- a/src/core/ext/filters/rbac/rbac_filter.cc +++ b/src/core/ext/filters/rbac/rbac_filter.cc @@ -19,8 +19,8 @@ #include "src/core/ext/filters/rbac/rbac_filter.h" #include "src/core/ext/filters/rbac/rbac_service_config_parser.h" -#include "src/core/ext/service_config/service_config_call_data.h" #include "src/core/lib/security/authorization/grpc_authorization_engine.h" +#include "src/core/lib/service_config/service_config_call_data.h" #include "src/core/lib/transport/metadata_batch.h" namespace grpc_core { diff --git a/src/core/ext/filters/rbac/rbac_service_config_parser.h b/src/core/ext/filters/rbac/rbac_service_config_parser.h index 35811f315c9..96fbec636bb 100644 --- a/src/core/ext/filters/rbac/rbac_service_config_parser.h +++ b/src/core/ext/filters/rbac/rbac_service_config_parser.h @@ -21,8 +21,8 @@ #include -#include "src/core/ext/service_config/service_config_parser.h" #include "src/core/lib/security/authorization/grpc_authorization_engine.h" +#include "src/core/lib/service_config/service_config_parser.h" namespace grpc_core { diff --git a/src/core/ext/filters/server_config_selector/server_config_selector.h b/src/core/ext/filters/server_config_selector/server_config_selector.h index 06c121f989b..8f8951be91e 100644 --- a/src/core/ext/filters/server_config_selector/server_config_selector.h +++ b/src/core/ext/filters/server_config_selector/server_config_selector.h @@ -21,8 +21,8 @@ #include "absl/status/statusor.h" -#include "src/core/ext/service_config/service_config.h" #include "src/core/lib/gprpp/dual_ref_counted.h" +#include "src/core/lib/service_config/service_config.h" #include "src/core/lib/transport/metadata_batch.h" namespace grpc_core { diff --git a/src/core/ext/filters/server_config_selector/server_config_selector_filter.cc b/src/core/ext/filters/server_config_selector/server_config_selector_filter.cc index ff6a0a68929..8954391cc4d 100644 --- a/src/core/ext/filters/server_config_selector/server_config_selector_filter.cc +++ b/src/core/ext/filters/server_config_selector/server_config_selector_filter.cc @@ -21,7 +21,7 @@ #include "src/core/ext/filters/server_config_selector/server_config_selector_filter.h" #include "src/core/ext/filters/server_config_selector/server_config_selector.h" -#include "src/core/ext/service_config/service_config_call_data.h" +#include "src/core/lib/service_config/service_config_call_data.h" #include "src/core/lib/transport/error_utils.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.cc b/src/core/ext/transport/chttp2/client/insecure/channel_create.cc index 66129d92b36..575a2b12bb7 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.cc @@ -23,9 +23,9 @@ #include #include "src/core/ext/filters/client_channel/client_channel.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/ext/transport/chttp2/client/chttp2_connector.h" #include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/resolver/resolver_registry.h" #include "src/core/lib/resource_quota/api.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc index c5fb03b82b1..9f42561669c 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc @@ -23,11 +23,11 @@ #include #include "src/core/ext/filters/client_channel/client_channel.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/ext/transport/chttp2/client/chttp2_connector.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/memory.h" +#include "src/core/lib/resolver/resolver_registry.h" #include "src/core/lib/resource_quota/api.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" diff --git a/src/core/ext/xds/xds_api.cc b/src/core/ext/xds/xds_api.cc index 85e14b265ec..6f885e18b4e 100644 --- a/src/core/ext/xds/xds_api.cc +++ b/src/core/ext/xds/xds_api.cc @@ -49,6 +49,7 @@ #include "src/core/ext/xds/xds_common_types.h" #include "src/core/ext/xds/xds_resource_type.h" #include "src/core/ext/xds/xds_routing.h" +#include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/gpr/env.h" #include "src/core/lib/gpr/string.h" diff --git a/src/core/ext/xds/xds_api.h b/src/core/ext/xds/xds_api.h index ccc3a3fb087..5e57c313425 100644 --- a/src/core/ext/xds/xds_api.h +++ b/src/core/ext/xds/xds_api.h @@ -31,6 +31,10 @@ #include "src/core/ext/xds/upb_utils.h" #include "src/core/ext/xds/xds_bootstrap.h" #include "src/core/ext/xds/xds_client_stats.h" +#include "src/core/ext/xds/xds_http_filters.h" +#include "src/core/lib/channel/status_util.h" +#include "src/core/lib/matchers/matchers.h" +#include "src/core/lib/resolver/server_address.h" namespace grpc_core { diff --git a/src/core/ext/xds/xds_endpoint.cc b/src/core/ext/xds/xds_endpoint.cc index 5bf9530cea8..c9e43d546eb 100644 --- a/src/core/ext/xds/xds_endpoint.cc +++ b/src/core/ext/xds/xds_endpoint.cc @@ -34,6 +34,7 @@ #include "upb/upb.hpp" #include "src/core/ext/xds/upb_utils.h" +#include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" namespace grpc_core { diff --git a/src/core/ext/xds/xds_endpoint.h b/src/core/ext/xds/xds_endpoint.h index 06ac4920563..e2125106428 100644 --- a/src/core/ext/xds/xds_endpoint.h +++ b/src/core/ext/xds/xds_endpoint.h @@ -26,11 +26,11 @@ #include "absl/container/inlined_vector.h" #include "envoy/config/endpoint/v3/endpoint.upbdefs.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/ext/xds/xds_client.h" #include "src/core/ext/xds/xds_client_stats.h" #include "src/core/ext/xds/xds_resource_type_impl.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/resolver/server_address.h" namespace grpc_core { diff --git a/src/core/ext/xds/xds_listener.cc b/src/core/ext/xds/xds_listener.cc index 2684cc721ce..6d1374023d5 100644 --- a/src/core/ext/xds/xds_listener.cc +++ b/src/core/ext/xds/xds_listener.cc @@ -37,6 +37,7 @@ #include "upb/upb.h" #include "upb/upb.hpp" +#include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/src/core/ext/xds/xds_server_config_fetcher.cc b/src/core/ext/xds/xds_server_config_fetcher.cc index a2fdc4aa06d..b1aed1cef90 100644 --- a/src/core/ext/xds/xds_server_config_fetcher.cc +++ b/src/core/ext/xds/xds_server_config_fetcher.cc @@ -29,6 +29,7 @@ #include "src/core/ext/xds/xds_listener.h" #include "src/core/ext/xds/xds_route_config.h" #include "src/core/ext/xds/xds_routing.h" +#include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/lib/address_utils/parse_address.cc b/src/core/lib/address_utils/parse_address.cc index c254d2eb194..340bab96829 100644 --- a/src/core/lib/address_utils/parse_address.cc +++ b/src/core/lib/address_utils/parse_address.cc @@ -37,6 +37,7 @@ #include #include +#include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/grpc_if_nametoindex.h" @@ -318,3 +319,22 @@ uint16_t grpc_strhtons(const char* port) { } return htons(static_cast(atoi(port))); } + +grpc_error_handle grpc_string_to_sockaddr(grpc_resolved_address* out, + const char* addr, int port) { + memset(out, 0, sizeof(grpc_resolved_address)); + grpc_sockaddr_in6* addr6 = reinterpret_cast(out->addr); + grpc_sockaddr_in* addr4 = reinterpret_cast(out->addr); + if (grpc_inet_pton(GRPC_AF_INET6, addr, &addr6->sin6_addr) == 1) { + addr6->sin6_family = GRPC_AF_INET6; + out->len = sizeof(grpc_sockaddr_in6); + } else if (grpc_inet_pton(GRPC_AF_INET, addr, &addr4->sin_addr) == 1) { + addr4->sin_family = GRPC_AF_INET; + out->len = sizeof(grpc_sockaddr_in); + } else { + return GRPC_ERROR_CREATE_FROM_CPP_STRING( + absl::StrCat("Failed to parse address:", addr)); + } + grpc_sockaddr_set_port(out, port); + return GRPC_ERROR_NONE; +} diff --git a/src/core/lib/address_utils/parse_address.h b/src/core/lib/address_utils/parse_address.h index 92409b7e813..4b18ed6d065 100644 --- a/src/core/lib/address_utils/parse_address.h +++ b/src/core/lib/address_utils/parse_address.h @@ -61,6 +61,11 @@ bool grpc_parse_ipv6_hostport(absl::string_view hostport, /* Converts named or numeric port to a uint16 suitable for use in a sockaddr. */ uint16_t grpc_strhtons(const char* port); +// Newer form of grpc_string_to_sockaddr which returns an error instead of +// crashing if \a addr is not IPv6/IPv6 +grpc_error_handle grpc_string_to_sockaddr(grpc_resolved_address* out, + const char* addr, int port); + namespace grpc_core { /** Populate \a resolved_addr to be a unix socket at |path| */ diff --git a/src/core/lib/address_utils/sockaddr_utils.cc b/src/core/lib/address_utils/sockaddr_utils.cc index 33afba1d726..ac84a14431b 100644 --- a/src/core/lib/address_utils/sockaddr_utils.cc +++ b/src/core/lib/address_utils/sockaddr_utils.cc @@ -29,16 +29,42 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" -#include #include #include #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/iomgr/event_engine/resolved_address_internal.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" -#include "src/core/lib/iomgr/unix_sockets_posix.h" + +#ifdef GRPC_HAVE_UNIX_SOCKET +#include +#endif + +#ifdef GRPC_HAVE_UNIX_SOCKET +static std::string grpc_sockaddr_to_uri_unix_if_possible( + const grpc_resolved_address* resolved_addr) { + const grpc_sockaddr* addr = + reinterpret_cast(resolved_addr->addr); + if (addr->sa_family != AF_UNIX) { + return ""; + } + const auto* unix_addr = reinterpret_cast(addr); + if (unix_addr->sun_path[0] == '\0' && unix_addr->sun_path[1] != '\0') { + return absl::StrCat( + "unix-abstract:", + absl::string_view( + unix_addr->sun_path + 1, + resolved_addr->len - sizeof(unix_addr->sun_family) - 1)); + } + return absl::StrCat("unix:", unix_addr->sun_path); +} +#else +static std::string grpc_sockaddr_to_uri_unix_if_possible( + const grpc_resolved_address* /* addr */) { + return ""; +} +#endif static const uint8_t kV4MappedPrefix[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff}; @@ -200,25 +226,6 @@ std::string grpc_sockaddr_to_string(const grpc_resolved_address* resolved_addr, return out; } -grpc_error_handle grpc_string_to_sockaddr(grpc_resolved_address* out, - const char* addr, int port) { - memset(out, 0, sizeof(grpc_resolved_address)); - grpc_sockaddr_in6* addr6 = reinterpret_cast(out->addr); - grpc_sockaddr_in* addr4 = reinterpret_cast(out->addr); - if (grpc_inet_pton(GRPC_AF_INET6, addr, &addr6->sin6_addr) == 1) { - addr6->sin6_family = GRPC_AF_INET6; - out->len = sizeof(grpc_sockaddr_in6); - } else if (grpc_inet_pton(GRPC_AF_INET, addr, &addr4->sin_addr) == 1) { - addr4->sin_family = GRPC_AF_INET; - out->len = sizeof(grpc_sockaddr_in); - } else { - return GRPC_ERROR_CREATE_FROM_CPP_STRING( - absl::StrCat("Failed to parse address:", addr)); - } - grpc_sockaddr_set_port(out, port); - return GRPC_ERROR_NONE; -} - std::string grpc_sockaddr_to_uri(const grpc_resolved_address* resolved_addr) { if (resolved_addr->len == 0) return ""; grpc_resolved_address addr_normalized; @@ -269,10 +276,11 @@ int grpc_sockaddr_get_port(const grpc_resolved_address* resolved_addr) { case GRPC_AF_INET6: return grpc_ntohs( (reinterpret_cast(addr))->sin6_port); +#ifdef GRPC_HAVE_UNIX_SOCKET + case AF_UNIX: + return 1; +#endif default: - if (grpc_is_unix_socket(resolved_addr)) { - return 1; - } gpr_log(GPR_ERROR, "Unknown socket family %d in grpc_sockaddr_get_port", addr->sa_family); return 0; @@ -399,14 +407,3 @@ bool grpc_sockaddr_match_subnet(const grpc_resolved_address* address, } return false; } - -namespace grpc_event_engine { -namespace experimental { - -std::string ResolvedAddressToURI(const EventEngine::ResolvedAddress& addr) { - auto gra = CreateGRPCResolvedAddress(addr); - return grpc_sockaddr_to_uri(&gra); -} - -} // namespace experimental -} // namespace grpc_event_engine diff --git a/src/core/lib/address_utils/sockaddr_utils.h b/src/core/lib/address_utils/sockaddr_utils.h index cf29fe7035c..159fd661991 100644 --- a/src/core/lib/address_utils/sockaddr_utils.h +++ b/src/core/lib/address_utils/sockaddr_utils.h @@ -23,9 +23,7 @@ #include -#include - -#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/resolved_address.h" /* Returns true if addr is an IPv4-mapped IPv6 address within the ::ffff:0.0.0.0/96 range, or false otherwise. @@ -68,11 +66,6 @@ int grpc_sockaddr_set_port(grpc_resolved_address* addr, int port); std::string grpc_sockaddr_to_string(const grpc_resolved_address* addr, bool normalize) GRPC_MUST_USE_RESULT; -// Newer form of grpc_string_to_sockaddr which returns an error instead of -// crashing if \a addr is not IPv6/IPv6 -grpc_error_handle grpc_string_to_sockaddr(grpc_resolved_address* out, - const char* addr, int port); - /* Returns the URI string corresponding to \a addr */ std::string grpc_sockaddr_to_uri(const grpc_resolved_address* addr); @@ -99,12 +92,4 @@ bool grpc_sockaddr_match_subnet(const grpc_resolved_address* address, const grpc_resolved_address* subnet_address, uint32_t mask_bits); -namespace grpc_event_engine { -namespace experimental { - -std::string ResolvedAddressToURI(const EventEngine::ResolvedAddress& addr); - -} // namespace experimental -} // namespace grpc_event_engine - #endif /* GRPC_CORE_LIB_ADDRESS_UTILS_SOCKADDR_UTILS_H */ diff --git a/src/core/lib/channel/channel_args.cc b/src/core/lib/channel/channel_args.cc index fc4ea8b3a26..c0a55072503 100644 --- a/src/core/lib/channel/channel_args.cc +++ b/src/core/lib/channel/channel_args.cc @@ -30,7 +30,6 @@ #include "absl/strings/str_join.h" #include -#include #include #include #include diff --git a/src/core/lib/channel/channelz.cc b/src/core/lib/channel/channelz.cc index fa78e9895f4..cad4e8ece4a 100644 --- a/src/core/lib/channel/channelz.cc +++ b/src/core/lib/channel/channelz.cc @@ -34,6 +34,7 @@ #include #include +#include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channelz_registry.h" #include "src/core/lib/channel/status_util.h" diff --git a/src/core/lib/iomgr/event_engine/resolved_address_internal.cc b/src/core/lib/iomgr/event_engine/resolved_address_internal.cc index 561d91ed011..ef270593096 100644 --- a/src/core/lib/iomgr/event_engine/resolved_address_internal.cc +++ b/src/core/lib/iomgr/event_engine/resolved_address_internal.cc @@ -37,5 +37,11 @@ grpc_resolved_address CreateGRPCResolvedAddress( return grpc_addr; } +// TODO(ctiller): Move this to somewhere more permanent as we're deleting iomgr. +std::string ResolvedAddressToURI(const EventEngine::ResolvedAddress& addr) { + auto gra = CreateGRPCResolvedAddress(addr); + return grpc_sockaddr_to_uri(&gra); +} + } // namespace experimental } // namespace grpc_event_engine diff --git a/src/core/lib/iomgr/event_engine/resolved_address_internal.h b/src/core/lib/iomgr/event_engine/resolved_address_internal.h index ae794805250..27141f2bae1 100644 --- a/src/core/lib/iomgr/event_engine/resolved_address_internal.h +++ b/src/core/lib/iomgr/event_engine/resolved_address_internal.h @@ -29,6 +29,8 @@ EventEngine::ResolvedAddress CreateResolvedAddress( grpc_resolved_address CreateGRPCResolvedAddress( const EventEngine::ResolvedAddress& ra); +std::string ResolvedAddressToURI(const EventEngine::ResolvedAddress& addr); + } // namespace experimental } // namespace grpc_event_engine diff --git a/src/core/lib/iomgr/resolve_address.h b/src/core/lib/iomgr/resolve_address.h index 6fbf572c9c4..35774425b7f 100644 --- a/src/core/lib/iomgr/resolve_address.h +++ b/src/core/lib/iomgr/resolve_address.h @@ -26,25 +26,12 @@ #include "absl/status/statusor.h" #include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/iomgr/port.h" - -#ifdef GRPC_WINSOCK_SOCKET -#include -#endif - -#if defined(GRPC_POSIX_SOCKET) || defined(GRPC_CFSTREAM) -#include -#endif - #include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/iomgr/port.h" +#include "src/core/lib/iomgr/resolved_address.h" #define GRPC_MAX_SOCKADDR_SIZE 128 -struct grpc_resolved_address { - char addr[GRPC_MAX_SOCKADDR_SIZE]; - socklen_t len; -}; - namespace grpc_core { extern const char* kDefaultSecurePort; constexpr int kDefaultSecurePortInt = 443; diff --git a/src/core/lib/iomgr/resolved_address.h b/src/core/lib/iomgr/resolved_address.h new file mode 100644 index 00000000000..9ca8c262998 --- /dev/null +++ b/src/core/lib/iomgr/resolved_address.h @@ -0,0 +1,39 @@ +// Copyright 2021 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_CORE_LIB_IOMGR_RESOLVED_ADDRESS_H +#define GRPC_CORE_LIB_IOMGR_RESOLVED_ADDRESS_H + +#include + +#include + +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_WINSOCK_SOCKET +#include +#endif + +#if defined(GRPC_POSIX_SOCKET) || defined(GRPC_CFSTREAM) +#include +#endif + +#define GRPC_MAX_SOCKADDR_SIZE 128 + +struct grpc_resolved_address { + char addr[GRPC_MAX_SOCKADDR_SIZE]; + socklen_t len; +}; + +#endif /* GRPC_CORE_LIB_IOMGR_RESOLVED_ADDRESS_H */ diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc index 7501596ecab..d0956db3ad0 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +++ b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc @@ -26,6 +26,7 @@ #include #include #include +#include #include diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc index 0a8cb7ae451..451ecbcf3d1 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +++ b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc @@ -26,6 +26,7 @@ #include #include #include +#include #include diff --git a/src/core/lib/iomgr/unix_sockets_posix.cc b/src/core/lib/iomgr/unix_sockets_posix.cc index bf7e5e9788b..e8776f6afc1 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.cc +++ b/src/core/lib/iomgr/unix_sockets_posix.cc @@ -93,22 +93,4 @@ void grpc_unlink_if_unix_domain_socket( } } -std::string grpc_sockaddr_to_uri_unix_if_possible( - const grpc_resolved_address* resolved_addr) { - const grpc_sockaddr* addr = - reinterpret_cast(resolved_addr->addr); - if (addr->sa_family != AF_UNIX) { - return ""; - } - const auto* unix_addr = reinterpret_cast(addr); - if (unix_addr->sun_path[0] == '\0' && unix_addr->sun_path[1] != '\0') { - return absl::StrCat( - "unix-abstract:", - absl::string_view( - unix_addr->sun_path + 1, - resolved_addr->len - sizeof(unix_addr->sun_family) - 1)); - } - return absl::StrCat("unix:", unix_addr->sun_path); -} - #endif diff --git a/src/core/lib/iomgr/unix_sockets_posix.h b/src/core/lib/iomgr/unix_sockets_posix.h index 3af73ff76c4..701b836da1c 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.h +++ b/src/core/lib/iomgr/unix_sockets_posix.h @@ -43,7 +43,4 @@ int grpc_is_unix_socket(const grpc_resolved_address* resolved_addr); void grpc_unlink_if_unix_domain_socket( const grpc_resolved_address* resolved_addr); -std::string grpc_sockaddr_to_uri_unix_if_possible( - const grpc_resolved_address* resolved_addr); - #endif /* GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H */ diff --git a/src/core/lib/iomgr/unix_sockets_posix_noop.cc b/src/core/lib/iomgr/unix_sockets_posix_noop.cc index f4dd2041287..492d04ac09a 100644 --- a/src/core/lib/iomgr/unix_sockets_posix_noop.cc +++ b/src/core/lib/iomgr/unix_sockets_posix_noop.cc @@ -50,9 +50,4 @@ int grpc_is_unix_socket(const grpc_resolved_address* /* addr */) { void grpc_unlink_if_unix_domain_socket( const grpc_resolved_address* /* addr */) {} -std::string grpc_sockaddr_to_uri_unix_if_possible( - const grpc_resolved_address* /* addr */) { - return ""; -} - #endif diff --git a/src/core/ext/filters/client_channel/resolver.cc b/src/core/lib/resolver/resolver.cc similarity index 97% rename from src/core/ext/filters/client_channel/resolver.cc rename to src/core/lib/resolver/resolver.cc index c6b251c91b3..e43e97b4a2f 100644 --- a/src/core/ext/filters/client_channel/resolver.cc +++ b/src/core/lib/resolver/resolver.cc @@ -18,7 +18,7 @@ #include -#include "src/core/ext/filters/client_channel/resolver.h" +#include "src/core/lib/resolver/resolver.h" grpc_core::DebugOnlyTraceFlag grpc_trace_resolver_refcount(false, "resolver_refcount"); diff --git a/src/core/ext/filters/client_channel/resolver.h b/src/core/lib/resolver/resolver.h similarity index 92% rename from src/core/ext/filters/client_channel/resolver.h rename to src/core/lib/resolver/resolver.h index f9400b91d51..f3e35eb68c6 100644 --- a/src/core/ext/filters/client_channel/resolver.h +++ b/src/core/lib/resolver/resolver.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_H -#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_H +#ifndef GRPC_CORE_LIB_RESOLVER_RESOLVER_H +#define GRPC_CORE_LIB_RESOLVER_RESOLVER_H #include @@ -23,12 +23,10 @@ #include -#include "src/core/ext/filters/client_channel/server_address.h" -#include "src/core/ext/service_config/service_config.h" #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/iomgr/iomgr.h" -#include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/server_address.h" +#include "src/core/lib/service_config/service_config.h" extern grpc_core::DebugOnlyTraceFlag grpc_trace_resolver_refcount; @@ -134,4 +132,4 @@ class Resolver : public InternallyRefCounted { } // namespace grpc_core -#endif // GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_H +#endif // GRPC_CORE_LIB_RESOLVER_RESOLVER_H diff --git a/src/core/ext/filters/client_channel/resolver_factory.h b/src/core/lib/resolver/resolver_factory.h similarity index 83% rename from src/core/ext/filters/client_channel/resolver_factory.h rename to src/core/lib/resolver/resolver_factory.h index ef958ab45b1..ccfee572bca 100644 --- a/src/core/ext/filters/client_channel/resolver_factory.h +++ b/src/core/lib/resolver/resolver_factory.h @@ -16,8 +16,8 @@ * */ -#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FACTORY_H -#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FACTORY_H +#ifndef GRPC_CORE_LIB_RESOLVER_RESOLVER_FACTORY_H +#define GRPC_CORE_LIB_RESOLVER_RESOLVER_FACTORY_H #include @@ -25,14 +25,19 @@ #include -#include "src/core/ext/filters/client_channel/resolver.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/resolver/resolver.h" #include "src/core/lib/uri/uri_parser.h" +typedef struct grpc_pollset_set grpc_pollset_set; + namespace grpc_core { +// TODO(yashkt): Move WorkSerializer to its own Bazel target, depend on that +// target from this one, and remove this forward declaration. +class WorkSerializer; + struct ResolverArgs { /// The parsed URI to resolve. URI uri; @@ -72,4 +77,4 @@ class ResolverFactory { } // namespace grpc_core -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FACTORY_H */ +#endif /* GRPC_CORE_LIB_RESOLVER_RESOLVER_FACTORY_H */ diff --git a/src/core/ext/filters/client_channel/resolver_registry.cc b/src/core/lib/resolver/resolver_registry.cc similarity index 98% rename from src/core/ext/filters/client_channel/resolver_registry.cc rename to src/core/lib/resolver/resolver_registry.cc index a7f3dd33540..d563d28d8c5 100644 --- a/src/core/ext/filters/client_channel/resolver_registry.cc +++ b/src/core/lib/resolver/resolver_registry.cc @@ -18,11 +18,12 @@ #include -#include "src/core/ext/filters/client_channel/resolver_registry.h" +#include "src/core/lib/resolver/resolver_registry.h" #include -#include "absl/container/inlined_vector.h" +#include + #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" diff --git a/src/core/ext/filters/client_channel/resolver_registry.h b/src/core/lib/resolver/resolver_registry.h similarity index 91% rename from src/core/ext/filters/client_channel/resolver_registry.h rename to src/core/lib/resolver/resolver_registry.h index 26f8ea288d8..c6a0361cdd8 100644 --- a/src/core/ext/filters/client_channel/resolver_registry.h +++ b/src/core/lib/resolver/resolver_registry.h @@ -16,15 +16,14 @@ * */ -#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_REGISTRY_H -#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_REGISTRY_H +#ifndef GRPC_CORE_LIB_RESOLVER_RESOLVER_REGISTRY_H +#define GRPC_CORE_LIB_RESOLVER_RESOLVER_REGISTRY_H #include -#include "src/core/ext/filters/client_channel/resolver_factory.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/resolver/resolver_factory.h" namespace grpc_core { @@ -85,4 +84,4 @@ class ResolverRegistry { } // namespace grpc_core -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_REGISTRY_H */ +#endif /* GRPC_CORE_LIB_RESOLVER_RESOLVER_REGISTRY_H */ diff --git a/src/core/ext/filters/client_channel/server_address.cc b/src/core/lib/resolver/server_address.cc similarity index 98% rename from src/core/ext/filters/client_channel/server_address.cc rename to src/core/lib/resolver/server_address.cc index e082256b97b..aa9bfeeaf54 100644 --- a/src/core/ext/filters/client_channel/server_address.cc +++ b/src/core/lib/resolver/server_address.cc @@ -18,7 +18,7 @@ #include -#include "src/core/ext/filters/client_channel/server_address.h" +#include "src/core/lib/resolver/server_address.h" #include #include diff --git a/src/core/ext/filters/client_channel/server_address.h b/src/core/lib/resolver/server_address.h similarity index 94% rename from src/core/ext/filters/client_channel/server_address.h rename to src/core/lib/resolver/server_address.h index 58697521533..db1c456ab9d 100644 --- a/src/core/ext/filters/client_channel/server_address.h +++ b/src/core/lib/resolver/server_address.h @@ -16,8 +16,8 @@ * */ -#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SERVER_ADDRESS_H -#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SERVER_ADDRESS_H +#ifndef GRPC_CORE_LIB_RESOLVER_SERVER_ADDRESS_H +#define GRPC_CORE_LIB_RESOLVER_SERVER_ADDRESS_H #include @@ -29,7 +29,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/useful.h" -#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/resolved_address.h" namespace grpc_core { @@ -141,4 +141,4 @@ class ServerAddressWeightAttribute : public ServerAddress::AttributeInterface { } // namespace grpc_core -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SERVER_ADDRESS_H */ +#endif /* GRPC_CORE_LIB_RESOLVER_SERVER_ADDRESS_H */ diff --git a/src/core/lib/security/authorization/matchers.cc b/src/core/lib/security/authorization/matchers.cc index 3d5f70c5a80..e5c8739b444 100644 --- a/src/core/lib/security/authorization/matchers.cc +++ b/src/core/lib/security/authorization/matchers.cc @@ -18,6 +18,7 @@ #include +#include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" namespace grpc_core { diff --git a/src/core/ext/service_config/service_config.cc b/src/core/lib/service_config/service_config.cc similarity index 98% rename from src/core/ext/service_config/service_config.cc rename to src/core/lib/service_config/service_config.cc index 643b175b506..1ab2a251481 100644 --- a/src/core/ext/service_config/service_config.cc +++ b/src/core/lib/service_config/service_config.cc @@ -16,7 +16,7 @@ #include -#include "src/core/ext/service_config/service_config.h" +#include "src/core/lib/service_config/service_config.h" #include @@ -24,8 +24,8 @@ #include -#include "src/core/ext/service_config/service_config_parser.h" #include "src/core/lib/json/json.h" +#include "src/core/lib/service_config/service_config_parser.h" #include "src/core/lib/slice/slice_internal.h" namespace grpc_core { diff --git a/src/core/ext/service_config/service_config.h b/src/core/lib/service_config/service_config.h similarity index 95% rename from src/core/ext/service_config/service_config.h rename to src/core/lib/service_config/service_config.h index 0fc49beffe8..9f4a1db5de3 100644 --- a/src/core/ext/service_config/service_config.h +++ b/src/core/lib/service_config/service_config.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_CORE_EXT_SERVICE_CONFIG_SERVICE_CONFIG_H -#define GRPC_CORE_EXT_SERVICE_CONFIG_SERVICE_CONFIG_H +#ifndef GRPC_CORE_LIB_SERVICE_CONFIG_SERVICE_CONFIG_H +#define GRPC_CORE_LIB_SERVICE_CONFIG_SERVICE_CONFIG_H #include @@ -26,11 +26,11 @@ #include #include -#include "src/core/ext/service_config/service_config_parser.h" #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/json/json.h" +#include "src/core/lib/service_config/service_config_parser.h" #include "src/core/lib/slice/slice_internal.h" // The main purpose of the code here is to parse the service config in @@ -124,4 +124,4 @@ class ServiceConfig : public RefCounted { } // namespace grpc_core -#endif /* GRPC_CORE_EXT_SERVICE_CONFIG_SERVICE_CONFIG_H */ +#endif /* GRPC_CORE_LIB_SERVICE_CONFIG_SERVICE_CONFIG_H */ diff --git a/src/core/ext/service_config/service_config_call_data.h b/src/core/lib/service_config/service_config_call_data.h similarity index 87% rename from src/core/ext/service_config/service_config_call_data.h rename to src/core/lib/service_config/service_config_call_data.h index 0d3d09d0c3a..8d5041e1504 100644 --- a/src/core/ext/service_config/service_config_call_data.h +++ b/src/core/lib/service_config/service_config_call_data.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_CORE_EXT_SERVICE_CONFIG_SERVICE_CONFIG_CALL_DATA_H -#define GRPC_CORE_EXT_SERVICE_CONFIG_SERVICE_CONFIG_CALL_DATA_H +#ifndef GRPC_CORE_LIB_SERVICE_CONFIG_SERVICE_CONFIG_CALL_DATA_H +#define GRPC_CORE_LIB_SERVICE_CONFIG_SERVICE_CONFIG_CALL_DATA_H #include @@ -23,10 +23,10 @@ #include "absl/strings/string_view.h" -#include "src/core/ext/service_config/service_config.h" -#include "src/core/ext/service_config/service_config_parser.h" #include "src/core/lib/channel/context.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/service_config/service_config.h" +#include "src/core/lib/service_config/service_config_parser.h" namespace grpc_core { @@ -69,4 +69,4 @@ class ServiceConfigCallData { } // namespace grpc_core -#endif /* GRPC_CORE_EXT_SERVICE_CONFIG_SERVICE_CONFIG_CALL_DATA_H */ +#endif /* GRPC_CORE_LIB_SERVICE_CONFIG_SERVICE_CONFIG_CALL_DATA_H */ diff --git a/src/core/ext/service_config/service_config_parser.cc b/src/core/lib/service_config/service_config_parser.cc similarity index 98% rename from src/core/ext/service_config/service_config_parser.cc rename to src/core/lib/service_config/service_config_parser.cc index f649fd77682..edd8dfc86d9 100644 --- a/src/core/ext/service_config/service_config_parser.cc +++ b/src/core/lib/service_config/service_config_parser.cc @@ -16,7 +16,7 @@ #include -#include "src/core/ext/service_config/service_config_parser.h" +#include "src/core/lib/service_config/service_config_parser.h" #include diff --git a/src/core/ext/service_config/service_config_parser.h b/src/core/lib/service_config/service_config_parser.h similarity index 94% rename from src/core/ext/service_config/service_config_parser.h rename to src/core/lib/service_config/service_config_parser.h index 522ca413857..b1e664db05b 100644 --- a/src/core/ext/service_config/service_config_parser.h +++ b/src/core/lib/service_config/service_config_parser.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_CORE_EXT_SERVICE_CONFIG_SERVICE_CONFIG_PARSER_H -#define GRPC_CORE_EXT_SERVICE_CONFIG_SERVICE_CONFIG_PARSER_H +#ifndef GRPC_CORE_LIB_SERVICE_CONFIG_SERVICE_CONFIG_PARSER_H +#define GRPC_CORE_LIB_SERVICE_CONFIG_SERVICE_CONFIG_PARSER_H #include @@ -94,4 +94,4 @@ class ServiceConfigParser { } // namespace grpc_core -#endif /* GRPC_CORE_EXT_SERVICE_CONFIG_SERVICE_CONFIG_PARSER_H */ +#endif /* GRPC_CORE_LIB_SERVICE_CONFIG_SERVICE_CONFIG_PARSER_H */ diff --git a/src/cpp/common/validate_service_config.cc b/src/cpp/common/validate_service_config.cc index 86172d9d401..a86a2c2b305 100644 --- a/src/cpp/common/validate_service_config.cc +++ b/src/cpp/common/validate_service_config.cc @@ -19,7 +19,7 @@ #include #include -#include "src/core/ext/service_config/service_config.h" +#include "src/core/lib/service_config/service_config.h" namespace grpc { namespace experimental { diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/iomgr.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/iomgr.pxd.pxi index 5f4a51f76f0..54174b3c13b 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/iomgr.pxd.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/iomgr.pxd.pxi @@ -124,7 +124,9 @@ cdef extern from "src/core/lib/address_utils/sockaddr_utils.h": int grpc_sockaddr_get_port(const grpc_resolved_address *addr); cppstring grpc_sockaddr_to_string(const grpc_resolved_address *addr, bool_t normalize); - grpc_error_handle grpc_string_to_sockaddr(grpc_resolved_address *out, char* addr, int port); int grpc_sockaddr_set_port(const grpc_resolved_address *resolved_addr, int port) const char* grpc_sockaddr_get_uri_scheme(const grpc_resolved_address* resolved_addr) + +cdef extern from "src/core/lib/address_utils/parse_address.h": + grpc_error_handle grpc_string_to_sockaddr(grpc_resolved_address *out, char* addr, int port); diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index f994fcdfac2..5283f179b24 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -51,7 +51,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/client_channel/lb_policy_registry.cc', 'src/core/ext/filters/client_channel/local_subchannel_pool.cc', 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc', - 'src/core/ext/filters/client_channel/resolver.cc', 'src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc', @@ -67,12 +66,10 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc', 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc', 'src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc', - 'src/core/ext/filters/client_channel/resolver_registry.cc', 'src/core/ext/filters/client_channel/resolver_result_parsing.cc', 'src/core/ext/filters/client_channel/retry_filter.cc', 'src/core/ext/filters/client_channel/retry_service_config.cc', 'src/core/ext/filters/client_channel/retry_throttle.cc', - 'src/core/ext/filters/client_channel/server_address.cc', 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', @@ -93,8 +90,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/rbac/rbac_service_config_parser.cc', 'src/core/ext/filters/server_config_selector/server_config_selector.cc', 'src/core/ext/filters/server_config_selector/server_config_selector_filter.cc', - 'src/core/ext/service_config/service_config.cc', - 'src/core/ext/service_config/service_config_parser.cc', 'src/core/ext/transport/chttp2/alpn/alpn.cc', 'src/core/ext/transport/chttp2/client/chttp2_connector.cc', 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc', @@ -534,6 +529,9 @@ CORE_SOURCE_FILES = [ 'src/core/lib/profiling/basic_timers.cc', 'src/core/lib/profiling/stap_timers.cc', 'src/core/lib/promise/activity.cc', + 'src/core/lib/resolver/resolver.cc', + 'src/core/lib/resolver/resolver_registry.cc', + 'src/core/lib/resolver/server_address.cc', 'src/core/lib/resource_quota/api.cc', 'src/core/lib/resource_quota/arena.cc', 'src/core/lib/resource_quota/memory_quota.cc', @@ -599,6 +597,8 @@ CORE_SOURCE_FILES = [ 'src/core/lib/security/transport/server_auth_filter.cc', 'src/core/lib/security/transport/tsi_error.cc', 'src/core/lib/security/util/json_util.cc', + 'src/core/lib/service_config/service_config.cc', + 'src/core/lib/service_config/service_config_parser.cc', 'src/core/lib/slice/b64.cc', 'src/core/lib/slice/percent_encoding.cc', 'src/core/lib/slice/slice.cc', diff --git a/test/core/address_utils/sockaddr_utils_test.cc b/test/core/address_utils/sockaddr_utils_test.cc index 33c728bf4b5..1efff70ed49 100644 --- a/test/core/address_utils/sockaddr_utils_test.cc +++ b/test/core/address_utils/sockaddr_utils_test.cc @@ -23,9 +23,11 @@ #include +#include #include #include +#include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" #include "test/core/util/test_config.h" diff --git a/test/core/client_channel/resolvers/binder_resolver_test.cc b/test/core/client_channel/resolvers/binder_resolver_test.cc index 30b12b3d5ea..3e7ddc288ad 100644 --- a/test/core/client_channel/resolvers/binder_resolver_test.cc +++ b/test/core/client_channel/resolvers/binder_resolver_test.cc @@ -28,8 +28,9 @@ #include #include -#include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/resolver/resolver_registry.h" // Registers the factory with `grpc_core::ResolverRegistry`. Defined in // binder_resolver.cc diff --git a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc index 13e0d436c70..b8ae31fd6e8 100644 --- a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc +++ b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc @@ -21,15 +21,15 @@ #include #include -#include "src/core/ext/filters/client_channel/resolver.h" #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/resolve_address_impl.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/resolver.h" +#include "src/core/lib/resolver/resolver_registry.h" +#include "src/core/lib/resolver/server_address.h" #include "test/core/util/test_config.h" static gpr_mu g_mu; diff --git a/test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc b/test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc index 7c49b4ec02d..6a8923755fb 100644 --- a/test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc +++ b/test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc @@ -23,13 +23,13 @@ #include #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/resolver_registry.h" +#include "src/core/lib/resolver/server_address.h" #include "test/core/util/test_config.h" constexpr int kMinResolutionPeriodMs = 1000; diff --git a/test/core/client_channel/resolvers/dns_resolver_test.cc b/test/core/client_channel/resolvers/dns_resolver_test.cc index d7e5c49e8d6..4752463ff8c 100644 --- a/test/core/client_channel/resolvers/dns_resolver_test.cc +++ b/test/core/client_channel/resolvers/dns_resolver_test.cc @@ -23,10 +23,10 @@ #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" #include "src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/resolver_registry.h" #include "test/core/util/test_config.h" static std::shared_ptr* g_work_serializer; diff --git a/test/core/client_channel/resolvers/fake_resolver_test.cc b/test/core/client_channel/resolvers/fake_resolver_test.cc index ae8ed5ac3c9..8f3c837bbe6 100644 --- a/test/core/client_channel/resolvers/fake_resolver_test.cc +++ b/test/core/client_channel/resolvers/fake_resolver_test.cc @@ -27,12 +27,12 @@ #include #include -#include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/resolver_registry.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "test/core/util/test_config.h" diff --git a/test/core/client_channel/resolvers/sockaddr_resolver_test.cc b/test/core/client_channel/resolvers/sockaddr_resolver_test.cc index 53543483b86..07d8af282ee 100644 --- a/test/core/client_channel/resolvers/sockaddr_resolver_test.cc +++ b/test/core/client_channel/resolvers/sockaddr_resolver_test.cc @@ -23,9 +23,9 @@ #include #include -#include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/resolver_registry.h" #include "test/core/util/test_config.h" static std::shared_ptr* g_work_serializer; diff --git a/test/core/client_channel/rls_lb_config_parser_test.cc b/test/core/client_channel/rls_lb_config_parser_test.cc index 2b69bff8b82..98b77fba9f6 100644 --- a/test/core/client_channel/rls_lb_config_parser_test.cc +++ b/test/core/client_channel/rls_lb_config_parser_test.cc @@ -19,8 +19,8 @@ #include -#include "src/core/ext/service_config/service_config.h" #include "src/core/lib/gpr/env.h" +#include "src/core/lib/service_config/service_config.h" #include "test/core/util/test_config.h" // A regular expression to enter referenced or child errors. diff --git a/test/core/client_channel/service_config_test.cc b/test/core/client_channel/service_config_test.cc index c916dcb381f..d0128193248 100644 --- a/test/core/client_channel/service_config_test.cc +++ b/test/core/client_channel/service_config_test.cc @@ -16,7 +16,7 @@ * */ -#include "src/core/ext/service_config/service_config.h" +#include "src/core/lib/service_config/service_config.h" #include #include @@ -28,8 +28,8 @@ #include "src/core/ext/filters/client_channel/resolver_result_parsing.h" #include "src/core/ext/filters/client_channel/retry_service_config.h" #include "src/core/ext/filters/message_size/message_size_filter.h" -#include "src/core/ext/service_config/service_config_parser.h" #include "src/core/lib/gpr/string.h" +#include "src/core/lib/service_config/service_config_parser.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/fuzzers/api_fuzzer.cc b/test/core/end2end/fuzzers/api_fuzzer.cc index 8e788ee1683..a6a46db8466 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.cc +++ b/test/core/end2end/fuzzers/api_fuzzer.cc @@ -25,7 +25,6 @@ #include #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/env.h" @@ -34,6 +33,7 @@ #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/iomgr/timer_manager.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/server.h" diff --git a/test/core/end2end/goaway_server_test.cc b/test/core/end2end/goaway_server_test.cc index bc804f84db8..df41aa3ead0 100644 --- a/test/core/end2end/goaway_server_test.cc +++ b/test/core/end2end/goaway_server_test.cc @@ -27,11 +27,11 @@ #include #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/resolve_address_impl.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" +#include "src/core/lib/resolver/server_address.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc b/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc index d97921ef90e..446414aaf61 100644 --- a/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc +++ b/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc @@ -18,7 +18,7 @@ #include #include -#include "src/core/ext/service_config/service_config.h" +#include "src/core/lib/service_config/service_config.h" #include "test/core/util/test_config.h" // A regular expression to enter referenced or child errors. diff --git a/test/core/surface/channel_create_test.cc b/test/core/surface/channel_create_test.cc index 5f109c0f840..776f4c9dd59 100644 --- a/test/core/surface/channel_create_test.cc +++ b/test/core/surface/channel_create_test.cc @@ -21,8 +21,8 @@ #include #include -#include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/resolver/resolver_registry.h" #include "src/core/lib/surface/channel.h" #include "test/core/util/test_config.h" diff --git a/test/core/surface/secure_channel_create_test.cc b/test/core/surface/secure_channel_create_test.cc index 97a7337b5fd..54e3aee5d9b 100644 --- a/test/core/surface/secure_channel_create_test.cc +++ b/test/core/surface/secure_channel_create_test.cc @@ -22,7 +22,7 @@ #include #include -#include "src/core/ext/filters/client_channel/resolver_registry.h" +#include "src/core/lib/resolver/resolver_registry.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/surface/channel.h" diff --git a/test/cpp/client/client_channel_stress_test.cc b/test/cpp/client/client_channel_stress_test.cc index 24c919083fa..ac5cc543e31 100644 --- a/test/cpp/client/client_channel_stress_test.cc +++ b/test/cpp/client/client_channel_stress_test.cc @@ -40,11 +40,11 @@ #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/resolver/server_address.h" #include "src/proto/grpc/lb/v1/load_balancer.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" diff --git a/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc b/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc index 7b5fa992ba4..cc577ae6f88 100644 --- a/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc +++ b/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc @@ -39,11 +39,11 @@ #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/resolver/server_address.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index e66d8709a67..8c0bf224f72 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -48,8 +48,6 @@ #include "src/core/ext/filters/client_channel/backup_poller.h" #include "src/core/ext/filters/client_channel/global_subchannel_pool.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" -#include "src/core/ext/filters/client_channel/server_address.h" -#include "src/core/ext/service_config/service_config.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" @@ -57,7 +55,9 @@ #include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/tcp_client.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" +#include "src/core/lib/service_config/service_config.h" #include "src/cpp/client/secure_credentials.h" #include "src/cpp/server/secure_server_credentials.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index 11b8115e188..036e08b4493 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -44,13 +44,13 @@ #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h" #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" -#include "src/core/ext/filters/client_channel/server_address.h" -#include "src/core/ext/service_config/service_config.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/gpr/env.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" +#include "src/core/lib/service_config/service_config.h" #include "src/cpp/client/secure_credentials.h" #include "src/cpp/server/secure_server_credentials.h" #include "src/proto/grpc/lb/v1/load_balancer.grpc.pb.h" diff --git a/test/cpp/end2end/service_config_end2end_test.cc b/test/cpp/end2end/service_config_end2end_test.cc index 2de452fa575..fe8b0a41e54 100644 --- a/test/cpp/end2end/service_config_end2end_test.cc +++ b/test/cpp/end2end/service_config_end2end_test.cc @@ -47,13 +47,13 @@ #include "src/core/ext/filters/client_channel/backup_poller.h" #include "src/core/ext/filters/client_channel/global_subchannel_pool.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/tcp_client.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/transport/error_utils.h" #include "src/cpp/client/secure_credentials.h" diff --git a/test/cpp/end2end/xds/xds_end2end_test.cc b/test/cpp/end2end/xds/xds_end2end_test.cc index deba1aa311f..5183cf8662f 100644 --- a/test/cpp/end2end/xds/xds_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_end2end_test.cc @@ -59,7 +59,6 @@ #include "src/core/ext/filters/client_channel/backup_poller.h" #include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/ext/xds/certificate_provider_registry.h" #include "src/core/ext/xds/xds_api.h" #include "src/core/ext/xds/xds_channel_args.h" @@ -76,6 +75,7 @@ #include "src/core/lib/gprpp/time_util.h" #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/cpp/client/secure_credentials.h" #include "src/cpp/server/secure_server_credentials.h" diff --git a/test/cpp/naming/address_sorting_test.cc b/test/cpp/naming/address_sorting_test.cc index 033d4553985..1f1456ab30c 100644 --- a/test/cpp/naming/address_sorting_test.cc +++ b/test/cpp/naming/address_sorting_test.cc @@ -32,11 +32,8 @@ #include #include "src/core/ext/filters/client_channel/client_channel.h" -#include "src/core/ext/filters/client_channel/resolver.h" #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" #include "src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/string.h" @@ -45,6 +42,9 @@ #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/resolver/resolver.h" +#include "src/core/lib/resolver/resolver_registry.h" +#include "src/core/lib/resolver/server_address.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" #include "test/cpp/util/subprocess.h" diff --git a/test/cpp/naming/cancel_ares_query_test.cc b/test/cpp/naming/cancel_ares_query_test.cc index c393a92c59c..7cd95d8301f 100644 --- a/test/cpp/naming/cancel_ares_query_test.cc +++ b/test/cpp/naming/cancel_ares_query_test.cc @@ -32,17 +32,18 @@ #include #include -#include "src/core/ext/filters/client_channel/resolver.h" #include "src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/stats.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/thd.h" +#include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/resolver.h" +#include "src/core/lib/resolver/resolver_registry.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/util/cmdline.h" #include "test/core/util/fake_udp_and_tcp_server.h" diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc index dd18ee074fc..65d07c56171 100644 --- a/test/cpp/naming/resolver_component_test.cc +++ b/test/cpp/naming/resolver_component_test.cc @@ -42,10 +42,7 @@ #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h" -#include "src/core/ext/filters/client_channel/resolver.h" #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" -#include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" @@ -57,6 +54,9 @@ #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/socket_utils.h" #include "src/core/lib/iomgr/work_serializer.h" +#include "src/core/lib/resolver/resolver.h" +#include "src/core/lib/resolver/resolver_registry.h" +#include "src/core/lib/resolver/server_address.h" #include "test/core/util/fake_udp_and_tcp_server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index fdb68061cca..8d1f006e001 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1117,8 +1117,6 @@ src/core/ext/filters/client_channel/local_subchannel_pool.h \ src/core/ext/filters/client_channel/proxy_mapper.h \ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \ src/core/ext/filters/client_channel/proxy_mapper_registry.h \ -src/core/ext/filters/client_channel/resolver.cc \ -src/core/ext/filters/client_channel/resolver.h \ src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h \ @@ -1139,9 +1137,6 @@ src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc \ src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc \ src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc \ src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h \ -src/core/ext/filters/client_channel/resolver_factory.h \ -src/core/ext/filters/client_channel/resolver_registry.cc \ -src/core/ext/filters/client_channel/resolver_registry.h \ src/core/ext/filters/client_channel/resolver_result_parsing.cc \ src/core/ext/filters/client_channel/resolver_result_parsing.h \ src/core/ext/filters/client_channel/retry_filter.cc \ @@ -1150,8 +1145,6 @@ src/core/ext/filters/client_channel/retry_service_config.cc \ src/core/ext/filters/client_channel/retry_service_config.h \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/retry_throttle.h \ -src/core/ext/filters/client_channel/server_address.cc \ -src/core/ext/filters/client_channel/server_address.h \ src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel.h \ @@ -1190,11 +1183,6 @@ src/core/ext/filters/server_config_selector/server_config_selector.cc \ src/core/ext/filters/server_config_selector/server_config_selector.h \ src/core/ext/filters/server_config_selector/server_config_selector_filter.cc \ src/core/ext/filters/server_config_selector/server_config_selector_filter.h \ -src/core/ext/service_config/service_config.cc \ -src/core/ext/service_config/service_config.h \ -src/core/ext/service_config/service_config_call_data.h \ -src/core/ext/service_config/service_config_parser.cc \ -src/core/ext/service_config/service_config_parser.h \ src/core/ext/transport/binder/client/binder_connector.cc \ src/core/ext/transport/binder/client/binder_connector.h \ src/core/ext/transport/binder/client/channel_create.cc \ @@ -2012,6 +2000,7 @@ src/core/lib/iomgr/resolve_address_posix.cc \ src/core/lib/iomgr/resolve_address_posix.h \ src/core/lib/iomgr/resolve_address_windows.cc \ src/core/lib/iomgr/resolve_address_windows.h \ +src/core/lib/iomgr/resolved_address.h \ src/core/lib/iomgr/sockaddr.h \ src/core/lib/iomgr/sockaddr_posix.h \ src/core/lib/iomgr/sockaddr_windows.h \ @@ -2097,6 +2086,13 @@ src/core/lib/promise/map.h \ src/core/lib/promise/poll.h \ src/core/lib/promise/race.h \ src/core/lib/promise/seq.h \ +src/core/lib/resolver/resolver.cc \ +src/core/lib/resolver/resolver.h \ +src/core/lib/resolver/resolver_factory.h \ +src/core/lib/resolver/resolver_registry.cc \ +src/core/lib/resolver/resolver_registry.h \ +src/core/lib/resolver/server_address.cc \ +src/core/lib/resolver/server_address.h \ src/core/lib/resource_quota/api.cc \ src/core/lib/resource_quota/api.h \ src/core/lib/resource_quota/arena.cc \ @@ -2219,6 +2215,11 @@ src/core/lib/security/transport/tsi_error.cc \ src/core/lib/security/transport/tsi_error.h \ src/core/lib/security/util/json_util.cc \ src/core/lib/security/util/json_util.h \ +src/core/lib/service_config/service_config.cc \ +src/core/lib/service_config/service_config.h \ +src/core/lib/service_config/service_config_call_data.h \ +src/core/lib/service_config/service_config_parser.cc \ +src/core/lib/service_config/service_config_parser.h \ src/core/lib/slice/b64.cc \ src/core/lib/slice/b64.h \ src/core/lib/slice/percent_encoding.cc \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 6d3408142c7..d136a0c95e3 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -937,8 +937,6 @@ src/core/ext/filters/client_channel/local_subchannel_pool.h \ src/core/ext/filters/client_channel/proxy_mapper.h \ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \ src/core/ext/filters/client_channel/proxy_mapper_registry.h \ -src/core/ext/filters/client_channel/resolver.cc \ -src/core/ext/filters/client_channel/resolver.h \ src/core/ext/filters/client_channel/resolver/README.md \ src/core/ext/filters/client_channel/resolver/binder/README.md \ src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc \ @@ -963,9 +961,6 @@ src/core/ext/filters/client_channel/resolver/sockaddr/README.md \ src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc \ src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc \ src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h \ -src/core/ext/filters/client_channel/resolver_factory.h \ -src/core/ext/filters/client_channel/resolver_registry.cc \ -src/core/ext/filters/client_channel/resolver_registry.h \ src/core/ext/filters/client_channel/resolver_result_parsing.cc \ src/core/ext/filters/client_channel/resolver_result_parsing.h \ src/core/ext/filters/client_channel/retry_filter.cc \ @@ -974,8 +969,6 @@ src/core/ext/filters/client_channel/retry_service_config.cc \ src/core/ext/filters/client_channel/retry_service_config.h \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/retry_throttle.h \ -src/core/ext/filters/client_channel/server_address.cc \ -src/core/ext/filters/client_channel/server_address.h \ src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel.h \ @@ -1014,11 +1007,6 @@ src/core/ext/filters/server_config_selector/server_config_selector.cc \ src/core/ext/filters/server_config_selector/server_config_selector.h \ src/core/ext/filters/server_config_selector/server_config_selector_filter.cc \ src/core/ext/filters/server_config_selector/server_config_selector_filter.h \ -src/core/ext/service_config/service_config.cc \ -src/core/ext/service_config/service_config.h \ -src/core/ext/service_config/service_config_call_data.h \ -src/core/ext/service_config/service_config_parser.cc \ -src/core/ext/service_config/service_config_parser.h \ src/core/ext/transport/README.md \ src/core/ext/transport/binder/README.md \ src/core/ext/transport/chttp2/README.md \ @@ -1811,6 +1799,7 @@ src/core/lib/iomgr/resolve_address_posix.cc \ src/core/lib/iomgr/resolve_address_posix.h \ src/core/lib/iomgr/resolve_address_windows.cc \ src/core/lib/iomgr/resolve_address_windows.h \ +src/core/lib/iomgr/resolved_address.h \ src/core/lib/iomgr/sockaddr.h \ src/core/lib/iomgr/sockaddr_posix.h \ src/core/lib/iomgr/sockaddr_windows.h \ @@ -1896,6 +1885,13 @@ src/core/lib/promise/map.h \ src/core/lib/promise/poll.h \ src/core/lib/promise/race.h \ src/core/lib/promise/seq.h \ +src/core/lib/resolver/resolver.cc \ +src/core/lib/resolver/resolver.h \ +src/core/lib/resolver/resolver_factory.h \ +src/core/lib/resolver/resolver_registry.cc \ +src/core/lib/resolver/resolver_registry.h \ +src/core/lib/resolver/server_address.cc \ +src/core/lib/resolver/server_address.h \ src/core/lib/resource_quota/api.cc \ src/core/lib/resource_quota/api.h \ src/core/lib/resource_quota/arena.cc \ @@ -2018,6 +2014,11 @@ src/core/lib/security/transport/tsi_error.cc \ src/core/lib/security/transport/tsi_error.h \ src/core/lib/security/util/json_util.cc \ src/core/lib/security/util/json_util.h \ +src/core/lib/service_config/service_config.cc \ +src/core/lib/service_config/service_config.h \ +src/core/lib/service_config/service_config_call_data.h \ +src/core/lib/service_config/service_config_parser.cc \ +src/core/lib/service_config/service_config_parser.h \ src/core/lib/slice/b64.cc \ src/core/lib/slice/b64.h \ src/core/lib/slice/percent_encoding.cc \