gitlab-grpc 1.42.1.gitlab
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +1 -0
- data/Makefile +3004 -0
- data/etc/roots.pem +4337 -0
- data/include/grpc/byte_buffer.h +27 -0
- data/include/grpc/byte_buffer_reader.h +26 -0
- data/include/grpc/census.h +40 -0
- data/include/grpc/compression.h +75 -0
- data/include/grpc/event_engine/README.md +38 -0
- data/include/grpc/event_engine/endpoint_config.h +43 -0
- data/include/grpc/event_engine/event_engine.h +375 -0
- data/include/grpc/event_engine/internal/memory_allocator_impl.h +98 -0
- data/include/grpc/event_engine/memory_allocator.h +210 -0
- data/include/grpc/event_engine/port.h +39 -0
- data/include/grpc/fork.h +26 -0
- data/include/grpc/grpc.h +579 -0
- data/include/grpc/grpc_cronet.h +38 -0
- data/include/grpc/grpc_posix.h +62 -0
- data/include/grpc/grpc_security.h +1142 -0
- data/include/grpc/grpc_security_constants.h +165 -0
- data/include/grpc/impl/codegen/README.md +22 -0
- data/include/grpc/impl/codegen/atm.h +97 -0
- data/include/grpc/impl/codegen/atm_gcc_atomic.h +93 -0
- data/include/grpc/impl/codegen/atm_gcc_sync.h +87 -0
- data/include/grpc/impl/codegen/atm_windows.h +134 -0
- data/include/grpc/impl/codegen/byte_buffer.h +103 -0
- data/include/grpc/impl/codegen/byte_buffer_reader.h +44 -0
- data/include/grpc/impl/codegen/compression_types.h +110 -0
- data/include/grpc/impl/codegen/connectivity_state.h +46 -0
- data/include/grpc/impl/codegen/fork.h +50 -0
- data/include/grpc/impl/codegen/gpr_slice.h +71 -0
- data/include/grpc/impl/codegen/gpr_types.h +61 -0
- data/include/grpc/impl/codegen/grpc_types.h +813 -0
- data/include/grpc/impl/codegen/log.h +112 -0
- data/include/grpc/impl/codegen/port_platform.h +719 -0
- data/include/grpc/impl/codegen/propagation_bits.h +54 -0
- data/include/grpc/impl/codegen/slice.h +129 -0
- data/include/grpc/impl/codegen/status.h +156 -0
- data/include/grpc/impl/codegen/sync.h +68 -0
- data/include/grpc/impl/codegen/sync_abseil.h +38 -0
- data/include/grpc/impl/codegen/sync_custom.h +40 -0
- data/include/grpc/impl/codegen/sync_generic.h +51 -0
- data/include/grpc/impl/codegen/sync_posix.h +54 -0
- data/include/grpc/impl/codegen/sync_windows.h +42 -0
- data/include/grpc/load_reporting.h +48 -0
- data/include/grpc/module.modulemap +64 -0
- data/include/grpc/slice.h +172 -0
- data/include/grpc/slice_buffer.h +84 -0
- data/include/grpc/status.h +26 -0
- data/include/grpc/support/alloc.h +52 -0
- data/include/grpc/support/atm.h +26 -0
- data/include/grpc/support/atm_gcc_atomic.h +26 -0
- data/include/grpc/support/atm_gcc_sync.h +26 -0
- data/include/grpc/support/atm_windows.h +26 -0
- data/include/grpc/support/cpu.h +44 -0
- data/include/grpc/support/log.h +26 -0
- data/include/grpc/support/log_windows.h +38 -0
- data/include/grpc/support/port_platform.h +24 -0
- data/include/grpc/support/string_util.h +51 -0
- data/include/grpc/support/sync.h +282 -0
- data/include/grpc/support/sync_abseil.h +26 -0
- data/include/grpc/support/sync_custom.h +26 -0
- data/include/grpc/support/sync_generic.h +26 -0
- data/include/grpc/support/sync_posix.h +26 -0
- data/include/grpc/support/sync_windows.h +26 -0
- data/include/grpc/support/thd_id.h +44 -0
- data/include/grpc/support/time.h +92 -0
- data/include/grpc/support/workaround_list.h +31 -0
- data/src/core/ext/filters/census/grpc_context.cc +39 -0
- data/src/core/ext/filters/client_channel/backend_metric.cc +80 -0
- data/src/core/ext/filters/client_channel/backend_metric.h +36 -0
- data/src/core/ext/filters/client_channel/backup_poller.cc +183 -0
- data/src/core/ext/filters/client_channel/backup_poller.h +42 -0
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +220 -0
- data/src/core/ext/filters/client_channel/client_channel.cc +3119 -0
- data/src/core/ext/filters/client_channel/client_channel.h +581 -0
- data/src/core/ext/filters/client_channel/client_channel_channelz.cc +96 -0
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +75 -0
- data/src/core/ext/filters/client_channel/client_channel_factory.cc +56 -0
- data/src/core/ext/filters/client_channel/client_channel_factory.h +46 -0
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +74 -0
- data/src/core/ext/filters/client_channel/config_selector.cc +59 -0
- data/src/core/ext/filters/client_channel/config_selector.h +145 -0
- data/src/core/ext/filters/client_channel/connector.h +79 -0
- data/src/core/ext/filters/client_channel/dynamic_filters.cc +190 -0
- data/src/core/ext/filters/client_channel/dynamic_filters.h +99 -0
- data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +83 -0
- data/src/core/ext/filters/client_channel/global_subchannel_pool.h +72 -0
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +619 -0
- data/src/core/ext/filters/client_channel/health/health_check_client.h +177 -0
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +392 -0
- data/src/core/ext/filters/client_channel/http_connect_handshaker.h +42 -0
- data/src/core/ext/filters/client_channel/http_proxy.cc +234 -0
- data/src/core/ext/filters/client_channel/http_proxy.h +28 -0
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.cc +96 -0
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +101 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +304 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +83 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +148 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h +29 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +1866 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +47 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc +76 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +37 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +44 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +83 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +93 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +76 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +192 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +74 -0
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +522 -0
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +918 -0
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +757 -0
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h +37 -0
- data/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +2502 -0
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +503 -0
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +426 -0
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +741 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +745 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.h +60 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h +29 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +795 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +701 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +1362 -0
- data/src/core/ext/filters/client_channel/lb_policy.cc +131 -0
- data/src/core/ext/filters/client_channel/lb_policy.h +425 -0
- data/src/core/ext/filters/client_channel/lb_policy_factory.h +48 -0
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +185 -0
- data/src/core/ext/filters/client_channel/lb_policy_registry.h +65 -0
- data/src/core/ext/filters/client_channel/local_subchannel_pool.cc +56 -0
- data/src/core/ext/filters/client_channel/local_subchannel_pool.h +58 -0
- data/src/core/ext/filters/client_channel/proxy_mapper.h +54 -0
- data/src/core/ext/filters/client_channel/proxy_mapper_registry.cc +89 -0
- data/src/core/ext/filters/client_channel/proxy_mapper_registry.h +50 -0
- data/src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc +139 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +526 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +74 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc +31 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +110 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +902 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +1203 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +122 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc +28 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc +29 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +34 -0
- data/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc +28 -0
- data/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h +29 -0
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +332 -0
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +380 -0
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +95 -0
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +384 -0
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +195 -0
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +1002 -0
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h +28 -0
- data/src/core/ext/filters/client_channel/resolver.cc +87 -0
- data/src/core/ext/filters/client_channel/resolver.h +136 -0
- data/src/core/ext/filters/client_channel/resolver_factory.h +75 -0
- data/src/core/ext/filters/client_channel/resolver_registry.cc +195 -0
- data/src/core/ext/filters/client_channel/resolver_registry.h +89 -0
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +189 -0
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +99 -0
- data/src/core/ext/filters/client_channel/retry_filter.cc +2573 -0
- data/src/core/ext/filters/client_channel/retry_filter.h +30 -0
- data/src/core/ext/filters/client_channel/retry_service_config.cc +316 -0
- data/src/core/ext/filters/client_channel/retry_service_config.h +96 -0
- data/src/core/ext/filters/client_channel/retry_throttle.cc +162 -0
- data/src/core/ext/filters/client_channel/retry_throttle.h +79 -0
- data/src/core/ext/filters/client_channel/server_address.cc +170 -0
- data/src/core/ext/filters/client_channel/server_address.h +144 -0
- data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +156 -0
- data/src/core/ext/filters/client_channel/subchannel.cc +1021 -0
- data/src/core/ext/filters/client_channel/subchannel.h +382 -0
- data/src/core/ext/filters/client_channel/subchannel_interface.h +130 -0
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.cc +126 -0
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +106 -0
- data/src/core/ext/filters/client_idle/client_idle_filter.cc +264 -0
- data/src/core/ext/filters/client_idle/idle_filter_state.cc +96 -0
- data/src/core/ext/filters/client_idle/idle_filter_state.h +66 -0
- data/src/core/ext/filters/deadline/deadline_filter.cc +391 -0
- data/src/core/ext/filters/deadline/deadline_filter.h +86 -0
- data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +503 -0
- data/src/core/ext/filters/fault_injection/fault_injection_filter.h +39 -0
- data/src/core/ext/filters/fault_injection/service_config_parser.cc +181 -0
- data/src/core/ext/filters/fault_injection/service_config_parser.h +85 -0
- data/src/core/ext/filters/http/client/http_client_filter.cc +604 -0
- data/src/core/ext/filters/http/client/http_client_filter.h +31 -0
- data/src/core/ext/filters/http/client_authority_filter.cc +159 -0
- data/src/core/ext/filters/http/client_authority_filter.h +34 -0
- data/src/core/ext/filters/http/http_filters_plugin.cc +90 -0
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +553 -0
- data/src/core/ext/filters/http/message_compress/message_compress_filter.h +53 -0
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +398 -0
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.h +31 -0
- data/src/core/ext/filters/http/server/http_server_filter.cc +537 -0
- data/src/core/ext/filters/http/server/http_server_filter.h +29 -0
- data/src/core/ext/filters/max_age/max_age_filter.cc +560 -0
- data/src/core/ext/filters/max_age/max_age_filter.h +26 -0
- data/src/core/ext/filters/message_size/message_size_filter.cc +402 -0
- data/src/core/ext/filters/message_size/message_size_filter.h +66 -0
- data/src/core/ext/service_config/service_config.cc +227 -0
- data/src/core/ext/service_config/service_config.h +127 -0
- data/src/core/ext/service_config/service_config_call_data.h +72 -0
- data/src/core/ext/service_config/service_config_parser.cc +89 -0
- data/src/core/ext/service_config/service_config_parser.h +97 -0
- data/src/core/ext/transport/chttp2/alpn/alpn.cc +45 -0
- data/src/core/ext/transport/chttp2/alpn/alpn.h +36 -0
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +276 -0
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +77 -0
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +119 -0
- data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +95 -0
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +189 -0
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +923 -0
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +47 -0
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +53 -0
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +83 -0
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +125 -0
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +252 -0
- data/src/core/ext/transport/chttp2/transport/bin_decoder.h +57 -0
- data/src/core/ext/transport/chttp2/transport/bin_encoder.cc +231 -0
- data/src/core/ext/transport/chttp2/transport/bin_encoder.h +42 -0
- data/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc +37 -0
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +3351 -0
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +66 -0
- data/src/core/ext/transport/chttp2/transport/context_list.cc +68 -0
- data/src/core/ext/transport/chttp2/transport/context_list.h +52 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +430 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.h +488 -0
- data/src/core/ext/transport/chttp2/transport/frame.h +47 -0
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +308 -0
- data/src/core/ext/transport/chttp2/transport/frame_data.h +83 -0
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +187 -0
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +63 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +132 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +46 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +118 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +51 -0
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +273 -0
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +62 -0
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +123 -0
- data/src/core/ext/transport/chttp2/transport/frame_window_update.h +43 -0
- data/src/core/ext/transport/chttp2/transport/hpack_constants.h +41 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +546 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +277 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_index.h +107 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc +86 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.h +69 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +1454 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +136 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +146 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +137 -0
- data/src/core/ext/transport/chttp2/transport/hpack_utils.cc +46 -0
- data/src/core/ext/transport/chttp2/transport/hpack_utils.h +30 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings.cc +62 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +61 -0
- data/src/core/ext/transport/chttp2/transport/huffsyms.cc +92 -0
- data/src/core/ext/transport/chttp2/transport/huffsyms.h +32 -0
- data/src/core/ext/transport/chttp2/transport/internal.h +892 -0
- data/src/core/ext/transport/chttp2/transport/parsing.cc +651 -0
- data/src/core/ext/transport/chttp2/transport/popularity_count.h +60 -0
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +216 -0
- data/src/core/ext/transport/chttp2/transport/stream_map.cc +177 -0
- data/src/core/ext/transport/chttp2/transport/stream_map.h +67 -0
- data/src/core/ext/transport/chttp2/transport/varint.cc +62 -0
- data/src/core/ext/transport/chttp2/transport/varint.h +71 -0
- data/src/core/ext/transport/chttp2/transport/writing.cc +716 -0
- data/src/core/ext/transport/inproc/inproc_plugin.cc +28 -0
- data/src/core/ext/transport/inproc/inproc_transport.cc +1360 -0
- data/src/core/ext/transport/inproc/inproc_transport.h +35 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c +406 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h +1591 -0
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c +17 -0
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +30 -0
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +66 -0
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +243 -0
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +955 -0
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c +371 -0
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h +1554 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c +74 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h +271 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +494 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +2116 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h +83 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c +56 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h +370 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +124 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +470 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h +94 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +382 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +1295 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +103 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +418 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h +84 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h +161 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +241 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +917 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +171 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +830 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c +36 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h +94 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +244 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +1089 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h +71 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.c +46 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.h +133 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +101 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +43 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h +132 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.h +96 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c +90 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h +261 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +125 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +462 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c +112 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h +397 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c +33 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h +79 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +138 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +640 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +161 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +680 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.c +48 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.h +177 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +42 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +127 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c +144 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h +536 -0
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c +153 -0
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h +550 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +185 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +738 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +82 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +312 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +960 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +4213 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +60 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +177 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c +49 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h +134 -0
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c +29 -0
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h +73 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c +79 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h +298 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c +79 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h +303 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c +42 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h +123 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +403 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +1785 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c +19 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +35 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +130 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +559 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +73 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +237 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +148 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +674 -0
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c +25 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +146 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +535 -0
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c +54 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h +163 -0
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c +121 -0
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h +468 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.c +60 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.h +205 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +48 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +144 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c +36 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h +96 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h +90 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h +84 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +65 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +184 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +158 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c +46 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h +136 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h +225 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h +343 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c +90 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h +313 -0
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.c +17 -0
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.h +36 -0
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c +40 -0
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h +111 -0
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.c +51 -0
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.h +148 -0
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c +30 -0
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h +74 -0
- data/src/core/ext/upb-generated/google/api/annotations.upb.c +18 -0
- data/src/core/ext/upb-generated/google/api/annotations.upb.h +30 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c +242 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h +896 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +251 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +943 -0
- data/src/core/ext/upb-generated/google/api/http.upb.c +66 -0
- data/src/core/ext/upb-generated/google/api/http.upb.h +228 -0
- data/src/core/ext/upb-generated/google/protobuf/any.upb.c +27 -0
- data/src/core/ext/upb-generated/google/protobuf/any.upb.h +70 -0
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +486 -0
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +2047 -0
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +27 -0
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +70 -0
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +22 -0
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +62 -0
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +79 -0
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +231 -0
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +27 -0
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +70 -0
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +106 -0
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +346 -0
- data/src/core/ext/upb-generated/google/rpc/status.upb.c +33 -0
- data/src/core/ext/upb-generated/google/rpc/status.upb.h +87 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +49 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +127 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +212 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +805 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +42 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +137 -0
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +36 -0
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +108 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +141 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +507 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c +55 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h +154 -0
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +48 -0
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +140 -0
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.c +29 -0
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.h +70 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c +17 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +30 -0
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.c +28 -0
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.h +77 -0
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c +27 -0
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h +66 -0
- data/src/core/ext/upb-generated/validate/validate.upb.c +464 -0
- data/src/core/ext/upb-generated/validate/validate.upb.h +2447 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.c +58 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.h +182 -0
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.c +28 -0
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.h +66 -0
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c +52 -0
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h +155 -0
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c +42 -0
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h +90 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.c +36 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.h +100 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c +54 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h +178 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c +36 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h +91 -0
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.c +58 -0
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.h +130 -0
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.c +33 -0
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.h +83 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c +354 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.h +140 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c +41 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c +252 -0
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h +105 -0
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +424 -0
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h +120 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +596 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +155 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c +136 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c +127 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +313 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h +150 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c +144 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c +66 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c +263 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c +236 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +300 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c +43 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c +107 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +140 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c +146 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +205 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c +201 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.c +90 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c +67 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c +141 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c +152 -0
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h +75 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +115 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +982 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +295 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c +71 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c +61 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c +51 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c +102 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c +123 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c +79 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +567 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +125 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c +44 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +196 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c +97 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +251 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c +60 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c +142 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c +73 -0
- data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c +80 -0
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c +80 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c +74 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c +163 -0
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.c +64 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c +65 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +76 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c +69 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c +63 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c +81 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c +92 -0
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c +95 -0
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c +34 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c +47 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c +61 -0
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c +39 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c +386 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h +165 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c +37 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c +65 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c +66 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h +75 -0
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c +42 -0
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c +71 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c +34 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c +51 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c +44 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c +332 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h +145 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.c +75 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c +43 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c +63 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c +50 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c +68 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c +51 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.c +45 -0
- data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.h +35 -0
- data/src/core/ext/xds/certificate_provider_factory.h +61 -0
- data/src/core/ext/xds/certificate_provider_registry.cc +103 -0
- data/src/core/ext/xds/certificate_provider_registry.h +57 -0
- data/src/core/ext/xds/certificate_provider_store.cc +87 -0
- data/src/core/ext/xds/certificate_provider_store.h +112 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +144 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.h +69 -0
- data/src/core/ext/xds/xds_api.cc +3965 -0
- data/src/core/ext/xds/xds_api.h +744 -0
- data/src/core/ext/xds/xds_bootstrap.cc +471 -0
- data/src/core/ext/xds/xds_bootstrap.h +125 -0
- data/src/core/ext/xds/xds_certificate_provider.cc +405 -0
- data/src/core/ext/xds/xds_certificate_provider.h +151 -0
- data/src/core/ext/xds/xds_channel_args.h +32 -0
- data/src/core/ext/xds/xds_channel_stack_modifier.cc +113 -0
- data/src/core/ext/xds/xds_channel_stack_modifier.h +52 -0
- data/src/core/ext/xds/xds_client.cc +2791 -0
- data/src/core/ext/xds/xds_client.h +380 -0
- data/src/core/ext/xds/xds_client_stats.cc +160 -0
- data/src/core/ext/xds/xds_client_stats.h +240 -0
- data/src/core/ext/xds/xds_http_fault_filter.cc +227 -0
- data/src/core/ext/xds/xds_http_fault_filter.h +64 -0
- data/src/core/ext/xds/xds_http_filters.cc +116 -0
- data/src/core/ext/xds/xds_http_filters.h +133 -0
- data/src/core/ext/xds/xds_server_config_fetcher.cc +544 -0
- data/src/core/lib/address_utils/parse_address.cc +320 -0
- data/src/core/lib/address_utils/parse_address.h +77 -0
- data/src/core/lib/address_utils/sockaddr_utils.cc +412 -0
- data/src/core/lib/address_utils/sockaddr_utils.h +110 -0
- data/src/core/lib/avl/avl.cc +306 -0
- data/src/core/lib/avl/avl.h +94 -0
- data/src/core/lib/backoff/backoff.cc +78 -0
- data/src/core/lib/backoff/backoff.h +89 -0
- data/src/core/lib/channel/call_tracer.h +85 -0
- data/src/core/lib/channel/channel_args.cc +400 -0
- data/src/core/lib/channel/channel_args.h +143 -0
- data/src/core/lib/channel/channel_stack.cc +267 -0
- data/src/core/lib/channel/channel_stack.h +312 -0
- data/src/core/lib/channel/channel_stack_builder.cc +313 -0
- data/src/core/lib/channel/channel_stack_builder.h +158 -0
- data/src/core/lib/channel/channel_trace.cc +193 -0
- data/src/core/lib/channel/channel_trace.h +135 -0
- data/src/core/lib/channel/channelz.cc +596 -0
- data/src/core/lib/channel/channelz.h +357 -0
- data/src/core/lib/channel/channelz_registry.cc +285 -0
- data/src/core/lib/channel/channelz_registry.h +99 -0
- data/src/core/lib/channel/connected_channel.cc +245 -0
- data/src/core/lib/channel/connected_channel.h +33 -0
- data/src/core/lib/channel/context.h +52 -0
- data/src/core/lib/channel/handshaker.cc +222 -0
- data/src/core/lib/channel/handshaker.h +161 -0
- data/src/core/lib/channel/handshaker_factory.h +50 -0
- data/src/core/lib/channel/handshaker_registry.cc +50 -0
- data/src/core/lib/channel/handshaker_registry.h +71 -0
- data/src/core/lib/channel/status_util.cc +109 -0
- data/src/core/lib/channel/status_util.h +67 -0
- data/src/core/lib/compression/algorithm_metadata.h +62 -0
- data/src/core/lib/compression/compression.cc +183 -0
- data/src/core/lib/compression/compression_args.cc +138 -0
- data/src/core/lib/compression/compression_args.h +56 -0
- data/src/core/lib/compression/compression_internal.cc +283 -0
- data/src/core/lib/compression/compression_internal.h +97 -0
- data/src/core/lib/compression/message_compress.cc +192 -0
- data/src/core/lib/compression/message_compress.h +40 -0
- data/src/core/lib/compression/stream_compression.cc +81 -0
- data/src/core/lib/compression/stream_compression.h +117 -0
- data/src/core/lib/compression/stream_compression_gzip.cc +231 -0
- data/src/core/lib/compression/stream_compression_gzip.h +28 -0
- data/src/core/lib/compression/stream_compression_identity.cc +91 -0
- data/src/core/lib/compression/stream_compression_identity.h +29 -0
- data/src/core/lib/config/core_configuration.cc +96 -0
- data/src/core/lib/config/core_configuration.h +146 -0
- data/src/core/lib/debug/stats.cc +172 -0
- data/src/core/lib/debug/stats.h +71 -0
- data/src/core/lib/debug/stats_data.cc +689 -0
- data/src/core/lib/debug/stats_data.h +556 -0
- data/src/core/lib/debug/trace.cc +155 -0
- data/src/core/lib/debug/trace.h +132 -0
- data/src/core/lib/event_engine/endpoint_config.cc +45 -0
- data/src/core/lib/event_engine/endpoint_config_internal.h +42 -0
- data/src/core/lib/event_engine/event_engine.cc +50 -0
- data/src/core/lib/event_engine/sockaddr.cc +40 -0
- data/src/core/lib/event_engine/sockaddr.h +44 -0
- data/src/core/lib/gpr/alloc.cc +76 -0
- data/src/core/lib/gpr/alloc.h +28 -0
- data/src/core/lib/gpr/atm.cc +35 -0
- data/src/core/lib/gpr/cpu_iphone.cc +44 -0
- data/src/core/lib/gpr/cpu_linux.cc +82 -0
- data/src/core/lib/gpr/cpu_posix.cc +83 -0
- data/src/core/lib/gpr/cpu_windows.cc +33 -0
- data/src/core/lib/gpr/env.h +40 -0
- data/src/core/lib/gpr/env_linux.cc +75 -0
- data/src/core/lib/gpr/env_posix.cc +46 -0
- data/src/core/lib/gpr/env_windows.cc +74 -0
- data/src/core/lib/gpr/log.cc +140 -0
- data/src/core/lib/gpr/log_android.cc +77 -0
- data/src/core/lib/gpr/log_linux.cc +114 -0
- data/src/core/lib/gpr/log_posix.cc +110 -0
- data/src/core/lib/gpr/log_windows.cc +116 -0
- data/src/core/lib/gpr/murmur_hash.cc +82 -0
- data/src/core/lib/gpr/murmur_hash.h +29 -0
- data/src/core/lib/gpr/spinlock.h +53 -0
- data/src/core/lib/gpr/string.cc +343 -0
- data/src/core/lib/gpr/string.h +112 -0
- data/src/core/lib/gpr/string_posix.cc +72 -0
- data/src/core/lib/gpr/string_util_windows.cc +82 -0
- data/src/core/lib/gpr/string_windows.cc +69 -0
- data/src/core/lib/gpr/string_windows.h +32 -0
- data/src/core/lib/gpr/sync.cc +124 -0
- data/src/core/lib/gpr/sync_abseil.cc +114 -0
- data/src/core/lib/gpr/sync_posix.cc +170 -0
- data/src/core/lib/gpr/sync_windows.cc +120 -0
- data/src/core/lib/gpr/time.cc +264 -0
- data/src/core/lib/gpr/time_posix.cc +186 -0
- data/src/core/lib/gpr/time_precise.cc +168 -0
- data/src/core/lib/gpr/time_precise.h +70 -0
- data/src/core/lib/gpr/time_windows.cc +99 -0
- data/src/core/lib/gpr/tls.h +151 -0
- data/src/core/lib/gpr/tmpfile.h +32 -0
- data/src/core/lib/gpr/tmpfile_msys.cc +58 -0
- data/src/core/lib/gpr/tmpfile_posix.cc +69 -0
- data/src/core/lib/gpr/tmpfile_windows.cc +69 -0
- data/src/core/lib/gpr/useful.h +113 -0
- data/src/core/lib/gpr/wrap_memcpy.cc +43 -0
- data/src/core/lib/gprpp/arena.cc +104 -0
- data/src/core/lib/gprpp/arena.h +131 -0
- data/src/core/lib/gprpp/atomic_utils.h +47 -0
- data/src/core/lib/gprpp/bitset.h +188 -0
- data/src/core/lib/gprpp/chunked_vector.h +211 -0
- data/src/core/lib/gprpp/construct_destruct.h +39 -0
- data/src/core/lib/gprpp/debug_location.h +53 -0
- data/src/core/lib/gprpp/dual_ref_counted.h +330 -0
- data/src/core/lib/gprpp/examine_stack.cc +43 -0
- data/src/core/lib/gprpp/examine_stack.h +46 -0
- data/src/core/lib/gprpp/fork.cc +244 -0
- data/src/core/lib/gprpp/fork.h +103 -0
- data/src/core/lib/gprpp/global_config.h +95 -0
- data/src/core/lib/gprpp/global_config_custom.h +29 -0
- data/src/core/lib/gprpp/global_config_env.cc +137 -0
- data/src/core/lib/gprpp/global_config_env.h +131 -0
- data/src/core/lib/gprpp/global_config_generic.h +44 -0
- data/src/core/lib/gprpp/host_port.cc +112 -0
- data/src/core/lib/gprpp/host_port.h +56 -0
- data/src/core/lib/gprpp/manual_constructor.h +216 -0
- data/src/core/lib/gprpp/match.h +73 -0
- data/src/core/lib/gprpp/memory.h +57 -0
- data/src/core/lib/gprpp/mpscq.cc +108 -0
- data/src/core/lib/gprpp/mpscq.h +99 -0
- data/src/core/lib/gprpp/orphanable.h +125 -0
- data/src/core/lib/gprpp/overload.h +59 -0
- data/src/core/lib/gprpp/ref_counted.h +349 -0
- data/src/core/lib/gprpp/ref_counted_ptr.h +353 -0
- data/src/core/lib/gprpp/stat.h +38 -0
- data/src/core/lib/gprpp/stat_posix.cc +49 -0
- data/src/core/lib/gprpp/stat_windows.cc +48 -0
- data/src/core/lib/gprpp/status_helper.cc +427 -0
- data/src/core/lib/gprpp/status_helper.h +194 -0
- data/src/core/lib/gprpp/sync.h +198 -0
- data/src/core/lib/gprpp/table.h +411 -0
- data/src/core/lib/gprpp/thd.h +174 -0
- data/src/core/lib/gprpp/thd_posix.cc +209 -0
- data/src/core/lib/gprpp/thd_windows.cc +171 -0
- data/src/core/lib/gprpp/time_util.cc +77 -0
- data/src/core/lib/gprpp/time_util.h +42 -0
- data/src/core/lib/http/format_request.cc +104 -0
- data/src/core/lib/http/format_request.h +35 -0
- data/src/core/lib/http/httpcli.cc +324 -0
- data/src/core/lib/http/httpcli.h +128 -0
- data/src/core/lib/http/httpcli_security_connector.cc +215 -0
- data/src/core/lib/http/parser.cc +392 -0
- data/src/core/lib/http/parser.h +114 -0
- data/src/core/lib/iomgr/block_annotate.h +57 -0
- data/src/core/lib/iomgr/buffer_list.cc +307 -0
- data/src/core/lib/iomgr/buffer_list.h +163 -0
- data/src/core/lib/iomgr/call_combiner.cc +281 -0
- data/src/core/lib/iomgr/call_combiner.h +215 -0
- data/src/core/lib/iomgr/cfstream_handle.cc +210 -0
- data/src/core/lib/iomgr/cfstream_handle.h +90 -0
- data/src/core/lib/iomgr/closure.h +256 -0
- data/src/core/lib/iomgr/combiner.cc +328 -0
- data/src/core/lib/iomgr/combiner.h +89 -0
- data/src/core/lib/iomgr/dualstack_socket_posix.cc +48 -0
- data/src/core/lib/iomgr/dynamic_annotations.h +67 -0
- data/src/core/lib/iomgr/endpoint.cc +67 -0
- data/src/core/lib/iomgr/endpoint.h +108 -0
- data/src/core/lib/iomgr/endpoint_cfstream.cc +389 -0
- data/src/core/lib/iomgr/endpoint_cfstream.h +49 -0
- data/src/core/lib/iomgr/endpoint_pair.h +34 -0
- data/src/core/lib/iomgr/endpoint_pair_event_engine.cc +32 -0
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +77 -0
- data/src/core/lib/iomgr/endpoint_pair_windows.cc +95 -0
- data/src/core/lib/iomgr/error.cc +985 -0
- data/src/core/lib/iomgr/error.h +442 -0
- data/src/core/lib/iomgr/error_cfstream.cc +59 -0
- data/src/core/lib/iomgr/error_cfstream.h +31 -0
- data/src/core/lib/iomgr/error_internal.h +66 -0
- data/src/core/lib/iomgr/ev_apple.cc +359 -0
- data/src/core/lib/iomgr/ev_apple.h +43 -0
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +1364 -0
- data/src/core/lib/iomgr/ev_epoll1_linux.h +31 -0
- data/src/core/lib/iomgr/ev_epollex_linux.cc +1654 -0
- data/src/core/lib/iomgr/ev_epollex_linux.h +30 -0
- data/src/core/lib/iomgr/ev_poll_posix.cc +1430 -0
- data/src/core/lib/iomgr/ev_poll_posix.h +29 -0
- data/src/core/lib/iomgr/ev_posix.cc +417 -0
- data/src/core/lib/iomgr/ev_posix.h +207 -0
- data/src/core/lib/iomgr/ev_windows.cc +30 -0
- data/src/core/lib/iomgr/event_engine/closure.cc +77 -0
- data/src/core/lib/iomgr/event_engine/closure.h +42 -0
- data/src/core/lib/iomgr/event_engine/endpoint.cc +173 -0
- data/src/core/lib/iomgr/event_engine/endpoint.h +52 -0
- data/src/core/lib/iomgr/event_engine/iomgr.cc +104 -0
- data/src/core/lib/iomgr/event_engine/iomgr.h +42 -0
- data/src/core/lib/iomgr/event_engine/pollset.cc +88 -0
- data/src/core/lib/iomgr/event_engine/pollset.h +25 -0
- data/src/core/lib/iomgr/event_engine/promise.h +51 -0
- data/src/core/lib/iomgr/event_engine/resolved_address_internal.cc +41 -0
- data/src/core/lib/iomgr/event_engine/resolved_address_internal.h +35 -0
- data/src/core/lib/iomgr/event_engine/resolver.cc +114 -0
- data/src/core/lib/iomgr/event_engine/tcp.cc +293 -0
- data/src/core/lib/iomgr/event_engine/timer.cc +62 -0
- data/src/core/lib/iomgr/exec_ctx.cc +227 -0
- data/src/core/lib/iomgr/exec_ctx.h +375 -0
- data/src/core/lib/iomgr/executor/mpmcqueue.cc +182 -0
- data/src/core/lib/iomgr/executor/mpmcqueue.h +171 -0
- data/src/core/lib/iomgr/executor/threadpool.cc +136 -0
- data/src/core/lib/iomgr/executor/threadpool.h +150 -0
- data/src/core/lib/iomgr/executor.cc +455 -0
- data/src/core/lib/iomgr/executor.h +122 -0
- data/src/core/lib/iomgr/fork_posix.cc +119 -0
- data/src/core/lib/iomgr/fork_windows.cc +41 -0
- data/src/core/lib/iomgr/gethostname.h +26 -0
- data/src/core/lib/iomgr/gethostname_fallback.cc +30 -0
- data/src/core/lib/iomgr/gethostname_host_name_max.cc +40 -0
- data/src/core/lib/iomgr/gethostname_sysconf.cc +40 -0
- data/src/core/lib/iomgr/grpc_if_nametoindex.h +30 -0
- data/src/core/lib/iomgr/grpc_if_nametoindex_posix.cc +42 -0
- data/src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc +38 -0
- data/src/core/lib/iomgr/internal_errqueue.cc +68 -0
- data/src/core/lib/iomgr/internal_errqueue.h +191 -0
- data/src/core/lib/iomgr/iocp_windows.cc +158 -0
- data/src/core/lib/iomgr/iocp_windows.h +48 -0
- data/src/core/lib/iomgr/iomgr.cc +196 -0
- data/src/core/lib/iomgr/iomgr.h +60 -0
- data/src/core/lib/iomgr/iomgr_custom.cc +79 -0
- data/src/core/lib/iomgr/iomgr_custom.h +49 -0
- data/src/core/lib/iomgr/iomgr_internal.cc +53 -0
- data/src/core/lib/iomgr/iomgr_internal.h +74 -0
- data/src/core/lib/iomgr/iomgr_posix.cc +90 -0
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +200 -0
- data/src/core/lib/iomgr/iomgr_windows.cc +105 -0
- data/src/core/lib/iomgr/is_epollexclusive_available.cc +119 -0
- data/src/core/lib/iomgr/is_epollexclusive_available.h +36 -0
- data/src/core/lib/iomgr/load_file.cc +81 -0
- data/src/core/lib/iomgr/load_file.h +35 -0
- data/src/core/lib/iomgr/lockfree_event.cc +278 -0
- data/src/core/lib/iomgr/lockfree_event.h +72 -0
- data/src/core/lib/iomgr/nameser.h +106 -0
- data/src/core/lib/iomgr/polling_entity.cc +96 -0
- data/src/core/lib/iomgr/polling_entity.h +68 -0
- data/src/core/lib/iomgr/pollset.cc +56 -0
- data/src/core/lib/iomgr/pollset.h +99 -0
- data/src/core/lib/iomgr/pollset_custom.cc +105 -0
- data/src/core/lib/iomgr/pollset_custom.h +37 -0
- data/src/core/lib/iomgr/pollset_set.cc +55 -0
- data/src/core/lib/iomgr/pollset_set.h +55 -0
- data/src/core/lib/iomgr/pollset_set_custom.cc +47 -0
- data/src/core/lib/iomgr/pollset_set_custom.h +26 -0
- data/src/core/lib/iomgr/pollset_set_windows.cc +52 -0
- data/src/core/lib/iomgr/pollset_set_windows.h +26 -0
- data/src/core/lib/iomgr/pollset_windows.cc +243 -0
- data/src/core/lib/iomgr/pollset_windows.h +70 -0
- data/src/core/lib/iomgr/port.h +221 -0
- data/src/core/lib/iomgr/python_util.h +47 -0
- data/src/core/lib/iomgr/resolve_address.cc +55 -0
- data/src/core/lib/iomgr/resolve_address.h +83 -0
- data/src/core/lib/iomgr/resolve_address_custom.cc +169 -0
- data/src/core/lib/iomgr/resolve_address_custom.h +44 -0
- data/src/core/lib/iomgr/resolve_address_posix.cc +170 -0
- data/src/core/lib/iomgr/resolve_address_windows.cc +152 -0
- data/src/core/lib/iomgr/resource_quota.cc +1106 -0
- data/src/core/lib/iomgr/resource_quota.h +226 -0
- data/src/core/lib/iomgr/sockaddr.h +33 -0
- data/src/core/lib/iomgr/sockaddr_posix.h +55 -0
- data/src/core/lib/iomgr/sockaddr_windows.h +55 -0
- data/src/core/lib/iomgr/socket_factory_posix.cc +95 -0
- data/src/core/lib/iomgr/socket_factory_posix.h +69 -0
- data/src/core/lib/iomgr/socket_mutator.cc +97 -0
- data/src/core/lib/iomgr/socket_mutator.h +84 -0
- data/src/core/lib/iomgr/socket_utils.h +47 -0
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +515 -0
- data/src/core/lib/iomgr/socket_utils_linux.cc +42 -0
- data/src/core/lib/iomgr/socket_utils_posix.cc +58 -0
- data/src/core/lib/iomgr/socket_utils_posix.h +163 -0
- data/src/core/lib/iomgr/socket_utils_windows.cc +47 -0
- data/src/core/lib/iomgr/socket_windows.cc +202 -0
- data/src/core/lib/iomgr/socket_windows.h +127 -0
- data/src/core/lib/iomgr/sys_epoll_wrapper.h +30 -0
- data/src/core/lib/iomgr/tcp_client.cc +38 -0
- data/src/core/lib/iomgr/tcp_client.h +56 -0
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +205 -0
- data/src/core/lib/iomgr/tcp_client_custom.cc +152 -0
- data/src/core/lib/iomgr/tcp_client_posix.cc +360 -0
- data/src/core/lib/iomgr/tcp_client_posix.h +70 -0
- data/src/core/lib/iomgr/tcp_client_windows.cc +241 -0
- data/src/core/lib/iomgr/tcp_custom.cc +377 -0
- data/src/core/lib/iomgr/tcp_custom.h +86 -0
- data/src/core/lib/iomgr/tcp_posix.cc +1848 -0
- data/src/core/lib/iomgr/tcp_posix.h +67 -0
- data/src/core/lib/iomgr/tcp_server.cc +79 -0
- data/src/core/lib/iomgr/tcp_server.h +149 -0
- data/src/core/lib/iomgr/tcp_server_custom.cc +467 -0
- data/src/core/lib/iomgr/tcp_server_posix.cc +645 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +128 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +223 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +175 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc +36 -0
- data/src/core/lib/iomgr/tcp_server_windows.cc +568 -0
- data/src/core/lib/iomgr/tcp_windows.cc +530 -0
- data/src/core/lib/iomgr/tcp_windows.h +54 -0
- data/src/core/lib/iomgr/time_averaged_stats.cc +64 -0
- data/src/core/lib/iomgr/time_averaged_stats.h +72 -0
- data/src/core/lib/iomgr/timer.cc +46 -0
- data/src/core/lib/iomgr/timer.h +131 -0
- data/src/core/lib/iomgr/timer_custom.cc +96 -0
- data/src/core/lib/iomgr/timer_custom.h +43 -0
- data/src/core/lib/iomgr/timer_generic.cc +718 -0
- data/src/core/lib/iomgr/timer_generic.h +40 -0
- data/src/core/lib/iomgr/timer_heap.cc +134 -0
- data/src/core/lib/iomgr/timer_heap.h +43 -0
- data/src/core/lib/iomgr/timer_manager.cc +363 -0
- data/src/core/lib/iomgr/timer_manager.h +41 -0
- data/src/core/lib/iomgr/unix_sockets_posix.cc +108 -0
- data/src/core/lib/iomgr/unix_sockets_posix.h +49 -0
- data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +62 -0
- data/src/core/lib/iomgr/wakeup_fd_eventfd.cc +82 -0
- data/src/core/lib/iomgr/wakeup_fd_nospecial.cc +39 -0
- data/src/core/lib/iomgr/wakeup_fd_pipe.cc +99 -0
- data/src/core/lib/iomgr/wakeup_fd_pipe.h +28 -0
- data/src/core/lib/iomgr/wakeup_fd_posix.cc +70 -0
- data/src/core/lib/iomgr/wakeup_fd_posix.h +98 -0
- data/src/core/lib/iomgr/work_serializer.cc +155 -0
- data/src/core/lib/iomgr/work_serializer.h +81 -0
- data/src/core/lib/json/json.h +250 -0
- data/src/core/lib/json/json_reader.cc +849 -0
- data/src/core/lib/json/json_util.cc +126 -0
- data/src/core/lib/json/json_util.h +154 -0
- data/src/core/lib/json/json_writer.cc +335 -0
- data/src/core/lib/matchers/matchers.cc +327 -0
- data/src/core/lib/matchers/matchers.h +160 -0
- data/src/core/lib/profiling/basic_timers.cc +295 -0
- data/src/core/lib/profiling/stap_timers.cc +50 -0
- data/src/core/lib/profiling/timers.h +94 -0
- data/src/core/lib/security/authorization/authorization_engine.h +44 -0
- data/src/core/lib/security/authorization/authorization_policy_provider.h +33 -0
- data/src/core/lib/security/authorization/authorization_policy_provider_vtable.cc +46 -0
- data/src/core/lib/security/authorization/evaluate_args.cc +213 -0
- data/src/core/lib/security/authorization/evaluate_args.h +91 -0
- data/src/core/lib/security/authorization/sdk_server_authz_filter.cc +171 -0
- data/src/core/lib/security/authorization/sdk_server_authz_filter.h +67 -0
- data/src/core/lib/security/context/security_context.cc +325 -0
- data/src/core/lib/security/context/security_context.h +152 -0
- data/src/core/lib/security/credentials/alts/alts_credentials.cc +111 -0
- data/src/core/lib/security/credentials/alts/alts_credentials.h +109 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment.cc +72 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment.h +57 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc +68 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc +33 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +102 -0
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc +127 -0
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc +46 -0
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h +75 -0
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc +59 -0
- data/src/core/lib/security/credentials/composite/composite_credentials.cc +230 -0
- data/src/core/lib/security/credentials/composite/composite_credentials.h +106 -0
- data/src/core/lib/security/credentials/credentials.cc +164 -0
- data/src/core/lib/security/credentials/credentials.h +291 -0
- data/src/core/lib/security/credentials/credentials_metadata.cc +61 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +404 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.h +81 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.cc +214 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.h +72 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +527 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.h +122 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +136 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.h +49 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +211 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.h +60 -0
- data/src/core/lib/security/credentials/fake/fake_credentials.cc +113 -0
- data/src/core/lib/security/credentials/fake/fake_credentials.h +87 -0
- data/src/core/lib/security/credentials/google_default/credentials_generic.cc +42 -0
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +465 -0
- data/src/core/lib/security/credentials/google_default/google_default_credentials.h +87 -0
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +81 -0
- data/src/core/lib/security/credentials/iam/iam_credentials.h +49 -0
- data/src/core/lib/security/credentials/insecure/insecure_credentials.cc +64 -0
- data/src/core/lib/security/credentials/jwt/json_token.cc +288 -0
- data/src/core/lib/security/credentials/jwt/json_token.h +76 -0
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +192 -0
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +89 -0
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +922 -0
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +122 -0
- data/src/core/lib/security/credentials/local/local_credentials.cc +65 -0
- data/src/core/lib/security/credentials/local/local_credentials.h +61 -0
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +753 -0
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +173 -0
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +267 -0
- data/src/core/lib/security/credentials/plugin/plugin_credentials.h +72 -0
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +385 -0
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +108 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +348 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +217 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +455 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +147 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +177 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +193 -0
- data/src/core/lib/security/credentials/tls/tls_credentials.cc +133 -0
- data/src/core/lib/security/credentials/tls/tls_credentials.h +62 -0
- data/src/core/lib/security/credentials/tls/tls_utils.cc +123 -0
- data/src/core/lib/security/credentials/tls/tls_utils.h +51 -0
- data/src/core/lib/security/credentials/xds/xds_credentials.cc +244 -0
- data/src/core/lib/security/credentials/xds/xds_credentials.h +69 -0
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +311 -0
- data/src/core/lib/security/security_connector/alts/alts_security_connector.h +76 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +327 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.h +45 -0
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc +121 -0
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +97 -0
- data/src/core/lib/security/security_connector/load_system_roots.h +33 -0
- data/src/core/lib/security/security_connector/load_system_roots_fallback.cc +33 -0
- data/src/core/lib/security/security_connector/load_system_roots_linux.cc +171 -0
- data/src/core/lib/security/security_connector/load_system_roots_linux.h +46 -0
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +294 -0
- data/src/core/lib/security/security_connector/local/local_security_connector.h +59 -0
- data/src/core/lib/security/security_connector/security_connector.cc +137 -0
- data/src/core/lib/security/security_connector/security_connector.h +183 -0
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +453 -0
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +81 -0
- data/src/core/lib/security/security_connector/ssl_utils.cc +611 -0
- data/src/core/lib/security/security_connector/ssl_utils.h +188 -0
- data/src/core/lib/security/security_connector/ssl_utils_config.cc +32 -0
- data/src/core/lib/security/security_connector/ssl_utils_config.h +30 -0
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +667 -0
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +243 -0
- data/src/core/lib/security/transport/auth_filters.h +36 -0
- data/src/core/lib/security/transport/client_auth_filter.cc +473 -0
- data/src/core/lib/security/transport/secure_endpoint.cc +442 -0
- data/src/core/lib/security/transport/secure_endpoint.h +42 -0
- data/src/core/lib/security/transport/security_handshaker.cc +642 -0
- data/src/core/lib/security/transport/security_handshaker.h +46 -0
- data/src/core/lib/security/transport/server_auth_filter.cc +331 -0
- data/src/core/lib/security/transport/tsi_error.cc +28 -0
- data/src/core/lib/security/transport/tsi_error.h +30 -0
- data/src/core/lib/security/util/json_util.cc +70 -0
- data/src/core/lib/security/util/json_util.h +45 -0
- data/src/core/lib/slice/b64.cc +239 -0
- data/src/core/lib/slice/b64.h +50 -0
- data/src/core/lib/slice/percent_encoding.cc +212 -0
- data/src/core/lib/slice/percent_encoding.h +66 -0
- data/src/core/lib/slice/slice.cc +592 -0
- data/src/core/lib/slice/slice_api.cc +39 -0
- data/src/core/lib/slice/slice_buffer.cc +413 -0
- data/src/core/lib/slice/slice_intern.cc +367 -0
- data/src/core/lib/slice/slice_internal.h +123 -0
- data/src/core/lib/slice/slice_refcount.cc +17 -0
- data/src/core/lib/slice/slice_refcount.h +121 -0
- data/src/core/lib/slice/slice_refcount_base.h +173 -0
- data/src/core/lib/slice/slice_split.cc +100 -0
- data/src/core/lib/slice/slice_split.h +40 -0
- data/src/core/lib/slice/slice_string_helpers.cc +44 -0
- data/src/core/lib/slice/slice_string_helpers.h +38 -0
- data/src/core/lib/slice/slice_utils.h +200 -0
- data/src/core/lib/slice/static_slice.cc +529 -0
- data/src/core/lib/slice/static_slice.h +331 -0
- data/src/core/lib/surface/api_trace.cc +25 -0
- data/src/core/lib/surface/api_trace.h +53 -0
- data/src/core/lib/surface/builtins.cc +49 -0
- data/src/core/lib/surface/builtins.h +26 -0
- data/src/core/lib/surface/byte_buffer.cc +92 -0
- data/src/core/lib/surface/byte_buffer_reader.cc +101 -0
- data/src/core/lib/surface/call.cc +2056 -0
- data/src/core/lib/surface/call.h +131 -0
- data/src/core/lib/surface/call_details.cc +41 -0
- data/src/core/lib/surface/call_log_batch.cc +111 -0
- data/src/core/lib/surface/call_test_only.h +43 -0
- data/src/core/lib/surface/channel.cc +535 -0
- data/src/core/lib/surface/channel.h +178 -0
- data/src/core/lib/surface/channel_init.cc +56 -0
- data/src/core/lib/surface/channel_init.h +86 -0
- data/src/core/lib/surface/channel_ping.cc +63 -0
- data/src/core/lib/surface/channel_stack_type.cc +59 -0
- data/src/core/lib/surface/channel_stack_type.h +47 -0
- data/src/core/lib/surface/completion_queue.cc +1429 -0
- data/src/core/lib/surface/completion_queue.h +98 -0
- data/src/core/lib/surface/completion_queue_factory.cc +88 -0
- data/src/core/lib/surface/completion_queue_factory.h +39 -0
- data/src/core/lib/surface/event_string.cc +62 -0
- data/src/core/lib/surface/event_string.h +31 -0
- data/src/core/lib/surface/init.cc +220 -0
- data/src/core/lib/surface/init.h +35 -0
- data/src/core/lib/surface/init_secure.cc +103 -0
- data/src/core/lib/surface/lame_client.cc +192 -0
- data/src/core/lib/surface/lame_client.h +33 -0
- data/src/core/lib/surface/metadata_array.cc +36 -0
- data/src/core/lib/surface/server.cc +1608 -0
- data/src/core/lib/surface/server.h +497 -0
- data/src/core/lib/surface/validate_metadata.cc +136 -0
- data/src/core/lib/surface/validate_metadata.h +45 -0
- data/src/core/lib/surface/version.cc +28 -0
- data/src/core/lib/transport/bdp_estimator.cc +87 -0
- data/src/core/lib/transport/bdp_estimator.h +95 -0
- data/src/core/lib/transport/byte_stream.cc +158 -0
- data/src/core/lib/transport/byte_stream.h +166 -0
- data/src/core/lib/transport/connectivity_state.cc +188 -0
- data/src/core/lib/transport/connectivity_state.h +145 -0
- data/src/core/lib/transport/error_utils.cc +191 -0
- data/src/core/lib/transport/error_utils.h +58 -0
- data/src/core/lib/transport/http2_errors.h +41 -0
- data/src/core/lib/transport/metadata.cc +714 -0
- data/src/core/lib/transport/metadata.h +449 -0
- data/src/core/lib/transport/metadata_batch.cc +94 -0
- data/src/core/lib/transport/metadata_batch.h +1055 -0
- data/src/core/lib/transport/parsed_metadata.h +263 -0
- data/src/core/lib/transport/pid_controller.cc +51 -0
- data/src/core/lib/transport/pid_controller.h +116 -0
- data/src/core/lib/transport/static_metadata.cc +1117 -0
- data/src/core/lib/transport/static_metadata.h +340 -0
- data/src/core/lib/transport/status_conversion.cc +92 -0
- data/src/core/lib/transport/status_conversion.h +38 -0
- data/src/core/lib/transport/status_metadata.cc +63 -0
- data/src/core/lib/transport/status_metadata.h +48 -0
- data/src/core/lib/transport/timeout_encoding.cc +151 -0
- data/src/core/lib/transport/timeout_encoding.h +38 -0
- data/src/core/lib/transport/transport.cc +261 -0
- data/src/core/lib/transport/transport.h +471 -0
- data/src/core/lib/transport/transport_impl.h +71 -0
- data/src/core/lib/transport/transport_op_string.cc +189 -0
- data/src/core/lib/uri/uri_parser.cc +191 -0
- data/src/core/lib/uri/uri_parser.h +87 -0
- data/src/core/plugin_registry/grpc_plugin_registry.cc +197 -0
- data/src/core/tsi/alts/crypt/aes_gcm.cc +690 -0
- data/src/core/tsi/alts/crypt/gsec.cc +190 -0
- data/src/core/tsi/alts/crypt/gsec.h +459 -0
- data/src/core/tsi/alts/frame_protector/alts_counter.cc +118 -0
- data/src/core/tsi/alts/frame_protector/alts_counter.h +98 -0
- data/src/core/tsi/alts/frame_protector/alts_crypter.cc +66 -0
- data/src/core/tsi/alts/frame_protector/alts_crypter.h +255 -0
- data/src/core/tsi/alts/frame_protector/alts_frame_protector.cc +408 -0
- data/src/core/tsi/alts/frame_protector/alts_frame_protector.h +55 -0
- data/src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.cc +114 -0
- data/src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.h +114 -0
- data/src/core/tsi/alts/frame_protector/alts_seal_privacy_integrity_crypter.cc +105 -0
- data/src/core/tsi/alts/frame_protector/alts_unseal_privacy_integrity_crypter.cc +103 -0
- data/src/core/tsi/alts/frame_protector/frame_handler.cc +219 -0
- data/src/core/tsi/alts/frame_protector/frame_handler.h +236 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +903 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +160 -0
- data/src/core/tsi/alts/handshaker/alts_shared_resource.cc +83 -0
- data/src/core/tsi/alts/handshaker/alts_shared_resource.h +73 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +705 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +104 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +89 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.cc +64 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.h +53 -0
- data/src/core/tsi/alts/handshaker/transport_security_common_api.cc +223 -0
- data/src/core/tsi/alts/handshaker/transport_security_common_api.h +171 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc +226 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h +54 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc +144 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h +49 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol.h +91 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc +174 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h +99 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc +478 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h +199 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +307 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h +57 -0
- data/src/core/tsi/fake_transport_security.cc +809 -0
- data/src/core/tsi/fake_transport_security.h +47 -0
- data/src/core/tsi/local_transport_security.cc +178 -0
- data/src/core/tsi/local_transport_security.h +50 -0
- data/src/core/tsi/ssl/session_cache/ssl_session.h +71 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +57 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +179 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +92 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +75 -0
- data/src/core/tsi/ssl_transport_security.cc +2260 -0
- data/src/core/tsi/ssl_transport_security.h +366 -0
- data/src/core/tsi/ssl_types.h +42 -0
- data/src/core/tsi/transport_security.cc +384 -0
- data/src/core/tsi/transport_security.h +142 -0
- data/src/core/tsi/transport_security_grpc.cc +73 -0
- data/src/core/tsi/transport_security_grpc.h +80 -0
- data/src/core/tsi/transport_security_interface.h +507 -0
- data/src/ruby/bin/math_client.rb +140 -0
- data/src/ruby/bin/math_pb.rb +34 -0
- data/src/ruby/bin/math_server.rb +191 -0
- data/src/ruby/bin/math_services_pb.rb +51 -0
- data/src/ruby/bin/noproto_client.rb +93 -0
- data/src/ruby/bin/noproto_server.rb +97 -0
- data/src/ruby/ext/grpc/ext-export.clang +1 -0
- data/src/ruby/ext/grpc/ext-export.gcc +6 -0
- data/src/ruby/ext/grpc/extconf.rb +129 -0
- data/src/ruby/ext/grpc/extconf.rb.orig +130 -0
- data/src/ruby/ext/grpc/extconf.rb.rej +18 -0
- data/src/ruby/ext/grpc/rb_byte_buffer.c +65 -0
- data/src/ruby/ext/grpc/rb_byte_buffer.h +35 -0
- data/src/ruby/ext/grpc/rb_call.c +1051 -0
- data/src/ruby/ext/grpc/rb_call.h +57 -0
- data/src/ruby/ext/grpc/rb_call_credentials.c +341 -0
- data/src/ruby/ext/grpc/rb_call_credentials.h +31 -0
- data/src/ruby/ext/grpc/rb_channel.c +846 -0
- data/src/ruby/ext/grpc/rb_channel.h +34 -0
- data/src/ruby/ext/grpc/rb_channel_args.c +155 -0
- data/src/ruby/ext/grpc/rb_channel_args.h +38 -0
- data/src/ruby/ext/grpc/rb_channel_credentials.c +286 -0
- data/src/ruby/ext/grpc/rb_channel_credentials.h +37 -0
- data/src/ruby/ext/grpc/rb_completion_queue.c +101 -0
- data/src/ruby/ext/grpc/rb_completion_queue.h +36 -0
- data/src/ruby/ext/grpc/rb_compression_options.c +471 -0
- data/src/ruby/ext/grpc/rb_compression_options.h +29 -0
- data/src/ruby/ext/grpc/rb_enable_cpp.cc +22 -0
- data/src/ruby/ext/grpc/rb_event_thread.c +145 -0
- data/src/ruby/ext/grpc/rb_event_thread.h +21 -0
- data/src/ruby/ext/grpc/rb_grpc.c +333 -0
- data/src/ruby/ext/grpc/rb_grpc.h +77 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +605 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +913 -0
- data/src/ruby/ext/grpc/rb_loader.c +57 -0
- data/src/ruby/ext/grpc/rb_loader.h +25 -0
- data/src/ruby/ext/grpc/rb_server.c +385 -0
- data/src/ruby/ext/grpc/rb_server.h +32 -0
- data/src/ruby/ext/grpc/rb_server_credentials.c +259 -0
- data/src/ruby/ext/grpc/rb_server_credentials.h +37 -0
- data/src/ruby/ext/grpc/rb_xds_channel_credentials.c +218 -0
- data/src/ruby/ext/grpc/rb_xds_channel_credentials.h +37 -0
- data/src/ruby/ext/grpc/rb_xds_server_credentials.c +170 -0
- data/src/ruby/ext/grpc/rb_xds_server_credentials.h +37 -0
- data/src/ruby/lib/grpc/core/status_codes.rb +135 -0
- data/src/ruby/lib/grpc/core/time_consts.rb +56 -0
- data/src/ruby/lib/grpc/errors.rb +277 -0
- data/src/ruby/lib/grpc/generic/active_call.rb +669 -0
- data/src/ruby/lib/grpc/generic/bidi_call.rb +233 -0
- data/src/ruby/lib/grpc/generic/client_stub.rb +503 -0
- data/src/ruby/lib/grpc/generic/interceptor_registry.rb +53 -0
- data/src/ruby/lib/grpc/generic/interceptors.rb +186 -0
- data/src/ruby/lib/grpc/generic/rpc_desc.rb +204 -0
- data/src/ruby/lib/grpc/generic/rpc_server.rb +551 -0
- data/src/ruby/lib/grpc/generic/service.rb +211 -0
- data/src/ruby/lib/grpc/google_rpc_status_utils.rb +40 -0
- data/src/ruby/lib/grpc/grpc.rb +24 -0
- data/src/ruby/lib/grpc/logconfig.rb +44 -0
- data/src/ruby/lib/grpc/notifier.rb +45 -0
- data/src/ruby/lib/grpc/structs.rb +15 -0
- data/src/ruby/lib/grpc/version.rb +18 -0
- data/src/ruby/lib/grpc.rb +37 -0
- data/src/ruby/pb/README.md +42 -0
- data/src/ruby/pb/generate_proto_ruby.sh +51 -0
- data/src/ruby/pb/grpc/health/checker.rb +75 -0
- data/src/ruby/pb/grpc/health/v1/health_pb.rb +31 -0
- data/src/ruby/pb/grpc/health/v1/health_services_pb.rb +62 -0
- data/src/ruby/pb/grpc/testing/duplicate/echo_duplicate_services_pb.rb +44 -0
- data/src/ruby/pb/grpc/testing/metrics_pb.rb +28 -0
- data/src/ruby/pb/grpc/testing/metrics_services_pb.rb +49 -0
- data/src/ruby/pb/src/proto/grpc/testing/empty_pb.rb +17 -0
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +145 -0
- data/src/ruby/pb/src/proto/grpc/testing/test_pb.rb +16 -0
- data/src/ruby/pb/src/proto/grpc/testing/test_services_pb.rb +152 -0
- data/src/ruby/spec/call_credentials_spec.rb +42 -0
- data/src/ruby/spec/call_spec.rb +180 -0
- data/src/ruby/spec/channel_connection_spec.rb +126 -0
- data/src/ruby/spec/channel_credentials_spec.rb +124 -0
- data/src/ruby/spec/channel_spec.rb +245 -0
- data/src/ruby/spec/client_auth_spec.rb +152 -0
- data/src/ruby/spec/client_server_spec.rb +664 -0
- data/src/ruby/spec/compression_options_spec.rb +149 -0
- data/src/ruby/spec/debug_message_spec.rb +134 -0
- data/src/ruby/spec/error_sanity_spec.rb +49 -0
- data/src/ruby/spec/errors_spec.rb +142 -0
- data/src/ruby/spec/errors_spec.rb.rej +11 -0
- data/src/ruby/spec/generic/active_call_spec.rb +683 -0
- data/src/ruby/spec/generic/client_interceptors_spec.rb +153 -0
- data/src/ruby/spec/generic/client_stub_spec.rb +1083 -0
- data/src/ruby/spec/generic/interceptor_registry_spec.rb +65 -0
- data/src/ruby/spec/generic/rpc_desc_spec.rb +374 -0
- data/src/ruby/spec/generic/rpc_server_pool_spec.rb +127 -0
- data/src/ruby/spec/generic/rpc_server_spec.rb +748 -0
- data/src/ruby/spec/generic/server_interceptors_spec.rb +218 -0
- data/src/ruby/spec/generic/service_spec.rb +263 -0
- data/src/ruby/spec/google_rpc_status_utils_spec.rb +282 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options.proto +28 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options_import.proto +22 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options_import2.proto +23 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options_ruby_style.proto +41 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/same_package_service_name.proto +27 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/same_ruby_package_service_name.proto +29 -0
- data/src/ruby/spec/pb/codegen/package_option_spec.rb +98 -0
- data/src/ruby/spec/pb/duplicate/codegen_spec.rb +57 -0
- data/src/ruby/spec/pb/health/checker_spec.rb +236 -0
- data/src/ruby/spec/server_credentials_spec.rb +104 -0
- data/src/ruby/spec/server_spec.rb +231 -0
- data/src/ruby/spec/spec_helper.rb +61 -0
- data/src/ruby/spec/support/helpers.rb +107 -0
- data/src/ruby/spec/support/services.rb +160 -0
- data/src/ruby/spec/testdata/README +1 -0
- data/src/ruby/spec/testdata/ca.pem +20 -0
- data/src/ruby/spec/testdata/client.key +28 -0
- data/src/ruby/spec/testdata/client.pem +20 -0
- data/src/ruby/spec/testdata/server1.key +28 -0
- data/src/ruby/spec/testdata/server1.pem +22 -0
- data/src/ruby/spec/time_consts_spec.rb +74 -0
- data/src/ruby/spec/user_agent_spec.rb +74 -0
- data/third_party/abseil-cpp/absl/algorithm/algorithm.h +159 -0
- data/third_party/abseil-cpp/absl/algorithm/container.h +1764 -0
- data/third_party/abseil-cpp/absl/base/attributes.h +702 -0
- data/third_party/abseil-cpp/absl/base/call_once.h +219 -0
- data/third_party/abseil-cpp/absl/base/casts.h +187 -0
- data/third_party/abseil-cpp/absl/base/config.h +742 -0
- data/third_party/abseil-cpp/absl/base/const_init.h +76 -0
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +496 -0
- data/third_party/abseil-cpp/absl/base/internal/atomic_hook.h +200 -0
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.cc +107 -0
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.h +94 -0
- data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +169 -0
- data/third_party/abseil-cpp/absl/base/internal/dynamic_annotations.h +398 -0
- data/third_party/abseil-cpp/absl/base/internal/endian.h +327 -0
- data/third_party/abseil-cpp/absl/base/internal/errno_saver.h +43 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.cc +93 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.h +130 -0
- data/third_party/abseil-cpp/absl/base/internal/hide_ptr.h +51 -0
- data/third_party/abseil-cpp/absl/base/internal/identity.h +37 -0
- data/third_party/abseil-cpp/absl/base/internal/inline_variable.h +107 -0
- data/third_party/abseil-cpp/absl/base/internal/invoke.h +187 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +620 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h +126 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +134 -0
- data/third_party/abseil-cpp/absl/base/internal/per_thread_tls.h +52 -0
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +242 -0
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +195 -0
- data/third_party/abseil-cpp/absl/base/internal/scheduling_mode.h +58 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +229 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +246 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_akaros.inc +35 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +74 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_posix.inc +46 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.cc +81 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.h +93 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_win32.inc +37 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +439 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.h +74 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_annotations.h +271 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.cc +155 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.h +265 -0
- data/third_party/abseil-cpp/absl/base/internal/throw_delegate.cc +212 -0
- data/third_party/abseil-cpp/absl/base/internal/throw_delegate.h +75 -0
- data/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h +68 -0
- data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +82 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +138 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +124 -0
- data/third_party/abseil-cpp/absl/base/log_severity.cc +27 -0
- data/third_party/abseil-cpp/absl/base/log_severity.h +121 -0
- data/third_party/abseil-cpp/absl/base/macros.h +158 -0
- data/third_party/abseil-cpp/absl/base/optimization.h +244 -0
- data/third_party/abseil-cpp/absl/base/options.h +238 -0
- data/third_party/abseil-cpp/absl/base/policy_checks.h +111 -0
- data/third_party/abseil-cpp/absl/base/port.h +25 -0
- data/third_party/abseil-cpp/absl/base/thread_annotations.h +335 -0
- data/third_party/abseil-cpp/absl/container/fixed_array.h +532 -0
- data/third_party/abseil-cpp/absl/container/flat_hash_map.h +606 -0
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +847 -0
- data/third_party/abseil-cpp/absl/container/internal/common.h +206 -0
- data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +290 -0
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +460 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +161 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +208 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtable_debug_hooks.h +85 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +274 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +322 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc +31 -0
- data/third_party/abseil-cpp/absl/container/internal/have_sse.h +50 -0
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +967 -0
- data/third_party/abseil-cpp/absl/container/internal/layout.h +743 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +197 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +61 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +1903 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +139 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.h +32 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +1949 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.h +71 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +382 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +134 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +199 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +134 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +80 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +108 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +253 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +24 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +93 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +346 -0
- data/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +147 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +173 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.h +158 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +140 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.h +231 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.cc +36 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.h +99 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_darwin.inc +101 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +1560 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_unimplemented.inc +40 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +81 -0
- data/third_party/abseil-cpp/absl/functional/bind_front.h +184 -0
- data/third_party/abseil-cpp/absl/functional/function_ref.h +139 -0
- data/third_party/abseil-cpp/absl/functional/internal/front_binder.h +95 -0
- data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +106 -0
- data/third_party/abseil-cpp/absl/hash/hash.h +325 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.cc +349 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.h +78 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +70 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +1045 -0
- data/third_party/abseil-cpp/absl/hash/internal/wyhash.cc +111 -0
- data/third_party/abseil-cpp/absl/hash/internal/wyhash.h +48 -0
- data/third_party/abseil-cpp/absl/memory/memory.h +699 -0
- data/third_party/abseil-cpp/absl/meta/type_traits.h +767 -0
- data/third_party/abseil-cpp/absl/numeric/bits.h +177 -0
- data/third_party/abseil-cpp/absl/numeric/int128.cc +390 -0
- data/third_party/abseil-cpp/absl/numeric/int128.h +1092 -0
- data/third_party/abseil-cpp/absl/numeric/int128_have_intrinsic.inc +302 -0
- data/third_party/abseil-cpp/absl/numeric/int128_no_intrinsic.inc +308 -0
- data/third_party/abseil-cpp/absl/numeric/internal/bits.h +358 -0
- data/third_party/abseil-cpp/absl/numeric/internal/representation.h +55 -0
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +69 -0
- data/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +396 -0
- data/third_party/abseil-cpp/absl/status/status.cc +452 -0
- data/third_party/abseil-cpp/absl/status/status.h +878 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.cc +38 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.h +51 -0
- data/third_party/abseil-cpp/absl/status/statusor.cc +71 -0
- data/third_party/abseil-cpp/absl/status/statusor.h +760 -0
- data/third_party/abseil-cpp/absl/strings/ascii.cc +200 -0
- data/third_party/abseil-cpp/absl/strings/ascii.h +242 -0
- data/third_party/abseil-cpp/absl/strings/charconv.cc +984 -0
- data/third_party/abseil-cpp/absl/strings/charconv.h +119 -0
- data/third_party/abseil-cpp/absl/strings/cord.cc +1953 -0
- data/third_party/abseil-cpp/absl/strings/cord.h +1394 -0
- data/third_party/abseil-cpp/absl/strings/escaping.cc +949 -0
- data/third_party/abseil-cpp/absl/strings/escaping.h +164 -0
- data/third_party/abseil-cpp/absl/strings/internal/char_map.h +156 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +359 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h +423 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +504 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.h +99 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.cc +83 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +543 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h +146 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.cc +897 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.h +589 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring_reader.h +114 -0
- data/third_party/abseil-cpp/absl/strings/internal/escaping.cc +180 -0
- data/third_party/abseil-cpp/absl/strings/internal/escaping.h +58 -0
- data/third_party/abseil-cpp/absl/strings/internal/memutil.cc +112 -0
- data/third_party/abseil-cpp/absl/strings/internal/memutil.h +148 -0
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.cc +36 -0
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.h +89 -0
- data/third_party/abseil-cpp/absl/strings/internal/resize_uninitialized.h +73 -0
- data/third_party/abseil-cpp/absl/strings/internal/stl_type_traits.h +248 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +488 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +518 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +259 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +217 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +333 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +75 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +427 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +1423 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +37 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.cc +72 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +96 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +350 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +349 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +314 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +430 -0
- data/third_party/abseil-cpp/absl/strings/internal/string_constant.h +64 -0
- data/third_party/abseil-cpp/absl/strings/internal/utf8.cc +53 -0
- data/third_party/abseil-cpp/absl/strings/internal/utf8.h +50 -0
- data/third_party/abseil-cpp/absl/strings/match.cc +43 -0
- data/third_party/abseil-cpp/absl/strings/match.h +100 -0
- data/third_party/abseil-cpp/absl/strings/numbers.cc +1093 -0
- data/third_party/abseil-cpp/absl/strings/numbers.h +266 -0
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +246 -0
- data/third_party/abseil-cpp/absl/strings/str_cat.h +408 -0
- data/third_party/abseil-cpp/absl/strings/str_format.h +813 -0
- data/third_party/abseil-cpp/absl/strings/str_join.h +293 -0
- data/third_party/abseil-cpp/absl/strings/str_replace.cc +82 -0
- data/third_party/abseil-cpp/absl/strings/str_replace.h +219 -0
- data/third_party/abseil-cpp/absl/strings/str_split.cc +139 -0
- data/third_party/abseil-cpp/absl/strings/str_split.h +548 -0
- data/third_party/abseil-cpp/absl/strings/string_view.cc +235 -0
- data/third_party/abseil-cpp/absl/strings/string_view.h +629 -0
- data/third_party/abseil-cpp/absl/strings/strip.h +91 -0
- data/third_party/abseil-cpp/absl/strings/substitute.cc +171 -0
- data/third_party/abseil-cpp/absl/strings/substitute.h +696 -0
- data/third_party/abseil-cpp/absl/synchronization/barrier.cc +52 -0
- data/third_party/abseil-cpp/absl/synchronization/barrier.h +79 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.cc +57 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.h +99 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +140 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.h +60 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/futex.h +154 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +698 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.h +141 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +156 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc +106 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +115 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc +428 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +155 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +2751 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +1082 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.cc +78 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.h +123 -0
- data/third_party/abseil-cpp/absl/time/civil_time.cc +175 -0
- data/third_party/abseil-cpp/absl/time/civil_time.h +538 -0
- data/third_party/abseil-cpp/absl/time/clock.cc +585 -0
- data/third_party/abseil-cpp/absl/time/clock.h +74 -0
- data/third_party/abseil-cpp/absl/time/duration.cc +954 -0
- data/third_party/abseil-cpp/absl/time/format.cc +160 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time.h +332 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h +628 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +386 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/zone_info_source.h +102 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc +94 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc +140 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.h +52 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +1029 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.cc +45 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.h +76 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc +113 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.h +93 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc +965 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.h +137 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc +315 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.h +55 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +187 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc +159 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.h +132 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h +122 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc +116 -0
- data/third_party/abseil-cpp/absl/time/internal/get_current_time_chrono.inc +31 -0
- data/third_party/abseil-cpp/absl/time/internal/get_current_time_posix.inc +24 -0
- data/third_party/abseil-cpp/absl/time/time.cc +500 -0
- data/third_party/abseil-cpp/absl/time/time.h +1585 -0
- data/third_party/abseil-cpp/absl/types/bad_optional_access.cc +48 -0
- data/third_party/abseil-cpp/absl/types/bad_optional_access.h +78 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.cc +64 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.h +82 -0
- data/third_party/abseil-cpp/absl/types/internal/optional.h +396 -0
- data/third_party/abseil-cpp/absl/types/internal/span.h +128 -0
- data/third_party/abseil-cpp/absl/types/internal/variant.h +1646 -0
- data/third_party/abseil-cpp/absl/types/optional.h +776 -0
- data/third_party/abseil-cpp/absl/types/span.h +726 -0
- data/third_party/abseil-cpp/absl/types/variant.h +866 -0
- data/third_party/abseil-cpp/absl/utility/utility.h +350 -0
- data/third_party/address_sorting/address_sorting.c +375 -0
- data/third_party/address_sorting/address_sorting_internal.h +70 -0
- data/third_party/address_sorting/address_sorting_posix.c +98 -0
- data/third_party/address_sorting/address_sorting_windows.c +95 -0
- data/third_party/address_sorting/include/address_sorting/address_sorting.h +115 -0
- data/third_party/boringssl-with-bazel/err_data.c +1489 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c +276 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.c +91 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_dup.c +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_enum.c +195 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.c +266 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_i2d_fp.c +88 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_int.c +420 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_mbstr.c +298 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c +288 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_octet.c +77 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_print.c +83 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strex.c +650 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strnid.c +266 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_time.c +212 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_type.c +163 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c +264 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utf8.c +236 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c +440 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_par.c +80 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.c +105 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/charmap.h +15 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_enum.c +93 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_int.c +97 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_string.c +91 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/internal.h +196 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c +1193 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c +709 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c +233 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c +332 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c +129 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c +281 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/time_support.c +206 -0
- data/third_party/boringssl-with-bazel/src/crypto/base64/base64.c +469 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio.c +702 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.c +324 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/connect.c +541 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/fd.c +275 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/file.c +311 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/hexdump.c +192 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/internal.h +111 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/pair.c +483 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/printf.c +115 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket.c +192 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket_helper.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/blake2/blake2.c +156 -0
- data/third_party/boringssl-with-bazel/src/crypto/bn_extra/bn_asn1.c +57 -0
- data/third_party/boringssl-with-bazel/src/crypto/bn_extra/convert.c +470 -0
- data/third_party/boringssl-with-bazel/src/crypto/buf/buf.c +172 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/asn1_compat.c +52 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/ber.c +264 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbb.c +728 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c +711 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/internal.h +96 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/unicode.c +155 -0
- data/third_party/boringssl-with-bazel/src/crypto/chacha/chacha.c +175 -0
- data/third_party/boringssl-with-bazel/src/crypto/chacha/internal.h +45 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.c +127 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/derive_key.c +152 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesccm.c +447 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesctrhmac.c +283 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesgcmsiv.c +891 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_chacha20poly1305.c +343 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_null.c +85 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc2.c +462 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc4.c +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_tls.c +601 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/internal.h +226 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/tls_cbc.c +338 -0
- data/third_party/boringssl-with-bazel/src/crypto/cmac/cmac.c +278 -0
- data/third_party/boringssl-with-bazel/src/crypto/conf/conf.c +821 -0
- data/third_party/boringssl-with-bazel/src/crypto/conf/conf_def.h +127 -0
- data/third_party/boringssl-with-bazel/src/crypto/conf/internal.h +31 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-fuchsia.c +55 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-linux.c +62 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-win.c +41 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux.c +229 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux.h +201 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-arm.c +38 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-intel.c +291 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-ppc64le.c +38 -0
- data/third_party/boringssl-with-bazel/src/crypto/crypto.c +226 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519.c +2159 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519_tables.h +7872 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/internal.h +146 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519.c +539 -0
- data/third_party/boringssl-with-bazel/src/crypto/dh_extra/dh_asn1.c +160 -0
- data/third_party/boringssl-with-bazel/src/crypto/dh_extra/params.c +272 -0
- data/third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c +268 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c +946 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c +390 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/internal.h +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_asn1.c +559 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_derive.c +95 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/hash_to_curve.c +385 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/internal.h +56 -0
- data/third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_extra.c +124 -0
- data/third_party/boringssl-with-bazel/src/crypto/ecdsa_extra/ecdsa_asn1.c +267 -0
- data/third_party/boringssl-with-bazel/src/crypto/engine/engine.c +99 -0
- data/third_party/boringssl-with-bazel/src/crypto/err/err.c +857 -0
- data/third_party/boringssl-with-bazel/src/crypto/err/internal.h +58 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/digestsign.c +231 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp.c +456 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c +547 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_ctx.c +484 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/internal.h +269 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_dsa_asn1.c +277 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ec.c +286 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ec_asn1.c +255 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519.c +104 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519_asn1.c +221 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_rsa.c +648 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_rsa_asn1.c +194 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_x25519.c +110 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_x25519_asn1.c +248 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/pbkdf.c +146 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/print.c +489 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/scrypt.c +211 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/sign.c +151 -0
- data/third_party/boringssl-with-bazel/src/crypto/ex_data.c +261 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes.c +108 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_nohw.c +1282 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/internal.h +238 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/key_wrap.c +236 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/mode_wrappers.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.c +266 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/add.c +316 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/asm/x86_64-gcc.c +541 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bn.c +438 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bytes.c +230 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/cmp.c +200 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/ctx.c +236 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div.c +902 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div_extra.c +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/exponentiation.c +1288 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd.c +378 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd_extra.c +326 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/generic.c +711 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h +715 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/jacobi.c +146 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery.c +502 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery_inv.c +186 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/mul.c +749 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/prime.c +1064 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/random.c +341 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/rsaz_exp.c +226 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/rsaz_exp.h +104 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/shift.c +364 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/sqrt.c +498 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/aead.c +284 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/cipher.c +636 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c +1473 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_des.c +237 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/internal.h +128 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/delocate.h +89 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/des/des.c +784 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/des/internal.h +238 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/check.c +217 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/dh.c +456 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c +282 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digests.c +304 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/internal.h +112 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/md32_common.h +195 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec.c +1268 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_key.c +472 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_montgomery.c +524 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/felem.c +100 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h +772 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/oct.c +328 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p224-64.c +1180 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64-table.h +9497 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64.c +633 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64.h +153 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256.c +740 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256_table.h +297 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/scalar.c +175 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple.c +357 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple_mul.c +270 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/util.c +255 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/wnaf.c +270 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdh/ecdh.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa.c +339 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/internal.h +39 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/fips_shared_support.c +32 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/hmac/hmac.c +228 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md4/md4.c +240 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/internal.h +37 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/md5.c +284 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cbc.c +178 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cfb.c +203 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ctr.c +201 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm.c +733 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c +304 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/internal.h +420 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ofb.c +97 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/polyval.c +91 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/ctrdrbg.c +202 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect.c +137 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect.h +49 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h +64 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/internal.h +184 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c +457 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/urandom.c +401 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/blinding.c +243 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/internal.h +131 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/padding.c +695 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +935 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +1416 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/fips.c +79 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c +874 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/internal.h +53 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha1-altivec.c +361 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha1.c +357 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha256.c +321 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha512.c +508 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/internal.h +39 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/kdf.c +165 -0
- data/third_party/boringssl-with-bazel/src/crypto/hkdf/hkdf.c +112 -0
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +618 -0
- data/third_party/boringssl-with-bazel/src/crypto/hrss/hrss.c +2198 -0
- data/third_party/boringssl-with-bazel/src/crypto/hrss/internal.h +68 -0
- data/third_party/boringssl-with-bazel/src/crypto/internal.h +959 -0
- data/third_party/boringssl-with-bazel/src/crypto/lhash/internal.h +253 -0
- data/third_party/boringssl-with-bazel/src/crypto/lhash/lhash.c +353 -0
- data/third_party/boringssl-with-bazel/src/crypto/mem.c +392 -0
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj.c +553 -0
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_dat.h +11585 -0
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_xref.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c +252 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_info.c +358 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_lib.c +769 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_oth.c +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pk8.c +255 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pkey.c +214 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_x509.c +65 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_xaux.c +65 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/internal.h +58 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7.c +164 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.c +526 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/internal.h +138 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/p5_pbev2.c +316 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8.c +530 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c +1383 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/internal.h +41 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305.c +321 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_arm.c +307 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.c +860 -0
- data/third_party/boringssl-with-bazel/src/crypto/pool/internal.h +45 -0
- data/third_party/boringssl-with-bazel/src/crypto/pool/pool.c +221 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c +56 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/forkunsafe.c +46 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/fuchsia.c +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/passive.c +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c +74 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c +73 -0
- data/third_party/boringssl-with-bazel/src/crypto/rc4/rc4.c +98 -0
- data/third_party/boringssl-with-bazel/src/crypto/refcount_c11.c +67 -0
- data/third_party/boringssl-with-bazel/src/crypto/refcount_lock.c +53 -0
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_asn1.c +324 -0
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_print.c +22 -0
- data/third_party/boringssl-with-bazel/src/crypto/siphash/siphash.c +82 -0
- data/third_party/boringssl-with-bazel/src/crypto/stack/stack.c +425 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread.c +110 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread_none.c +59 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread_pthread.c +182 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread_win.c +260 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h +318 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c +1399 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c +858 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/voprf.c +766 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_digest.c +96 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_sign.c +128 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_verify.c +118 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c +163 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.c +842 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/by_dir.c +459 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/by_file.c +277 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/i2d_pr.c +83 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/internal.h +398 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/name_print.c +246 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c +400 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +130 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_req.c +246 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +365 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c +116 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509.c +90 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_att.c +358 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c +461 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_d2.c +106 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_def.c +103 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.c +212 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_lu.c +830 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c +199 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_req.c +304 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c +240 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c +331 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_txt.c +204 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.c +281 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +2456 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c +651 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c +284 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +388 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509rset.c +84 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509spki.c +137 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_algor.c +153 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +386 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_attrib.c +98 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c +565 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_exten.c +77 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_info.c +98 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_name.c +544 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pkey.c +106 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pubkey.c +217 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_req.c +106 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c +94 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_spki.c +80 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_val.c +71 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +394 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.c +201 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/ext_dat.h +138 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +84 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_cache.c +287 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c +132 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_int.h +217 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_lib.c +155 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_map.c +131 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_node.c +189 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_tree.c +843 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akey.c +226 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akeya.c +72 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c +639 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bcons.c +133 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bitst.c +144 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c +468 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c +501 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_crld.c +563 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_enum.c +106 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_extku.c +148 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_genn.c +266 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ia5.c +121 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_info.c +218 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_int.c +91 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_lib.c +362 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ncons.c +558 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ocsp.c +68 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pci.c +289 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pcia.c +57 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pcons.c +139 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pmaps.c +154 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c +230 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +929 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_skey.c +156 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +1437 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +480 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/aes.h +207 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +240 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +1321 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1_mac.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1t.h +718 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +628 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/base64.h +190 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +939 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/blake2.h +62 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/blowfish.h +93 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/bn.h +1057 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/buf.h +137 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/buffer.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +586 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cast.h +96 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/chacha.h +41 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +661 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cmac.h +91 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/conf.h +183 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cpu.h +202 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/crypto.h +169 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/curve25519.h +201 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/des.h +183 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +361 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +348 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dsa.h +457 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dtls1.h +16 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/e_os2.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ec.h +442 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ec_key.h +372 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdh.h +118 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdsa.h +238 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/engine.h +109 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/err.h +466 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +1109 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/evp_errors.h +99 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ex_data.h +203 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hkdf.h +68 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hmac.h +186 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hpke.h +350 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hrss.h +102 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/is_boringssl.h +16 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/lhash.h +81 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/md4.h +108 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/md5.h +109 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/mem.h +184 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/nid.h +4259 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/obj.h +256 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/obj_mac.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/objects.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslconf.h +70 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslv.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ossl_typ.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +483 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs12.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs7.h +240 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs8.h +277 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/poly1305.h +49 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pool.h +102 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/rand.h +114 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/rc4.h +96 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ripemd.h +108 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +859 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/safestack.h +16 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/sha.h +294 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/siphash.h +37 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/span.h +222 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/srtp.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +5606 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl3.h +333 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/stack.h +542 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/thread.h +191 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +647 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +310 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/type_check.h +90 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +2450 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +1020 -0
- data/third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc +192 -0
- data/third_party/boringssl-with-bazel/src/ssl/d1_both.cc +835 -0
- data/third_party/boringssl-with-bazel/src/ssl/d1_lib.cc +268 -0
- data/third_party/boringssl-with-bazel/src/ssl/d1_pkt.cc +273 -0
- data/third_party/boringssl-with-bazel/src/ssl/d1_srtp.cc +232 -0
- data/third_party/boringssl-with-bazel/src/ssl/dtls_method.cc +200 -0
- data/third_party/boringssl-with-bazel/src/ssl/dtls_record.cc +353 -0
- data/third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc +1084 -0
- data/third_party/boringssl-with-bazel/src/ssl/extensions.cc +4325 -0
- data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +986 -0
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +758 -0
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +1986 -0
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +1956 -0
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +3953 -0
- data/third_party/boringssl-with-bazel/src/ssl/s3_both.cc +730 -0
- data/third_party/boringssl-with-bazel/src/ssl/s3_lib.cc +219 -0
- data/third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc +453 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_aead_ctx.cc +432 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc +896 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_buffer.cc +306 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc +1014 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +1717 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_file.cc +585 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc +400 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +3068 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc +837 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +1342 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc +233 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +272 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +398 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc +1363 -0
- data/third_party/boringssl-with-bazel/src/ssl/t1_enc.cc +384 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +733 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +1122 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +582 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +1349 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls_method.cc +319 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls_record.cc +705 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_32.h +981 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_64.h +619 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_32.h +3147 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_64.h +1226 -0
- data/third_party/cares/ares_build.h +223 -0
- data/third_party/cares/cares/ares.h +670 -0
- data/third_party/cares/cares/ares__close_sockets.c +61 -0
- data/third_party/cares/cares/ares__get_hostent.c +261 -0
- data/third_party/cares/cares/ares__read_line.c +73 -0
- data/third_party/cares/cares/ares__timeval.c +111 -0
- data/third_party/cares/cares/ares_cancel.c +63 -0
- data/third_party/cares/cares/ares_create_query.c +206 -0
- data/third_party/cares/cares/ares_data.c +222 -0
- data/third_party/cares/cares/ares_data.h +72 -0
- data/third_party/cares/cares/ares_destroy.c +113 -0
- data/third_party/cares/cares/ares_dns.h +103 -0
- data/third_party/cares/cares/ares_expand_name.c +209 -0
- data/third_party/cares/cares/ares_expand_string.c +70 -0
- data/third_party/cares/cares/ares_fds.c +59 -0
- data/third_party/cares/cares/ares_free_hostent.c +41 -0
- data/third_party/cares/cares/ares_free_string.c +25 -0
- data/third_party/cares/cares/ares_getenv.c +30 -0
- data/third_party/cares/cares/ares_getenv.h +26 -0
- data/third_party/cares/cares/ares_gethostbyaddr.c +294 -0
- data/third_party/cares/cares/ares_gethostbyname.c +529 -0
- data/third_party/cares/cares/ares_getnameinfo.c +453 -0
- data/third_party/cares/cares/ares_getopt.c +122 -0
- data/third_party/cares/cares/ares_getopt.h +53 -0
- data/third_party/cares/cares/ares_getsock.c +66 -0
- data/third_party/cares/cares/ares_inet_net_pton.h +25 -0
- data/third_party/cares/cares/ares_init.c +2615 -0
- data/third_party/cares/cares/ares_iphlpapi.h +221 -0
- data/third_party/cares/cares/ares_ipv6.h +78 -0
- data/third_party/cares/cares/ares_library_init.c +195 -0
- data/third_party/cares/cares/ares_library_init.h +43 -0
- data/third_party/cares/cares/ares_llist.c +63 -0
- data/third_party/cares/cares/ares_llist.h +39 -0
- data/third_party/cares/cares/ares_mkquery.c +24 -0
- data/third_party/cares/cares/ares_nowarn.c +260 -0
- data/third_party/cares/cares/ares_nowarn.h +61 -0
- data/third_party/cares/cares/ares_options.c +406 -0
- data/third_party/cares/cares/ares_parse_a_reply.c +264 -0
- data/third_party/cares/cares/ares_parse_aaaa_reply.c +264 -0
- data/third_party/cares/cares/ares_parse_mx_reply.c +170 -0
- data/third_party/cares/cares/ares_parse_naptr_reply.c +194 -0
- data/third_party/cares/cares/ares_parse_ns_reply.c +183 -0
- data/third_party/cares/cares/ares_parse_ptr_reply.c +221 -0
- data/third_party/cares/cares/ares_parse_soa_reply.c +133 -0
- data/third_party/cares/cares/ares_parse_srv_reply.c +179 -0
- data/third_party/cares/cares/ares_parse_txt_reply.c +220 -0
- data/third_party/cares/cares/ares_platform.c +11042 -0
- data/third_party/cares/cares/ares_platform.h +43 -0
- data/third_party/cares/cares/ares_private.h +382 -0
- data/third_party/cares/cares/ares_process.c +1473 -0
- data/third_party/cares/cares/ares_query.c +186 -0
- data/third_party/cares/cares/ares_rules.h +125 -0
- data/third_party/cares/cares/ares_search.c +323 -0
- data/third_party/cares/cares/ares_send.c +137 -0
- data/third_party/cares/cares/ares_setup.h +217 -0
- data/third_party/cares/cares/ares_strcasecmp.c +66 -0
- data/third_party/cares/cares/ares_strcasecmp.h +30 -0
- data/third_party/cares/cares/ares_strdup.c +49 -0
- data/third_party/cares/cares/ares_strdup.h +24 -0
- data/third_party/cares/cares/ares_strerror.c +56 -0
- data/third_party/cares/cares/ares_strsplit.c +174 -0
- data/third_party/cares/cares/ares_strsplit.h +43 -0
- data/third_party/cares/cares/ares_timeout.c +88 -0
- data/third_party/cares/cares/ares_version.c +11 -0
- data/third_party/cares/cares/ares_version.h +24 -0
- data/third_party/cares/cares/ares_writev.c +79 -0
- data/third_party/cares/cares/bitncmp.c +59 -0
- data/third_party/cares/cares/bitncmp.h +26 -0
- data/third_party/cares/cares/config-win32.h +351 -0
- data/third_party/cares/cares/inet_net_pton.c +450 -0
- data/third_party/cares/cares/inet_ntop.c +207 -0
- data/third_party/cares/cares/setup_once.h +554 -0
- data/third_party/cares/cares/windows_port.c +22 -0
- data/third_party/cares/config_darwin/ares_config.h +428 -0
- data/third_party/cares/config_freebsd/ares_config.h +505 -0
- data/third_party/cares/config_linux/ares_config.h +461 -0
- data/third_party/cares/config_openbsd/ares_config.h +505 -0
- data/third_party/re2/re2/bitmap256.h +117 -0
- data/third_party/re2/re2/bitstate.cc +385 -0
- data/third_party/re2/re2/compile.cc +1261 -0
- data/third_party/re2/re2/dfa.cc +2118 -0
- data/third_party/re2/re2/filtered_re2.cc +137 -0
- data/third_party/re2/re2/filtered_re2.h +114 -0
- data/third_party/re2/re2/mimics_pcre.cc +197 -0
- data/third_party/re2/re2/nfa.cc +713 -0
- data/third_party/re2/re2/onepass.cc +623 -0
- data/third_party/re2/re2/parse.cc +2483 -0
- data/third_party/re2/re2/perl_groups.cc +119 -0
- data/third_party/re2/re2/pod_array.h +55 -0
- data/third_party/re2/re2/prefilter.cc +711 -0
- data/third_party/re2/re2/prefilter.h +108 -0
- data/third_party/re2/re2/prefilter_tree.cc +407 -0
- data/third_party/re2/re2/prefilter_tree.h +139 -0
- data/third_party/re2/re2/prog.cc +1166 -0
- data/third_party/re2/re2/prog.h +455 -0
- data/third_party/re2/re2/re2.cc +1331 -0
- data/third_party/re2/re2/re2.h +1017 -0
- data/third_party/re2/re2/regexp.cc +987 -0
- data/third_party/re2/re2/regexp.h +665 -0
- data/third_party/re2/re2/set.cc +176 -0
- data/third_party/re2/re2/set.h +85 -0
- data/third_party/re2/re2/simplify.cc +665 -0
- data/third_party/re2/re2/sparse_array.h +392 -0
- data/third_party/re2/re2/sparse_set.h +264 -0
- data/third_party/re2/re2/stringpiece.cc +65 -0
- data/third_party/re2/re2/stringpiece.h +210 -0
- data/third_party/re2/re2/tostring.cc +351 -0
- data/third_party/re2/re2/unicode_casefold.cc +582 -0
- data/third_party/re2/re2/unicode_casefold.h +78 -0
- data/third_party/re2/re2/unicode_groups.cc +6269 -0
- data/third_party/re2/re2/unicode_groups.h +67 -0
- data/third_party/re2/re2/walker-inl.h +246 -0
- data/third_party/re2/util/benchmark.h +156 -0
- data/third_party/re2/util/flags.h +26 -0
- data/third_party/re2/util/logging.h +109 -0
- data/third_party/re2/util/malloc_counter.h +19 -0
- data/third_party/re2/util/mix.h +41 -0
- data/third_party/re2/util/mutex.h +148 -0
- data/third_party/re2/util/pcre.cc +1025 -0
- data/third_party/re2/util/pcre.h +681 -0
- data/third_party/re2/util/rune.cc +260 -0
- data/third_party/re2/util/strutil.cc +149 -0
- data/third_party/re2/util/strutil.h +21 -0
- data/third_party/re2/util/test.h +50 -0
- data/third_party/re2/util/utf.h +44 -0
- data/third_party/re2/util/util.h +42 -0
- data/third_party/upb/upb/decode.c +771 -0
- data/third_party/upb/upb/decode.h +68 -0
- data/third_party/upb/upb/decode_fast.c +1053 -0
- data/third_party/upb/upb/decode_fast.h +153 -0
- data/third_party/upb/upb/decode_internal.h +193 -0
- data/third_party/upb/upb/def.c +2168 -0
- data/third_party/upb/upb/def.h +337 -0
- data/third_party/upb/upb/def.hpp +468 -0
- data/third_party/upb/upb/encode.c +511 -0
- data/third_party/upb/upb/encode.h +73 -0
- data/third_party/upb/upb/msg.c +397 -0
- data/third_party/upb/upb/msg.h +108 -0
- data/third_party/upb/upb/msg_internal.h +687 -0
- data/third_party/upb/upb/port_def.inc +253 -0
- data/third_party/upb/upb/port_undef.inc +61 -0
- data/third_party/upb/upb/reflection.c +400 -0
- data/third_party/upb/upb/reflection.h +196 -0
- data/third_party/upb/upb/reflection.hpp +37 -0
- data/third_party/upb/upb/table.c +842 -0
- data/third_party/upb/upb/table_internal.h +351 -0
- data/third_party/upb/upb/text_encode.c +449 -0
- data/third_party/upb/upb/text_encode.h +64 -0
- data/third_party/upb/upb/upb.c +315 -0
- data/third_party/upb/upb/upb.h +367 -0
- data/third_party/upb/upb/upb.hpp +112 -0
- data/third_party/upb/upb/upb_internal.h +58 -0
- data/third_party/xxhash/xxhash.h +5325 -0
- data/third_party/zlib/adler32.c +186 -0
- data/third_party/zlib/compress.c +86 -0
- data/third_party/zlib/crc32.c +442 -0
- data/third_party/zlib/crc32.h +441 -0
- data/third_party/zlib/deflate.c +2163 -0
- data/third_party/zlib/deflate.h +349 -0
- data/third_party/zlib/gzclose.c +25 -0
- data/third_party/zlib/gzguts.h +218 -0
- data/third_party/zlib/gzlib.c +637 -0
- data/third_party/zlib/gzread.c +654 -0
- data/third_party/zlib/gzwrite.c +665 -0
- data/third_party/zlib/infback.c +640 -0
- data/third_party/zlib/inffast.c +323 -0
- data/third_party/zlib/inffast.h +11 -0
- data/third_party/zlib/inffixed.h +94 -0
- data/third_party/zlib/inflate.c +1561 -0
- data/third_party/zlib/inflate.h +125 -0
- data/third_party/zlib/inftrees.c +304 -0
- data/third_party/zlib/inftrees.h +62 -0
- data/third_party/zlib/trees.c +1203 -0
- data/third_party/zlib/trees.h +128 -0
- data/third_party/zlib/uncompr.c +93 -0
- data/third_party/zlib/zconf.h +534 -0
- data/third_party/zlib/zlib.h +1912 -0
- data/third_party/zlib/zutil.c +325 -0
- data/third_party/zlib/zutil.h +271 -0
- metadata +2563 -0
@@ -0,0 +1,3119 @@
|
|
1
|
+
//
|
2
|
+
// Copyright 2015 gRPC authors.
|
3
|
+
//
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
// you may not use this file except in compliance with the License.
|
6
|
+
// You may obtain a copy of the License at
|
7
|
+
//
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
//
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
// See the License for the specific language governing permissions and
|
14
|
+
// limitations under the License.
|
15
|
+
//
|
16
|
+
|
17
|
+
#include <grpc/support/port_platform.h>
|
18
|
+
|
19
|
+
#include "src/core/ext/filters/client_channel/client_channel.h"
|
20
|
+
|
21
|
+
#include <inttypes.h>
|
22
|
+
#include <limits.h>
|
23
|
+
#include <stdbool.h>
|
24
|
+
#include <stdio.h>
|
25
|
+
#include <string.h>
|
26
|
+
|
27
|
+
#include <set>
|
28
|
+
|
29
|
+
#include "absl/container/inlined_vector.h"
|
30
|
+
#include "absl/strings/numbers.h"
|
31
|
+
#include "absl/strings/str_cat.h"
|
32
|
+
#include "absl/strings/str_join.h"
|
33
|
+
#include "absl/strings/string_view.h"
|
34
|
+
#include "absl/types/optional.h"
|
35
|
+
|
36
|
+
#include <grpc/support/alloc.h>
|
37
|
+
#include <grpc/support/log.h>
|
38
|
+
#include <grpc/support/string_util.h>
|
39
|
+
#include <grpc/support/sync.h>
|
40
|
+
|
41
|
+
#include "src/core/ext/filters/client_channel/backend_metric.h"
|
42
|
+
#include "src/core/ext/filters/client_channel/backup_poller.h"
|
43
|
+
#include "src/core/ext/filters/client_channel/config_selector.h"
|
44
|
+
#include "src/core/ext/filters/client_channel/dynamic_filters.h"
|
45
|
+
#include "src/core/ext/filters/client_channel/global_subchannel_pool.h"
|
46
|
+
#include "src/core/ext/filters/client_channel/http_connect_handshaker.h"
|
47
|
+
#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
|
48
|
+
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
|
49
|
+
#include "src/core/ext/filters/client_channel/local_subchannel_pool.h"
|
50
|
+
#include "src/core/ext/filters/client_channel/proxy_mapper_registry.h"
|
51
|
+
#include "src/core/ext/filters/client_channel/resolver_registry.h"
|
52
|
+
#include "src/core/ext/filters/client_channel/resolver_result_parsing.h"
|
53
|
+
#include "src/core/ext/filters/client_channel/retry_filter.h"
|
54
|
+
#include "src/core/ext/filters/client_channel/subchannel.h"
|
55
|
+
#include "src/core/ext/filters/deadline/deadline_filter.h"
|
56
|
+
#include "src/core/ext/service_config/service_config.h"
|
57
|
+
#include "src/core/ext/service_config/service_config_call_data.h"
|
58
|
+
#include "src/core/lib/backoff/backoff.h"
|
59
|
+
#include "src/core/lib/channel/channel_args.h"
|
60
|
+
#include "src/core/lib/channel/connected_channel.h"
|
61
|
+
#include "src/core/lib/channel/status_util.h"
|
62
|
+
#include "src/core/lib/gpr/string.h"
|
63
|
+
#include "src/core/lib/gprpp/sync.h"
|
64
|
+
#include "src/core/lib/iomgr/iomgr.h"
|
65
|
+
#include "src/core/lib/iomgr/polling_entity.h"
|
66
|
+
#include "src/core/lib/iomgr/work_serializer.h"
|
67
|
+
#include "src/core/lib/profiling/timers.h"
|
68
|
+
#include "src/core/lib/slice/slice_internal.h"
|
69
|
+
#include "src/core/lib/slice/slice_string_helpers.h"
|
70
|
+
#include "src/core/lib/surface/channel.h"
|
71
|
+
#include "src/core/lib/transport/connectivity_state.h"
|
72
|
+
#include "src/core/lib/transport/error_utils.h"
|
73
|
+
#include "src/core/lib/transport/metadata.h"
|
74
|
+
#include "src/core/lib/transport/metadata_batch.h"
|
75
|
+
#include "src/core/lib/transport/static_metadata.h"
|
76
|
+
#include "src/core/lib/transport/status_metadata.h"
|
77
|
+
|
78
|
+
//
|
79
|
+
// Client channel filter
|
80
|
+
//
|
81
|
+
|
82
|
+
#define GRPC_ARG_HEALTH_CHECK_SERVICE_NAME \
|
83
|
+
"grpc.internal.health_check_service_name"
|
84
|
+
|
85
|
+
namespace grpc_core {
|
86
|
+
|
87
|
+
using internal::ClientChannelGlobalParsedConfig;
|
88
|
+
using internal::ClientChannelMethodParsedConfig;
|
89
|
+
using internal::ClientChannelServiceConfigParser;
|
90
|
+
|
91
|
+
TraceFlag grpc_client_channel_call_trace(false, "client_channel_call");
|
92
|
+
TraceFlag grpc_client_channel_routing_trace(false, "client_channel_routing");
|
93
|
+
|
94
|
+
//
|
95
|
+
// ClientChannel::CallData definition
|
96
|
+
//
|
97
|
+
|
98
|
+
class ClientChannel::CallData {
|
99
|
+
public:
|
100
|
+
static grpc_error_handle Init(grpc_call_element* elem,
|
101
|
+
const grpc_call_element_args* args);
|
102
|
+
static void Destroy(grpc_call_element* elem,
|
103
|
+
const grpc_call_final_info* final_info,
|
104
|
+
grpc_closure* then_schedule_closure);
|
105
|
+
static void StartTransportStreamOpBatch(
|
106
|
+
grpc_call_element* elem, grpc_transport_stream_op_batch* batch);
|
107
|
+
static void SetPollent(grpc_call_element* elem, grpc_polling_entity* pollent);
|
108
|
+
|
109
|
+
// Invoked by channel for queued calls when name resolution is completed.
|
110
|
+
static void CheckResolution(void* arg, grpc_error_handle error);
|
111
|
+
// Helper function for applying the service config to a call while
|
112
|
+
// holding ClientChannel::resolution_mu_.
|
113
|
+
// Returns true if the service config has been applied to the call, in which
|
114
|
+
// case the caller must invoke ResolutionDone() or AsyncResolutionDone()
|
115
|
+
// with the returned error.
|
116
|
+
bool CheckResolutionLocked(grpc_call_element* elem, grpc_error_handle* error)
|
117
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ClientChannel::resolution_mu_);
|
118
|
+
// Schedules a callback to continue processing the call once
|
119
|
+
// resolution is complete. The callback will not run until after this
|
120
|
+
// method returns.
|
121
|
+
void AsyncResolutionDone(grpc_call_element* elem, grpc_error_handle error);
|
122
|
+
|
123
|
+
private:
|
124
|
+
class ResolverQueuedCallCanceller;
|
125
|
+
|
126
|
+
CallData(grpc_call_element* elem, const ClientChannel& chand,
|
127
|
+
const grpc_call_element_args& args);
|
128
|
+
~CallData();
|
129
|
+
|
130
|
+
// Returns the index into pending_batches_ to be used for batch.
|
131
|
+
static size_t GetBatchIndex(grpc_transport_stream_op_batch* batch);
|
132
|
+
void PendingBatchesAdd(grpc_call_element* elem,
|
133
|
+
grpc_transport_stream_op_batch* batch);
|
134
|
+
static void FailPendingBatchInCallCombiner(void* arg,
|
135
|
+
grpc_error_handle error);
|
136
|
+
// A predicate type and some useful implementations for PendingBatchesFail().
|
137
|
+
typedef bool (*YieldCallCombinerPredicate)(
|
138
|
+
const CallCombinerClosureList& closures);
|
139
|
+
static bool YieldCallCombiner(const CallCombinerClosureList& /*closures*/) {
|
140
|
+
return true;
|
141
|
+
}
|
142
|
+
static bool NoYieldCallCombiner(const CallCombinerClosureList& /*closures*/) {
|
143
|
+
return false;
|
144
|
+
}
|
145
|
+
static bool YieldCallCombinerIfPendingBatchesFound(
|
146
|
+
const CallCombinerClosureList& closures) {
|
147
|
+
return closures.size() > 0;
|
148
|
+
}
|
149
|
+
// Fails all pending batches.
|
150
|
+
// If yield_call_combiner_predicate returns true, assumes responsibility for
|
151
|
+
// yielding the call combiner.
|
152
|
+
void PendingBatchesFail(
|
153
|
+
grpc_call_element* elem, grpc_error_handle error,
|
154
|
+
YieldCallCombinerPredicate yield_call_combiner_predicate);
|
155
|
+
static void ResumePendingBatchInCallCombiner(void* arg,
|
156
|
+
grpc_error_handle ignored);
|
157
|
+
// Resumes all pending batches on lb_call_.
|
158
|
+
void PendingBatchesResume(grpc_call_element* elem);
|
159
|
+
|
160
|
+
// Applies service config to the call. Must be invoked once we know
|
161
|
+
// that the resolver has returned results to the channel.
|
162
|
+
// If an error is returned, the error indicates the status with which
|
163
|
+
// the call should be failed.
|
164
|
+
grpc_error_handle ApplyServiceConfigToCallLocked(
|
165
|
+
grpc_call_element* elem, grpc_metadata_batch* initial_metadata)
|
166
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ClientChannel::resolution_mu_);
|
167
|
+
// Invoked when the resolver result is applied to the caller, on both
|
168
|
+
// success or failure.
|
169
|
+
static void ResolutionDone(void* arg, grpc_error_handle error);
|
170
|
+
// Removes the call (if present) from the channel's list of calls queued
|
171
|
+
// for name resolution.
|
172
|
+
void MaybeRemoveCallFromResolverQueuedCallsLocked(grpc_call_element* elem)
|
173
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ClientChannel::resolution_mu_);
|
174
|
+
// Adds the call (if not already present) to the channel's list of
|
175
|
+
// calls queued for name resolution.
|
176
|
+
void MaybeAddCallToResolverQueuedCallsLocked(grpc_call_element* elem)
|
177
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ClientChannel::resolution_mu_);
|
178
|
+
|
179
|
+
static void RecvTrailingMetadataReadyForConfigSelectorCommitCallback(
|
180
|
+
void* arg, grpc_error_handle error);
|
181
|
+
void InjectRecvTrailingMetadataReadyForConfigSelectorCommitCallback(
|
182
|
+
grpc_transport_stream_op_batch* batch);
|
183
|
+
|
184
|
+
void CreateDynamicCall(grpc_call_element* elem);
|
185
|
+
|
186
|
+
// State for handling deadlines.
|
187
|
+
// The code in deadline_filter.c requires this to be the first field.
|
188
|
+
// TODO(roth): This is slightly sub-optimal in that grpc_deadline_state
|
189
|
+
// and this struct both independently store pointers to the call stack
|
190
|
+
// and call combiner. If/when we have time, find a way to avoid this
|
191
|
+
// without breaking the grpc_deadline_state abstraction.
|
192
|
+
grpc_deadline_state deadline_state_;
|
193
|
+
|
194
|
+
grpc_slice path_; // Request path.
|
195
|
+
gpr_cycle_counter call_start_time_;
|
196
|
+
grpc_millis deadline_;
|
197
|
+
Arena* arena_;
|
198
|
+
grpc_call_stack* owning_call_;
|
199
|
+
CallCombiner* call_combiner_;
|
200
|
+
grpc_call_context_element* call_context_;
|
201
|
+
|
202
|
+
grpc_polling_entity* pollent_ = nullptr;
|
203
|
+
|
204
|
+
grpc_closure resolution_done_closure_;
|
205
|
+
|
206
|
+
// Accessed while holding ClientChannel::resolution_mu_.
|
207
|
+
bool service_config_applied_ ABSL_GUARDED_BY(&ClientChannel::resolution_mu_) =
|
208
|
+
false;
|
209
|
+
bool queued_pending_resolver_result_
|
210
|
+
ABSL_GUARDED_BY(&ClientChannel::resolution_mu_) = false;
|
211
|
+
ClientChannel::ResolverQueuedCall resolver_queued_call_
|
212
|
+
ABSL_GUARDED_BY(&ClientChannel::resolution_mu_);
|
213
|
+
ResolverQueuedCallCanceller* resolver_call_canceller_
|
214
|
+
ABSL_GUARDED_BY(&ClientChannel::resolution_mu_) = nullptr;
|
215
|
+
|
216
|
+
grpc_closure* original_recv_trailing_metadata_ready_ = nullptr;
|
217
|
+
grpc_closure recv_trailing_metadata_ready_;
|
218
|
+
|
219
|
+
RefCountedPtr<DynamicFilters> dynamic_filters_;
|
220
|
+
RefCountedPtr<DynamicFilters::Call> dynamic_call_;
|
221
|
+
|
222
|
+
// Batches are added to this list when received from above.
|
223
|
+
// They are removed when we are done handling the batch (i.e., when
|
224
|
+
// either we have invoked all of the batch's callbacks or we have
|
225
|
+
// passed the batch down to the LB call and are not intercepting any of
|
226
|
+
// its callbacks).
|
227
|
+
grpc_transport_stream_op_batch* pending_batches_[MAX_PENDING_BATCHES] = {};
|
228
|
+
|
229
|
+
// Set when we get a cancel_stream op.
|
230
|
+
grpc_error_handle cancel_error_ = GRPC_ERROR_NONE;
|
231
|
+
};
|
232
|
+
|
233
|
+
//
|
234
|
+
// Filter vtable
|
235
|
+
//
|
236
|
+
|
237
|
+
const grpc_channel_filter ClientChannel::kFilterVtable = {
|
238
|
+
ClientChannel::CallData::StartTransportStreamOpBatch,
|
239
|
+
ClientChannel::StartTransportOp,
|
240
|
+
sizeof(ClientChannel::CallData),
|
241
|
+
ClientChannel::CallData::Init,
|
242
|
+
ClientChannel::CallData::SetPollent,
|
243
|
+
ClientChannel::CallData::Destroy,
|
244
|
+
sizeof(ClientChannel),
|
245
|
+
ClientChannel::Init,
|
246
|
+
ClientChannel::Destroy,
|
247
|
+
ClientChannel::GetChannelInfo,
|
248
|
+
"client-channel",
|
249
|
+
};
|
250
|
+
|
251
|
+
//
|
252
|
+
// dynamic termination filter
|
253
|
+
//
|
254
|
+
|
255
|
+
namespace {
|
256
|
+
|
257
|
+
// Channel arg pointer vtable for GRPC_ARG_CLIENT_CHANNEL.
|
258
|
+
void* ClientChannelArgCopy(void* p) { return p; }
|
259
|
+
void ClientChannelArgDestroy(void* /*p*/) {}
|
260
|
+
int ClientChannelArgCmp(void* p, void* q) { return QsortCompare(p, q); }
|
261
|
+
const grpc_arg_pointer_vtable kClientChannelArgPointerVtable = {
|
262
|
+
ClientChannelArgCopy, ClientChannelArgDestroy, ClientChannelArgCmp};
|
263
|
+
|
264
|
+
// Channel arg pointer vtable for GRPC_ARG_SERVICE_CONFIG_OBJ.
|
265
|
+
void* ServiceConfigObjArgCopy(void* p) {
|
266
|
+
auto* service_config = static_cast<ServiceConfig*>(p);
|
267
|
+
service_config->Ref().release();
|
268
|
+
return p;
|
269
|
+
}
|
270
|
+
void ServiceConfigObjArgDestroy(void* p) {
|
271
|
+
auto* service_config = static_cast<ServiceConfig*>(p);
|
272
|
+
service_config->Unref();
|
273
|
+
}
|
274
|
+
int ServiceConfigObjArgCmp(void* p, void* q) { return QsortCompare(p, q); }
|
275
|
+
const grpc_arg_pointer_vtable kServiceConfigObjArgPointerVtable = {
|
276
|
+
ServiceConfigObjArgCopy, ServiceConfigObjArgDestroy,
|
277
|
+
ServiceConfigObjArgCmp};
|
278
|
+
|
279
|
+
class DynamicTerminationFilter {
|
280
|
+
public:
|
281
|
+
class CallData;
|
282
|
+
|
283
|
+
static const grpc_channel_filter kFilterVtable;
|
284
|
+
|
285
|
+
static grpc_error_handle Init(grpc_channel_element* elem,
|
286
|
+
grpc_channel_element_args* args) {
|
287
|
+
GPR_ASSERT(args->is_last);
|
288
|
+
GPR_ASSERT(elem->filter == &kFilterVtable);
|
289
|
+
new (elem->channel_data) DynamicTerminationFilter(args->channel_args);
|
290
|
+
return GRPC_ERROR_NONE;
|
291
|
+
}
|
292
|
+
|
293
|
+
static void Destroy(grpc_channel_element* elem) {
|
294
|
+
auto* chand = static_cast<DynamicTerminationFilter*>(elem->channel_data);
|
295
|
+
chand->~DynamicTerminationFilter();
|
296
|
+
}
|
297
|
+
|
298
|
+
// Will never be called.
|
299
|
+
static void StartTransportOp(grpc_channel_element* /*elem*/,
|
300
|
+
grpc_transport_op* /*op*/) {}
|
301
|
+
static void GetChannelInfo(grpc_channel_element* /*elem*/,
|
302
|
+
const grpc_channel_info* /*info*/) {}
|
303
|
+
|
304
|
+
private:
|
305
|
+
explicit DynamicTerminationFilter(const grpc_channel_args* args)
|
306
|
+
: chand_(grpc_channel_args_find_pointer<ClientChannel>(
|
307
|
+
args, GRPC_ARG_CLIENT_CHANNEL)) {}
|
308
|
+
|
309
|
+
ClientChannel* chand_;
|
310
|
+
};
|
311
|
+
|
312
|
+
class DynamicTerminationFilter::CallData {
|
313
|
+
public:
|
314
|
+
static grpc_error_handle Init(grpc_call_element* elem,
|
315
|
+
const grpc_call_element_args* args) {
|
316
|
+
new (elem->call_data) CallData(*args);
|
317
|
+
return GRPC_ERROR_NONE;
|
318
|
+
}
|
319
|
+
|
320
|
+
static void Destroy(grpc_call_element* elem,
|
321
|
+
const grpc_call_final_info* /*final_info*/,
|
322
|
+
grpc_closure* then_schedule_closure) {
|
323
|
+
auto* calld = static_cast<CallData*>(elem->call_data);
|
324
|
+
RefCountedPtr<SubchannelCall> subchannel_call;
|
325
|
+
if (GPR_LIKELY(calld->lb_call_ != nullptr)) {
|
326
|
+
subchannel_call = calld->lb_call_->subchannel_call();
|
327
|
+
}
|
328
|
+
calld->~CallData();
|
329
|
+
if (GPR_LIKELY(subchannel_call != nullptr)) {
|
330
|
+
subchannel_call->SetAfterCallStackDestroy(then_schedule_closure);
|
331
|
+
} else {
|
332
|
+
// TODO(yashkt) : This can potentially be a Closure::Run
|
333
|
+
ExecCtx::Run(DEBUG_LOCATION, then_schedule_closure, GRPC_ERROR_NONE);
|
334
|
+
}
|
335
|
+
}
|
336
|
+
|
337
|
+
static void StartTransportStreamOpBatch(
|
338
|
+
grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
|
339
|
+
auto* calld = static_cast<CallData*>(elem->call_data);
|
340
|
+
calld->lb_call_->StartTransportStreamOpBatch(batch);
|
341
|
+
}
|
342
|
+
|
343
|
+
static void SetPollent(grpc_call_element* elem,
|
344
|
+
grpc_polling_entity* pollent) {
|
345
|
+
auto* calld = static_cast<CallData*>(elem->call_data);
|
346
|
+
auto* chand = static_cast<DynamicTerminationFilter*>(elem->channel_data);
|
347
|
+
ClientChannel* client_channel = chand->chand_;
|
348
|
+
grpc_call_element_args args = {calld->owning_call_, nullptr,
|
349
|
+
calld->call_context_, calld->path_,
|
350
|
+
/*start_time=*/0, calld->deadline_,
|
351
|
+
calld->arena_, calld->call_combiner_};
|
352
|
+
auto* service_config_call_data =
|
353
|
+
static_cast<ClientChannelServiceConfigCallData*>(
|
354
|
+
calld->call_context_[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value);
|
355
|
+
calld->lb_call_ = client_channel->CreateLoadBalancedCall(
|
356
|
+
args, pollent, nullptr,
|
357
|
+
service_config_call_data->call_dispatch_controller(),
|
358
|
+
/*is_transparent_retry=*/false);
|
359
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
360
|
+
gpr_log(GPR_INFO,
|
361
|
+
"chand=%p dynamic_termination_calld=%p: create lb_call=%p", chand,
|
362
|
+
client_channel, calld->lb_call_.get());
|
363
|
+
}
|
364
|
+
}
|
365
|
+
|
366
|
+
private:
|
367
|
+
explicit CallData(const grpc_call_element_args& args)
|
368
|
+
: path_(grpc_slice_ref_internal(args.path)),
|
369
|
+
deadline_(args.deadline),
|
370
|
+
arena_(args.arena),
|
371
|
+
owning_call_(args.call_stack),
|
372
|
+
call_combiner_(args.call_combiner),
|
373
|
+
call_context_(args.context) {}
|
374
|
+
|
375
|
+
~CallData() { grpc_slice_unref_internal(path_); }
|
376
|
+
|
377
|
+
grpc_slice path_; // Request path.
|
378
|
+
grpc_millis deadline_;
|
379
|
+
Arena* arena_;
|
380
|
+
grpc_call_stack* owning_call_;
|
381
|
+
CallCombiner* call_combiner_;
|
382
|
+
grpc_call_context_element* call_context_;
|
383
|
+
|
384
|
+
OrphanablePtr<ClientChannel::LoadBalancedCall> lb_call_;
|
385
|
+
};
|
386
|
+
|
387
|
+
const grpc_channel_filter DynamicTerminationFilter::kFilterVtable = {
|
388
|
+
DynamicTerminationFilter::CallData::StartTransportStreamOpBatch,
|
389
|
+
DynamicTerminationFilter::StartTransportOp,
|
390
|
+
sizeof(DynamicTerminationFilter::CallData),
|
391
|
+
DynamicTerminationFilter::CallData::Init,
|
392
|
+
DynamicTerminationFilter::CallData::SetPollent,
|
393
|
+
DynamicTerminationFilter::CallData::Destroy,
|
394
|
+
sizeof(DynamicTerminationFilter),
|
395
|
+
DynamicTerminationFilter::Init,
|
396
|
+
DynamicTerminationFilter::Destroy,
|
397
|
+
DynamicTerminationFilter::GetChannelInfo,
|
398
|
+
"dynamic_filter_termination",
|
399
|
+
};
|
400
|
+
|
401
|
+
} // namespace
|
402
|
+
|
403
|
+
//
|
404
|
+
// ClientChannel::ResolverResultHandler
|
405
|
+
//
|
406
|
+
|
407
|
+
class ClientChannel::ResolverResultHandler : public Resolver::ResultHandler {
|
408
|
+
public:
|
409
|
+
explicit ResolverResultHandler(ClientChannel* chand) : chand_(chand) {
|
410
|
+
GRPC_CHANNEL_STACK_REF(chand_->owning_stack_, "ResolverResultHandler");
|
411
|
+
}
|
412
|
+
|
413
|
+
~ResolverResultHandler() override {
|
414
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
415
|
+
gpr_log(GPR_INFO, "chand=%p: resolver shutdown complete", chand_);
|
416
|
+
}
|
417
|
+
GRPC_CHANNEL_STACK_UNREF(chand_->owning_stack_, "ResolverResultHandler");
|
418
|
+
}
|
419
|
+
|
420
|
+
void ReturnResult(Resolver::Result result) override
|
421
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
422
|
+
chand_->OnResolverResultChangedLocked(std::move(result));
|
423
|
+
}
|
424
|
+
|
425
|
+
void ReturnError(grpc_error_handle error) override
|
426
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
427
|
+
chand_->OnResolverErrorLocked(error);
|
428
|
+
}
|
429
|
+
|
430
|
+
private:
|
431
|
+
ClientChannel* chand_;
|
432
|
+
};
|
433
|
+
|
434
|
+
//
|
435
|
+
// ClientChannel::SubchannelWrapper
|
436
|
+
//
|
437
|
+
|
438
|
+
// This class is a wrapper for Subchannel that hides details of the
|
439
|
+
// channel's implementation (such as the health check service name and
|
440
|
+
// connected subchannel) from the LB policy API.
|
441
|
+
//
|
442
|
+
// Note that no synchronization is needed here, because even if the
|
443
|
+
// underlying subchannel is shared between channels, this wrapper will only
|
444
|
+
// be used within one channel, so it will always be synchronized by the
|
445
|
+
// control plane work_serializer.
|
446
|
+
class ClientChannel::SubchannelWrapper : public SubchannelInterface {
|
447
|
+
public:
|
448
|
+
SubchannelWrapper(ClientChannel* chand, RefCountedPtr<Subchannel> subchannel,
|
449
|
+
absl::optional<std::string> health_check_service_name)
|
450
|
+
: SubchannelInterface(
|
451
|
+
GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)
|
452
|
+
? "SubchannelWrapper"
|
453
|
+
: nullptr),
|
454
|
+
chand_(chand),
|
455
|
+
subchannel_(std::move(subchannel)),
|
456
|
+
health_check_service_name_(std::move(health_check_service_name)) {
|
457
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
458
|
+
gpr_log(GPR_INFO,
|
459
|
+
"chand=%p: creating subchannel wrapper %p for subchannel %p",
|
460
|
+
chand, this, subchannel_.get());
|
461
|
+
}
|
462
|
+
GRPC_CHANNEL_STACK_REF(chand_->owning_stack_, "SubchannelWrapper");
|
463
|
+
if (chand_->channelz_node_ != nullptr) {
|
464
|
+
auto* subchannel_node = subchannel_->channelz_node();
|
465
|
+
if (subchannel_node != nullptr) {
|
466
|
+
auto it = chand_->subchannel_refcount_map_.find(subchannel_.get());
|
467
|
+
if (it == chand_->subchannel_refcount_map_.end()) {
|
468
|
+
chand_->channelz_node_->AddChildSubchannel(subchannel_node->uuid());
|
469
|
+
it = chand_->subchannel_refcount_map_.emplace(subchannel_.get(), 0)
|
470
|
+
.first;
|
471
|
+
}
|
472
|
+
++it->second;
|
473
|
+
}
|
474
|
+
}
|
475
|
+
chand_->subchannel_wrappers_.insert(this);
|
476
|
+
}
|
477
|
+
|
478
|
+
~SubchannelWrapper() override {
|
479
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
480
|
+
gpr_log(GPR_INFO,
|
481
|
+
"chand=%p: destroying subchannel wrapper %p for subchannel %p",
|
482
|
+
chand_, this, subchannel_.get());
|
483
|
+
}
|
484
|
+
chand_->subchannel_wrappers_.erase(this);
|
485
|
+
if (chand_->channelz_node_ != nullptr) {
|
486
|
+
auto* subchannel_node = subchannel_->channelz_node();
|
487
|
+
if (subchannel_node != nullptr) {
|
488
|
+
auto it = chand_->subchannel_refcount_map_.find(subchannel_.get());
|
489
|
+
GPR_ASSERT(it != chand_->subchannel_refcount_map_.end());
|
490
|
+
--it->second;
|
491
|
+
if (it->second == 0) {
|
492
|
+
chand_->channelz_node_->RemoveChildSubchannel(
|
493
|
+
subchannel_node->uuid());
|
494
|
+
chand_->subchannel_refcount_map_.erase(it);
|
495
|
+
}
|
496
|
+
}
|
497
|
+
}
|
498
|
+
GRPC_CHANNEL_STACK_UNREF(chand_->owning_stack_, "SubchannelWrapper");
|
499
|
+
}
|
500
|
+
|
501
|
+
grpc_connectivity_state CheckConnectivityState() override {
|
502
|
+
return subchannel_->CheckConnectivityState(health_check_service_name_);
|
503
|
+
}
|
504
|
+
|
505
|
+
void WatchConnectivityState(
|
506
|
+
grpc_connectivity_state initial_state,
|
507
|
+
std::unique_ptr<ConnectivityStateWatcherInterface> watcher) override
|
508
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
509
|
+
auto& watcher_wrapper = watcher_map_[watcher.get()];
|
510
|
+
GPR_ASSERT(watcher_wrapper == nullptr);
|
511
|
+
watcher_wrapper = new WatcherWrapper(std::move(watcher),
|
512
|
+
Ref(DEBUG_LOCATION, "WatcherWrapper"),
|
513
|
+
initial_state);
|
514
|
+
subchannel_->WatchConnectivityState(
|
515
|
+
initial_state, health_check_service_name_,
|
516
|
+
RefCountedPtr<Subchannel::ConnectivityStateWatcherInterface>(
|
517
|
+
watcher_wrapper));
|
518
|
+
}
|
519
|
+
|
520
|
+
void CancelConnectivityStateWatch(ConnectivityStateWatcherInterface* watcher)
|
521
|
+
override ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
522
|
+
auto it = watcher_map_.find(watcher);
|
523
|
+
GPR_ASSERT(it != watcher_map_.end());
|
524
|
+
subchannel_->CancelConnectivityStateWatch(health_check_service_name_,
|
525
|
+
it->second);
|
526
|
+
watcher_map_.erase(it);
|
527
|
+
}
|
528
|
+
|
529
|
+
RefCountedPtr<ConnectedSubchannel> connected_subchannel() const {
|
530
|
+
return subchannel_->connected_subchannel();
|
531
|
+
}
|
532
|
+
|
533
|
+
void AttemptToConnect() override { subchannel_->AttemptToConnect(); }
|
534
|
+
|
535
|
+
void ResetBackoff() override { subchannel_->ResetBackoff(); }
|
536
|
+
|
537
|
+
const grpc_channel_args* channel_args() override {
|
538
|
+
return subchannel_->channel_args();
|
539
|
+
}
|
540
|
+
|
541
|
+
void ThrottleKeepaliveTime(int new_keepalive_time) {
|
542
|
+
subchannel_->ThrottleKeepaliveTime(new_keepalive_time);
|
543
|
+
}
|
544
|
+
|
545
|
+
private:
|
546
|
+
// Subchannel and SubchannelInterface have different interfaces for
|
547
|
+
// their respective ConnectivityStateWatcherInterface classes.
|
548
|
+
// The one in Subchannel updates the ConnectedSubchannel along with
|
549
|
+
// the state, whereas the one in SubchannelInterface does not expose
|
550
|
+
// the ConnectedSubchannel.
|
551
|
+
//
|
552
|
+
// This wrapper provides a bridge between the two. It implements
|
553
|
+
// Subchannel::ConnectivityStateWatcherInterface and wraps
|
554
|
+
// the instance of SubchannelInterface::ConnectivityStateWatcherInterface
|
555
|
+
// that was passed in by the LB policy. We pass an instance of this
|
556
|
+
// class to the underlying Subchannel, and when we get updates from
|
557
|
+
// the subchannel, we pass those on to the wrapped watcher to return
|
558
|
+
// the update to the LB policy. This allows us to set the connected
|
559
|
+
// subchannel before passing the result back to the LB policy.
|
560
|
+
class WatcherWrapper : public Subchannel::ConnectivityStateWatcherInterface {
|
561
|
+
public:
|
562
|
+
WatcherWrapper(
|
563
|
+
std::unique_ptr<SubchannelInterface::ConnectivityStateWatcherInterface>
|
564
|
+
watcher,
|
565
|
+
RefCountedPtr<SubchannelWrapper> parent,
|
566
|
+
grpc_connectivity_state initial_state)
|
567
|
+
: watcher_(std::move(watcher)),
|
568
|
+
parent_(std::move(parent)),
|
569
|
+
last_seen_state_(initial_state) {}
|
570
|
+
|
571
|
+
~WatcherWrapper() override {
|
572
|
+
auto* parent = parent_.release(); // ref owned by lambda
|
573
|
+
parent->chand_->work_serializer_->Run(
|
574
|
+
[parent]()
|
575
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(parent_->chand_->work_serializer_) {
|
576
|
+
parent->Unref(DEBUG_LOCATION, "WatcherWrapper");
|
577
|
+
},
|
578
|
+
DEBUG_LOCATION);
|
579
|
+
}
|
580
|
+
|
581
|
+
void OnConnectivityStateChange() override {
|
582
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
583
|
+
gpr_log(GPR_INFO,
|
584
|
+
"chand=%p: connectivity change for subchannel wrapper %p "
|
585
|
+
"subchannel %p; hopping into work_serializer",
|
586
|
+
parent_->chand_, parent_.get(), parent_->subchannel_.get());
|
587
|
+
}
|
588
|
+
Ref().release(); // ref owned by lambda
|
589
|
+
parent_->chand_->work_serializer_->Run(
|
590
|
+
[this]()
|
591
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(parent_->chand_->work_serializer_) {
|
592
|
+
ApplyUpdateInControlPlaneWorkSerializer();
|
593
|
+
Unref();
|
594
|
+
},
|
595
|
+
DEBUG_LOCATION);
|
596
|
+
}
|
597
|
+
|
598
|
+
grpc_pollset_set* interested_parties() override {
|
599
|
+
SubchannelInterface::ConnectivityStateWatcherInterface* watcher =
|
600
|
+
watcher_.get();
|
601
|
+
if (watcher_ == nullptr) watcher = replacement_->watcher_.get();
|
602
|
+
return watcher->interested_parties();
|
603
|
+
}
|
604
|
+
|
605
|
+
WatcherWrapper* MakeReplacement() {
|
606
|
+
auto* replacement =
|
607
|
+
new WatcherWrapper(std::move(watcher_), parent_, last_seen_state_);
|
608
|
+
replacement_ = replacement;
|
609
|
+
return replacement;
|
610
|
+
}
|
611
|
+
|
612
|
+
grpc_connectivity_state last_seen_state() const { return last_seen_state_; }
|
613
|
+
|
614
|
+
private:
|
615
|
+
void ApplyUpdateInControlPlaneWorkSerializer()
|
616
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(parent_->chand_->work_serializer_) {
|
617
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
618
|
+
gpr_log(GPR_INFO,
|
619
|
+
"chand=%p: processing connectivity change in work serializer "
|
620
|
+
"for subchannel wrapper %p subchannel %p "
|
621
|
+
"watcher=%p",
|
622
|
+
parent_->chand_, parent_.get(), parent_->subchannel_.get(),
|
623
|
+
watcher_.get());
|
624
|
+
}
|
625
|
+
ConnectivityStateChange state_change = PopConnectivityStateChange();
|
626
|
+
absl::optional<absl::Cord> keepalive_throttling =
|
627
|
+
state_change.status.GetPayload(kKeepaliveThrottlingKey);
|
628
|
+
if (keepalive_throttling.has_value()) {
|
629
|
+
int new_keepalive_time = -1;
|
630
|
+
if (absl::SimpleAtoi(std::string(keepalive_throttling.value()),
|
631
|
+
&new_keepalive_time)) {
|
632
|
+
if (new_keepalive_time > parent_->chand_->keepalive_time_) {
|
633
|
+
parent_->chand_->keepalive_time_ = new_keepalive_time;
|
634
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
635
|
+
gpr_log(GPR_INFO, "chand=%p: throttling keepalive time to %d",
|
636
|
+
parent_->chand_, parent_->chand_->keepalive_time_);
|
637
|
+
}
|
638
|
+
// Propagate the new keepalive time to all subchannels. This is so
|
639
|
+
// that new transports created by any subchannel (and not just the
|
640
|
+
// subchannel that received the GOAWAY), use the new keepalive time.
|
641
|
+
for (auto* subchannel_wrapper :
|
642
|
+
parent_->chand_->subchannel_wrappers_) {
|
643
|
+
subchannel_wrapper->ThrottleKeepaliveTime(new_keepalive_time);
|
644
|
+
}
|
645
|
+
}
|
646
|
+
} else {
|
647
|
+
gpr_log(GPR_ERROR, "chand=%p: Illegal keepalive throttling value %s",
|
648
|
+
parent_->chand_,
|
649
|
+
std::string(keepalive_throttling.value()).c_str());
|
650
|
+
}
|
651
|
+
}
|
652
|
+
// Ignore update if the parent WatcherWrapper has been replaced
|
653
|
+
// since this callback was scheduled.
|
654
|
+
if (watcher_ != nullptr) {
|
655
|
+
last_seen_state_ = state_change.state;
|
656
|
+
watcher_->OnConnectivityStateChange(state_change.state);
|
657
|
+
}
|
658
|
+
}
|
659
|
+
|
660
|
+
std::unique_ptr<SubchannelInterface::ConnectivityStateWatcherInterface>
|
661
|
+
watcher_;
|
662
|
+
RefCountedPtr<SubchannelWrapper> parent_;
|
663
|
+
grpc_connectivity_state last_seen_state_;
|
664
|
+
WatcherWrapper* replacement_ = nullptr;
|
665
|
+
};
|
666
|
+
|
667
|
+
ClientChannel* chand_;
|
668
|
+
RefCountedPtr<Subchannel> subchannel_;
|
669
|
+
absl::optional<std::string> health_check_service_name_;
|
670
|
+
// Maps from the address of the watcher passed to us by the LB policy
|
671
|
+
// to the address of the WrapperWatcher that we passed to the underlying
|
672
|
+
// subchannel. This is needed so that when the LB policy calls
|
673
|
+
// CancelConnectivityStateWatch() with its watcher, we know the
|
674
|
+
// corresponding WrapperWatcher to cancel on the underlying subchannel.
|
675
|
+
std::map<ConnectivityStateWatcherInterface*, WatcherWrapper*> watcher_map_
|
676
|
+
ABSL_GUARDED_BY(&ClientChannel::work_serializer_);
|
677
|
+
};
|
678
|
+
|
679
|
+
//
|
680
|
+
// ClientChannel::ExternalConnectivityWatcher
|
681
|
+
//
|
682
|
+
|
683
|
+
ClientChannel::ExternalConnectivityWatcher::ExternalConnectivityWatcher(
|
684
|
+
ClientChannel* chand, grpc_polling_entity pollent,
|
685
|
+
grpc_connectivity_state* state, grpc_closure* on_complete,
|
686
|
+
grpc_closure* watcher_timer_init)
|
687
|
+
: chand_(chand),
|
688
|
+
pollent_(pollent),
|
689
|
+
initial_state_(*state),
|
690
|
+
state_(state),
|
691
|
+
on_complete_(on_complete),
|
692
|
+
watcher_timer_init_(watcher_timer_init) {
|
693
|
+
grpc_polling_entity_add_to_pollset_set(&pollent_,
|
694
|
+
chand_->interested_parties_);
|
695
|
+
GRPC_CHANNEL_STACK_REF(chand_->owning_stack_, "ExternalConnectivityWatcher");
|
696
|
+
{
|
697
|
+
MutexLock lock(&chand_->external_watchers_mu_);
|
698
|
+
// Will be deleted when the watch is complete.
|
699
|
+
GPR_ASSERT(chand->external_watchers_[on_complete] == nullptr);
|
700
|
+
// Store a ref to the watcher in the external_watchers_ map.
|
701
|
+
chand->external_watchers_[on_complete] =
|
702
|
+
Ref(DEBUG_LOCATION, "AddWatcherToExternalWatchersMapLocked");
|
703
|
+
}
|
704
|
+
// Pass the ref from creating the object to Start().
|
705
|
+
chand_->work_serializer_->Run(
|
706
|
+
[this]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
707
|
+
// The ref is passed to AddWatcherLocked().
|
708
|
+
AddWatcherLocked();
|
709
|
+
},
|
710
|
+
DEBUG_LOCATION);
|
711
|
+
}
|
712
|
+
|
713
|
+
ClientChannel::ExternalConnectivityWatcher::~ExternalConnectivityWatcher() {
|
714
|
+
grpc_polling_entity_del_from_pollset_set(&pollent_,
|
715
|
+
chand_->interested_parties_);
|
716
|
+
GRPC_CHANNEL_STACK_UNREF(chand_->owning_stack_,
|
717
|
+
"ExternalConnectivityWatcher");
|
718
|
+
}
|
719
|
+
|
720
|
+
void ClientChannel::ExternalConnectivityWatcher::
|
721
|
+
RemoveWatcherFromExternalWatchersMap(ClientChannel* chand,
|
722
|
+
grpc_closure* on_complete,
|
723
|
+
bool cancel) {
|
724
|
+
RefCountedPtr<ExternalConnectivityWatcher> watcher;
|
725
|
+
{
|
726
|
+
MutexLock lock(&chand->external_watchers_mu_);
|
727
|
+
auto it = chand->external_watchers_.find(on_complete);
|
728
|
+
if (it != chand->external_watchers_.end()) {
|
729
|
+
watcher = std::move(it->second);
|
730
|
+
chand->external_watchers_.erase(it);
|
731
|
+
}
|
732
|
+
}
|
733
|
+
// watcher->Cancel() will hop into the WorkSerializer, so we have to unlock
|
734
|
+
// the mutex before calling it.
|
735
|
+
if (watcher != nullptr && cancel) watcher->Cancel();
|
736
|
+
}
|
737
|
+
|
738
|
+
void ClientChannel::ExternalConnectivityWatcher::Notify(
|
739
|
+
grpc_connectivity_state state, const absl::Status& /* status */) {
|
740
|
+
bool done = false;
|
741
|
+
if (!done_.compare_exchange_strong(done, true, std::memory_order_relaxed,
|
742
|
+
std::memory_order_relaxed)) {
|
743
|
+
return; // Already done.
|
744
|
+
}
|
745
|
+
// Remove external watcher.
|
746
|
+
ExternalConnectivityWatcher::RemoveWatcherFromExternalWatchersMap(
|
747
|
+
chand_, on_complete_, /*cancel=*/false);
|
748
|
+
// Report new state to the user.
|
749
|
+
*state_ = state;
|
750
|
+
ExecCtx::Run(DEBUG_LOCATION, on_complete_, GRPC_ERROR_NONE);
|
751
|
+
// Hop back into the work_serializer to clean up.
|
752
|
+
// Not needed in state SHUTDOWN, because the tracker will
|
753
|
+
// automatically remove all watchers in that case.
|
754
|
+
if (state != GRPC_CHANNEL_SHUTDOWN) {
|
755
|
+
chand_->work_serializer_->Run(
|
756
|
+
[this]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
757
|
+
RemoveWatcherLocked();
|
758
|
+
},
|
759
|
+
DEBUG_LOCATION);
|
760
|
+
}
|
761
|
+
}
|
762
|
+
|
763
|
+
void ClientChannel::ExternalConnectivityWatcher::Cancel() {
|
764
|
+
bool done = false;
|
765
|
+
if (!done_.compare_exchange_strong(done, true, std::memory_order_relaxed,
|
766
|
+
std::memory_order_relaxed)) {
|
767
|
+
return; // Already done.
|
768
|
+
}
|
769
|
+
ExecCtx::Run(DEBUG_LOCATION, on_complete_, GRPC_ERROR_CANCELLED);
|
770
|
+
// Hop back into the work_serializer to clean up.
|
771
|
+
chand_->work_serializer_->Run(
|
772
|
+
[this]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
773
|
+
RemoveWatcherLocked();
|
774
|
+
},
|
775
|
+
DEBUG_LOCATION);
|
776
|
+
}
|
777
|
+
|
778
|
+
void ClientChannel::ExternalConnectivityWatcher::AddWatcherLocked() {
|
779
|
+
Closure::Run(DEBUG_LOCATION, watcher_timer_init_, GRPC_ERROR_NONE);
|
780
|
+
// Add new watcher. Pass the ref of the object from creation to OrphanablePtr.
|
781
|
+
chand_->state_tracker_.AddWatcher(
|
782
|
+
initial_state_, OrphanablePtr<ConnectivityStateWatcherInterface>(this));
|
783
|
+
}
|
784
|
+
|
785
|
+
void ClientChannel::ExternalConnectivityWatcher::RemoveWatcherLocked() {
|
786
|
+
chand_->state_tracker_.RemoveWatcher(this);
|
787
|
+
}
|
788
|
+
|
789
|
+
//
|
790
|
+
// ClientChannel::ConnectivityWatcherAdder
|
791
|
+
//
|
792
|
+
|
793
|
+
class ClientChannel::ConnectivityWatcherAdder {
|
794
|
+
public:
|
795
|
+
ConnectivityWatcherAdder(
|
796
|
+
ClientChannel* chand, grpc_connectivity_state initial_state,
|
797
|
+
OrphanablePtr<AsyncConnectivityStateWatcherInterface> watcher)
|
798
|
+
: chand_(chand),
|
799
|
+
initial_state_(initial_state),
|
800
|
+
watcher_(std::move(watcher)) {
|
801
|
+
GRPC_CHANNEL_STACK_REF(chand_->owning_stack_, "ConnectivityWatcherAdder");
|
802
|
+
chand_->work_serializer_->Run(
|
803
|
+
[this]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
804
|
+
AddWatcherLocked();
|
805
|
+
},
|
806
|
+
DEBUG_LOCATION);
|
807
|
+
}
|
808
|
+
|
809
|
+
private:
|
810
|
+
void AddWatcherLocked()
|
811
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
812
|
+
chand_->state_tracker_.AddWatcher(initial_state_, std::move(watcher_));
|
813
|
+
GRPC_CHANNEL_STACK_UNREF(chand_->owning_stack_, "ConnectivityWatcherAdder");
|
814
|
+
delete this;
|
815
|
+
}
|
816
|
+
|
817
|
+
ClientChannel* chand_;
|
818
|
+
grpc_connectivity_state initial_state_;
|
819
|
+
OrphanablePtr<AsyncConnectivityStateWatcherInterface> watcher_;
|
820
|
+
};
|
821
|
+
|
822
|
+
//
|
823
|
+
// ClientChannel::ConnectivityWatcherRemover
|
824
|
+
//
|
825
|
+
|
826
|
+
class ClientChannel::ConnectivityWatcherRemover {
|
827
|
+
public:
|
828
|
+
ConnectivityWatcherRemover(ClientChannel* chand,
|
829
|
+
AsyncConnectivityStateWatcherInterface* watcher)
|
830
|
+
: chand_(chand), watcher_(watcher) {
|
831
|
+
GRPC_CHANNEL_STACK_REF(chand_->owning_stack_, "ConnectivityWatcherRemover");
|
832
|
+
chand_->work_serializer_->Run(
|
833
|
+
[this]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
834
|
+
RemoveWatcherLocked();
|
835
|
+
},
|
836
|
+
DEBUG_LOCATION);
|
837
|
+
}
|
838
|
+
|
839
|
+
private:
|
840
|
+
void RemoveWatcherLocked()
|
841
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
842
|
+
chand_->state_tracker_.RemoveWatcher(watcher_);
|
843
|
+
GRPC_CHANNEL_STACK_UNREF(chand_->owning_stack_,
|
844
|
+
"ConnectivityWatcherRemover");
|
845
|
+
delete this;
|
846
|
+
}
|
847
|
+
|
848
|
+
ClientChannel* chand_;
|
849
|
+
AsyncConnectivityStateWatcherInterface* watcher_;
|
850
|
+
};
|
851
|
+
|
852
|
+
//
|
853
|
+
// ClientChannel::ClientChannelControlHelper
|
854
|
+
//
|
855
|
+
|
856
|
+
class ClientChannel::ClientChannelControlHelper
|
857
|
+
: public LoadBalancingPolicy::ChannelControlHelper {
|
858
|
+
public:
|
859
|
+
explicit ClientChannelControlHelper(ClientChannel* chand) : chand_(chand) {
|
860
|
+
GRPC_CHANNEL_STACK_REF(chand_->owning_stack_, "ClientChannelControlHelper");
|
861
|
+
}
|
862
|
+
|
863
|
+
~ClientChannelControlHelper() override {
|
864
|
+
GRPC_CHANNEL_STACK_UNREF(chand_->owning_stack_,
|
865
|
+
"ClientChannelControlHelper");
|
866
|
+
}
|
867
|
+
|
868
|
+
RefCountedPtr<SubchannelInterface> CreateSubchannel(
|
869
|
+
ServerAddress address, const grpc_channel_args& args) override
|
870
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
871
|
+
if (chand_->resolver_ == nullptr) return nullptr; // Shutting down.
|
872
|
+
// Determine health check service name.
|
873
|
+
absl::optional<std::string> health_check_service_name;
|
874
|
+
const char* health_check_service_name_arg = grpc_channel_args_find_string(
|
875
|
+
&args, GRPC_ARG_HEALTH_CHECK_SERVICE_NAME);
|
876
|
+
if (health_check_service_name_arg != nullptr) {
|
877
|
+
bool inhibit_health_checking = grpc_channel_args_find_bool(
|
878
|
+
&args, GRPC_ARG_INHIBIT_HEALTH_CHECKING, false);
|
879
|
+
if (!inhibit_health_checking) {
|
880
|
+
health_check_service_name = health_check_service_name_arg;
|
881
|
+
}
|
882
|
+
}
|
883
|
+
// Construct channel args for subchannel.
|
884
|
+
// Remove channel args that should not affect subchannel uniqueness.
|
885
|
+
absl::InlinedVector<const char*, 4> args_to_remove = {
|
886
|
+
GRPC_ARG_HEALTH_CHECK_SERVICE_NAME,
|
887
|
+
GRPC_ARG_INHIBIT_HEALTH_CHECKING,
|
888
|
+
GRPC_ARG_CHANNELZ_CHANNEL_NODE,
|
889
|
+
};
|
890
|
+
// Add channel args needed for the subchannel.
|
891
|
+
absl::InlinedVector<grpc_arg, 2> args_to_add = {
|
892
|
+
SubchannelPoolInterface::CreateChannelArg(
|
893
|
+
chand_->subchannel_pool_.get()),
|
894
|
+
};
|
895
|
+
// Check if default authority arg is already set.
|
896
|
+
const char* default_authority =
|
897
|
+
grpc_channel_args_find_string(&args, GRPC_ARG_DEFAULT_AUTHORITY);
|
898
|
+
// Add args from subchannel address.
|
899
|
+
if (address.args() != nullptr) {
|
900
|
+
for (size_t j = 0; j < address.args()->num_args; ++j) {
|
901
|
+
grpc_arg& arg = address.args()->args[j];
|
902
|
+
if (strcmp(arg.key, GRPC_ARG_DEFAULT_AUTHORITY) == 0) {
|
903
|
+
// Don't add default authority arg from subchannel address if
|
904
|
+
// it's already set at the channel level -- the value from the
|
905
|
+
// application should take precedence over what is set by the
|
906
|
+
// resolver.
|
907
|
+
if (default_authority != nullptr) continue;
|
908
|
+
default_authority = arg.value.string;
|
909
|
+
}
|
910
|
+
args_to_add.emplace_back(arg);
|
911
|
+
}
|
912
|
+
}
|
913
|
+
// If we haven't already set the default authority arg, add it from
|
914
|
+
// the channel.
|
915
|
+
if (default_authority == nullptr) {
|
916
|
+
// Remove it, just in case it's actually present but is the wrong type.
|
917
|
+
args_to_remove.push_back(GRPC_ARG_DEFAULT_AUTHORITY);
|
918
|
+
args_to_add.push_back(grpc_channel_arg_string_create(
|
919
|
+
const_cast<char*>(GRPC_ARG_DEFAULT_AUTHORITY),
|
920
|
+
const_cast<char*>(chand_->default_authority_.c_str())));
|
921
|
+
}
|
922
|
+
grpc_channel_args* new_args = grpc_channel_args_copy_and_add_and_remove(
|
923
|
+
&args, args_to_remove.data(), args_to_remove.size(), args_to_add.data(),
|
924
|
+
args_to_add.size());
|
925
|
+
// Create subchannel.
|
926
|
+
RefCountedPtr<Subchannel> subchannel =
|
927
|
+
chand_->client_channel_factory_->CreateSubchannel(address.address(),
|
928
|
+
new_args);
|
929
|
+
grpc_channel_args_destroy(new_args);
|
930
|
+
if (subchannel == nullptr) return nullptr;
|
931
|
+
// Make sure the subchannel has updated keepalive time.
|
932
|
+
subchannel->ThrottleKeepaliveTime(chand_->keepalive_time_);
|
933
|
+
// Create and return wrapper for the subchannel.
|
934
|
+
return MakeRefCounted<SubchannelWrapper>(
|
935
|
+
chand_, std::move(subchannel), std::move(health_check_service_name));
|
936
|
+
}
|
937
|
+
|
938
|
+
void UpdateState(
|
939
|
+
grpc_connectivity_state state, const absl::Status& status,
|
940
|
+
std::unique_ptr<LoadBalancingPolicy::SubchannelPicker> picker) override
|
941
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
942
|
+
if (chand_->resolver_ == nullptr) return; // Shutting down.
|
943
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
944
|
+
const char* extra = chand_->disconnect_error_ == GRPC_ERROR_NONE
|
945
|
+
? ""
|
946
|
+
: " (ignoring -- channel shutting down)";
|
947
|
+
gpr_log(GPR_INFO, "chand=%p: update: state=%s status=(%s) picker=%p%s",
|
948
|
+
chand_, ConnectivityStateName(state), status.ToString().c_str(),
|
949
|
+
picker.get(), extra);
|
950
|
+
}
|
951
|
+
// Do update only if not shutting down.
|
952
|
+
if (chand_->disconnect_error_ == GRPC_ERROR_NONE) {
|
953
|
+
chand_->UpdateStateAndPickerLocked(state, status, "helper",
|
954
|
+
std::move(picker));
|
955
|
+
}
|
956
|
+
}
|
957
|
+
|
958
|
+
void RequestReresolution() override
|
959
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
960
|
+
if (chand_->resolver_ == nullptr) return; // Shutting down.
|
961
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
962
|
+
gpr_log(GPR_INFO, "chand=%p: started name re-resolving", chand_);
|
963
|
+
}
|
964
|
+
chand_->resolver_->RequestReresolutionLocked();
|
965
|
+
}
|
966
|
+
|
967
|
+
absl::string_view GetAuthority() override {
|
968
|
+
return chand_->default_authority_;
|
969
|
+
}
|
970
|
+
|
971
|
+
void AddTraceEvent(TraceSeverity severity, absl::string_view message) override
|
972
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand_->work_serializer_) {
|
973
|
+
if (chand_->resolver_ == nullptr) return; // Shutting down.
|
974
|
+
if (chand_->channelz_node_ != nullptr) {
|
975
|
+
chand_->channelz_node_->AddTraceEvent(
|
976
|
+
ConvertSeverityEnum(severity),
|
977
|
+
grpc_slice_from_copied_buffer(message.data(), message.size()));
|
978
|
+
}
|
979
|
+
}
|
980
|
+
|
981
|
+
private:
|
982
|
+
static channelz::ChannelTrace::Severity ConvertSeverityEnum(
|
983
|
+
TraceSeverity severity) {
|
984
|
+
if (severity == TRACE_INFO) return channelz::ChannelTrace::Info;
|
985
|
+
if (severity == TRACE_WARNING) return channelz::ChannelTrace::Warning;
|
986
|
+
return channelz::ChannelTrace::Error;
|
987
|
+
}
|
988
|
+
|
989
|
+
ClientChannel* chand_;
|
990
|
+
};
|
991
|
+
|
992
|
+
//
|
993
|
+
// ClientChannel implementation
|
994
|
+
//
|
995
|
+
|
996
|
+
ClientChannel* ClientChannel::GetFromChannel(grpc_channel* channel) {
|
997
|
+
grpc_channel_element* elem =
|
998
|
+
grpc_channel_stack_last_element(grpc_channel_get_channel_stack(channel));
|
999
|
+
if (elem->filter != &kFilterVtable) return nullptr;
|
1000
|
+
return static_cast<ClientChannel*>(elem->channel_data);
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
grpc_error_handle ClientChannel::Init(grpc_channel_element* elem,
|
1004
|
+
grpc_channel_element_args* args) {
|
1005
|
+
GPR_ASSERT(args->is_last);
|
1006
|
+
GPR_ASSERT(elem->filter == &kFilterVtable);
|
1007
|
+
grpc_error_handle error = GRPC_ERROR_NONE;
|
1008
|
+
new (elem->channel_data) ClientChannel(args, &error);
|
1009
|
+
return error;
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
void ClientChannel::Destroy(grpc_channel_element* elem) {
|
1013
|
+
ClientChannel* chand = static_cast<ClientChannel*>(elem->channel_data);
|
1014
|
+
chand->~ClientChannel();
|
1015
|
+
}
|
1016
|
+
|
1017
|
+
namespace {
|
1018
|
+
|
1019
|
+
RefCountedPtr<SubchannelPoolInterface> GetSubchannelPool(
|
1020
|
+
const grpc_channel_args* args) {
|
1021
|
+
const bool use_local_subchannel_pool = grpc_channel_args_find_bool(
|
1022
|
+
args, GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL, false);
|
1023
|
+
if (use_local_subchannel_pool) {
|
1024
|
+
return MakeRefCounted<LocalSubchannelPool>();
|
1025
|
+
}
|
1026
|
+
return GlobalSubchannelPool::instance();
|
1027
|
+
}
|
1028
|
+
|
1029
|
+
channelz::ChannelNode* GetChannelzNode(const grpc_channel_args* args) {
|
1030
|
+
return grpc_channel_args_find_pointer<channelz::ChannelNode>(
|
1031
|
+
args, GRPC_ARG_CHANNELZ_CHANNEL_NODE);
|
1032
|
+
}
|
1033
|
+
|
1034
|
+
} // namespace
|
1035
|
+
|
1036
|
+
ClientChannel::ClientChannel(grpc_channel_element_args* args,
|
1037
|
+
grpc_error_handle* error)
|
1038
|
+
: deadline_checking_enabled_(
|
1039
|
+
grpc_deadline_checking_enabled(args->channel_args)),
|
1040
|
+
owning_stack_(args->channel_stack),
|
1041
|
+
client_channel_factory_(
|
1042
|
+
ClientChannelFactory::GetFromChannelArgs(args->channel_args)),
|
1043
|
+
channelz_node_(GetChannelzNode(args->channel_args)),
|
1044
|
+
interested_parties_(grpc_pollset_set_create()),
|
1045
|
+
work_serializer_(std::make_shared<WorkSerializer>()),
|
1046
|
+
state_tracker_("client_channel", GRPC_CHANNEL_IDLE),
|
1047
|
+
subchannel_pool_(GetSubchannelPool(args->channel_args)) {
|
1048
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1049
|
+
gpr_log(GPR_INFO, "chand=%p: creating client_channel for channel stack %p",
|
1050
|
+
this, owning_stack_);
|
1051
|
+
}
|
1052
|
+
// Start backup polling.
|
1053
|
+
grpc_client_channel_start_backup_polling(interested_parties_);
|
1054
|
+
// Check client channel factory.
|
1055
|
+
if (client_channel_factory_ == nullptr) {
|
1056
|
+
*error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1057
|
+
"Missing client channel factory in args for client channel filter");
|
1058
|
+
return;
|
1059
|
+
}
|
1060
|
+
// Get default service config. If none is specified via the client API,
|
1061
|
+
// we use an empty config.
|
1062
|
+
const char* service_config_json = grpc_channel_args_find_string(
|
1063
|
+
args->channel_args, GRPC_ARG_SERVICE_CONFIG);
|
1064
|
+
if (service_config_json == nullptr) service_config_json = "{}";
|
1065
|
+
*error = GRPC_ERROR_NONE;
|
1066
|
+
default_service_config_ =
|
1067
|
+
ServiceConfig::Create(args->channel_args, service_config_json, error);
|
1068
|
+
if (*error != GRPC_ERROR_NONE) {
|
1069
|
+
default_service_config_.reset();
|
1070
|
+
return;
|
1071
|
+
}
|
1072
|
+
// Get URI to resolve, using proxy mapper if needed.
|
1073
|
+
const char* server_uri =
|
1074
|
+
grpc_channel_args_find_string(args->channel_args, GRPC_ARG_SERVER_URI);
|
1075
|
+
if (server_uri == nullptr) {
|
1076
|
+
*error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1077
|
+
"target URI channel arg missing or wrong type in client channel "
|
1078
|
+
"filter");
|
1079
|
+
return;
|
1080
|
+
}
|
1081
|
+
uri_to_resolve_ = server_uri;
|
1082
|
+
char* proxy_name = nullptr;
|
1083
|
+
grpc_channel_args* new_args = nullptr;
|
1084
|
+
ProxyMapperRegistry::MapName(server_uri, args->channel_args, &proxy_name,
|
1085
|
+
&new_args);
|
1086
|
+
if (proxy_name != nullptr) {
|
1087
|
+
uri_to_resolve_ = proxy_name;
|
1088
|
+
gpr_free(proxy_name);
|
1089
|
+
}
|
1090
|
+
// Make sure the URI to resolve is valid, so that we know that
|
1091
|
+
// resolver creation will succeed later.
|
1092
|
+
if (!ResolverRegistry::IsValidTarget(uri_to_resolve_)) {
|
1093
|
+
*error = GRPC_ERROR_CREATE_FROM_CPP_STRING(
|
1094
|
+
absl::StrCat("the target uri is not valid: ", uri_to_resolve_.c_str()));
|
1095
|
+
return;
|
1096
|
+
}
|
1097
|
+
// Strip out service config channel arg, so that it doesn't affect
|
1098
|
+
// subchannel uniqueness when the args flow down to that layer.
|
1099
|
+
const char* arg_to_remove = GRPC_ARG_SERVICE_CONFIG;
|
1100
|
+
channel_args_ = grpc_channel_args_copy_and_remove(
|
1101
|
+
new_args != nullptr ? new_args : args->channel_args, &arg_to_remove, 1);
|
1102
|
+
grpc_channel_args_destroy(new_args);
|
1103
|
+
// Set initial keepalive time.
|
1104
|
+
keepalive_time_ = grpc_channel_args_find_integer(
|
1105
|
+
channel_args_, GRPC_ARG_KEEPALIVE_TIME_MS,
|
1106
|
+
{-1 /* default value, unset */, 1, INT_MAX});
|
1107
|
+
// Set default authority.
|
1108
|
+
const char* default_authority =
|
1109
|
+
grpc_channel_args_find_string(channel_args_, GRPC_ARG_DEFAULT_AUTHORITY);
|
1110
|
+
if (default_authority == nullptr) {
|
1111
|
+
default_authority_ = ResolverRegistry::GetDefaultAuthority(server_uri);
|
1112
|
+
} else {
|
1113
|
+
default_authority_ = default_authority;
|
1114
|
+
}
|
1115
|
+
// Success.
|
1116
|
+
*error = GRPC_ERROR_NONE;
|
1117
|
+
}
|
1118
|
+
|
1119
|
+
ClientChannel::~ClientChannel() {
|
1120
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1121
|
+
gpr_log(GPR_INFO, "chand=%p: destroying channel", this);
|
1122
|
+
}
|
1123
|
+
DestroyResolverAndLbPolicyLocked();
|
1124
|
+
grpc_channel_args_destroy(channel_args_);
|
1125
|
+
GRPC_ERROR_UNREF(resolver_transient_failure_error_);
|
1126
|
+
// Stop backup polling.
|
1127
|
+
grpc_client_channel_stop_backup_polling(interested_parties_);
|
1128
|
+
grpc_pollset_set_destroy(interested_parties_);
|
1129
|
+
GRPC_ERROR_UNREF(disconnect_error_);
|
1130
|
+
}
|
1131
|
+
|
1132
|
+
OrphanablePtr<ClientChannel::LoadBalancedCall>
|
1133
|
+
ClientChannel::CreateLoadBalancedCall(
|
1134
|
+
const grpc_call_element_args& args, grpc_polling_entity* pollent,
|
1135
|
+
grpc_closure* on_call_destruction_complete,
|
1136
|
+
ConfigSelector::CallDispatchController* call_dispatch_controller,
|
1137
|
+
bool is_transparent_retry) {
|
1138
|
+
return OrphanablePtr<LoadBalancedCall>(args.arena->New<LoadBalancedCall>(
|
1139
|
+
this, args, pollent, on_call_destruction_complete,
|
1140
|
+
call_dispatch_controller, is_transparent_retry));
|
1141
|
+
}
|
1142
|
+
|
1143
|
+
namespace {
|
1144
|
+
|
1145
|
+
RefCountedPtr<LoadBalancingPolicy::Config> ChooseLbPolicy(
|
1146
|
+
const Resolver::Result& resolver_result,
|
1147
|
+
const internal::ClientChannelGlobalParsedConfig* parsed_service_config) {
|
1148
|
+
// Prefer the LB policy config found in the service config.
|
1149
|
+
if (parsed_service_config->parsed_lb_config() != nullptr) {
|
1150
|
+
return parsed_service_config->parsed_lb_config();
|
1151
|
+
}
|
1152
|
+
// Try the deprecated LB policy name from the service config.
|
1153
|
+
// If not, try the setting from channel args.
|
1154
|
+
const char* policy_name = nullptr;
|
1155
|
+
if (!parsed_service_config->parsed_deprecated_lb_policy().empty()) {
|
1156
|
+
policy_name = parsed_service_config->parsed_deprecated_lb_policy().c_str();
|
1157
|
+
} else {
|
1158
|
+
policy_name = grpc_channel_args_find_string(resolver_result.args,
|
1159
|
+
GRPC_ARG_LB_POLICY_NAME);
|
1160
|
+
}
|
1161
|
+
// Use pick_first if nothing was specified and we didn't select grpclb
|
1162
|
+
// above.
|
1163
|
+
if (policy_name == nullptr) policy_name = "pick_first";
|
1164
|
+
// Now that we have the policy name, construct an empty config for it.
|
1165
|
+
Json config_json = Json::Array{Json::Object{
|
1166
|
+
{policy_name, Json::Object{}},
|
1167
|
+
}};
|
1168
|
+
grpc_error_handle parse_error = GRPC_ERROR_NONE;
|
1169
|
+
auto lb_policy_config = LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(
|
1170
|
+
config_json, &parse_error);
|
1171
|
+
// The policy name came from one of three places:
|
1172
|
+
// - The deprecated loadBalancingPolicy field in the service config,
|
1173
|
+
// in which case the code in ClientChannelServiceConfigParser
|
1174
|
+
// already verified that the policy does not require a config.
|
1175
|
+
// - One of the hard-coded values here, all of which are known to not
|
1176
|
+
// require a config.
|
1177
|
+
// - A channel arg, in which case the application did something that
|
1178
|
+
// is a misuse of our API.
|
1179
|
+
// In the first two cases, these assertions will always be true. In
|
1180
|
+
// the last case, this is probably fine for now.
|
1181
|
+
// TODO(roth): If the last case becomes a problem, add better error
|
1182
|
+
// handling here.
|
1183
|
+
GPR_ASSERT(lb_policy_config != nullptr);
|
1184
|
+
GPR_ASSERT(parse_error == GRPC_ERROR_NONE);
|
1185
|
+
return lb_policy_config;
|
1186
|
+
}
|
1187
|
+
|
1188
|
+
} // namespace
|
1189
|
+
|
1190
|
+
void ClientChannel::OnResolverResultChangedLocked(Resolver::Result result) {
|
1191
|
+
// Handle race conditions.
|
1192
|
+
if (resolver_ == nullptr) return;
|
1193
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1194
|
+
gpr_log(GPR_INFO, "chand=%p: got resolver result", this);
|
1195
|
+
}
|
1196
|
+
// We only want to trace the address resolution in the follow cases:
|
1197
|
+
// (a) Address resolution resulted in service config change.
|
1198
|
+
// (b) Address resolution that causes number of backends to go from
|
1199
|
+
// zero to non-zero.
|
1200
|
+
// (c) Address resolution that causes number of backends to go from
|
1201
|
+
// non-zero to zero.
|
1202
|
+
// (d) Address resolution that causes a new LB policy to be created.
|
1203
|
+
//
|
1204
|
+
// We track a list of strings to eventually be concatenated and traced.
|
1205
|
+
absl::InlinedVector<const char*, 3> trace_strings;
|
1206
|
+
if (result.addresses.empty() && previous_resolution_contained_addresses_) {
|
1207
|
+
trace_strings.push_back("Address list became empty");
|
1208
|
+
} else if (!result.addresses.empty() &&
|
1209
|
+
!previous_resolution_contained_addresses_) {
|
1210
|
+
trace_strings.push_back("Address list became non-empty");
|
1211
|
+
}
|
1212
|
+
previous_resolution_contained_addresses_ = !result.addresses.empty();
|
1213
|
+
std::string service_config_error_string_storage;
|
1214
|
+
if (result.service_config_error != GRPC_ERROR_NONE) {
|
1215
|
+
service_config_error_string_storage =
|
1216
|
+
grpc_error_std_string(result.service_config_error);
|
1217
|
+
trace_strings.push_back(service_config_error_string_storage.c_str());
|
1218
|
+
}
|
1219
|
+
// Choose the service config.
|
1220
|
+
RefCountedPtr<ServiceConfig> service_config;
|
1221
|
+
RefCountedPtr<ConfigSelector> config_selector;
|
1222
|
+
if (result.service_config_error != GRPC_ERROR_NONE) {
|
1223
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1224
|
+
gpr_log(GPR_INFO, "chand=%p: resolver returned service config error: %s",
|
1225
|
+
this, grpc_error_std_string(result.service_config_error).c_str());
|
1226
|
+
}
|
1227
|
+
// If the service config was invalid, then fallback to the
|
1228
|
+
// previously returned service config.
|
1229
|
+
if (saved_service_config_ != nullptr) {
|
1230
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1231
|
+
gpr_log(GPR_INFO,
|
1232
|
+
"chand=%p: resolver returned invalid service config. "
|
1233
|
+
"Continuing to use previous service config.",
|
1234
|
+
this);
|
1235
|
+
}
|
1236
|
+
service_config = saved_service_config_;
|
1237
|
+
config_selector = saved_config_selector_;
|
1238
|
+
} else {
|
1239
|
+
// We received an invalid service config and we don't have a
|
1240
|
+
// previous service config to fall back to. Put the channel into
|
1241
|
+
// TRANSIENT_FAILURE.
|
1242
|
+
OnResolverErrorLocked(GRPC_ERROR_REF(result.service_config_error));
|
1243
|
+
trace_strings.push_back("no valid service config");
|
1244
|
+
}
|
1245
|
+
} else if (result.service_config == nullptr) {
|
1246
|
+
// Resolver did not return any service config.
|
1247
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1248
|
+
gpr_log(GPR_INFO,
|
1249
|
+
"chand=%p: resolver returned no service config. Using default "
|
1250
|
+
"service config for channel.",
|
1251
|
+
this);
|
1252
|
+
}
|
1253
|
+
service_config = default_service_config_;
|
1254
|
+
} else {
|
1255
|
+
// Use ServiceConfig and ConfigSelector returned by resolver.
|
1256
|
+
service_config = result.service_config;
|
1257
|
+
config_selector = ConfigSelector::GetFromChannelArgs(*result.args);
|
1258
|
+
}
|
1259
|
+
if (service_config != nullptr) {
|
1260
|
+
// Extract global config for client channel.
|
1261
|
+
const internal::ClientChannelGlobalParsedConfig* parsed_service_config =
|
1262
|
+
static_cast<const internal::ClientChannelGlobalParsedConfig*>(
|
1263
|
+
service_config->GetGlobalParsedConfig(
|
1264
|
+
internal::ClientChannelServiceConfigParser::ParserIndex()));
|
1265
|
+
// Choose LB policy config.
|
1266
|
+
RefCountedPtr<LoadBalancingPolicy::Config> lb_policy_config =
|
1267
|
+
ChooseLbPolicy(result, parsed_service_config);
|
1268
|
+
// Check if the ServiceConfig has changed.
|
1269
|
+
const bool service_config_changed =
|
1270
|
+
saved_service_config_ == nullptr ||
|
1271
|
+
service_config->json_string() != saved_service_config_->json_string();
|
1272
|
+
// Check if the ConfigSelector has changed.
|
1273
|
+
const bool config_selector_changed = !ConfigSelector::Equals(
|
1274
|
+
saved_config_selector_.get(), config_selector.get());
|
1275
|
+
// If either has changed, apply the global parameters now.
|
1276
|
+
if (service_config_changed || config_selector_changed) {
|
1277
|
+
// Update service config in control plane.
|
1278
|
+
UpdateServiceConfigInControlPlaneLocked(std::move(service_config),
|
1279
|
+
std::move(config_selector),
|
1280
|
+
lb_policy_config->name());
|
1281
|
+
} else if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1282
|
+
gpr_log(GPR_INFO, "chand=%p: service config not changed", this);
|
1283
|
+
}
|
1284
|
+
// Create or update LB policy, as needed.
|
1285
|
+
CreateOrUpdateLbPolicyLocked(
|
1286
|
+
std::move(lb_policy_config),
|
1287
|
+
parsed_service_config->health_check_service_name(), std::move(result));
|
1288
|
+
if (service_config_changed || config_selector_changed) {
|
1289
|
+
// Start using new service config for calls.
|
1290
|
+
// This needs to happen after the LB policy has been updated, since
|
1291
|
+
// the ConfigSelector may need the LB policy to know about new
|
1292
|
+
// destinations before it can send RPCs to those destinations.
|
1293
|
+
UpdateServiceConfigInDataPlaneLocked();
|
1294
|
+
// TODO(ncteisen): might be worth somehow including a snippet of the
|
1295
|
+
// config in the trace, at the risk of bloating the trace logs.
|
1296
|
+
trace_strings.push_back("Service config changed");
|
1297
|
+
}
|
1298
|
+
}
|
1299
|
+
// Add channel trace event.
|
1300
|
+
if (!trace_strings.empty()) {
|
1301
|
+
std::string message =
|
1302
|
+
absl::StrCat("Resolution event: ", absl::StrJoin(trace_strings, ", "));
|
1303
|
+
if (channelz_node_ != nullptr) {
|
1304
|
+
channelz_node_->AddTraceEvent(channelz::ChannelTrace::Severity::Info,
|
1305
|
+
grpc_slice_from_cpp_string(message));
|
1306
|
+
}
|
1307
|
+
}
|
1308
|
+
}
|
1309
|
+
|
1310
|
+
void ClientChannel::OnResolverErrorLocked(grpc_error_handle error) {
|
1311
|
+
if (resolver_ == nullptr) {
|
1312
|
+
GRPC_ERROR_UNREF(error);
|
1313
|
+
return;
|
1314
|
+
}
|
1315
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1316
|
+
gpr_log(GPR_INFO, "chand=%p: resolver transient failure: %s", this,
|
1317
|
+
grpc_error_std_string(error).c_str());
|
1318
|
+
}
|
1319
|
+
// If we already have an LB policy from a previous resolution
|
1320
|
+
// result, then we continue to let it set the connectivity state.
|
1321
|
+
// Otherwise, we go into TRANSIENT_FAILURE.
|
1322
|
+
if (lb_policy_ == nullptr) {
|
1323
|
+
grpc_error_handle state_error =
|
1324
|
+
GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
|
1325
|
+
"Resolver transient failure", &error, 1);
|
1326
|
+
absl::Status status = grpc_error_to_absl_status(state_error);
|
1327
|
+
{
|
1328
|
+
MutexLock lock(&resolution_mu_);
|
1329
|
+
// Update resolver transient failure.
|
1330
|
+
GRPC_ERROR_UNREF(resolver_transient_failure_error_);
|
1331
|
+
resolver_transient_failure_error_ = state_error;
|
1332
|
+
// Process calls that were queued waiting for the resolver result.
|
1333
|
+
for (ResolverQueuedCall* call = resolver_queued_calls_; call != nullptr;
|
1334
|
+
call = call->next) {
|
1335
|
+
grpc_call_element* elem = call->elem;
|
1336
|
+
CallData* calld = static_cast<CallData*>(elem->call_data);
|
1337
|
+
grpc_error_handle error = GRPC_ERROR_NONE;
|
1338
|
+
if (calld->CheckResolutionLocked(elem, &error)) {
|
1339
|
+
calld->AsyncResolutionDone(elem, error);
|
1340
|
+
}
|
1341
|
+
}
|
1342
|
+
}
|
1343
|
+
// Update connectivity state.
|
1344
|
+
UpdateStateAndPickerLocked(
|
1345
|
+
GRPC_CHANNEL_TRANSIENT_FAILURE, status, "resolver failure",
|
1346
|
+
absl::make_unique<LoadBalancingPolicy::TransientFailurePicker>(status));
|
1347
|
+
}
|
1348
|
+
GRPC_ERROR_UNREF(error);
|
1349
|
+
}
|
1350
|
+
|
1351
|
+
void ClientChannel::CreateOrUpdateLbPolicyLocked(
|
1352
|
+
RefCountedPtr<LoadBalancingPolicy::Config> lb_policy_config,
|
1353
|
+
const absl::optional<std::string>& health_check_service_name,
|
1354
|
+
Resolver::Result result) {
|
1355
|
+
// Construct update.
|
1356
|
+
LoadBalancingPolicy::UpdateArgs update_args;
|
1357
|
+
update_args.addresses = std::move(result.addresses);
|
1358
|
+
update_args.config = std::move(lb_policy_config);
|
1359
|
+
// Add health check service name to channel args.
|
1360
|
+
absl::InlinedVector<grpc_arg, 1> args_to_add;
|
1361
|
+
if (health_check_service_name.has_value()) {
|
1362
|
+
args_to_add.push_back(grpc_channel_arg_string_create(
|
1363
|
+
const_cast<char*>(GRPC_ARG_HEALTH_CHECK_SERVICE_NAME),
|
1364
|
+
const_cast<char*>(health_check_service_name->c_str())));
|
1365
|
+
}
|
1366
|
+
// Remove the config selector from channel args so that we're not holding
|
1367
|
+
// unnecessary refs that cause it to be destroyed somewhere other than in the
|
1368
|
+
// WorkSerializer.
|
1369
|
+
const char* arg_to_remove = GRPC_ARG_CONFIG_SELECTOR;
|
1370
|
+
update_args.args = grpc_channel_args_copy_and_add_and_remove(
|
1371
|
+
result.args, &arg_to_remove, 1, args_to_add.data(), args_to_add.size());
|
1372
|
+
// Create policy if needed.
|
1373
|
+
if (lb_policy_ == nullptr) {
|
1374
|
+
lb_policy_ = CreateLbPolicyLocked(*update_args.args);
|
1375
|
+
}
|
1376
|
+
// Update the policy.
|
1377
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1378
|
+
gpr_log(GPR_INFO, "chand=%p: Updating child policy %p", this,
|
1379
|
+
lb_policy_.get());
|
1380
|
+
}
|
1381
|
+
lb_policy_->UpdateLocked(std::move(update_args));
|
1382
|
+
}
|
1383
|
+
|
1384
|
+
// Creates a new LB policy.
|
1385
|
+
OrphanablePtr<LoadBalancingPolicy> ClientChannel::CreateLbPolicyLocked(
|
1386
|
+
const grpc_channel_args& args) {
|
1387
|
+
LoadBalancingPolicy::Args lb_policy_args;
|
1388
|
+
lb_policy_args.work_serializer = work_serializer_;
|
1389
|
+
lb_policy_args.channel_control_helper =
|
1390
|
+
absl::make_unique<ClientChannelControlHelper>(this);
|
1391
|
+
lb_policy_args.args = &args;
|
1392
|
+
OrphanablePtr<LoadBalancingPolicy> lb_policy =
|
1393
|
+
MakeOrphanable<ChildPolicyHandler>(std::move(lb_policy_args),
|
1394
|
+
&grpc_client_channel_routing_trace);
|
1395
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1396
|
+
gpr_log(GPR_INFO, "chand=%p: created new LB policy %p", this,
|
1397
|
+
lb_policy.get());
|
1398
|
+
}
|
1399
|
+
grpc_pollset_set_add_pollset_set(lb_policy->interested_parties(),
|
1400
|
+
interested_parties_);
|
1401
|
+
return lb_policy;
|
1402
|
+
}
|
1403
|
+
|
1404
|
+
void ClientChannel::AddResolverQueuedCall(ResolverQueuedCall* call,
|
1405
|
+
grpc_polling_entity* pollent) {
|
1406
|
+
// Add call to queued calls list.
|
1407
|
+
call->next = resolver_queued_calls_;
|
1408
|
+
resolver_queued_calls_ = call;
|
1409
|
+
// Add call's pollent to channel's interested_parties, so that I/O
|
1410
|
+
// can be done under the call's CQ.
|
1411
|
+
grpc_polling_entity_add_to_pollset_set(pollent, interested_parties_);
|
1412
|
+
}
|
1413
|
+
|
1414
|
+
void ClientChannel::RemoveResolverQueuedCall(ResolverQueuedCall* to_remove,
|
1415
|
+
grpc_polling_entity* pollent) {
|
1416
|
+
// Remove call's pollent from channel's interested_parties.
|
1417
|
+
grpc_polling_entity_del_from_pollset_set(pollent, interested_parties_);
|
1418
|
+
// Remove from queued calls list.
|
1419
|
+
for (ResolverQueuedCall** call = &resolver_queued_calls_; *call != nullptr;
|
1420
|
+
call = &(*call)->next) {
|
1421
|
+
if (*call == to_remove) {
|
1422
|
+
*call = to_remove->next;
|
1423
|
+
return;
|
1424
|
+
}
|
1425
|
+
}
|
1426
|
+
}
|
1427
|
+
|
1428
|
+
void ClientChannel::UpdateServiceConfigInControlPlaneLocked(
|
1429
|
+
RefCountedPtr<ServiceConfig> service_config,
|
1430
|
+
RefCountedPtr<ConfigSelector> config_selector, const char* lb_policy_name) {
|
1431
|
+
UniquePtr<char> service_config_json(
|
1432
|
+
gpr_strdup(service_config->json_string().c_str()));
|
1433
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1434
|
+
gpr_log(GPR_INFO,
|
1435
|
+
"chand=%p: resolver returned updated service config: \"%s\"", this,
|
1436
|
+
service_config_json.get());
|
1437
|
+
}
|
1438
|
+
// Save service config.
|
1439
|
+
saved_service_config_ = std::move(service_config);
|
1440
|
+
// Swap out the data used by GetChannelInfo().
|
1441
|
+
UniquePtr<char> lb_policy_name_owned(gpr_strdup(lb_policy_name));
|
1442
|
+
{
|
1443
|
+
MutexLock lock(&info_mu_);
|
1444
|
+
info_lb_policy_name_ = std::move(lb_policy_name_owned);
|
1445
|
+
info_service_config_json_ = std::move(service_config_json);
|
1446
|
+
}
|
1447
|
+
// Save config selector.
|
1448
|
+
saved_config_selector_ = std::move(config_selector);
|
1449
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1450
|
+
gpr_log(GPR_INFO, "chand=%p: using ConfigSelector %p", this,
|
1451
|
+
saved_config_selector_.get());
|
1452
|
+
}
|
1453
|
+
}
|
1454
|
+
|
1455
|
+
void ClientChannel::UpdateServiceConfigInDataPlaneLocked() {
|
1456
|
+
// Grab ref to service config.
|
1457
|
+
RefCountedPtr<ServiceConfig> service_config = saved_service_config_;
|
1458
|
+
// Grab ref to config selector. Use default if resolver didn't supply one.
|
1459
|
+
RefCountedPtr<ConfigSelector> config_selector = saved_config_selector_;
|
1460
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1461
|
+
gpr_log(GPR_INFO, "chand=%p: switching to ConfigSelector %p", this,
|
1462
|
+
saved_config_selector_.get());
|
1463
|
+
}
|
1464
|
+
if (config_selector == nullptr) {
|
1465
|
+
config_selector =
|
1466
|
+
MakeRefCounted<DefaultConfigSelector>(saved_service_config_);
|
1467
|
+
}
|
1468
|
+
absl::InlinedVector<grpc_arg, 2> args_to_add = {
|
1469
|
+
grpc_channel_arg_pointer_create(
|
1470
|
+
const_cast<char*>(GRPC_ARG_CLIENT_CHANNEL), this,
|
1471
|
+
&kClientChannelArgPointerVtable),
|
1472
|
+
grpc_channel_arg_pointer_create(
|
1473
|
+
const_cast<char*>(GRPC_ARG_SERVICE_CONFIG_OBJ), service_config.get(),
|
1474
|
+
&kServiceConfigObjArgPointerVtable),
|
1475
|
+
};
|
1476
|
+
grpc_channel_args* new_args = grpc_channel_args_copy_and_add(
|
1477
|
+
channel_args_, args_to_add.data(), args_to_add.size());
|
1478
|
+
new_args = config_selector->ModifyChannelArgs(new_args);
|
1479
|
+
bool enable_retries =
|
1480
|
+
grpc_channel_args_find_bool(new_args, GRPC_ARG_ENABLE_RETRIES, true);
|
1481
|
+
// Construct dynamic filter stack.
|
1482
|
+
std::vector<const grpc_channel_filter*> filters =
|
1483
|
+
config_selector->GetFilters();
|
1484
|
+
if (enable_retries) {
|
1485
|
+
filters.push_back(&kRetryFilterVtable);
|
1486
|
+
} else {
|
1487
|
+
filters.push_back(&DynamicTerminationFilter::kFilterVtable);
|
1488
|
+
}
|
1489
|
+
RefCountedPtr<DynamicFilters> dynamic_filters =
|
1490
|
+
DynamicFilters::Create(new_args, std::move(filters));
|
1491
|
+
GPR_ASSERT(dynamic_filters != nullptr);
|
1492
|
+
grpc_channel_args_destroy(new_args);
|
1493
|
+
// Grab data plane lock to update service config.
|
1494
|
+
//
|
1495
|
+
// We defer unreffing the old values (and deallocating memory) until
|
1496
|
+
// after releasing the lock to keep the critical section small.
|
1497
|
+
{
|
1498
|
+
MutexLock lock(&resolution_mu_);
|
1499
|
+
GRPC_ERROR_UNREF(resolver_transient_failure_error_);
|
1500
|
+
resolver_transient_failure_error_ = GRPC_ERROR_NONE;
|
1501
|
+
// Update service config.
|
1502
|
+
received_service_config_data_ = true;
|
1503
|
+
// Old values will be unreffed after lock is released.
|
1504
|
+
service_config_.swap(service_config);
|
1505
|
+
config_selector_.swap(config_selector);
|
1506
|
+
dynamic_filters_.swap(dynamic_filters);
|
1507
|
+
// Process calls that were queued waiting for the resolver result.
|
1508
|
+
for (ResolverQueuedCall* call = resolver_queued_calls_; call != nullptr;
|
1509
|
+
call = call->next) {
|
1510
|
+
// If there are a lot of queued calls here, resuming them all may cause us
|
1511
|
+
// to stay inside C-core for a long period of time. All of that work would
|
1512
|
+
// be done using the same ExecCtx instance and therefore the same cached
|
1513
|
+
// value of "now". The longer it takes to finish all of this work and exit
|
1514
|
+
// from C-core, the more stale the cached value of "now" may become. This
|
1515
|
+
// can cause problems whereby (e.g.) we calculate a timer deadline based
|
1516
|
+
// on the stale value, which results in the timer firing too early. To
|
1517
|
+
// avoid this, we invalidate the cached value for each call we process.
|
1518
|
+
ExecCtx::Get()->InvalidateNow();
|
1519
|
+
grpc_call_element* elem = call->elem;
|
1520
|
+
CallData* calld = static_cast<CallData*>(elem->call_data);
|
1521
|
+
grpc_error_handle error = GRPC_ERROR_NONE;
|
1522
|
+
if (calld->CheckResolutionLocked(elem, &error)) {
|
1523
|
+
calld->AsyncResolutionDone(elem, error);
|
1524
|
+
}
|
1525
|
+
}
|
1526
|
+
}
|
1527
|
+
// Old values will be unreffed after lock is released when they go out
|
1528
|
+
// of scope.
|
1529
|
+
}
|
1530
|
+
|
1531
|
+
void ClientChannel::CreateResolverLocked() {
|
1532
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1533
|
+
gpr_log(GPR_INFO, "chand=%p: starting name resolution", this);
|
1534
|
+
}
|
1535
|
+
resolver_ = ResolverRegistry::CreateResolver(
|
1536
|
+
uri_to_resolve_.c_str(), channel_args_, interested_parties_,
|
1537
|
+
work_serializer_, absl::make_unique<ResolverResultHandler>(this));
|
1538
|
+
// Since the validity of the args was checked when the channel was created,
|
1539
|
+
// CreateResolver() must return a non-null result.
|
1540
|
+
GPR_ASSERT(resolver_ != nullptr);
|
1541
|
+
UpdateStateAndPickerLocked(
|
1542
|
+
GRPC_CHANNEL_CONNECTING, absl::Status(), "started resolving",
|
1543
|
+
absl::make_unique<LoadBalancingPolicy::QueuePicker>(nullptr));
|
1544
|
+
resolver_->StartLocked();
|
1545
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1546
|
+
gpr_log(GPR_INFO, "chand=%p: created resolver=%p", this, resolver_.get());
|
1547
|
+
}
|
1548
|
+
}
|
1549
|
+
|
1550
|
+
void ClientChannel::DestroyResolverAndLbPolicyLocked() {
|
1551
|
+
if (resolver_ != nullptr) {
|
1552
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1553
|
+
gpr_log(GPR_INFO, "chand=%p: shutting down resolver=%p", this,
|
1554
|
+
resolver_.get());
|
1555
|
+
}
|
1556
|
+
resolver_.reset();
|
1557
|
+
if (lb_policy_ != nullptr) {
|
1558
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1559
|
+
gpr_log(GPR_INFO, "chand=%p: shutting down lb_policy=%p", this,
|
1560
|
+
lb_policy_.get());
|
1561
|
+
}
|
1562
|
+
grpc_pollset_set_del_pollset_set(lb_policy_->interested_parties(),
|
1563
|
+
interested_parties_);
|
1564
|
+
lb_policy_.reset();
|
1565
|
+
}
|
1566
|
+
}
|
1567
|
+
}
|
1568
|
+
|
1569
|
+
void ClientChannel::UpdateStateAndPickerLocked(
|
1570
|
+
grpc_connectivity_state state, const absl::Status& status,
|
1571
|
+
const char* reason,
|
1572
|
+
std::unique_ptr<LoadBalancingPolicy::SubchannelPicker> picker) {
|
1573
|
+
// Special case for IDLE and SHUTDOWN states.
|
1574
|
+
if (picker == nullptr || state == GRPC_CHANNEL_SHUTDOWN) {
|
1575
|
+
saved_service_config_.reset();
|
1576
|
+
saved_config_selector_.reset();
|
1577
|
+
// Acquire resolution lock to update config selector and associated state.
|
1578
|
+
// To minimize lock contention, we wait to unref these objects until
|
1579
|
+
// after we release the lock.
|
1580
|
+
RefCountedPtr<ServiceConfig> service_config_to_unref;
|
1581
|
+
RefCountedPtr<ConfigSelector> config_selector_to_unref;
|
1582
|
+
RefCountedPtr<DynamicFilters> dynamic_filters_to_unref;
|
1583
|
+
{
|
1584
|
+
MutexLock lock(&resolution_mu_);
|
1585
|
+
received_service_config_data_ = false;
|
1586
|
+
service_config_to_unref = std::move(service_config_);
|
1587
|
+
config_selector_to_unref = std::move(config_selector_);
|
1588
|
+
dynamic_filters_to_unref = std::move(dynamic_filters_);
|
1589
|
+
}
|
1590
|
+
}
|
1591
|
+
// Update connectivity state.
|
1592
|
+
state_tracker_.SetState(state, status, reason);
|
1593
|
+
if (channelz_node_ != nullptr) {
|
1594
|
+
channelz_node_->SetConnectivityState(state);
|
1595
|
+
channelz_node_->AddTraceEvent(
|
1596
|
+
channelz::ChannelTrace::Severity::Info,
|
1597
|
+
grpc_slice_from_static_string(
|
1598
|
+
channelz::ChannelNode::GetChannelConnectivityStateChangeString(
|
1599
|
+
state)));
|
1600
|
+
}
|
1601
|
+
// Grab data plane lock to update the picker.
|
1602
|
+
{
|
1603
|
+
MutexLock lock(&data_plane_mu_);
|
1604
|
+
// Swap out the picker.
|
1605
|
+
// Note: Original value will be destroyed after the lock is released.
|
1606
|
+
picker_.swap(picker);
|
1607
|
+
// Re-process queued picks.
|
1608
|
+
for (LbQueuedCall* call = lb_queued_calls_; call != nullptr;
|
1609
|
+
call = call->next) {
|
1610
|
+
// If there are a lot of queued calls here, resuming them all may cause us
|
1611
|
+
// to stay inside C-core for a long period of time. All of that work would
|
1612
|
+
// be done using the same ExecCtx instance and therefore the same cached
|
1613
|
+
// value of "now". The longer it takes to finish all of this work and exit
|
1614
|
+
// from C-core, the more stale the cached value of "now" may become. This
|
1615
|
+
// can cause problems whereby (e.g.) we calculate a timer deadline based
|
1616
|
+
// on the stale value, which results in the timer firing too early. To
|
1617
|
+
// avoid this, we invalidate the cached value for each call we process.
|
1618
|
+
ExecCtx::Get()->InvalidateNow();
|
1619
|
+
grpc_error_handle error = GRPC_ERROR_NONE;
|
1620
|
+
if (call->lb_call->PickSubchannelLocked(&error)) {
|
1621
|
+
call->lb_call->AsyncPickDone(error);
|
1622
|
+
}
|
1623
|
+
}
|
1624
|
+
}
|
1625
|
+
}
|
1626
|
+
|
1627
|
+
namespace {
|
1628
|
+
|
1629
|
+
// TODO(roth): Remove this in favor of the gprpp Match() function once
|
1630
|
+
// we can do that without breaking lock annotations.
|
1631
|
+
template <typename T>
|
1632
|
+
T HandlePickResult(
|
1633
|
+
LoadBalancingPolicy::PickResult* result,
|
1634
|
+
std::function<T(LoadBalancingPolicy::PickResult::Complete*)> complete_func,
|
1635
|
+
std::function<T(LoadBalancingPolicy::PickResult::Queue*)> queue_func,
|
1636
|
+
std::function<T(LoadBalancingPolicy::PickResult::Fail*)> fail_func,
|
1637
|
+
std::function<T(LoadBalancingPolicy::PickResult::Drop*)> drop_func) {
|
1638
|
+
auto* complete_pick =
|
1639
|
+
absl::get_if<LoadBalancingPolicy::PickResult::Complete>(&result->result);
|
1640
|
+
if (complete_pick != nullptr) {
|
1641
|
+
return complete_func(complete_pick);
|
1642
|
+
}
|
1643
|
+
auto* queue_pick =
|
1644
|
+
absl::get_if<LoadBalancingPolicy::PickResult::Queue>(&result->result);
|
1645
|
+
if (queue_pick != nullptr) {
|
1646
|
+
return queue_func(queue_pick);
|
1647
|
+
}
|
1648
|
+
auto* fail_pick =
|
1649
|
+
absl::get_if<LoadBalancingPolicy::PickResult::Fail>(&result->result);
|
1650
|
+
if (fail_pick != nullptr) {
|
1651
|
+
return fail_func(fail_pick);
|
1652
|
+
}
|
1653
|
+
auto* drop_pick =
|
1654
|
+
absl::get_if<LoadBalancingPolicy::PickResult::Drop>(&result->result);
|
1655
|
+
GPR_ASSERT(drop_pick != nullptr);
|
1656
|
+
return drop_func(drop_pick);
|
1657
|
+
}
|
1658
|
+
|
1659
|
+
} // namespace
|
1660
|
+
|
1661
|
+
grpc_error_handle ClientChannel::DoPingLocked(grpc_transport_op* op) {
|
1662
|
+
if (state_tracker_.state() != GRPC_CHANNEL_READY) {
|
1663
|
+
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("channel not connected");
|
1664
|
+
}
|
1665
|
+
LoadBalancingPolicy::PickResult result;
|
1666
|
+
{
|
1667
|
+
MutexLock lock(&data_plane_mu_);
|
1668
|
+
result = picker_->Pick(LoadBalancingPolicy::PickArgs());
|
1669
|
+
}
|
1670
|
+
return HandlePickResult<grpc_error_handle>(
|
1671
|
+
&result,
|
1672
|
+
// Complete pick.
|
1673
|
+
[op](LoadBalancingPolicy::PickResult::Complete* complete_pick)
|
1674
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ClientChannel::work_serializer_) {
|
1675
|
+
SubchannelWrapper* subchannel = static_cast<SubchannelWrapper*>(
|
1676
|
+
complete_pick->subchannel.get());
|
1677
|
+
RefCountedPtr<ConnectedSubchannel> connected_subchannel =
|
1678
|
+
subchannel->connected_subchannel();
|
1679
|
+
connected_subchannel->Ping(op->send_ping.on_initiate,
|
1680
|
+
op->send_ping.on_ack);
|
1681
|
+
return GRPC_ERROR_NONE;
|
1682
|
+
},
|
1683
|
+
// Queue pick.
|
1684
|
+
[](LoadBalancingPolicy::PickResult::Queue* /*queue_pick*/) {
|
1685
|
+
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("LB picker queued call");
|
1686
|
+
},
|
1687
|
+
// Fail pick.
|
1688
|
+
[](LoadBalancingPolicy::PickResult::Fail* fail_pick) {
|
1689
|
+
return absl_status_to_grpc_error(fail_pick->status);
|
1690
|
+
},
|
1691
|
+
// Drop pick.
|
1692
|
+
[](LoadBalancingPolicy::PickResult::Drop* drop_pick) {
|
1693
|
+
return absl_status_to_grpc_error(drop_pick->status);
|
1694
|
+
});
|
1695
|
+
}
|
1696
|
+
|
1697
|
+
void ClientChannel::StartTransportOpLocked(grpc_transport_op* op) {
|
1698
|
+
// Connectivity watch.
|
1699
|
+
if (op->start_connectivity_watch != nullptr) {
|
1700
|
+
state_tracker_.AddWatcher(op->start_connectivity_watch_state,
|
1701
|
+
std::move(op->start_connectivity_watch));
|
1702
|
+
}
|
1703
|
+
if (op->stop_connectivity_watch != nullptr) {
|
1704
|
+
state_tracker_.RemoveWatcher(op->stop_connectivity_watch);
|
1705
|
+
}
|
1706
|
+
// Ping.
|
1707
|
+
if (op->send_ping.on_initiate != nullptr || op->send_ping.on_ack != nullptr) {
|
1708
|
+
grpc_error_handle error = DoPingLocked(op);
|
1709
|
+
if (error != GRPC_ERROR_NONE) {
|
1710
|
+
ExecCtx::Run(DEBUG_LOCATION, op->send_ping.on_initiate,
|
1711
|
+
GRPC_ERROR_REF(error));
|
1712
|
+
ExecCtx::Run(DEBUG_LOCATION, op->send_ping.on_ack, error);
|
1713
|
+
}
|
1714
|
+
op->bind_pollset = nullptr;
|
1715
|
+
op->send_ping.on_initiate = nullptr;
|
1716
|
+
op->send_ping.on_ack = nullptr;
|
1717
|
+
}
|
1718
|
+
// Reset backoff.
|
1719
|
+
if (op->reset_connect_backoff) {
|
1720
|
+
if (lb_policy_ != nullptr) {
|
1721
|
+
lb_policy_->ResetBackoffLocked();
|
1722
|
+
}
|
1723
|
+
}
|
1724
|
+
// Disconnect or enter IDLE.
|
1725
|
+
if (op->disconnect_with_error != GRPC_ERROR_NONE) {
|
1726
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
1727
|
+
gpr_log(GPR_INFO, "chand=%p: disconnect_with_error: %s", this,
|
1728
|
+
grpc_error_std_string(op->disconnect_with_error).c_str());
|
1729
|
+
}
|
1730
|
+
DestroyResolverAndLbPolicyLocked();
|
1731
|
+
intptr_t value;
|
1732
|
+
if (grpc_error_get_int(op->disconnect_with_error,
|
1733
|
+
GRPC_ERROR_INT_CHANNEL_CONNECTIVITY_STATE, &value) &&
|
1734
|
+
static_cast<grpc_connectivity_state>(value) == GRPC_CHANNEL_IDLE) {
|
1735
|
+
if (disconnect_error_ == GRPC_ERROR_NONE) {
|
1736
|
+
// Enter IDLE state.
|
1737
|
+
UpdateStateAndPickerLocked(GRPC_CHANNEL_IDLE, absl::Status(),
|
1738
|
+
"channel entering IDLE", nullptr);
|
1739
|
+
}
|
1740
|
+
GRPC_ERROR_UNREF(op->disconnect_with_error);
|
1741
|
+
} else {
|
1742
|
+
// Disconnect.
|
1743
|
+
GPR_ASSERT(disconnect_error_ == GRPC_ERROR_NONE);
|
1744
|
+
disconnect_error_ = op->disconnect_with_error;
|
1745
|
+
UpdateStateAndPickerLocked(
|
1746
|
+
GRPC_CHANNEL_SHUTDOWN, absl::Status(), "shutdown from API",
|
1747
|
+
absl::make_unique<LoadBalancingPolicy::TransientFailurePicker>(
|
1748
|
+
grpc_error_to_absl_status(op->disconnect_with_error)));
|
1749
|
+
}
|
1750
|
+
}
|
1751
|
+
GRPC_CHANNEL_STACK_UNREF(owning_stack_, "start_transport_op");
|
1752
|
+
ExecCtx::Run(DEBUG_LOCATION, op->on_consumed, GRPC_ERROR_NONE);
|
1753
|
+
}
|
1754
|
+
|
1755
|
+
void ClientChannel::StartTransportOp(grpc_channel_element* elem,
|
1756
|
+
grpc_transport_op* op) {
|
1757
|
+
ClientChannel* chand = static_cast<ClientChannel*>(elem->channel_data);
|
1758
|
+
GPR_ASSERT(op->set_accept_stream == false);
|
1759
|
+
// Handle bind_pollset.
|
1760
|
+
if (op->bind_pollset != nullptr) {
|
1761
|
+
grpc_pollset_set_add_pollset(chand->interested_parties_, op->bind_pollset);
|
1762
|
+
}
|
1763
|
+
// Pop into control plane work_serializer for remaining ops.
|
1764
|
+
GRPC_CHANNEL_STACK_REF(chand->owning_stack_, "start_transport_op");
|
1765
|
+
chand->work_serializer_->Run(
|
1766
|
+
[chand, op]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand->work_serializer_) {
|
1767
|
+
chand->StartTransportOpLocked(op);
|
1768
|
+
},
|
1769
|
+
DEBUG_LOCATION);
|
1770
|
+
}
|
1771
|
+
|
1772
|
+
void ClientChannel::GetChannelInfo(grpc_channel_element* elem,
|
1773
|
+
const grpc_channel_info* info) {
|
1774
|
+
ClientChannel* chand = static_cast<ClientChannel*>(elem->channel_data);
|
1775
|
+
MutexLock lock(&chand->info_mu_);
|
1776
|
+
if (info->lb_policy_name != nullptr) {
|
1777
|
+
*info->lb_policy_name = gpr_strdup(chand->info_lb_policy_name_.get());
|
1778
|
+
}
|
1779
|
+
if (info->service_config_json != nullptr) {
|
1780
|
+
*info->service_config_json =
|
1781
|
+
gpr_strdup(chand->info_service_config_json_.get());
|
1782
|
+
}
|
1783
|
+
}
|
1784
|
+
|
1785
|
+
void ClientChannel::AddLbQueuedCall(LbQueuedCall* call,
|
1786
|
+
grpc_polling_entity* pollent) {
|
1787
|
+
// Add call to queued picks list.
|
1788
|
+
call->next = lb_queued_calls_;
|
1789
|
+
lb_queued_calls_ = call;
|
1790
|
+
// Add call's pollent to channel's interested_parties, so that I/O
|
1791
|
+
// can be done under the call's CQ.
|
1792
|
+
grpc_polling_entity_add_to_pollset_set(pollent, interested_parties_);
|
1793
|
+
}
|
1794
|
+
|
1795
|
+
void ClientChannel::RemoveLbQueuedCall(LbQueuedCall* to_remove,
|
1796
|
+
grpc_polling_entity* pollent) {
|
1797
|
+
// Remove call's pollent from channel's interested_parties.
|
1798
|
+
grpc_polling_entity_del_from_pollset_set(pollent, interested_parties_);
|
1799
|
+
// Remove from queued picks list.
|
1800
|
+
for (LbQueuedCall** call = &lb_queued_calls_; *call != nullptr;
|
1801
|
+
call = &(*call)->next) {
|
1802
|
+
if (*call == to_remove) {
|
1803
|
+
*call = to_remove->next;
|
1804
|
+
return;
|
1805
|
+
}
|
1806
|
+
}
|
1807
|
+
}
|
1808
|
+
|
1809
|
+
void ClientChannel::TryToConnectLocked() {
|
1810
|
+
if (lb_policy_ != nullptr) {
|
1811
|
+
lb_policy_->ExitIdleLocked();
|
1812
|
+
} else if (resolver_ == nullptr) {
|
1813
|
+
CreateResolverLocked();
|
1814
|
+
}
|
1815
|
+
GRPC_CHANNEL_STACK_UNREF(owning_stack_, "TryToConnect");
|
1816
|
+
}
|
1817
|
+
|
1818
|
+
grpc_connectivity_state ClientChannel::CheckConnectivityState(
|
1819
|
+
bool try_to_connect) {
|
1820
|
+
// state_tracker_ is guarded by work_serializer_, which we're not
|
1821
|
+
// holding here. But the one method of state_tracker_ that *is*
|
1822
|
+
// thread-safe to call without external synchronization is the state()
|
1823
|
+
// method, so we can disable thread-safety analysis for this one read.
|
1824
|
+
grpc_connectivity_state out = ABSL_TS_UNCHECKED_READ(state_tracker_).state();
|
1825
|
+
if (out == GRPC_CHANNEL_IDLE && try_to_connect) {
|
1826
|
+
GRPC_CHANNEL_STACK_REF(owning_stack_, "TryToConnect");
|
1827
|
+
work_serializer_->Run([this]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(
|
1828
|
+
work_serializer_) { TryToConnectLocked(); },
|
1829
|
+
DEBUG_LOCATION);
|
1830
|
+
}
|
1831
|
+
return out;
|
1832
|
+
}
|
1833
|
+
|
1834
|
+
void ClientChannel::AddConnectivityWatcher(
|
1835
|
+
grpc_connectivity_state initial_state,
|
1836
|
+
OrphanablePtr<AsyncConnectivityStateWatcherInterface> watcher) {
|
1837
|
+
new ConnectivityWatcherAdder(this, initial_state, std::move(watcher));
|
1838
|
+
}
|
1839
|
+
|
1840
|
+
void ClientChannel::RemoveConnectivityWatcher(
|
1841
|
+
AsyncConnectivityStateWatcherInterface* watcher) {
|
1842
|
+
new ConnectivityWatcherRemover(this, watcher);
|
1843
|
+
}
|
1844
|
+
|
1845
|
+
//
|
1846
|
+
// CallData implementation
|
1847
|
+
//
|
1848
|
+
|
1849
|
+
ClientChannel::CallData::CallData(grpc_call_element* elem,
|
1850
|
+
const ClientChannel& chand,
|
1851
|
+
const grpc_call_element_args& args)
|
1852
|
+
: deadline_state_(elem, args,
|
1853
|
+
GPR_LIKELY(chand.deadline_checking_enabled_)
|
1854
|
+
? args.deadline
|
1855
|
+
: GRPC_MILLIS_INF_FUTURE),
|
1856
|
+
path_(grpc_slice_ref_internal(args.path)),
|
1857
|
+
call_start_time_(args.start_time),
|
1858
|
+
deadline_(args.deadline),
|
1859
|
+
arena_(args.arena),
|
1860
|
+
owning_call_(args.call_stack),
|
1861
|
+
call_combiner_(args.call_combiner),
|
1862
|
+
call_context_(args.context) {
|
1863
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
1864
|
+
gpr_log(GPR_INFO, "chand=%p calld=%p: created call", &chand, this);
|
1865
|
+
}
|
1866
|
+
}
|
1867
|
+
|
1868
|
+
ClientChannel::CallData::~CallData() {
|
1869
|
+
grpc_slice_unref_internal(path_);
|
1870
|
+
GRPC_ERROR_UNREF(cancel_error_);
|
1871
|
+
// Make sure there are no remaining pending batches.
|
1872
|
+
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
|
1873
|
+
GPR_ASSERT(pending_batches_[i] == nullptr);
|
1874
|
+
}
|
1875
|
+
}
|
1876
|
+
|
1877
|
+
grpc_error_handle ClientChannel::CallData::Init(
|
1878
|
+
grpc_call_element* elem, const grpc_call_element_args* args) {
|
1879
|
+
ClientChannel* chand = static_cast<ClientChannel*>(elem->channel_data);
|
1880
|
+
new (elem->call_data) CallData(elem, *chand, *args);
|
1881
|
+
return GRPC_ERROR_NONE;
|
1882
|
+
}
|
1883
|
+
|
1884
|
+
void ClientChannel::CallData::Destroy(
|
1885
|
+
grpc_call_element* elem, const grpc_call_final_info* /*final_info*/,
|
1886
|
+
grpc_closure* then_schedule_closure) {
|
1887
|
+
CallData* calld = static_cast<CallData*>(elem->call_data);
|
1888
|
+
RefCountedPtr<DynamicFilters::Call> dynamic_call =
|
1889
|
+
std::move(calld->dynamic_call_);
|
1890
|
+
calld->~CallData();
|
1891
|
+
if (GPR_LIKELY(dynamic_call != nullptr)) {
|
1892
|
+
dynamic_call->SetAfterCallStackDestroy(then_schedule_closure);
|
1893
|
+
} else {
|
1894
|
+
// TODO(yashkt) : This can potentially be a Closure::Run
|
1895
|
+
ExecCtx::Run(DEBUG_LOCATION, then_schedule_closure, GRPC_ERROR_NONE);
|
1896
|
+
}
|
1897
|
+
}
|
1898
|
+
|
1899
|
+
void ClientChannel::CallData::StartTransportStreamOpBatch(
|
1900
|
+
grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
|
1901
|
+
GPR_TIMER_SCOPE("cc_start_transport_stream_op_batch", 0);
|
1902
|
+
CallData* calld = static_cast<CallData*>(elem->call_data);
|
1903
|
+
ClientChannel* chand = static_cast<ClientChannel*>(elem->channel_data);
|
1904
|
+
if (GPR_LIKELY(chand->deadline_checking_enabled_)) {
|
1905
|
+
grpc_deadline_state_client_start_transport_stream_op_batch(elem, batch);
|
1906
|
+
}
|
1907
|
+
// Intercept recv_trailing_metadata to call CallDispatchController::Commit(),
|
1908
|
+
// in case we wind up failing the call before we get down to the retry
|
1909
|
+
// or LB call layer.
|
1910
|
+
if (batch->recv_trailing_metadata) {
|
1911
|
+
calld->InjectRecvTrailingMetadataReadyForConfigSelectorCommitCallback(
|
1912
|
+
batch);
|
1913
|
+
}
|
1914
|
+
// If we already have a dynamic call, pass the batch down to it.
|
1915
|
+
// Note that once we have done so, we do not need to acquire the channel's
|
1916
|
+
// resolution mutex, which is more efficient (especially for streaming calls).
|
1917
|
+
if (calld->dynamic_call_ != nullptr) {
|
1918
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
1919
|
+
gpr_log(GPR_INFO, "chand=%p calld=%p: starting batch on dynamic_call=%p",
|
1920
|
+
chand, calld, calld->dynamic_call_.get());
|
1921
|
+
}
|
1922
|
+
calld->dynamic_call_->StartTransportStreamOpBatch(batch);
|
1923
|
+
return;
|
1924
|
+
}
|
1925
|
+
// We do not yet have a dynamic call.
|
1926
|
+
//
|
1927
|
+
// If we've previously been cancelled, immediately fail any new batches.
|
1928
|
+
if (GPR_UNLIKELY(calld->cancel_error_ != GRPC_ERROR_NONE)) {
|
1929
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
1930
|
+
gpr_log(GPR_INFO, "chand=%p calld=%p: failing batch with error: %s",
|
1931
|
+
chand, calld,
|
1932
|
+
grpc_error_std_string(calld->cancel_error_).c_str());
|
1933
|
+
}
|
1934
|
+
// Note: This will release the call combiner.
|
1935
|
+
grpc_transport_stream_op_batch_finish_with_failure(
|
1936
|
+
batch, GRPC_ERROR_REF(calld->cancel_error_), calld->call_combiner_);
|
1937
|
+
return;
|
1938
|
+
}
|
1939
|
+
// Handle cancellation.
|
1940
|
+
if (GPR_UNLIKELY(batch->cancel_stream)) {
|
1941
|
+
// Stash a copy of cancel_error in our call data, so that we can use
|
1942
|
+
// it for subsequent operations. This ensures that if the call is
|
1943
|
+
// cancelled before any batches are passed down (e.g., if the deadline
|
1944
|
+
// is in the past when the call starts), we can return the right
|
1945
|
+
// error to the caller when the first batch does get passed down.
|
1946
|
+
GRPC_ERROR_UNREF(calld->cancel_error_);
|
1947
|
+
calld->cancel_error_ =
|
1948
|
+
GRPC_ERROR_REF(batch->payload->cancel_stream.cancel_error);
|
1949
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
1950
|
+
gpr_log(GPR_INFO, "chand=%p calld=%p: recording cancel_error=%s", chand,
|
1951
|
+
calld, grpc_error_std_string(calld->cancel_error_).c_str());
|
1952
|
+
}
|
1953
|
+
// Fail all pending batches.
|
1954
|
+
calld->PendingBatchesFail(elem, GRPC_ERROR_REF(calld->cancel_error_),
|
1955
|
+
NoYieldCallCombiner);
|
1956
|
+
// Note: This will release the call combiner.
|
1957
|
+
grpc_transport_stream_op_batch_finish_with_failure(
|
1958
|
+
batch, GRPC_ERROR_REF(calld->cancel_error_), calld->call_combiner_);
|
1959
|
+
return;
|
1960
|
+
}
|
1961
|
+
// Add the batch to the pending list.
|
1962
|
+
calld->PendingBatchesAdd(elem, batch);
|
1963
|
+
// For batches containing a send_initial_metadata op, acquire the
|
1964
|
+
// channel's resolution mutex to apply the service config to the call,
|
1965
|
+
// after which we will create a dynamic call.
|
1966
|
+
if (GPR_LIKELY(batch->send_initial_metadata)) {
|
1967
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
1968
|
+
gpr_log(GPR_INFO,
|
1969
|
+
"chand=%p calld=%p: grabbing resolution mutex to apply service "
|
1970
|
+
"config",
|
1971
|
+
chand, calld);
|
1972
|
+
}
|
1973
|
+
CheckResolution(elem, GRPC_ERROR_NONE);
|
1974
|
+
} else {
|
1975
|
+
// For all other batches, release the call combiner.
|
1976
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
1977
|
+
gpr_log(GPR_INFO,
|
1978
|
+
"chand=%p calld=%p: saved batch, yielding call combiner", chand,
|
1979
|
+
calld);
|
1980
|
+
}
|
1981
|
+
GRPC_CALL_COMBINER_STOP(calld->call_combiner_,
|
1982
|
+
"batch does not include send_initial_metadata");
|
1983
|
+
}
|
1984
|
+
}
|
1985
|
+
|
1986
|
+
void ClientChannel::CallData::SetPollent(grpc_call_element* elem,
|
1987
|
+
grpc_polling_entity* pollent) {
|
1988
|
+
CallData* calld = static_cast<CallData*>(elem->call_data);
|
1989
|
+
calld->pollent_ = pollent;
|
1990
|
+
}
|
1991
|
+
|
1992
|
+
//
|
1993
|
+
// pending_batches management
|
1994
|
+
//
|
1995
|
+
|
1996
|
+
size_t ClientChannel::CallData::GetBatchIndex(
|
1997
|
+
grpc_transport_stream_op_batch* batch) {
|
1998
|
+
// Note: It is important the send_initial_metadata be the first entry
|
1999
|
+
// here, since the code in ApplyServiceConfigToCallLocked() and
|
2000
|
+
// CheckResolutionLocked() assumes it will be.
|
2001
|
+
if (batch->send_initial_metadata) return 0;
|
2002
|
+
if (batch->send_message) return 1;
|
2003
|
+
if (batch->send_trailing_metadata) return 2;
|
2004
|
+
if (batch->recv_initial_metadata) return 3;
|
2005
|
+
if (batch->recv_message) return 4;
|
2006
|
+
if (batch->recv_trailing_metadata) return 5;
|
2007
|
+
GPR_UNREACHABLE_CODE(return (size_t)-1);
|
2008
|
+
}
|
2009
|
+
|
2010
|
+
// This is called via the call combiner, so access to calld is synchronized.
|
2011
|
+
void ClientChannel::CallData::PendingBatchesAdd(
|
2012
|
+
grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
|
2013
|
+
ClientChannel* chand = static_cast<ClientChannel*>(elem->channel_data);
|
2014
|
+
const size_t idx = GetBatchIndex(batch);
|
2015
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
2016
|
+
gpr_log(GPR_INFO,
|
2017
|
+
"chand=%p calld=%p: adding pending batch at index %" PRIuPTR, chand,
|
2018
|
+
this, idx);
|
2019
|
+
}
|
2020
|
+
grpc_transport_stream_op_batch*& pending = pending_batches_[idx];
|
2021
|
+
GPR_ASSERT(pending == nullptr);
|
2022
|
+
pending = batch;
|
2023
|
+
}
|
2024
|
+
|
2025
|
+
// This is called via the call combiner, so access to calld is synchronized.
|
2026
|
+
void ClientChannel::CallData::FailPendingBatchInCallCombiner(
|
2027
|
+
void* arg, grpc_error_handle error) {
|
2028
|
+
grpc_transport_stream_op_batch* batch =
|
2029
|
+
static_cast<grpc_transport_stream_op_batch*>(arg);
|
2030
|
+
CallData* calld = static_cast<CallData*>(batch->handler_private.extra_arg);
|
2031
|
+
// Note: This will release the call combiner.
|
2032
|
+
grpc_transport_stream_op_batch_finish_with_failure(
|
2033
|
+
batch, GRPC_ERROR_REF(error), calld->call_combiner_);
|
2034
|
+
}
|
2035
|
+
|
2036
|
+
// This is called via the call combiner, so access to calld is synchronized.
|
2037
|
+
void ClientChannel::CallData::PendingBatchesFail(
|
2038
|
+
grpc_call_element* elem, grpc_error_handle error,
|
2039
|
+
YieldCallCombinerPredicate yield_call_combiner_predicate) {
|
2040
|
+
GPR_ASSERT(error != GRPC_ERROR_NONE);
|
2041
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
2042
|
+
size_t num_batches = 0;
|
2043
|
+
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
|
2044
|
+
if (pending_batches_[i] != nullptr) ++num_batches;
|
2045
|
+
}
|
2046
|
+
gpr_log(GPR_INFO,
|
2047
|
+
"chand=%p calld=%p: failing %" PRIuPTR " pending batches: %s",
|
2048
|
+
elem->channel_data, this, num_batches,
|
2049
|
+
grpc_error_std_string(error).c_str());
|
2050
|
+
}
|
2051
|
+
CallCombinerClosureList closures;
|
2052
|
+
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
|
2053
|
+
grpc_transport_stream_op_batch*& batch = pending_batches_[i];
|
2054
|
+
if (batch != nullptr) {
|
2055
|
+
batch->handler_private.extra_arg = this;
|
2056
|
+
GRPC_CLOSURE_INIT(&batch->handler_private.closure,
|
2057
|
+
FailPendingBatchInCallCombiner, batch,
|
2058
|
+
grpc_schedule_on_exec_ctx);
|
2059
|
+
closures.Add(&batch->handler_private.closure, GRPC_ERROR_REF(error),
|
2060
|
+
"PendingBatchesFail");
|
2061
|
+
batch = nullptr;
|
2062
|
+
}
|
2063
|
+
}
|
2064
|
+
if (yield_call_combiner_predicate(closures)) {
|
2065
|
+
closures.RunClosures(call_combiner_);
|
2066
|
+
} else {
|
2067
|
+
closures.RunClosuresWithoutYielding(call_combiner_);
|
2068
|
+
}
|
2069
|
+
GRPC_ERROR_UNREF(error);
|
2070
|
+
}
|
2071
|
+
|
2072
|
+
// This is called via the call combiner, so access to calld is synchronized.
|
2073
|
+
void ClientChannel::CallData::ResumePendingBatchInCallCombiner(
|
2074
|
+
void* arg, grpc_error_handle /*ignored*/) {
|
2075
|
+
grpc_transport_stream_op_batch* batch =
|
2076
|
+
static_cast<grpc_transport_stream_op_batch*>(arg);
|
2077
|
+
auto* elem =
|
2078
|
+
static_cast<grpc_call_element*>(batch->handler_private.extra_arg);
|
2079
|
+
auto* calld = static_cast<CallData*>(elem->call_data);
|
2080
|
+
// Note: This will release the call combiner.
|
2081
|
+
calld->dynamic_call_->StartTransportStreamOpBatch(batch);
|
2082
|
+
}
|
2083
|
+
|
2084
|
+
// This is called via the call combiner, so access to calld is synchronized.
|
2085
|
+
void ClientChannel::CallData::PendingBatchesResume(grpc_call_element* elem) {
|
2086
|
+
ClientChannel* chand = static_cast<ClientChannel*>(elem->channel_data);
|
2087
|
+
// Retries not enabled; send down batches as-is.
|
2088
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
2089
|
+
size_t num_batches = 0;
|
2090
|
+
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
|
2091
|
+
if (pending_batches_[i] != nullptr) ++num_batches;
|
2092
|
+
}
|
2093
|
+
gpr_log(GPR_INFO,
|
2094
|
+
"chand=%p calld=%p: starting %" PRIuPTR
|
2095
|
+
" pending batches on dynamic_call=%p",
|
2096
|
+
chand, this, num_batches, dynamic_call_.get());
|
2097
|
+
}
|
2098
|
+
CallCombinerClosureList closures;
|
2099
|
+
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
|
2100
|
+
grpc_transport_stream_op_batch*& batch = pending_batches_[i];
|
2101
|
+
if (batch != nullptr) {
|
2102
|
+
batch->handler_private.extra_arg = elem;
|
2103
|
+
GRPC_CLOSURE_INIT(&batch->handler_private.closure,
|
2104
|
+
ResumePendingBatchInCallCombiner, batch, nullptr);
|
2105
|
+
closures.Add(&batch->handler_private.closure, GRPC_ERROR_NONE,
|
2106
|
+
"resuming pending batch from client channel call");
|
2107
|
+
batch = nullptr;
|
2108
|
+
}
|
2109
|
+
}
|
2110
|
+
// Note: This will release the call combiner.
|
2111
|
+
closures.RunClosures(call_combiner_);
|
2112
|
+
}
|
2113
|
+
|
2114
|
+
//
|
2115
|
+
// name resolution
|
2116
|
+
//
|
2117
|
+
|
2118
|
+
// A class to handle the call combiner cancellation callback for a
|
2119
|
+
// queued pick.
|
2120
|
+
class ClientChannel::CallData::ResolverQueuedCallCanceller {
|
2121
|
+
public:
|
2122
|
+
explicit ResolverQueuedCallCanceller(grpc_call_element* elem) : elem_(elem) {
|
2123
|
+
auto* calld = static_cast<CallData*>(elem->call_data);
|
2124
|
+
GRPC_CALL_STACK_REF(calld->owning_call_, "ResolverQueuedCallCanceller");
|
2125
|
+
GRPC_CLOSURE_INIT(&closure_, &CancelLocked, this,
|
2126
|
+
grpc_schedule_on_exec_ctx);
|
2127
|
+
calld->call_combiner_->SetNotifyOnCancel(&closure_);
|
2128
|
+
}
|
2129
|
+
|
2130
|
+
private:
|
2131
|
+
static void CancelLocked(void* arg, grpc_error_handle error) {
|
2132
|
+
auto* self = static_cast<ResolverQueuedCallCanceller*>(arg);
|
2133
|
+
auto* chand = static_cast<ClientChannel*>(self->elem_->channel_data);
|
2134
|
+
auto* calld = static_cast<CallData*>(self->elem_->call_data);
|
2135
|
+
{
|
2136
|
+
MutexLock lock(&chand->resolution_mu_);
|
2137
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
2138
|
+
gpr_log(GPR_INFO,
|
2139
|
+
"chand=%p calld=%p: cancelling resolver queued pick: "
|
2140
|
+
"error=%s self=%p calld->resolver_pick_canceller=%p",
|
2141
|
+
chand, calld, grpc_error_std_string(error).c_str(), self,
|
2142
|
+
calld->resolver_call_canceller_);
|
2143
|
+
}
|
2144
|
+
if (calld->resolver_call_canceller_ == self && error != GRPC_ERROR_NONE) {
|
2145
|
+
// Remove pick from list of queued picks.
|
2146
|
+
calld->MaybeRemoveCallFromResolverQueuedCallsLocked(self->elem_);
|
2147
|
+
// Fail pending batches on the call.
|
2148
|
+
calld->PendingBatchesFail(self->elem_, GRPC_ERROR_REF(error),
|
2149
|
+
YieldCallCombinerIfPendingBatchesFound);
|
2150
|
+
}
|
2151
|
+
}
|
2152
|
+
GRPC_CALL_STACK_UNREF(calld->owning_call_, "ResolvingQueuedCallCanceller");
|
2153
|
+
delete self;
|
2154
|
+
}
|
2155
|
+
|
2156
|
+
grpc_call_element* elem_;
|
2157
|
+
grpc_closure closure_;
|
2158
|
+
};
|
2159
|
+
|
2160
|
+
void ClientChannel::CallData::MaybeRemoveCallFromResolverQueuedCallsLocked(
|
2161
|
+
grpc_call_element* elem) {
|
2162
|
+
if (!queued_pending_resolver_result_) return;
|
2163
|
+
auto* chand = static_cast<ClientChannel*>(elem->channel_data);
|
2164
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
2165
|
+
gpr_log(GPR_INFO,
|
2166
|
+
"chand=%p calld=%p: removing from resolver queued picks list",
|
2167
|
+
chand, this);
|
2168
|
+
}
|
2169
|
+
chand->RemoveResolverQueuedCall(&resolver_queued_call_, pollent_);
|
2170
|
+
queued_pending_resolver_result_ = false;
|
2171
|
+
// Lame the call combiner canceller.
|
2172
|
+
resolver_call_canceller_ = nullptr;
|
2173
|
+
}
|
2174
|
+
|
2175
|
+
void ClientChannel::CallData::MaybeAddCallToResolverQueuedCallsLocked(
|
2176
|
+
grpc_call_element* elem) {
|
2177
|
+
if (queued_pending_resolver_result_) return;
|
2178
|
+
auto* chand = static_cast<ClientChannel*>(elem->channel_data);
|
2179
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
2180
|
+
gpr_log(GPR_INFO, "chand=%p calld=%p: adding to resolver queued picks list",
|
2181
|
+
chand, this);
|
2182
|
+
}
|
2183
|
+
queued_pending_resolver_result_ = true;
|
2184
|
+
resolver_queued_call_.elem = elem;
|
2185
|
+
chand->AddResolverQueuedCall(&resolver_queued_call_, pollent_);
|
2186
|
+
// Register call combiner cancellation callback.
|
2187
|
+
resolver_call_canceller_ = new ResolverQueuedCallCanceller(elem);
|
2188
|
+
}
|
2189
|
+
|
2190
|
+
grpc_error_handle ClientChannel::CallData::ApplyServiceConfigToCallLocked(
|
2191
|
+
grpc_call_element* elem, grpc_metadata_batch* initial_metadata) {
|
2192
|
+
ClientChannel* chand = static_cast<ClientChannel*>(elem->channel_data);
|
2193
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
2194
|
+
gpr_log(GPR_INFO, "chand=%p calld=%p: applying service config to call",
|
2195
|
+
chand, this);
|
2196
|
+
}
|
2197
|
+
ConfigSelector* config_selector = chand->config_selector_.get();
|
2198
|
+
if (config_selector != nullptr) {
|
2199
|
+
// Use the ConfigSelector to determine the config for the call.
|
2200
|
+
ConfigSelector::CallConfig call_config =
|
2201
|
+
config_selector->GetCallConfig({&path_, initial_metadata, arena_});
|
2202
|
+
if (call_config.error != GRPC_ERROR_NONE) return call_config.error;
|
2203
|
+
// Create a ClientChannelServiceConfigCallData for the call. This stores
|
2204
|
+
// a ref to the ServiceConfig and caches the right set of parsed configs
|
2205
|
+
// to use for the call. The ClientChannelServiceConfigCallData will store
|
2206
|
+
// itself in the call context, so that it can be accessed by filters
|
2207
|
+
// below us in the stack, and it will be cleaned up when the call ends.
|
2208
|
+
auto* service_config_call_data =
|
2209
|
+
arena_->New<ClientChannelServiceConfigCallData>(
|
2210
|
+
std::move(call_config.service_config), call_config.method_configs,
|
2211
|
+
std::move(call_config.call_attributes),
|
2212
|
+
call_config.call_dispatch_controller, call_context_);
|
2213
|
+
// Apply our own method params to the call.
|
2214
|
+
auto* method_params = static_cast<ClientChannelMethodParsedConfig*>(
|
2215
|
+
service_config_call_data->GetMethodParsedConfig(
|
2216
|
+
internal::ClientChannelServiceConfigParser::ParserIndex()));
|
2217
|
+
if (method_params != nullptr) {
|
2218
|
+
// If the deadline from the service config is shorter than the one
|
2219
|
+
// from the client API, reset the deadline timer.
|
2220
|
+
if (chand->deadline_checking_enabled_ && method_params->timeout() != 0) {
|
2221
|
+
const grpc_millis per_method_deadline =
|
2222
|
+
grpc_cycle_counter_to_millis_round_up(call_start_time_) +
|
2223
|
+
method_params->timeout();
|
2224
|
+
if (per_method_deadline < deadline_) {
|
2225
|
+
deadline_ = per_method_deadline;
|
2226
|
+
grpc_deadline_state_reset(elem, deadline_);
|
2227
|
+
}
|
2228
|
+
}
|
2229
|
+
// If the service config set wait_for_ready and the application
|
2230
|
+
// did not explicitly set it, use the value from the service config.
|
2231
|
+
uint32_t* send_initial_metadata_flags =
|
2232
|
+
&pending_batches_[0]
|
2233
|
+
->payload->send_initial_metadata.send_initial_metadata_flags;
|
2234
|
+
if (method_params->wait_for_ready().has_value() &&
|
2235
|
+
!(*send_initial_metadata_flags &
|
2236
|
+
GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET)) {
|
2237
|
+
if (method_params->wait_for_ready().value()) {
|
2238
|
+
*send_initial_metadata_flags |= GRPC_INITIAL_METADATA_WAIT_FOR_READY;
|
2239
|
+
} else {
|
2240
|
+
*send_initial_metadata_flags &= ~GRPC_INITIAL_METADATA_WAIT_FOR_READY;
|
2241
|
+
}
|
2242
|
+
}
|
2243
|
+
}
|
2244
|
+
// Set the dynamic filter stack.
|
2245
|
+
dynamic_filters_ = chand->dynamic_filters_;
|
2246
|
+
}
|
2247
|
+
return GRPC_ERROR_NONE;
|
2248
|
+
}
|
2249
|
+
|
2250
|
+
void ClientChannel::CallData::
|
2251
|
+
RecvTrailingMetadataReadyForConfigSelectorCommitCallback(
|
2252
|
+
void* arg, grpc_error_handle error) {
|
2253
|
+
auto* self = static_cast<CallData*>(arg);
|
2254
|
+
auto* service_config_call_data =
|
2255
|
+
static_cast<ClientChannelServiceConfigCallData*>(
|
2256
|
+
self->call_context_[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value);
|
2257
|
+
if (service_config_call_data != nullptr) {
|
2258
|
+
service_config_call_data->call_dispatch_controller()->Commit();
|
2259
|
+
}
|
2260
|
+
// Chain to original callback.
|
2261
|
+
Closure::Run(DEBUG_LOCATION, self->original_recv_trailing_metadata_ready_,
|
2262
|
+
GRPC_ERROR_REF(error));
|
2263
|
+
}
|
2264
|
+
|
2265
|
+
void ClientChannel::CallData::
|
2266
|
+
InjectRecvTrailingMetadataReadyForConfigSelectorCommitCallback(
|
2267
|
+
grpc_transport_stream_op_batch* batch) {
|
2268
|
+
original_recv_trailing_metadata_ready_ =
|
2269
|
+
batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready;
|
2270
|
+
GRPC_CLOSURE_INIT(&recv_trailing_metadata_ready_,
|
2271
|
+
RecvTrailingMetadataReadyForConfigSelectorCommitCallback,
|
2272
|
+
this, nullptr);
|
2273
|
+
batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready =
|
2274
|
+
&recv_trailing_metadata_ready_;
|
2275
|
+
}
|
2276
|
+
|
2277
|
+
void ClientChannel::CallData::AsyncResolutionDone(grpc_call_element* elem,
|
2278
|
+
grpc_error_handle error) {
|
2279
|
+
// TODO(roth): Does this callback need to hold a ref to the call stack?
|
2280
|
+
GRPC_CLOSURE_INIT(&resolution_done_closure_, ResolutionDone, elem, nullptr);
|
2281
|
+
ExecCtx::Run(DEBUG_LOCATION, &resolution_done_closure_, error);
|
2282
|
+
}
|
2283
|
+
|
2284
|
+
void ClientChannel::CallData::ResolutionDone(void* arg,
|
2285
|
+
grpc_error_handle error) {
|
2286
|
+
grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
|
2287
|
+
ClientChannel* chand = static_cast<ClientChannel*>(elem->channel_data);
|
2288
|
+
CallData* calld = static_cast<CallData*>(elem->call_data);
|
2289
|
+
if (error != GRPC_ERROR_NONE) {
|
2290
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
2291
|
+
gpr_log(GPR_INFO,
|
2292
|
+
"chand=%p calld=%p: error applying config to call: error=%s",
|
2293
|
+
chand, calld, grpc_error_std_string(error).c_str());
|
2294
|
+
}
|
2295
|
+
calld->PendingBatchesFail(elem, GRPC_ERROR_REF(error), YieldCallCombiner);
|
2296
|
+
return;
|
2297
|
+
}
|
2298
|
+
calld->CreateDynamicCall(elem);
|
2299
|
+
}
|
2300
|
+
|
2301
|
+
void ClientChannel::CallData::CheckResolution(void* arg,
|
2302
|
+
grpc_error_handle error) {
|
2303
|
+
grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
|
2304
|
+
CallData* calld = static_cast<CallData*>(elem->call_data);
|
2305
|
+
ClientChannel* chand = static_cast<ClientChannel*>(elem->channel_data);
|
2306
|
+
bool resolution_complete;
|
2307
|
+
{
|
2308
|
+
MutexLock lock(&chand->resolution_mu_);
|
2309
|
+
resolution_complete = calld->CheckResolutionLocked(elem, &error);
|
2310
|
+
}
|
2311
|
+
if (resolution_complete) {
|
2312
|
+
ResolutionDone(elem, error);
|
2313
|
+
GRPC_ERROR_UNREF(error);
|
2314
|
+
}
|
2315
|
+
}
|
2316
|
+
|
2317
|
+
bool ClientChannel::CallData::CheckResolutionLocked(grpc_call_element* elem,
|
2318
|
+
grpc_error_handle* error) {
|
2319
|
+
ClientChannel* chand = static_cast<ClientChannel*>(elem->channel_data);
|
2320
|
+
// If we're still in IDLE, we need to start resolving.
|
2321
|
+
if (GPR_UNLIKELY(chand->CheckConnectivityState(false) == GRPC_CHANNEL_IDLE)) {
|
2322
|
+
// Bounce into the control plane work serializer to start resolving,
|
2323
|
+
// in case we are still in IDLE state. Since we are holding on to the
|
2324
|
+
// resolution mutex here, we offload it on the ExecCtx so that we don't
|
2325
|
+
// deadlock with ourselves.
|
2326
|
+
GRPC_CHANNEL_STACK_REF(chand->owning_stack_, "CheckResolutionLocked");
|
2327
|
+
ExecCtx::Run(
|
2328
|
+
DEBUG_LOCATION,
|
2329
|
+
GRPC_CLOSURE_CREATE(
|
2330
|
+
[](void* arg, grpc_error_handle /*error*/) {
|
2331
|
+
auto* chand = static_cast<ClientChannel*>(arg);
|
2332
|
+
chand->work_serializer_->Run(
|
2333
|
+
[chand]()
|
2334
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(chand->work_serializer_) {
|
2335
|
+
chand->CheckConnectivityState(/*try_to_connect=*/true);
|
2336
|
+
GRPC_CHANNEL_STACK_UNREF(chand->owning_stack_,
|
2337
|
+
"CheckResolutionLocked");
|
2338
|
+
},
|
2339
|
+
DEBUG_LOCATION);
|
2340
|
+
},
|
2341
|
+
chand, nullptr),
|
2342
|
+
GRPC_ERROR_NONE);
|
2343
|
+
}
|
2344
|
+
// Get send_initial_metadata batch and flags.
|
2345
|
+
auto& send_initial_metadata =
|
2346
|
+
pending_batches_[0]->payload->send_initial_metadata;
|
2347
|
+
grpc_metadata_batch* initial_metadata_batch =
|
2348
|
+
send_initial_metadata.send_initial_metadata;
|
2349
|
+
const uint32_t send_initial_metadata_flags =
|
2350
|
+
send_initial_metadata.send_initial_metadata_flags;
|
2351
|
+
// If we don't yet have a resolver result, we need to queue the call
|
2352
|
+
// until we get one.
|
2353
|
+
if (GPR_UNLIKELY(!chand->received_service_config_data_)) {
|
2354
|
+
// If the resolver returned transient failure before returning the
|
2355
|
+
// first service config, fail any non-wait_for_ready calls.
|
2356
|
+
grpc_error_handle resolver_error = chand->resolver_transient_failure_error_;
|
2357
|
+
if (resolver_error != GRPC_ERROR_NONE &&
|
2358
|
+
(send_initial_metadata_flags & GRPC_INITIAL_METADATA_WAIT_FOR_READY) ==
|
2359
|
+
0) {
|
2360
|
+
MaybeRemoveCallFromResolverQueuedCallsLocked(elem);
|
2361
|
+
*error = GRPC_ERROR_REF(resolver_error);
|
2362
|
+
return true;
|
2363
|
+
}
|
2364
|
+
// Either the resolver has not yet returned a result, or it has
|
2365
|
+
// returned transient failure but the call is wait_for_ready. In
|
2366
|
+
// either case, queue the call.
|
2367
|
+
MaybeAddCallToResolverQueuedCallsLocked(elem);
|
2368
|
+
return false;
|
2369
|
+
}
|
2370
|
+
// Apply service config to call if not yet applied.
|
2371
|
+
if (GPR_LIKELY(!service_config_applied_)) {
|
2372
|
+
service_config_applied_ = true;
|
2373
|
+
*error = ApplyServiceConfigToCallLocked(elem, initial_metadata_batch);
|
2374
|
+
}
|
2375
|
+
MaybeRemoveCallFromResolverQueuedCallsLocked(elem);
|
2376
|
+
return true;
|
2377
|
+
}
|
2378
|
+
|
2379
|
+
void ClientChannel::CallData::CreateDynamicCall(grpc_call_element* elem) {
|
2380
|
+
auto* chand = static_cast<ClientChannel*>(elem->channel_data);
|
2381
|
+
DynamicFilters::Call::Args args = {std::move(dynamic_filters_),
|
2382
|
+
pollent_,
|
2383
|
+
path_,
|
2384
|
+
call_start_time_,
|
2385
|
+
deadline_,
|
2386
|
+
arena_,
|
2387
|
+
call_context_,
|
2388
|
+
call_combiner_};
|
2389
|
+
grpc_error_handle error = GRPC_ERROR_NONE;
|
2390
|
+
DynamicFilters* channel_stack = args.channel_stack.get();
|
2391
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
2392
|
+
gpr_log(
|
2393
|
+
GPR_INFO,
|
2394
|
+
"chand=%p calld=%p: creating dynamic call stack on channel_stack=%p",
|
2395
|
+
chand, this, channel_stack);
|
2396
|
+
}
|
2397
|
+
dynamic_call_ = channel_stack->CreateCall(std::move(args), &error);
|
2398
|
+
if (error != GRPC_ERROR_NONE) {
|
2399
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
2400
|
+
gpr_log(GPR_INFO,
|
2401
|
+
"chand=%p calld=%p: failed to create dynamic call: error=%s",
|
2402
|
+
chand, this, grpc_error_std_string(error).c_str());
|
2403
|
+
}
|
2404
|
+
PendingBatchesFail(elem, error, YieldCallCombiner);
|
2405
|
+
return;
|
2406
|
+
}
|
2407
|
+
PendingBatchesResume(elem);
|
2408
|
+
}
|
2409
|
+
|
2410
|
+
//
|
2411
|
+
// ClientChannel::LoadBalancedCall::Metadata
|
2412
|
+
//
|
2413
|
+
|
2414
|
+
class ClientChannel::LoadBalancedCall::Metadata
|
2415
|
+
: public LoadBalancingPolicy::MetadataInterface {
|
2416
|
+
public:
|
2417
|
+
Metadata(LoadBalancedCall* lb_call, grpc_metadata_batch* batch)
|
2418
|
+
: lb_call_(lb_call), batch_(batch) {}
|
2419
|
+
|
2420
|
+
void Add(absl::string_view key, absl::string_view value) override {
|
2421
|
+
grpc_linked_mdelem* linked_mdelem = static_cast<grpc_linked_mdelem*>(
|
2422
|
+
lb_call_->arena_->Alloc(sizeof(grpc_linked_mdelem)));
|
2423
|
+
linked_mdelem->md = grpc_mdelem_from_slices(
|
2424
|
+
ExternallyManagedSlice(key.data(), key.size()),
|
2425
|
+
ExternallyManagedSlice(value.data(), value.size()));
|
2426
|
+
GPR_ASSERT(batch_->LinkTail(linked_mdelem) == GRPC_ERROR_NONE);
|
2427
|
+
}
|
2428
|
+
|
2429
|
+
std::vector<std::pair<std::string, std::string>> TestOnlyCopyToVector()
|
2430
|
+
override {
|
2431
|
+
std::vector<std::pair<std::string, std::string>> result;
|
2432
|
+
batch_->ForEach([&](grpc_mdelem md) {
|
2433
|
+
auto key = std::string(StringViewFromSlice(GRPC_MDKEY(md)));
|
2434
|
+
if (key != ":path") {
|
2435
|
+
result.push_back(
|
2436
|
+
std::make_pair(std::move(key),
|
2437
|
+
std::string(StringViewFromSlice(GRPC_MDVALUE(md)))));
|
2438
|
+
}
|
2439
|
+
});
|
2440
|
+
return result;
|
2441
|
+
}
|
2442
|
+
|
2443
|
+
absl::optional<absl::string_view> Lookup(absl::string_view key,
|
2444
|
+
std::string* buffer) const override {
|
2445
|
+
return batch_->GetValue(key, buffer);
|
2446
|
+
}
|
2447
|
+
|
2448
|
+
private:
|
2449
|
+
LoadBalancedCall* lb_call_;
|
2450
|
+
grpc_metadata_batch* batch_;
|
2451
|
+
};
|
2452
|
+
|
2453
|
+
//
|
2454
|
+
// ClientChannel::LoadBalancedCall::LbCallState
|
2455
|
+
//
|
2456
|
+
|
2457
|
+
class ClientChannel::LoadBalancedCall::LbCallState
|
2458
|
+
: public LoadBalancingPolicy::CallState {
|
2459
|
+
public:
|
2460
|
+
explicit LbCallState(LoadBalancedCall* lb_call) : lb_call_(lb_call) {}
|
2461
|
+
|
2462
|
+
void* Alloc(size_t size) override { return lb_call_->arena_->Alloc(size); }
|
2463
|
+
|
2464
|
+
const LoadBalancingPolicy::BackendMetricData* GetBackendMetricData()
|
2465
|
+
override {
|
2466
|
+
if (lb_call_->backend_metric_data_ == nullptr) {
|
2467
|
+
grpc_linked_mdelem* md = lb_call_->recv_trailing_metadata_->legacy_index()
|
2468
|
+
->named.x_endpoint_load_metrics_bin;
|
2469
|
+
if (md != nullptr) {
|
2470
|
+
lb_call_->backend_metric_data_ =
|
2471
|
+
ParseBackendMetricData(GRPC_MDVALUE(md->md), lb_call_->arena_);
|
2472
|
+
}
|
2473
|
+
}
|
2474
|
+
return lb_call_->backend_metric_data_;
|
2475
|
+
}
|
2476
|
+
|
2477
|
+
absl::string_view ExperimentalGetCallAttribute(const char* key) override {
|
2478
|
+
auto* service_config_call_data = static_cast<ServiceConfigCallData*>(
|
2479
|
+
lb_call_->call_context_[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value);
|
2480
|
+
auto& call_attributes = service_config_call_data->call_attributes();
|
2481
|
+
auto it = call_attributes.find(key);
|
2482
|
+
if (it == call_attributes.end()) return absl::string_view();
|
2483
|
+
return it->second;
|
2484
|
+
}
|
2485
|
+
|
2486
|
+
private:
|
2487
|
+
LoadBalancedCall* lb_call_;
|
2488
|
+
};
|
2489
|
+
|
2490
|
+
//
|
2491
|
+
// LoadBalancedCall
|
2492
|
+
//
|
2493
|
+
|
2494
|
+
namespace {
|
2495
|
+
|
2496
|
+
CallTracer::CallAttemptTracer* GetCallAttemptTracer(
|
2497
|
+
grpc_call_context_element* context, bool is_transparent_retry) {
|
2498
|
+
auto* call_tracer =
|
2499
|
+
static_cast<CallTracer*>(context[GRPC_CONTEXT_CALL_TRACER].value);
|
2500
|
+
if (call_tracer == nullptr) return nullptr;
|
2501
|
+
return call_tracer->StartNewAttempt(is_transparent_retry);
|
2502
|
+
}
|
2503
|
+
|
2504
|
+
} // namespace
|
2505
|
+
|
2506
|
+
ClientChannel::LoadBalancedCall::LoadBalancedCall(
|
2507
|
+
ClientChannel* chand, const grpc_call_element_args& args,
|
2508
|
+
grpc_polling_entity* pollent, grpc_closure* on_call_destruction_complete,
|
2509
|
+
ConfigSelector::CallDispatchController* call_dispatch_controller,
|
2510
|
+
bool is_transparent_retry)
|
2511
|
+
: InternallyRefCounted(
|
2512
|
+
GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)
|
2513
|
+
? "LoadBalancedCall"
|
2514
|
+
: nullptr),
|
2515
|
+
chand_(chand),
|
2516
|
+
path_(grpc_slice_ref_internal(args.path)),
|
2517
|
+
deadline_(args.deadline),
|
2518
|
+
arena_(args.arena),
|
2519
|
+
owning_call_(args.call_stack),
|
2520
|
+
call_combiner_(args.call_combiner),
|
2521
|
+
call_context_(args.context),
|
2522
|
+
pollent_(pollent),
|
2523
|
+
on_call_destruction_complete_(on_call_destruction_complete),
|
2524
|
+
call_dispatch_controller_(call_dispatch_controller),
|
2525
|
+
call_attempt_tracer_(
|
2526
|
+
GetCallAttemptTracer(args.context, is_transparent_retry)) {}
|
2527
|
+
|
2528
|
+
ClientChannel::LoadBalancedCall::~LoadBalancedCall() {
|
2529
|
+
grpc_slice_unref_internal(path_);
|
2530
|
+
GRPC_ERROR_UNREF(cancel_error_);
|
2531
|
+
GRPC_ERROR_UNREF(failure_error_);
|
2532
|
+
if (backend_metric_data_ != nullptr) {
|
2533
|
+
backend_metric_data_
|
2534
|
+
->LoadBalancingPolicy::BackendMetricData::~BackendMetricData();
|
2535
|
+
}
|
2536
|
+
// Make sure there are no remaining pending batches.
|
2537
|
+
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
|
2538
|
+
GPR_ASSERT(pending_batches_[i] == nullptr);
|
2539
|
+
}
|
2540
|
+
if (on_call_destruction_complete_ != nullptr) {
|
2541
|
+
ExecCtx::Run(DEBUG_LOCATION, on_call_destruction_complete_,
|
2542
|
+
GRPC_ERROR_NONE);
|
2543
|
+
}
|
2544
|
+
}
|
2545
|
+
|
2546
|
+
void ClientChannel::LoadBalancedCall::Orphan() {
|
2547
|
+
// Compute latency and report it to the tracer.
|
2548
|
+
if (call_attempt_tracer_ != nullptr) {
|
2549
|
+
gpr_timespec latency =
|
2550
|
+
gpr_cycle_counter_sub(gpr_get_cycle_counter(), lb_call_start_time_);
|
2551
|
+
call_attempt_tracer_->RecordEnd(latency);
|
2552
|
+
}
|
2553
|
+
Unref();
|
2554
|
+
}
|
2555
|
+
|
2556
|
+
size_t ClientChannel::LoadBalancedCall::GetBatchIndex(
|
2557
|
+
grpc_transport_stream_op_batch* batch) {
|
2558
|
+
// Note: It is important the send_initial_metadata be the first entry
|
2559
|
+
// here, since the code in PickSubchannelLocked() assumes it will be.
|
2560
|
+
if (batch->send_initial_metadata) return 0;
|
2561
|
+
if (batch->send_message) return 1;
|
2562
|
+
if (batch->send_trailing_metadata) return 2;
|
2563
|
+
if (batch->recv_initial_metadata) return 3;
|
2564
|
+
if (batch->recv_message) return 4;
|
2565
|
+
if (batch->recv_trailing_metadata) return 5;
|
2566
|
+
GPR_UNREACHABLE_CODE(return (size_t)-1);
|
2567
|
+
}
|
2568
|
+
|
2569
|
+
// This is called via the call combiner, so access to calld is synchronized.
|
2570
|
+
void ClientChannel::LoadBalancedCall::PendingBatchesAdd(
|
2571
|
+
grpc_transport_stream_op_batch* batch) {
|
2572
|
+
const size_t idx = GetBatchIndex(batch);
|
2573
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
2574
|
+
gpr_log(GPR_INFO,
|
2575
|
+
"chand=%p lb_call=%p: adding pending batch at index %" PRIuPTR,
|
2576
|
+
chand_, this, idx);
|
2577
|
+
}
|
2578
|
+
GPR_ASSERT(pending_batches_[idx] == nullptr);
|
2579
|
+
pending_batches_[idx] = batch;
|
2580
|
+
}
|
2581
|
+
|
2582
|
+
// This is called via the call combiner, so access to calld is synchronized.
|
2583
|
+
void ClientChannel::LoadBalancedCall::FailPendingBatchInCallCombiner(
|
2584
|
+
void* arg, grpc_error_handle error) {
|
2585
|
+
grpc_transport_stream_op_batch* batch =
|
2586
|
+
static_cast<grpc_transport_stream_op_batch*>(arg);
|
2587
|
+
auto* self = static_cast<LoadBalancedCall*>(batch->handler_private.extra_arg);
|
2588
|
+
// Note: This will release the call combiner.
|
2589
|
+
grpc_transport_stream_op_batch_finish_with_failure(
|
2590
|
+
batch, GRPC_ERROR_REF(error), self->call_combiner_);
|
2591
|
+
}
|
2592
|
+
|
2593
|
+
// This is called via the call combiner, so access to calld is synchronized.
|
2594
|
+
void ClientChannel::LoadBalancedCall::PendingBatchesFail(
|
2595
|
+
grpc_error_handle error,
|
2596
|
+
YieldCallCombinerPredicate yield_call_combiner_predicate) {
|
2597
|
+
GPR_ASSERT(error != GRPC_ERROR_NONE);
|
2598
|
+
GRPC_ERROR_UNREF(failure_error_);
|
2599
|
+
failure_error_ = error;
|
2600
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
2601
|
+
size_t num_batches = 0;
|
2602
|
+
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
|
2603
|
+
if (pending_batches_[i] != nullptr) ++num_batches;
|
2604
|
+
}
|
2605
|
+
gpr_log(GPR_INFO,
|
2606
|
+
"chand=%p lb_call=%p: failing %" PRIuPTR " pending batches: %s",
|
2607
|
+
chand_, this, num_batches, grpc_error_std_string(error).c_str());
|
2608
|
+
}
|
2609
|
+
CallCombinerClosureList closures;
|
2610
|
+
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
|
2611
|
+
grpc_transport_stream_op_batch*& batch = pending_batches_[i];
|
2612
|
+
if (batch != nullptr) {
|
2613
|
+
batch->handler_private.extra_arg = this;
|
2614
|
+
GRPC_CLOSURE_INIT(&batch->handler_private.closure,
|
2615
|
+
FailPendingBatchInCallCombiner, batch,
|
2616
|
+
grpc_schedule_on_exec_ctx);
|
2617
|
+
closures.Add(&batch->handler_private.closure, GRPC_ERROR_REF(error),
|
2618
|
+
"PendingBatchesFail");
|
2619
|
+
batch = nullptr;
|
2620
|
+
}
|
2621
|
+
}
|
2622
|
+
if (yield_call_combiner_predicate(closures)) {
|
2623
|
+
closures.RunClosures(call_combiner_);
|
2624
|
+
} else {
|
2625
|
+
closures.RunClosuresWithoutYielding(call_combiner_);
|
2626
|
+
}
|
2627
|
+
}
|
2628
|
+
|
2629
|
+
// This is called via the call combiner, so access to calld is synchronized.
|
2630
|
+
void ClientChannel::LoadBalancedCall::ResumePendingBatchInCallCombiner(
|
2631
|
+
void* arg, grpc_error_handle /*ignored*/) {
|
2632
|
+
grpc_transport_stream_op_batch* batch =
|
2633
|
+
static_cast<grpc_transport_stream_op_batch*>(arg);
|
2634
|
+
SubchannelCall* subchannel_call =
|
2635
|
+
static_cast<SubchannelCall*>(batch->handler_private.extra_arg);
|
2636
|
+
// Note: This will release the call combiner.
|
2637
|
+
subchannel_call->StartTransportStreamOpBatch(batch);
|
2638
|
+
}
|
2639
|
+
|
2640
|
+
// This is called via the call combiner, so access to calld is synchronized.
|
2641
|
+
void ClientChannel::LoadBalancedCall::PendingBatchesResume() {
|
2642
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
2643
|
+
size_t num_batches = 0;
|
2644
|
+
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
|
2645
|
+
if (pending_batches_[i] != nullptr) ++num_batches;
|
2646
|
+
}
|
2647
|
+
gpr_log(GPR_INFO,
|
2648
|
+
"chand=%p lb_call=%p: starting %" PRIuPTR
|
2649
|
+
" pending batches on subchannel_call=%p",
|
2650
|
+
chand_, this, num_batches, subchannel_call_.get());
|
2651
|
+
}
|
2652
|
+
CallCombinerClosureList closures;
|
2653
|
+
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
|
2654
|
+
grpc_transport_stream_op_batch*& batch = pending_batches_[i];
|
2655
|
+
if (batch != nullptr) {
|
2656
|
+
batch->handler_private.extra_arg = subchannel_call_.get();
|
2657
|
+
GRPC_CLOSURE_INIT(&batch->handler_private.closure,
|
2658
|
+
ResumePendingBatchInCallCombiner, batch,
|
2659
|
+
grpc_schedule_on_exec_ctx);
|
2660
|
+
closures.Add(&batch->handler_private.closure, GRPC_ERROR_NONE,
|
2661
|
+
"resuming pending batch from LB call");
|
2662
|
+
batch = nullptr;
|
2663
|
+
}
|
2664
|
+
}
|
2665
|
+
// Note: This will release the call combiner.
|
2666
|
+
closures.RunClosures(call_combiner_);
|
2667
|
+
}
|
2668
|
+
|
2669
|
+
void ClientChannel::LoadBalancedCall::StartTransportStreamOpBatch(
|
2670
|
+
grpc_transport_stream_op_batch* batch) {
|
2671
|
+
// Handle call tracing.
|
2672
|
+
if (call_attempt_tracer_ != nullptr) {
|
2673
|
+
// Record send ops in tracer.
|
2674
|
+
if (batch->cancel_stream) {
|
2675
|
+
call_attempt_tracer_->RecordCancel(
|
2676
|
+
GRPC_ERROR_REF(batch->payload->cancel_stream.cancel_error));
|
2677
|
+
}
|
2678
|
+
if (batch->send_initial_metadata) {
|
2679
|
+
call_attempt_tracer_->RecordSendInitialMetadata(
|
2680
|
+
batch->payload->send_initial_metadata.send_initial_metadata,
|
2681
|
+
batch->payload->send_initial_metadata.send_initial_metadata_flags);
|
2682
|
+
peer_string_ = batch->payload->send_initial_metadata.peer_string;
|
2683
|
+
original_send_initial_metadata_on_complete_ = batch->on_complete;
|
2684
|
+
GRPC_CLOSURE_INIT(&send_initial_metadata_on_complete_,
|
2685
|
+
SendInitialMetadataOnComplete, this, nullptr);
|
2686
|
+
batch->on_complete = &send_initial_metadata_on_complete_;
|
2687
|
+
}
|
2688
|
+
if (batch->send_message) {
|
2689
|
+
call_attempt_tracer_->RecordSendMessage(
|
2690
|
+
*batch->payload->send_message.send_message);
|
2691
|
+
}
|
2692
|
+
if (batch->send_trailing_metadata) {
|
2693
|
+
call_attempt_tracer_->RecordSendTrailingMetadata(
|
2694
|
+
batch->payload->send_trailing_metadata.send_trailing_metadata);
|
2695
|
+
}
|
2696
|
+
// Intercept recv ops.
|
2697
|
+
if (batch->recv_initial_metadata) {
|
2698
|
+
recv_initial_metadata_ =
|
2699
|
+
batch->payload->recv_initial_metadata.recv_initial_metadata;
|
2700
|
+
original_recv_initial_metadata_ready_ =
|
2701
|
+
batch->payload->recv_initial_metadata.recv_initial_metadata_ready;
|
2702
|
+
GRPC_CLOSURE_INIT(&recv_initial_metadata_ready_, RecvInitialMetadataReady,
|
2703
|
+
this, nullptr);
|
2704
|
+
batch->payload->recv_initial_metadata.recv_initial_metadata_ready =
|
2705
|
+
&recv_initial_metadata_ready_;
|
2706
|
+
}
|
2707
|
+
if (batch->recv_message) {
|
2708
|
+
recv_message_ = batch->payload->recv_message.recv_message;
|
2709
|
+
original_recv_message_ready_ =
|
2710
|
+
batch->payload->recv_message.recv_message_ready;
|
2711
|
+
GRPC_CLOSURE_INIT(&recv_message_ready_, RecvMessageReady, this, nullptr);
|
2712
|
+
batch->payload->recv_message.recv_message_ready = &recv_message_ready_;
|
2713
|
+
}
|
2714
|
+
}
|
2715
|
+
// Intercept recv_trailing_metadata even if there is no call tracer,
|
2716
|
+
// since we may need to notify the LB policy about trailing metadata.
|
2717
|
+
if (batch->recv_trailing_metadata) {
|
2718
|
+
recv_trailing_metadata_ =
|
2719
|
+
batch->payload->recv_trailing_metadata.recv_trailing_metadata;
|
2720
|
+
transport_stream_stats_ =
|
2721
|
+
batch->payload->recv_trailing_metadata.collect_stats;
|
2722
|
+
original_recv_trailing_metadata_ready_ =
|
2723
|
+
batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready;
|
2724
|
+
GRPC_CLOSURE_INIT(&recv_trailing_metadata_ready_, RecvTrailingMetadataReady,
|
2725
|
+
this, nullptr);
|
2726
|
+
batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready =
|
2727
|
+
&recv_trailing_metadata_ready_;
|
2728
|
+
}
|
2729
|
+
// If we've already gotten a subchannel call, pass the batch down to it.
|
2730
|
+
// Note that once we have picked a subchannel, we do not need to acquire
|
2731
|
+
// the channel's data plane mutex, which is more efficient (especially for
|
2732
|
+
// streaming calls).
|
2733
|
+
if (subchannel_call_ != nullptr) {
|
2734
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
2735
|
+
gpr_log(GPR_INFO,
|
2736
|
+
"chand=%p lb_call=%p: starting batch on subchannel_call=%p",
|
2737
|
+
chand_, this, subchannel_call_.get());
|
2738
|
+
}
|
2739
|
+
subchannel_call_->StartTransportStreamOpBatch(batch);
|
2740
|
+
return;
|
2741
|
+
}
|
2742
|
+
// We do not yet have a subchannel call.
|
2743
|
+
//
|
2744
|
+
// If we've previously been cancelled, immediately fail any new batches.
|
2745
|
+
if (GPR_UNLIKELY(cancel_error_ != GRPC_ERROR_NONE)) {
|
2746
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
2747
|
+
gpr_log(GPR_INFO, "chand=%p lb_call=%p: failing batch with error: %s",
|
2748
|
+
chand_, this, grpc_error_std_string(cancel_error_).c_str());
|
2749
|
+
}
|
2750
|
+
// Note: This will release the call combiner.
|
2751
|
+
grpc_transport_stream_op_batch_finish_with_failure(
|
2752
|
+
batch, GRPC_ERROR_REF(cancel_error_), call_combiner_);
|
2753
|
+
return;
|
2754
|
+
}
|
2755
|
+
// Handle cancellation.
|
2756
|
+
if (GPR_UNLIKELY(batch->cancel_stream)) {
|
2757
|
+
// Stash a copy of cancel_error in our call data, so that we can use
|
2758
|
+
// it for subsequent operations. This ensures that if the call is
|
2759
|
+
// cancelled before any batches are passed down (e.g., if the deadline
|
2760
|
+
// is in the past when the call starts), we can return the right
|
2761
|
+
// error to the caller when the first batch does get passed down.
|
2762
|
+
GRPC_ERROR_UNREF(cancel_error_);
|
2763
|
+
cancel_error_ = GRPC_ERROR_REF(batch->payload->cancel_stream.cancel_error);
|
2764
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
2765
|
+
gpr_log(GPR_INFO, "chand=%p lb_call=%p: recording cancel_error=%s",
|
2766
|
+
chand_, this, grpc_error_std_string(cancel_error_).c_str());
|
2767
|
+
}
|
2768
|
+
// Fail all pending batches.
|
2769
|
+
PendingBatchesFail(GRPC_ERROR_REF(cancel_error_), NoYieldCallCombiner);
|
2770
|
+
// Note: This will release the call combiner.
|
2771
|
+
grpc_transport_stream_op_batch_finish_with_failure(
|
2772
|
+
batch, GRPC_ERROR_REF(cancel_error_), call_combiner_);
|
2773
|
+
return;
|
2774
|
+
}
|
2775
|
+
// Add the batch to the pending list.
|
2776
|
+
PendingBatchesAdd(batch);
|
2777
|
+
// For batches containing a send_initial_metadata op, acquire the
|
2778
|
+
// channel's data plane mutex to pick a subchannel.
|
2779
|
+
if (GPR_LIKELY(batch->send_initial_metadata)) {
|
2780
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
2781
|
+
gpr_log(GPR_INFO,
|
2782
|
+
"chand=%p lb_call=%p: grabbing data plane mutex to perform pick",
|
2783
|
+
chand_, this);
|
2784
|
+
}
|
2785
|
+
PickSubchannel(this, GRPC_ERROR_NONE);
|
2786
|
+
} else {
|
2787
|
+
// For all other batches, release the call combiner.
|
2788
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
|
2789
|
+
gpr_log(GPR_INFO,
|
2790
|
+
"chand=%p lb_call=%p: saved batch, yielding call combiner",
|
2791
|
+
chand_, this);
|
2792
|
+
}
|
2793
|
+
GRPC_CALL_COMBINER_STOP(call_combiner_,
|
2794
|
+
"batch does not include send_initial_metadata");
|
2795
|
+
}
|
2796
|
+
}
|
2797
|
+
|
2798
|
+
void ClientChannel::LoadBalancedCall::SendInitialMetadataOnComplete(
|
2799
|
+
void* arg, grpc_error_handle error) {
|
2800
|
+
auto* self = static_cast<LoadBalancedCall*>(arg);
|
2801
|
+
self->call_attempt_tracer_->RecordOnDoneSendInitialMetadata(
|
2802
|
+
self->peer_string_);
|
2803
|
+
Closure::Run(DEBUG_LOCATION,
|
2804
|
+
self->original_send_initial_metadata_on_complete_,
|
2805
|
+
GRPC_ERROR_REF(error));
|
2806
|
+
}
|
2807
|
+
|
2808
|
+
void ClientChannel::LoadBalancedCall::RecvInitialMetadataReady(
|
2809
|
+
void* arg, grpc_error_handle error) {
|
2810
|
+
auto* self = static_cast<LoadBalancedCall*>(arg);
|
2811
|
+
if (error == GRPC_ERROR_NONE) {
|
2812
|
+
// recv_initial_metadata_flags is not populated for clients
|
2813
|
+
self->call_attempt_tracer_->RecordReceivedInitialMetadata(
|
2814
|
+
self->recv_initial_metadata_, 0 /* recv_initial_metadata_flags */);
|
2815
|
+
}
|
2816
|
+
Closure::Run(DEBUG_LOCATION, self->original_recv_initial_metadata_ready_,
|
2817
|
+
GRPC_ERROR_REF(error));
|
2818
|
+
}
|
2819
|
+
|
2820
|
+
void ClientChannel::LoadBalancedCall::RecvMessageReady(
|
2821
|
+
void* arg, grpc_error_handle error) {
|
2822
|
+
auto* self = static_cast<LoadBalancedCall*>(arg);
|
2823
|
+
if (*self->recv_message_ != nullptr) {
|
2824
|
+
self->call_attempt_tracer_->RecordReceivedMessage(**self->recv_message_);
|
2825
|
+
}
|
2826
|
+
Closure::Run(DEBUG_LOCATION, self->original_recv_message_ready_,
|
2827
|
+
GRPC_ERROR_REF(error));
|
2828
|
+
}
|
2829
|
+
|
2830
|
+
void ClientChannel::LoadBalancedCall::RecvTrailingMetadataReady(
|
2831
|
+
void* arg, grpc_error_handle error) {
|
2832
|
+
auto* self = static_cast<LoadBalancedCall*>(arg);
|
2833
|
+
// Check if we have a tracer or an LB callback to invoke.
|
2834
|
+
if (self->call_attempt_tracer_ != nullptr ||
|
2835
|
+
self->lb_recv_trailing_metadata_ready_ != nullptr) {
|
2836
|
+
// Get the call's status.
|
2837
|
+
absl::Status status;
|
2838
|
+
if (error != GRPC_ERROR_NONE) {
|
2839
|
+
// Get status from error.
|
2840
|
+
grpc_status_code code;
|
2841
|
+
std::string message;
|
2842
|
+
grpc_error_get_status(error, self->deadline_, &code, &message,
|
2843
|
+
/*http_error=*/nullptr, /*error_string=*/nullptr);
|
2844
|
+
status = absl::Status(static_cast<absl::StatusCode>(code), message);
|
2845
|
+
} else {
|
2846
|
+
// Get status from headers.
|
2847
|
+
const auto& fields = self->recv_trailing_metadata_->legacy_index()->named;
|
2848
|
+
GPR_ASSERT(fields.grpc_status != nullptr);
|
2849
|
+
grpc_status_code code =
|
2850
|
+
grpc_get_status_code_from_metadata(fields.grpc_status->md);
|
2851
|
+
if (code != GRPC_STATUS_OK) {
|
2852
|
+
absl::string_view message;
|
2853
|
+
if (fields.grpc_message != nullptr) {
|
2854
|
+
message = StringViewFromSlice(GRPC_MDVALUE(fields.grpc_message->md));
|
2855
|
+
}
|
2856
|
+
status = absl::Status(static_cast<absl::StatusCode>(code), message);
|
2857
|
+
}
|
2858
|
+
}
|
2859
|
+
// If we have a tracer, notify it.
|
2860
|
+
if (self->call_attempt_tracer_ != nullptr) {
|
2861
|
+
self->call_attempt_tracer_->RecordReceivedTrailingMetadata(
|
2862
|
+
status, self->recv_trailing_metadata_,
|
2863
|
+
*self->transport_stream_stats_);
|
2864
|
+
}
|
2865
|
+
// If the LB policy requested a callback for trailing metadata, invoke
|
2866
|
+
// the callback.
|
2867
|
+
if (self->lb_recv_trailing_metadata_ready_ != nullptr) {
|
2868
|
+
Metadata trailing_metadata(self, self->recv_trailing_metadata_);
|
2869
|
+
LbCallState lb_call_state(self);
|
2870
|
+
self->lb_recv_trailing_metadata_ready_(status, &trailing_metadata,
|
2871
|
+
&lb_call_state);
|
2872
|
+
}
|
2873
|
+
}
|
2874
|
+
// Chain to original callback.
|
2875
|
+
if (self->failure_error_ != GRPC_ERROR_NONE) {
|
2876
|
+
error = self->failure_error_;
|
2877
|
+
self->failure_error_ = GRPC_ERROR_NONE;
|
2878
|
+
} else {
|
2879
|
+
error = GRPC_ERROR_REF(error);
|
2880
|
+
}
|
2881
|
+
Closure::Run(DEBUG_LOCATION, self->original_recv_trailing_metadata_ready_,
|
2882
|
+
error);
|
2883
|
+
}
|
2884
|
+
|
2885
|
+
void ClientChannel::LoadBalancedCall::CreateSubchannelCall() {
|
2886
|
+
SubchannelCall::Args call_args = {
|
2887
|
+
std::move(connected_subchannel_), pollent_, path_, /*start_time=*/0,
|
2888
|
+
deadline_, arena_,
|
2889
|
+
// TODO(roth): When we implement hedging support, we will probably
|
2890
|
+
// need to use a separate call context for each subchannel call.
|
2891
|
+
call_context_, call_combiner_};
|
2892
|
+
grpc_error_handle error = GRPC_ERROR_NONE;
|
2893
|
+
subchannel_call_ = SubchannelCall::Create(std::move(call_args), &error);
|
2894
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
2895
|
+
gpr_log(GPR_INFO,
|
2896
|
+
"chand=%p lb_call=%p: create subchannel_call=%p: error=%s", chand_,
|
2897
|
+
this, subchannel_call_.get(), grpc_error_std_string(error).c_str());
|
2898
|
+
}
|
2899
|
+
if (on_call_destruction_complete_ != nullptr) {
|
2900
|
+
subchannel_call_->SetAfterCallStackDestroy(on_call_destruction_complete_);
|
2901
|
+
on_call_destruction_complete_ = nullptr;
|
2902
|
+
}
|
2903
|
+
if (GPR_UNLIKELY(error != GRPC_ERROR_NONE)) {
|
2904
|
+
PendingBatchesFail(error, YieldCallCombiner);
|
2905
|
+
} else {
|
2906
|
+
PendingBatchesResume();
|
2907
|
+
}
|
2908
|
+
}
|
2909
|
+
|
2910
|
+
// A class to handle the call combiner cancellation callback for a
|
2911
|
+
// queued pick.
|
2912
|
+
// TODO(roth): When we implement hedging support, we won't be able to
|
2913
|
+
// register a call combiner cancellation closure for each LB pick,
|
2914
|
+
// because there may be multiple LB picks happening in parallel.
|
2915
|
+
// Instead, we will probably need to maintain a list in the CallData
|
2916
|
+
// object of pending LB picks to be cancelled when the closure runs.
|
2917
|
+
class ClientChannel::LoadBalancedCall::LbQueuedCallCanceller {
|
2918
|
+
public:
|
2919
|
+
explicit LbQueuedCallCanceller(RefCountedPtr<LoadBalancedCall> lb_call)
|
2920
|
+
: lb_call_(std::move(lb_call)) {
|
2921
|
+
GRPC_CALL_STACK_REF(lb_call_->owning_call_, "LbQueuedCallCanceller");
|
2922
|
+
GRPC_CLOSURE_INIT(&closure_, &CancelLocked, this, nullptr);
|
2923
|
+
lb_call_->call_combiner_->SetNotifyOnCancel(&closure_);
|
2924
|
+
}
|
2925
|
+
|
2926
|
+
private:
|
2927
|
+
static void CancelLocked(void* arg, grpc_error_handle error) {
|
2928
|
+
auto* self = static_cast<LbQueuedCallCanceller*>(arg);
|
2929
|
+
auto* lb_call = self->lb_call_.get();
|
2930
|
+
auto* chand = lb_call->chand_;
|
2931
|
+
{
|
2932
|
+
MutexLock lock(&chand->data_plane_mu_);
|
2933
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
2934
|
+
gpr_log(GPR_INFO,
|
2935
|
+
"chand=%p lb_call=%p: cancelling queued pick: "
|
2936
|
+
"error=%s self=%p calld->pick_canceller=%p",
|
2937
|
+
chand, lb_call, grpc_error_std_string(error).c_str(), self,
|
2938
|
+
lb_call->lb_call_canceller_);
|
2939
|
+
}
|
2940
|
+
if (lb_call->lb_call_canceller_ == self && error != GRPC_ERROR_NONE) {
|
2941
|
+
lb_call->call_dispatch_controller_->Commit();
|
2942
|
+
// Remove pick from list of queued picks.
|
2943
|
+
lb_call->MaybeRemoveCallFromLbQueuedCallsLocked();
|
2944
|
+
// Fail pending batches on the call.
|
2945
|
+
lb_call->PendingBatchesFail(GRPC_ERROR_REF(error),
|
2946
|
+
YieldCallCombinerIfPendingBatchesFound);
|
2947
|
+
}
|
2948
|
+
}
|
2949
|
+
GRPC_CALL_STACK_UNREF(lb_call->owning_call_, "LbQueuedCallCanceller");
|
2950
|
+
delete self;
|
2951
|
+
}
|
2952
|
+
|
2953
|
+
RefCountedPtr<LoadBalancedCall> lb_call_;
|
2954
|
+
grpc_closure closure_;
|
2955
|
+
};
|
2956
|
+
|
2957
|
+
void ClientChannel::LoadBalancedCall::MaybeRemoveCallFromLbQueuedCallsLocked() {
|
2958
|
+
if (!queued_pending_lb_pick_) return;
|
2959
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
2960
|
+
gpr_log(GPR_INFO, "chand=%p lb_call=%p: removing from queued picks list",
|
2961
|
+
chand_, this);
|
2962
|
+
}
|
2963
|
+
chand_->RemoveLbQueuedCall(&queued_call_, pollent_);
|
2964
|
+
queued_pending_lb_pick_ = false;
|
2965
|
+
// Lame the call combiner canceller.
|
2966
|
+
lb_call_canceller_ = nullptr;
|
2967
|
+
}
|
2968
|
+
|
2969
|
+
void ClientChannel::LoadBalancedCall::MaybeAddCallToLbQueuedCallsLocked() {
|
2970
|
+
if (queued_pending_lb_pick_) return;
|
2971
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
2972
|
+
gpr_log(GPR_INFO, "chand=%p lb_call=%p: adding to queued picks list",
|
2973
|
+
chand_, this);
|
2974
|
+
}
|
2975
|
+
queued_pending_lb_pick_ = true;
|
2976
|
+
queued_call_.lb_call = this;
|
2977
|
+
chand_->AddLbQueuedCall(&queued_call_, pollent_);
|
2978
|
+
// Register call combiner cancellation callback.
|
2979
|
+
lb_call_canceller_ = new LbQueuedCallCanceller(Ref());
|
2980
|
+
}
|
2981
|
+
|
2982
|
+
void ClientChannel::LoadBalancedCall::AsyncPickDone(grpc_error_handle error) {
|
2983
|
+
// TODO(roth): Does this callback need to hold a ref to LoadBalancedCall?
|
2984
|
+
GRPC_CLOSURE_INIT(&pick_closure_, PickDone, this, grpc_schedule_on_exec_ctx);
|
2985
|
+
ExecCtx::Run(DEBUG_LOCATION, &pick_closure_, error);
|
2986
|
+
}
|
2987
|
+
|
2988
|
+
void ClientChannel::LoadBalancedCall::PickDone(void* arg,
|
2989
|
+
grpc_error_handle error) {
|
2990
|
+
auto* self = static_cast<LoadBalancedCall*>(arg);
|
2991
|
+
if (error != GRPC_ERROR_NONE) {
|
2992
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
2993
|
+
gpr_log(GPR_INFO,
|
2994
|
+
"chand=%p lb_call=%p: failed to pick subchannel: error=%s",
|
2995
|
+
self->chand_, self, grpc_error_std_string(error).c_str());
|
2996
|
+
}
|
2997
|
+
self->PendingBatchesFail(GRPC_ERROR_REF(error), YieldCallCombiner);
|
2998
|
+
return;
|
2999
|
+
}
|
3000
|
+
self->call_dispatch_controller_->Commit();
|
3001
|
+
self->CreateSubchannelCall();
|
3002
|
+
}
|
3003
|
+
|
3004
|
+
void ClientChannel::LoadBalancedCall::PickSubchannel(void* arg,
|
3005
|
+
grpc_error_handle error) {
|
3006
|
+
auto* self = static_cast<LoadBalancedCall*>(arg);
|
3007
|
+
bool pick_complete;
|
3008
|
+
{
|
3009
|
+
MutexLock lock(&self->chand_->data_plane_mu_);
|
3010
|
+
pick_complete = self->PickSubchannelLocked(&error);
|
3011
|
+
}
|
3012
|
+
if (pick_complete) {
|
3013
|
+
PickDone(self, error);
|
3014
|
+
GRPC_ERROR_UNREF(error);
|
3015
|
+
}
|
3016
|
+
}
|
3017
|
+
|
3018
|
+
bool ClientChannel::LoadBalancedCall::PickSubchannelLocked(
|
3019
|
+
grpc_error_handle* error) {
|
3020
|
+
GPR_ASSERT(connected_subchannel_ == nullptr);
|
3021
|
+
GPR_ASSERT(subchannel_call_ == nullptr);
|
3022
|
+
// Grab initial metadata.
|
3023
|
+
auto& send_initial_metadata =
|
3024
|
+
pending_batches_[0]->payload->send_initial_metadata;
|
3025
|
+
grpc_metadata_batch* initial_metadata_batch =
|
3026
|
+
send_initial_metadata.send_initial_metadata;
|
3027
|
+
const uint32_t send_initial_metadata_flags =
|
3028
|
+
send_initial_metadata.send_initial_metadata_flags;
|
3029
|
+
// Perform LB pick.
|
3030
|
+
LoadBalancingPolicy::PickArgs pick_args;
|
3031
|
+
pick_args.path = StringViewFromSlice(path_);
|
3032
|
+
LbCallState lb_call_state(this);
|
3033
|
+
pick_args.call_state = &lb_call_state;
|
3034
|
+
Metadata initial_metadata(this, initial_metadata_batch);
|
3035
|
+
pick_args.initial_metadata = &initial_metadata;
|
3036
|
+
auto result = chand_->picker_->Pick(pick_args);
|
3037
|
+
return HandlePickResult<bool>(
|
3038
|
+
&result,
|
3039
|
+
// CompletePick
|
3040
|
+
[this](LoadBalancingPolicy::PickResult::Complete* complete_pick)
|
3041
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ClientChannel::data_plane_mu_) {
|
3042
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
3043
|
+
gpr_log(GPR_INFO,
|
3044
|
+
"chand=%p lb_call=%p: LB pick succeeded: subchannel=%p",
|
3045
|
+
chand_, this, complete_pick->subchannel.get());
|
3046
|
+
}
|
3047
|
+
GPR_ASSERT(complete_pick->subchannel != nullptr);
|
3048
|
+
// Grab a ref to the connected subchannel while we're still
|
3049
|
+
// holding the data plane mutex.
|
3050
|
+
SubchannelWrapper* subchannel = static_cast<SubchannelWrapper*>(
|
3051
|
+
complete_pick->subchannel.get());
|
3052
|
+
connected_subchannel_ = subchannel->connected_subchannel();
|
3053
|
+
// If the subchannel has no connected subchannel (e.g., if the
|
3054
|
+
// subchannel has moved out of state READY but the LB policy hasn't
|
3055
|
+
// yet seen that change and given us a new picker), then just
|
3056
|
+
// queue the pick. We'll try again as soon as we get a new picker.
|
3057
|
+
// TODO(roth): In this case, we need to invoke the LB
|
3058
|
+
// policy's recv_trailing_metadata_ready callback to tell it
|
3059
|
+
// that the pick has been abandoned.
|
3060
|
+
if (connected_subchannel_ == nullptr) {
|
3061
|
+
MaybeAddCallToLbQueuedCallsLocked();
|
3062
|
+
return false;
|
3063
|
+
}
|
3064
|
+
lb_recv_trailing_metadata_ready_ =
|
3065
|
+
std::move(complete_pick->recv_trailing_metadata_ready);
|
3066
|
+
MaybeRemoveCallFromLbQueuedCallsLocked();
|
3067
|
+
return true;
|
3068
|
+
},
|
3069
|
+
// QueuePick
|
3070
|
+
[this](LoadBalancingPolicy::PickResult::Queue* /*queue_pick*/)
|
3071
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ClientChannel::data_plane_mu_) {
|
3072
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
3073
|
+
gpr_log(GPR_INFO, "chand=%p lb_call=%p: LB pick queued", chand_,
|
3074
|
+
this);
|
3075
|
+
}
|
3076
|
+
MaybeAddCallToLbQueuedCallsLocked();
|
3077
|
+
return false;
|
3078
|
+
},
|
3079
|
+
// FailPick
|
3080
|
+
[this, send_initial_metadata_flags,
|
3081
|
+
&error](LoadBalancingPolicy::PickResult::Fail* fail_pick)
|
3082
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ClientChannel::data_plane_mu_) {
|
3083
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
3084
|
+
gpr_log(GPR_INFO, "chand=%p lb_call=%p: LB pick failed: %s",
|
3085
|
+
chand_, this, fail_pick->status.ToString().c_str());
|
3086
|
+
}
|
3087
|
+
// If wait_for_ready is false, then the error indicates the RPC
|
3088
|
+
// attempt's final status.
|
3089
|
+
if ((send_initial_metadata_flags &
|
3090
|
+
GRPC_INITIAL_METADATA_WAIT_FOR_READY) == 0) {
|
3091
|
+
grpc_error_handle lb_error =
|
3092
|
+
absl_status_to_grpc_error(fail_pick->status);
|
3093
|
+
*error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
|
3094
|
+
"Failed to pick subchannel", &lb_error, 1);
|
3095
|
+
GRPC_ERROR_UNREF(lb_error);
|
3096
|
+
MaybeRemoveCallFromLbQueuedCallsLocked();
|
3097
|
+
return true;
|
3098
|
+
}
|
3099
|
+
// If wait_for_ready is true, then queue to retry when we get a new
|
3100
|
+
// picker.
|
3101
|
+
MaybeAddCallToLbQueuedCallsLocked();
|
3102
|
+
return false;
|
3103
|
+
},
|
3104
|
+
// DropPick
|
3105
|
+
[this, &error](LoadBalancingPolicy::PickResult::Drop* drop_pick)
|
3106
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ClientChannel::data_plane_mu_) {
|
3107
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
3108
|
+
gpr_log(GPR_INFO, "chand=%p lb_call=%p: LB pick dropped: %s",
|
3109
|
+
chand_, this, drop_pick->status.ToString().c_str());
|
3110
|
+
}
|
3111
|
+
*error =
|
3112
|
+
grpc_error_set_int(absl_status_to_grpc_error(drop_pick->status),
|
3113
|
+
GRPC_ERROR_INT_LB_POLICY_DROP, 1);
|
3114
|
+
MaybeRemoveCallFromLbQueuedCallsLocked();
|
3115
|
+
return true;
|
3116
|
+
});
|
3117
|
+
}
|
3118
|
+
|
3119
|
+
} // namespace grpc_core
|