grpc 1.83.1 → 1.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +21 -17
- data/include/grpc/credentials.h +10 -0
- data/include/grpc/grpc_security_constants.h +2 -0
- data/include/grpc/impl/channel_arg_names.h +9 -0
- data/src/core/call/call_filters.h +4 -2
- data/src/core/call/client_call.cc +20 -8
- data/src/core/call/client_call.h +4 -0
- data/src/core/call/interception_chain.cc +2 -0
- data/src/core/call/interception_chain.h +14 -1
- data/src/core/call/metadata.cc +1 -3
- data/src/core/call/metadata_batch.h +13 -5
- data/src/core/call/server_call.cc +31 -14
- data/src/core/call/server_call.h +4 -0
- data/src/core/channelz/text_encode.cc +9 -4
- data/src/core/channelz/v2tov1/convert.cc +2 -2
- data/src/core/client_channel/backup_poller.cc +1 -2
- data/src/core/client_channel/client_channel.cc +6 -33
- data/src/core/client_channel/client_channel_filter.cc +22 -55
- data/src/core/client_channel/client_channel_filter.h +2 -2
- data/src/core/client_channel/client_channel_service_config.cc +3 -19
- data/src/core/client_channel/direct_channel.cc +7 -1
- data/src/core/client_channel/direct_channel.h +2 -2
- data/src/core/client_channel/load_balanced_call_destination.cc +5 -3
- data/src/core/client_channel/retry_filter_legacy_call_data.cc +5 -12
- data/src/core/client_channel/subchannel.cc +310 -1058
- data/src/core/client_channel/subchannel.h +44 -329
- data/src/core/client_channel/subchannel_metrics.cc +48 -0
- data/src/core/client_channel/subchannel_metrics.h +60 -0
- data/src/core/credentials/call/external/file_external_account_credentials.cc +1 -1
- data/src/core/credentials/call/external/url_external_account_credentials.cc +2 -3
- data/src/core/credentials/call/gcp_service_account_identity/gcp_service_account_identity_credentials.cc +8 -24
- data/src/core/credentials/call/gcp_service_account_identity/gcp_service_account_identity_credentials.h +3 -6
- data/src/core/credentials/call/gdch_service_account/gdch_service_account_credentials.cc +525 -0
- data/src/core/credentials/call/gdch_service_account/gdch_service_account_credentials.h +138 -0
- data/src/core/credentials/call/json_util.h +1 -0
- data/src/core/credentials/call/jwt/json_token.cc +10 -2
- data/src/core/credentials/call/jwt/jwt_verifier.cc +15 -1
- data/src/core/credentials/call/jwt_token_file/jwt_token_file_call_credentials.cc +1 -1
- data/src/core/credentials/call/oauth2/oauth2_credentials.cc +42 -79
- data/src/core/credentials/call/oauth2/oauth2_credentials.h +2 -5
- data/src/core/credentials/call/token_fetcher/token_fetcher_credentials.cc +52 -31
- data/src/core/credentials/call/token_fetcher/token_fetcher_credentials.h +21 -8
- data/src/core/credentials/transport/google_default/google_default_credentials.cc +3 -4
- data/src/core/credentials/transport/ssl/ssl_credentials.cc +59 -72
- data/src/core/credentials/transport/ssl/ssl_credentials.h +9 -8
- data/src/core/credentials/transport/ssl/ssl_security_connector.cc +12 -6
- data/src/core/credentials/transport/ssl/ssl_security_connector.h +4 -4
- data/src/core/credentials/transport/tls/grpc_tls_certificate_distributor.cc +29 -18
- data/src/core/credentials/transport/tls/grpc_tls_certificate_distributor.h +9 -6
- data/src/core/credentials/transport/tls/grpc_tls_certificate_provider.cc +45 -56
- data/src/core/credentials/transport/tls/grpc_tls_certificate_provider.h +5 -4
- data/src/core/credentials/transport/tls/grpc_tls_certificate_selector.h +26 -0
- data/src/core/credentials/transport/tls/grpc_tls_crl_provider.cc +1 -1
- data/src/core/credentials/transport/tls/load_system_roots.h +2 -6
- data/src/core/credentials/transport/tls/load_system_roots_fallback.cc +2 -4
- data/src/core/credentials/transport/tls/load_system_roots_supported.cc +13 -15
- data/src/core/credentials/transport/tls/load_system_roots_supported.h +3 -2
- data/src/core/credentials/transport/tls/load_system_roots_windows.cc +5 -8
- data/src/core/credentials/transport/tls/spiffe_utils.cc +1 -1
- data/src/core/credentials/transport/tls/ssl_utils.cc +39 -28
- data/src/core/credentials/transport/tls/ssl_utils.h +12 -49
- data/src/core/credentials/transport/tls/tls_security_connector.cc +48 -33
- data/src/core/credentials/transport/tls/tls_security_connector.h +31 -10
- data/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc +15 -11
- data/src/core/ext/filters/http/http_filters_plugin.cc +20 -9
- data/src/core/ext/filters/rbac/rbac_filter.cc +43 -21
- data/src/core/ext/filters/rbac/rbac_filter.h +21 -3
- data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +2 -2
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +1 -1
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +6 -20
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +32 -67
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +2 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.h +78 -4
- data/src/core/ext/transport/chttp2/transport/frame.h +2 -0
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +3 -4
- data/src/core/ext/transport/chttp2/transport/goaway.h +7 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +5 -3
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +3 -1
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +141 -130
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +22 -22
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.cc +402 -269
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.h +80 -49
- data/src/core/ext/transport/chttp2/transport/http2_settings_promises.h +1 -2
- data/src/core/ext/transport/chttp2/transport/http2_status.h +38 -37
- data/src/core/ext/transport/chttp2/transport/http2_transport.cc +178 -5
- data/src/core/ext/transport/chttp2/transport/http2_transport.h +345 -5
- data/src/core/ext/transport/chttp2/transport/parsing.cc +5 -5
- data/src/core/ext/transport/chttp2/transport/ping_promise.cc +3 -2
- data/src/core/ext/transport/chttp2/transport/ping_promise.h +25 -5
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +3 -4
- data/src/core/ext/transport/chttp2/transport/read_context.h +30 -3
- data/src/core/ext/transport/chttp2/transport/stream.h +65 -23
- data/src/core/ext/transport/chttp2/transport/writing.cc +0 -3
- data/src/core/ext/transport/inproc/inproc_transport.cc +1 -5
- data/src/core/ext/transport/inproc/legacy_inproc_transport.cc +4 -17
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb.h +1912 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb_minitable.c +300 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb_minitable.h +37 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upb.h +187 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upb_minitable.c +64 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upb_minitable.h +31 -0
- data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb.h +2362 -0
- data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.c +556 -0
- data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.h +47 -0
- data/src/core/ext/upb-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upb.h +5 -5
- data/src/core/ext/upb-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upb_minitable.h +5 -5
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upbdefs.c +453 -0
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upbdefs.h +67 -0
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upbdefs.c +142 -0
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upbdefs.h +37 -0
- data/src/core/ext/upbdefs-gen/grpc/channelz/v1/channelz.upbdefs.c +715 -0
- data/src/core/ext/upbdefs-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upbdefs.h +44 -44
- data/src/core/filter/auth/server_auth_filter.cc +2 -3
- data/src/core/filter/composite/composite_filter.cc +45 -33
- data/src/core/filter/composite/composite_filter.h +5 -4
- data/src/core/filter/ext_proc/ext_proc_filter.cc +224 -0
- data/src/core/filter/ext_proc/ext_proc_filter.h +155 -0
- data/src/core/filter/ext_proc/ext_proc_messages.cc +701 -0
- data/src/core/filter/ext_proc/ext_proc_messages.h +297 -0
- data/src/core/filter/filter_args.h +13 -2
- data/src/core/handshaker/http_connect/http_proxy_mapper.cc +30 -3
- data/src/core/handshaker/security/security_handshaker.cc +9 -6
- data/src/core/lib/channel/channel_stack.cc +3 -0
- data/src/core/lib/channel/channel_stack.h +2 -0
- data/src/core/lib/channel/channel_stack_builder_impl.cc +1 -2
- data/src/core/lib/channel/promise_based_filter.cc +132 -20
- data/src/core/lib/channel/promise_based_filter.h +42 -12
- data/src/core/lib/compression/compression_internal.cc +4 -5
- data/src/core/lib/debug/trace_flags.cc +8 -0
- data/src/core/lib/debug/trace_flags.h +3 -0
- data/src/core/lib/event_engine/ares_resolver.cc +54 -50
- data/src/core/lib/event_engine/ares_resolver.h +3 -2
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +3 -3
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +4 -10
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +74 -33
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +4 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +6 -2
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +3 -0
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +3 -0
- data/src/core/lib/event_engine/windows/windows_endpoint.cc +1 -3
- data/src/core/lib/experiments/experiments.cc +60 -96
- data/src/core/lib/experiments/experiments.h +34 -50
- data/src/core/lib/iomgr/cfstream_handle.cc +2 -6
- data/src/core/lib/iomgr/endpoint_cfstream.cc +3 -10
- data/src/core/lib/iomgr/error.cc +2 -6
- data/src/core/lib/iomgr/error_cfstream.cc +1 -1
- data/src/core/lib/iomgr/ev_poll_posix.cc +5 -9
- data/src/core/lib/iomgr/event_engine_shims/closure.cc +1 -1
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +1 -2
- data/src/core/lib/iomgr/event_engine_shims/tcp_client.cc +1 -2
- data/src/core/lib/iomgr/iomgr_posix.cc +0 -4
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +0 -4
- data/src/core/lib/iomgr/iomgr_windows.cc +0 -4
- data/src/core/lib/iomgr/socket_factory_posix.h +1 -1
- data/src/core/lib/iomgr/socket_utils_posix.cc +3 -0
- data/src/core/lib/iomgr/socket_utils_posix.h +3 -0
- data/src/core/lib/iomgr/systemd_utils.cc +0 -1
- data/src/core/lib/iomgr/tcp_client.h +1 -1
- data/src/core/lib/iomgr/tcp_posix.cc +23 -15
- data/src/core/lib/iomgr/tcp_server.h +1 -1
- data/src/core/lib/iomgr/tcp_server_posix.cc +2 -3
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +0 -1
- data/src/core/lib/iomgr/tcp_server_windows.cc +0 -1
- data/src/core/lib/iomgr/tcp_windows.cc +5 -10
- data/src/core/lib/iomgr/unix_sockets_posix.cc +2 -4
- data/src/core/lib/iomgr/unix_sockets_posix.h +3 -1
- data/src/core/lib/iomgr/vsock.h +3 -1
- data/src/core/lib/resource_quota/memory_quota.cc +1 -1
- data/src/core/lib/security/authorization/rbac_policy.cc +139 -56
- data/src/core/lib/security/authorization/rbac_policy.h +21 -3
- data/src/core/lib/surface/call.cc +3 -9
- data/src/core/lib/surface/call_utils.h +113 -0
- data/src/core/lib/surface/channel_create.cc +1 -1
- data/src/core/lib/surface/channel_create.h +0 -2
- data/src/core/lib/surface/channel_init.cc +77 -38
- data/src/core/lib/surface/channel_init.h +30 -16
- data/src/core/lib/surface/filter_stack_call.cc +5 -10
- data/src/core/lib/surface/init.cc +13 -27
- data/src/core/lib/surface/version.cc +1 -1
- data/src/core/lib/transport/error_utils.cc +0 -27
- data/src/core/lib/transport/error_utils.h +0 -16
- data/src/core/lib/transport/transport.h +7 -5
- data/src/core/load_balancing/pick_first/pick_first.cc +2 -0
- data/src/core/load_balancing/rls/rls.cc +28 -11
- data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc +33 -42
- data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.h +0 -2
- data/src/core/load_balancing/xds/cds.cc +3 -1
- data/src/core/load_balancing/xds/xds_cluster_impl.cc +0 -1
- data/src/core/mitigation_engine/mitigation.h +14 -5
- data/src/core/mitigation_engine/mitigation_engine.h +7 -3
- data/src/core/mitigation_engine/mitigation_provider.h +2 -1
- data/src/core/plugin_registry/grpc_plugin_registry.cc +39 -8
- data/src/core/resolver/dns/{event_engine/event_engine_client_channel_resolver.cc → dns_resolver.cc} +42 -41
- data/src/core/resolver/dns/{event_engine/event_engine_client_channel_resolver.h → dns_resolver.h} +8 -5
- data/src/core/resolver/dns/{event_engine/service_config_helper.cc → service_config_helper.cc} +1 -1
- data/src/core/resolver/dns/{event_engine/service_config_helper.h → service_config_helper.h} +3 -3
- data/src/core/resolver/endpoint_addresses.h +3 -0
- data/src/core/resolver/google_c2p/google_c2p_resolver.cc +2 -1
- data/src/core/resolver/xds/xds_resolver.cc +35 -9
- data/src/core/server/server.cc +2 -6
- data/src/core/server/server_config_selector.h +18 -3
- data/src/core/server/server_config_selector_filter.cc +178 -91
- data/src/core/server/server_config_selector_filter.h +58 -3
- data/src/core/server/xds_server_config_fetcher.cc +196 -129
- data/src/core/server/xds_server_config_fetcher.h +49 -0
- data/src/core/server/xds_server_config_fetcher_legacy.cc +41 -37
- data/src/core/telemetry/histogram.h +94 -14
- data/src/core/telemetry/instrument.cc +179 -74
- data/src/core/telemetry/instrument.h +78 -30
- data/src/core/telemetry/metrics.h +5 -0
- data/src/core/{resolver/dns/dns_resolver_plugin.h → telemetry/telemetry_label.h} +12 -8
- data/src/core/tsi/alts/crypt/aes_gcm.cc +10 -13
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +2 -2
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +3 -1
- data/src/core/tsi/ssl_telemetry_utils.cc +216 -259
- data/src/core/tsi/ssl_telemetry_utils.h +12 -2
- data/src/core/tsi/ssl_transport_security.cc +238 -80
- data/src/core/tsi/ssl_transport_security.h +63 -33
- data/src/core/tsi/tls_telemetry.cc +31 -0
- data/src/core/tsi/tls_telemetry.h +47 -0
- data/src/core/tsi/transport_security.cc +2 -2
- data/src/core/tsi/transport_security.h +1 -1
- data/src/core/tsi/transport_security_interface.h +1 -1
- data/src/core/{resolver/dns/native/dns_resolver.h → util/address_sorting_init.cc} +21 -8
- data/src/core/{resolver/dns/c_ares/grpc_ares_wrapper_posix.cc → util/address_sorting_init.h} +7 -8
- data/src/core/util/http_client/httpcli.cc +16 -53
- data/src/core/util/http_client/httpcli.h +0 -7
- data/src/core/util/http_client/httpcli_security_connector.cc +13 -8
- data/src/core/util/linux/cpu.cc +1 -1
- data/src/core/util/load_file.cc +3 -9
- data/src/core/util/load_file.h +3 -4
- data/src/core/util/matchers.h +8 -0
- data/src/core/util/posix/cpu.cc +1 -1
- data/src/core/util/status_helper.cc +0 -20
- data/src/core/util/status_helper.h +3 -14
- data/src/core/xds/grpc/xds_audit_logger_registry.cc +51 -31
- data/src/core/xds/grpc/xds_audit_logger_registry.h +17 -3
- data/src/core/xds/grpc/xds_bootstrap_grpc.cc +2 -10
- data/src/core/xds/grpc/xds_bootstrap_grpc.h +8 -6
- data/src/core/xds/grpc/xds_bootstrap_grpc_builder.cc +488 -0
- data/src/core/xds/grpc/xds_bootstrap_grpc_builder.h +97 -0
- data/src/core/xds/grpc/xds_certificate_provider.cc +7 -7
- data/src/core/xds/grpc/xds_client_grpc.cc +4 -8
- data/src/core/xds/grpc/xds_client_grpc.h +0 -4
- data/src/core/xds/grpc/xds_cluster.h +1 -0
- data/src/core/xds/grpc/xds_cluster_parser.cc +1 -5
- data/src/core/xds/grpc/xds_cluster_parser.h +0 -2
- data/src/core/xds/grpc/xds_cluster_specifier_plugin.cc +0 -2
- data/src/core/xds/grpc/xds_cluster_specifier_plugin.h +0 -2
- data/src/core/xds/grpc/xds_common_types.cc +0 -91
- data/src/core/xds/grpc/xds_common_types.h +1 -47
- data/src/core/xds/grpc/xds_common_types_parser.cc +84 -378
- data/src/core/xds/grpc/xds_common_types_parser.h +9 -11
- data/src/core/xds/grpc/xds_endpoint_parser.cc +0 -2
- data/src/core/xds/grpc/xds_grpc_service_parser.cc +177 -0
- data/src/core/{resolver/dns/c_ares/dns_resolver_ares.h → xds/grpc/xds_grpc_service_parser.h} +14 -9
- data/src/core/xds/grpc/xds_http_composite_filter.cc +26 -21
- data/src/core/xds/grpc/xds_http_composite_filter.h +4 -3
- data/src/core/xds/grpc/xds_http_ext_proc_filter.cc +418 -0
- data/src/core/xds/grpc/xds_http_ext_proc_filter.h +89 -0
- data/src/core/xds/grpc/xds_http_fault_filter.cc +9 -12
- data/src/core/xds/grpc/xds_http_fault_filter.h +1 -4
- data/src/core/xds/grpc/xds_http_filter.cc +2 -1
- data/src/core/xds/grpc/xds_http_filter.h +6 -5
- data/src/core/xds/grpc/xds_http_filter_registry.cc +10 -127
- data/src/core/xds/grpc/xds_http_filter_registry.h +7 -59
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +13 -14
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +3 -2
- data/src/core/xds/grpc/xds_http_rbac_filter.cc +403 -25
- data/src/core/xds/grpc/xds_http_rbac_filter.h +1 -3
- data/src/core/xds/grpc/xds_http_stateful_session_filter.cc +8 -13
- data/src/core/xds/grpc/xds_http_stateful_session_filter.h +1 -4
- data/src/core/xds/grpc/xds_lb_policy_registry.cc +0 -292
- data/src/core/xds/grpc/xds_lb_policy_registry.h +7 -3
- data/src/core/xds/grpc/xds_listener.cc +2 -0
- data/src/core/xds/grpc/xds_listener.h +5 -0
- data/src/core/xds/grpc/xds_listener_parser.cc +16 -11
- data/src/core/xds/grpc/xds_matcher_parse.h +3 -1
- data/src/core/xds/grpc/xds_metadata_parser.cc +6 -1
- data/src/core/xds/grpc/xds_metadata_parser.h +2 -0
- data/src/core/xds/grpc/xds_route_config.cc +2 -0
- data/src/core/xds/grpc/xds_route_config.h +3 -1
- data/src/core/xds/grpc/xds_route_config_parser.cc +13 -79
- data/src/core/xds/grpc/xds_route_config_parser.h +0 -3
- data/src/core/xds/grpc/xds_routing.cc +116 -69
- data/src/core/xds/grpc/xds_routing.h +19 -8
- data/src/core/xds/grpc/xds_tls_context.cc +117 -0
- data/src/core/xds/grpc/xds_tls_context.h +76 -0
- data/src/core/xds/grpc/xds_tls_context_parser.cc +275 -0
- data/src/core/xds/grpc/xds_tls_context_parser.h +35 -0
- data/src/core/xds/grpc/xds_transport_grpc.cc +41 -38
- data/src/core/xds/grpc/xds_transport_grpc.h +4 -2
- data/src/ruby/ext/grpc/rb_call.c +26 -15
- data/src/ruby/ext/grpc/rb_completion_queue.c +6 -5
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +2 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +3 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/test/client.rb +5 -4
- data/src/ruby/spec/call_spec.rb +14 -0
- data/src/ruby/spec/generic/server_interceptors_spec.rb +3 -6
- metadata +50 -35
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/channelz.upbdefs.c +0 -716
- data/src/core/lib/iomgr/resolve_address.cc +0 -59
- data/src/core/lib/iomgr/resolve_address.h +0 -125
- data/src/core/lib/iomgr/resolve_address_impl.h +0 -58
- data/src/core/lib/iomgr/resolve_address_posix.cc +0 -184
- data/src/core/lib/iomgr/resolve_address_posix.h +0 -78
- data/src/core/lib/iomgr/resolve_address_windows.cc +0 -169
- data/src/core/lib/iomgr/resolve_address_windows.h +0 -76
- data/src/core/resolver/dns/c_ares/dns_resolver_ares.cc +0 -781
- data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h +0 -93
- data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +0 -203
- data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +0 -838
- data/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc +0 -1237
- data/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h +0 -130
- data/src/core/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +0 -35
- data/src/core/resolver/dns/dns_resolver_plugin.cc +0 -64
- data/src/core/resolver/dns/native/dns_resolver.cc +0 -173
- data/src/core/util/json/json_util.cc +0 -101
- data/src/core/util/json/json_util.h +0 -163
|
@@ -42,20 +42,4 @@ void grpc_error_get_status(grpc_error_handle error,
|
|
|
42
42
|
grpc_core::http2::Http2ErrorCode* http_error,
|
|
43
43
|
const char** error_string);
|
|
44
44
|
|
|
45
|
-
/// Utility Function to convert a grpc_error_handle \a error to an
|
|
46
|
-
/// absl::Status. Does NOT consume a ref to grpc_error.
|
|
47
|
-
absl::Status grpc_error_to_absl_status(grpc_error_handle error);
|
|
48
|
-
|
|
49
|
-
/// Utility function to convert an absl::Status \a status to grpc_error. Note
|
|
50
|
-
/// that this method does not return "special case" errors such as
|
|
51
|
-
/// absl::CancelledError(), with the exception of absl::OkStatus() returned for
|
|
52
|
-
/// \a absl::OkStatus().
|
|
53
|
-
grpc_error_handle absl_status_to_grpc_error(absl::Status status);
|
|
54
|
-
|
|
55
|
-
/// A utility function to check whether there is a clear status code that
|
|
56
|
-
/// doesn't need to be guessed in \a error. This means that \a error or some
|
|
57
|
-
/// child has grpc_core::StatusIntProperty::kRpcStatus set, or that it is
|
|
58
|
-
/// absl::OkStatus() or absl::CancelledError()
|
|
59
|
-
bool grpc_error_has_clear_grpc_status(grpc_error_handle error);
|
|
60
|
-
|
|
61
45
|
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_ERROR_UTILS_H
|
|
@@ -417,11 +417,10 @@ struct grpc_transport_stream_op_batch_payload {
|
|
|
417
417
|
|
|
418
418
|
/// Forcefully close this stream.
|
|
419
419
|
/// The HTTP2 semantics should be:
|
|
420
|
-
/// - server side: if cancel_error
|
|
421
|
-
///
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
/// error=GRPC_CHTTP2_NO_ERROR to force a full close
|
|
420
|
+
/// - server side: if cancel_error is not UNKNOWN and trailing
|
|
421
|
+
/// metadata has not been sent, send trailing metadata with status and
|
|
422
|
+
// message from cancel_error (use grpc_error_get_status) followed by a
|
|
423
|
+
// RST_STREAM with error=GRPC_CHTTP2_NO_ERROR to force a full close
|
|
425
424
|
/// - at all other times: use grpc_error_get_status to get a status code, and
|
|
426
425
|
/// convert to a HTTP2 error code using
|
|
427
426
|
/// grpc_chttp2_grpc_status_to_http2_error. Send a RST_STREAM with this
|
|
@@ -455,6 +454,9 @@ typedef struct grpc_transport_op {
|
|
|
455
454
|
nullptr;
|
|
456
455
|
/// should the transport be disconnected
|
|
457
456
|
grpc_error_handle disconnect_with_error;
|
|
457
|
+
/// should the transport go IDLE
|
|
458
|
+
/// (used only by client channel, only if disconnect_with_error is set)
|
|
459
|
+
bool go_idle = false;
|
|
458
460
|
/// Start a graceful goaway with the specified error message. (The error code
|
|
459
461
|
/// is ignored since graceful GOAWAYs use a NO_ERROR error code.) Use
|
|
460
462
|
/// disconnect_with_error if graceful shutdown is not needed.
|
|
@@ -78,6 +78,8 @@ namespace {
|
|
|
78
78
|
|
|
79
79
|
constexpr absl::string_view kPickFirst = "pick_first";
|
|
80
80
|
|
|
81
|
+
// TODO(https://github.com/grpc/grpc/issues/40835): Remove metrics after 1.84.0
|
|
82
|
+
// release. Metrics functionality was moved from pick_first to subchannel.
|
|
81
83
|
const auto kMetricDisconnections =
|
|
82
84
|
GlobalInstrumentsRegistry::RegisterUInt64Counter(
|
|
83
85
|
"grpc.lb.pick_first.disconnections",
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
#include <vector>
|
|
53
53
|
|
|
54
54
|
#include "src/core/channelz/channelz.h"
|
|
55
|
-
#include "src/core/client_channel/client_channel_filter.h"
|
|
56
55
|
#include "src/core/config/core_configuration.h"
|
|
57
56
|
#include "src/core/credentials/transport/fake/fake_credentials.h"
|
|
58
57
|
#include "src/core/lib/channel/channel_args.h"
|
|
@@ -61,6 +60,8 @@
|
|
|
61
60
|
#include "src/core/lib/iomgr/error.h"
|
|
62
61
|
#include "src/core/lib/iomgr/exec_ctx.h"
|
|
63
62
|
#include "src/core/lib/iomgr/pollset_set.h"
|
|
63
|
+
#include "src/core/lib/promise/context.h"
|
|
64
|
+
#include "src/core/lib/resource_quota/arena.h"
|
|
64
65
|
#include "src/core/lib/slice/slice.h"
|
|
65
66
|
#include "src/core/lib/slice/slice_internal.h"
|
|
66
67
|
#include "src/core/lib/surface/call.h"
|
|
@@ -76,6 +77,7 @@
|
|
|
76
77
|
#include "src/core/resolver/resolver_registry.h"
|
|
77
78
|
#include "src/core/service_config/service_config_impl.h"
|
|
78
79
|
#include "src/core/telemetry/metrics.h"
|
|
80
|
+
#include "src/core/telemetry/telemetry_label.h"
|
|
79
81
|
#include "src/core/util/backoff.h"
|
|
80
82
|
#include "src/core/util/debug_location.h"
|
|
81
83
|
#include "src/core/util/dual_ref_counted.h"
|
|
@@ -146,6 +148,7 @@ const auto kMetricDefaultTargetPicks =
|
|
|
146
148
|
"{pick}", false)
|
|
147
149
|
.Labels(kMetricLabelTarget, kMetricLabelRlsServerTarget,
|
|
148
150
|
kMetricRlsDataPlaneTarget, kMetricLabelPickResult)
|
|
151
|
+
.OptionalLabels(kMetricLabelTelemetry)
|
|
149
152
|
.Build();
|
|
150
153
|
|
|
151
154
|
const auto kMetricTargetPicks =
|
|
@@ -158,6 +161,7 @@ const auto kMetricTargetPicks =
|
|
|
158
161
|
"{pick}", false)
|
|
159
162
|
.Labels(kMetricLabelTarget, kMetricLabelRlsServerTarget,
|
|
160
163
|
kMetricRlsDataPlaneTarget, kMetricLabelPickResult)
|
|
164
|
+
.OptionalLabels(kMetricLabelTelemetry)
|
|
161
165
|
.Build();
|
|
162
166
|
|
|
163
167
|
const auto kMetricFailedPicks =
|
|
@@ -167,6 +171,7 @@ const auto kMetricFailedPicks =
|
|
|
167
171
|
"request or the RLS channel being throttled.",
|
|
168
172
|
"{pick}", false)
|
|
169
173
|
.Labels(kMetricLabelTarget, kMetricLabelRlsServerTarget)
|
|
174
|
+
.OptionalLabels(kMetricLabelTelemetry)
|
|
170
175
|
.Build();
|
|
171
176
|
|
|
172
177
|
const char kGrpc[] = "grpc";
|
|
@@ -696,7 +701,8 @@ class RlsLb final : public LoadBalancingPolicy {
|
|
|
696
701
|
template <typename HandleType>
|
|
697
702
|
void MaybeExportPickCount(HandleType handle, absl::string_view target,
|
|
698
703
|
absl::string_view lookup_service,
|
|
699
|
-
const PickResult& pick_result
|
|
704
|
+
const PickResult& pick_result,
|
|
705
|
+
absl::string_view telemetry_label);
|
|
700
706
|
|
|
701
707
|
const std::string instance_uuid_;
|
|
702
708
|
|
|
@@ -1023,14 +1029,19 @@ LoadBalancingPolicy::PickResult RlsLb::Picker::Pick(PickArgs args) {
|
|
|
1023
1029
|
|
|
1024
1030
|
LoadBalancingPolicy::PickResult RlsLb::Picker::PickFromDefaultTargetOrFail(
|
|
1025
1031
|
const char* reason, PickArgs args, absl::Status status) {
|
|
1032
|
+
absl::string_view telemetry_label;
|
|
1033
|
+
if (auto* label = GetContext<Arena>()->GetContext<TelemetryLabel>();
|
|
1034
|
+
label != nullptr) {
|
|
1035
|
+
telemetry_label = label->value;
|
|
1036
|
+
}
|
|
1026
1037
|
if (default_child_policy_ != nullptr) {
|
|
1027
1038
|
GRPC_TRACE_LOG(rls_lb, INFO)
|
|
1028
1039
|
<< "[rlslb " << lb_policy_.get() << "] picker=" << this << ": "
|
|
1029
1040
|
<< reason << "; using default target";
|
|
1030
1041
|
auto pick_result = default_child_policy_->Pick(args);
|
|
1031
|
-
lb_policy_->MaybeExportPickCount(
|
|
1032
|
-
|
|
1033
|
-
|
|
1042
|
+
lb_policy_->MaybeExportPickCount(
|
|
1043
|
+
kMetricDefaultTargetPicks, config_->default_target(),
|
|
1044
|
+
config_->lookup_service(), pick_result, telemetry_label);
|
|
1034
1045
|
return pick_result;
|
|
1035
1046
|
}
|
|
1036
1047
|
GRPC_TRACE_LOG(rls_lb, INFO)
|
|
@@ -1041,7 +1052,7 @@ LoadBalancingPolicy::PickResult RlsLb::Picker::PickFromDefaultTargetOrFail(
|
|
|
1041
1052
|
stats_plugins.AddCounter(kMetricFailedPicks, 1,
|
|
1042
1053
|
{lb_policy_->channel_control_helper()->GetTarget(),
|
|
1043
1054
|
config_->lookup_service()},
|
|
1044
|
-
{});
|
|
1055
|
+
{telemetry_label});
|
|
1045
1056
|
return PickResult::Fail(std::move(status));
|
|
1046
1057
|
}
|
|
1047
1058
|
|
|
@@ -1170,10 +1181,15 @@ LoadBalancingPolicy::PickResult RlsLb::Cache::Entry::Pick(
|
|
|
1170
1181
|
<< child_policy_wrappers_.size() << ") in state "
|
|
1171
1182
|
<< ConnectivityStateName(child_policy_wrapper->connectivity_state())
|
|
1172
1183
|
<< "; delegating";
|
|
1184
|
+
absl::string_view telemetry_label;
|
|
1185
|
+
if (auto* label = GetContext<Arena>()->GetContext<TelemetryLabel>();
|
|
1186
|
+
label != nullptr) {
|
|
1187
|
+
telemetry_label = label->value;
|
|
1188
|
+
}
|
|
1173
1189
|
auto pick_result = child_policy_wrapper->Pick(args);
|
|
1174
|
-
lb_policy_->MaybeExportPickCount(
|
|
1175
|
-
|
|
1176
|
-
|
|
1190
|
+
lb_policy_->MaybeExportPickCount(
|
|
1191
|
+
kMetricTargetPicks, child_policy_wrapper->target(), lookup_service,
|
|
1192
|
+
pick_result, telemetry_label);
|
|
1177
1193
|
// Add header data.
|
|
1178
1194
|
if (!header_data_.empty()) {
|
|
1179
1195
|
auto* complete_pick =
|
|
@@ -2122,7 +2138,8 @@ void RlsLb::UpdatePickerLocked() {
|
|
|
2122
2138
|
template <typename HandleType>
|
|
2123
2139
|
void RlsLb::MaybeExportPickCount(HandleType handle, absl::string_view target,
|
|
2124
2140
|
absl::string_view lookup_service,
|
|
2125
|
-
const PickResult& pick_result
|
|
2141
|
+
const PickResult& pick_result,
|
|
2142
|
+
absl::string_view telemetry_label) {
|
|
2126
2143
|
absl::string_view pick_result_string = Match(
|
|
2127
2144
|
pick_result.result,
|
|
2128
2145
|
[](const LoadBalancingPolicy::PickResult::Complete&) {
|
|
@@ -2136,7 +2153,7 @@ void RlsLb::MaybeExportPickCount(HandleType handle, absl::string_view target,
|
|
|
2136
2153
|
stats_plugins.AddCounter(handle, 1,
|
|
2137
2154
|
{channel_control_helper()->GetTarget(),
|
|
2138
2155
|
lookup_service, target, pick_result_string},
|
|
2139
|
-
{});
|
|
2156
|
+
{telemetry_label});
|
|
2140
2157
|
}
|
|
2141
2158
|
|
|
2142
2159
|
//
|
|
@@ -80,18 +80,10 @@
|
|
|
80
80
|
|
|
81
81
|
namespace grpc_core {
|
|
82
82
|
|
|
83
|
-
bool WrrCustomMetricsEnabled() {
|
|
84
|
-
return IsExperimentEnvVarEnabled("GRPC_EXPERIMENTAL_WRR_CUSTOM_METRICS");
|
|
85
|
-
}
|
|
86
|
-
|
|
87
83
|
namespace {
|
|
88
84
|
|
|
89
85
|
constexpr absl::string_view kWeightedRoundRobin = "weighted_round_robin";
|
|
90
86
|
|
|
91
|
-
constexpr absl::string_view kMetricLabelLocality = "grpc.lb.locality";
|
|
92
|
-
constexpr absl::string_view kMetricLabelBackendService =
|
|
93
|
-
"grpc.lb.backend_service";
|
|
94
|
-
|
|
95
87
|
const auto kMetricRrFallback =
|
|
96
88
|
GlobalInstrumentsRegistry::RegisterUInt64Counter(
|
|
97
89
|
"grpc.lb.wrr.rr_fallback",
|
|
@@ -220,41 +212,40 @@ void WeightedRoundRobinConfig::JsonPostLoad(const Json& json,
|
|
|
220
212
|
ValidationErrors::ScopedField field(errors, ".errorUtilizationPenalty");
|
|
221
213
|
errors->AddError("must be non-negative");
|
|
222
214
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
++i;
|
|
215
|
+
// Handle metricNamesForComputingUtilization.
|
|
216
|
+
std::optional<std::vector<std::string>>
|
|
217
|
+
metric_names_for_computing_utilization =
|
|
218
|
+
LoadJsonObjectField<std::vector<std::string>>(
|
|
219
|
+
json.object(), args, "metricNamesForComputingUtilization", errors,
|
|
220
|
+
/*required=*/false);
|
|
221
|
+
if (metric_names_for_computing_utilization.has_value()) {
|
|
222
|
+
size_t i = 0;
|
|
223
|
+
for (const auto& metric_name : *metric_names_for_computing_utilization) {
|
|
224
|
+
if (metric_name == "cpu_utilization") {
|
|
225
|
+
parsed_custom_metrics_.push_back(
|
|
226
|
+
{WeightedRoundRobinConfig::ParsedMetric::Type::kCpu, ""});
|
|
227
|
+
} else if (metric_name == "mem_utilization") {
|
|
228
|
+
parsed_custom_metrics_.push_back(
|
|
229
|
+
{WeightedRoundRobinConfig::ParsedMetric::Type::kMem, ""});
|
|
230
|
+
} else if (metric_name == "application_utilization") {
|
|
231
|
+
parsed_custom_metrics_.push_back(
|
|
232
|
+
{WeightedRoundRobinConfig::ParsedMetric::Type::kApplication, ""});
|
|
233
|
+
} else if (absl::StartsWith(metric_name, "named_metrics.")) {
|
|
234
|
+
parsed_custom_metrics_.push_back(
|
|
235
|
+
{WeightedRoundRobinConfig::ParsedMetric::Type::kNamedMetric,
|
|
236
|
+
std::string(absl::StripPrefix(metric_name, "named_metrics."))});
|
|
237
|
+
} else if (absl::StartsWith(metric_name, "utilization.")) {
|
|
238
|
+
parsed_custom_metrics_.push_back(
|
|
239
|
+
{WeightedRoundRobinConfig::ParsedMetric::Type::kUtilization,
|
|
240
|
+
std::string(absl::StripPrefix(metric_name, "utilization."))});
|
|
241
|
+
} else {
|
|
242
|
+
ValidationErrors::ScopedField field(
|
|
243
|
+
errors,
|
|
244
|
+
absl::StrCat(".metricNamesForComputingUtilization[", i, "]"));
|
|
245
|
+
errors->AddError(
|
|
246
|
+
absl::StrCat("unsupported metric name \"", metric_name, "\""));
|
|
257
247
|
}
|
|
248
|
+
++i;
|
|
258
249
|
}
|
|
259
250
|
}
|
|
260
251
|
}
|
|
@@ -768,7 +768,9 @@ void CdsPriorityEndpointIterator::ForEach(
|
|
|
768
768
|
.SetObject(hierarchical_path_attr)
|
|
769
769
|
.Set(GRPC_ARG_ADDRESS_WEIGHT, endpoint_weight)
|
|
770
770
|
.SetObject(locality_name->Ref())
|
|
771
|
-
.Set(GRPC_ARG_XDS_LOCALITY_WEIGHT, locality.lb_weight)
|
|
771
|
+
.Set(GRPC_ARG_XDS_LOCALITY_WEIGHT, locality.lb_weight)
|
|
772
|
+
.Set(GRPC_ARG_LB_LOCALITY,
|
|
773
|
+
locality_name->human_readable_string().as_string_view());
|
|
772
774
|
if (!use_http_connect_) args = args.Remove(GRPC_ARG_XDS_HTTP_PROXY);
|
|
773
775
|
callback(EndpointAddresses(endpoint.addresses(), args));
|
|
774
776
|
}
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
#include "src/core/util/ref_counted_string.h"
|
|
61
61
|
#include "src/core/util/sync.h"
|
|
62
62
|
#include "src/core/util/validation_errors.h"
|
|
63
|
-
#include "src/core/xds/grpc/xds_bootstrap_grpc.h"
|
|
64
63
|
#include "src/core/xds/grpc/xds_client_grpc.h"
|
|
65
64
|
#include "src/core/xds/grpc/xds_endpoint.h"
|
|
66
65
|
#include "src/core/xds/xds_client/xds_bootstrap.h"
|
|
@@ -25,19 +25,28 @@
|
|
|
25
25
|
#include "src/core/mitigation_engine/mitigation_engine.h"
|
|
26
26
|
#include "src/core/util/ref_counted.h"
|
|
27
27
|
#include "absl/strings/string_view.h"
|
|
28
|
+
#include "absl/time/time.h"
|
|
28
29
|
|
|
29
30
|
namespace grpc_core {
|
|
30
31
|
|
|
31
32
|
// Mitigations represent read-only configuration rules.
|
|
32
33
|
class Mitigation : public RefCounted<Mitigation> {
|
|
33
34
|
public:
|
|
35
|
+
struct EvaluationResult {
|
|
36
|
+
explicit EvaluationResult(MitigationEngine::Action action)
|
|
37
|
+
: action(action) {}
|
|
38
|
+
|
|
39
|
+
MitigationEngine::Action action;
|
|
40
|
+
bool reject_new_connections = false;
|
|
41
|
+
absl::Duration max_duration;
|
|
42
|
+
absl::string_view rule_name;
|
|
43
|
+
};
|
|
44
|
+
|
|
34
45
|
~Mitigation() override = default;
|
|
35
46
|
|
|
36
|
-
virtual std::optional<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
virtual std::optional<MitigationEngine::Action>
|
|
40
|
-
EvaluateIncomingMetadataAllParsed(
|
|
47
|
+
virtual std::optional<EvaluationResult> EvaluateIncomingMetadataParsed(
|
|
48
|
+
absl::string_view key, absl::string_view value) const = 0;
|
|
49
|
+
virtual std::optional<EvaluationResult> EvaluateIncomingMetadataAllParsed(
|
|
41
50
|
const grpc_metadata_batch& metadata) const = 0;
|
|
42
51
|
|
|
43
52
|
Mitigation() = default;
|
|
@@ -43,24 +43,28 @@ class MitigationEngine : public RefCounted<MitigationEngine> {
|
|
|
43
43
|
return "Unknown Action";
|
|
44
44
|
}
|
|
45
45
|
~MitigationEngine() override = default;
|
|
46
|
+
|
|
46
47
|
// Evaluates an incoming connection based on the peer address.
|
|
47
48
|
virtual std::optional<Action> EvaluateIncomingConnection(
|
|
48
49
|
absl::string_view peer_address) = 0;
|
|
50
|
+
|
|
49
51
|
// Evaluates an incoming metadata key/value pair. Please note that this
|
|
50
52
|
// function only evaluates *new* key/value pairs; if an incoming header has
|
|
51
53
|
// already been seen by the connection, it will not be evaluated again.
|
|
52
54
|
virtual std::optional<Action> EvaluateIncomingMetadata(
|
|
53
|
-
absl::string_view key, absl::string_view value
|
|
55
|
+
absl::string_view key, absl::string_view value,
|
|
56
|
+
absl::string_view peer_address) = 0;
|
|
57
|
+
|
|
54
58
|
// Evaluates all incoming metadata after they have been parsed.
|
|
55
59
|
virtual std::optional<Action> EvaluateAllIncomingMetadata(
|
|
56
|
-
const grpc_metadata_batch& metadata) = 0;
|
|
60
|
+
const grpc_metadata_batch& metadata, absl::string_view peer_address) = 0;
|
|
57
61
|
};
|
|
58
62
|
|
|
59
63
|
class MitigationEngineProvider
|
|
60
64
|
: public DualRefCounted<MitigationEngineProvider> {
|
|
61
65
|
public:
|
|
62
66
|
static absl::string_view ChannelArgName() {
|
|
63
|
-
return "grpc.
|
|
67
|
+
return "grpc.mitigation_engine_provider";
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
static int ChannelArgsCompare(const MitigationEngineProvider* a,
|
|
@@ -40,7 +40,8 @@ class MitigationProvider {
|
|
|
40
40
|
|
|
41
41
|
// Subscribes to mitigation configuration updates.
|
|
42
42
|
//
|
|
43
|
-
// The provided callback is invoked
|
|
43
|
+
// The provided callback is invoked immediately with the current set of
|
|
44
|
+
// mitigations, and subsequently whenever the mitigation rules change.
|
|
44
45
|
//
|
|
45
46
|
// Returns an opaque MitigationSubscriptionHandle to be used as an
|
|
46
47
|
// unsubscription token for CancelWatch().
|
|
@@ -20,13 +20,16 @@
|
|
|
20
20
|
#include <grpc/support/port_platform.h>
|
|
21
21
|
|
|
22
22
|
#include "src/core/config/core_configuration.h"
|
|
23
|
+
#include "src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h"
|
|
23
24
|
#include "src/core/handshaker/endpoint_info/endpoint_info_handshaker.h"
|
|
24
25
|
#include "src/core/handshaker/http_connect/http_connect_client_handshaker.h"
|
|
25
26
|
#include "src/core/handshaker/tcp_connect/tcp_connect_handshaker.h"
|
|
27
|
+
#include "src/core/lib/experiments/experiments.h"
|
|
26
28
|
#include "src/core/lib/surface/channel_stack_type.h"
|
|
27
29
|
#include "src/core/lib/surface/lame_client.h"
|
|
28
30
|
#include "src/core/server/server.h"
|
|
29
31
|
#include "src/core/server/server_call_tracer_filter.h"
|
|
32
|
+
#include "src/core/server/server_config_selector_filter.h"
|
|
30
33
|
|
|
31
34
|
namespace grpc_event_engine {
|
|
32
35
|
namespace experimental {
|
|
@@ -83,14 +86,42 @@ void RegisterBuiltins(CoreConfiguration::Builder* builder) {
|
|
|
83
86
|
builder->channel_init()
|
|
84
87
|
->RegisterV2Filter<LameClientFilter>(GRPC_CLIENT_LAME_CHANNEL)
|
|
85
88
|
.Terminal();
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
|
|
90
|
+
auto& top_filter_server_reg =
|
|
91
|
+
builder->channel_init()
|
|
92
|
+
->RegisterFilter(GRPC_SERVER_CHANNEL, &Server::kServerTopFilter)
|
|
93
|
+
.SkipV3();
|
|
94
|
+
|
|
95
|
+
auto& top_filter_server_virtual_reg =
|
|
96
|
+
builder->channel_init()
|
|
97
|
+
->RegisterFilter(GRPC_SERVER_VIRTUAL_CHANNEL,
|
|
98
|
+
&Server::kServerTopFilter)
|
|
99
|
+
.SkipV3();
|
|
100
|
+
|
|
101
|
+
if (IsFixV3FilterStackServerSideOrderingEnabled()) {
|
|
102
|
+
top_filter_server_reg.SinkToBottom().After(
|
|
103
|
+
{LegacyMaxAgeFilter::kFilter.name});
|
|
104
|
+
top_filter_server_virtual_reg.SinkToBottom();
|
|
105
|
+
} else {
|
|
106
|
+
top_filter_server_reg.BeforeAll();
|
|
107
|
+
top_filter_server_virtual_reg.BeforeAll();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (IsXdsServerFilterChainPerRouteEnabled()) {
|
|
111
|
+
auto& server_config_selector_interceptor_reg =
|
|
112
|
+
builder->channel_init()
|
|
113
|
+
->RegisterFilter<ServerConfigSelectorInterceptor>(
|
|
114
|
+
GRPC_SERVER_CHANNEL)
|
|
115
|
+
.IfHasChannelArg(ServerConfigSelectorProvider::ChannelArgName());
|
|
116
|
+
|
|
117
|
+
if (IsFixV3FilterStackServerSideOrderingEnabled()) {
|
|
118
|
+
server_config_selector_interceptor_reg.Before(
|
|
119
|
+
{LegacyMaxAgeFilter::kFilter.name});
|
|
120
|
+
} else {
|
|
121
|
+
server_config_selector_interceptor_reg.After(
|
|
122
|
+
{LegacyMaxAgeFilter::kFilter.name});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
94
125
|
}
|
|
95
126
|
|
|
96
127
|
} // namespace
|