grpc 1.30.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/.yardopts +1 -0
- data/Makefile +20074 -0
- data/etc/roots.pem +4644 -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/fork.h +26 -0
- data/include/grpc/grpc.h +540 -0
- data/include/grpc/grpc_cronet.h +38 -0
- data/include/grpc/grpc_posix.h +59 -0
- data/include/grpc/grpc_security.h +1019 -0
- data/include/grpc/grpc_security_constants.h +146 -0
- data/include/grpc/impl/codegen/atm.h +95 -0
- data/include/grpc/impl/codegen/atm_gcc_atomic.h +91 -0
- data/include/grpc/impl/codegen/atm_gcc_sync.h +85 -0
- data/include/grpc/impl/codegen/atm_windows.h +128 -0
- data/include/grpc/impl/codegen/byte_buffer.h +101 -0
- data/include/grpc/impl/codegen/byte_buffer_reader.h +42 -0
- data/include/grpc/impl/codegen/compression_types.h +108 -0
- data/include/grpc/impl/codegen/connectivity_state.h +44 -0
- data/include/grpc/impl/codegen/fork.h +48 -0
- data/include/grpc/impl/codegen/gpr_slice.h +69 -0
- data/include/grpc/impl/codegen/gpr_types.h +59 -0
- data/include/grpc/impl/codegen/grpc_types.h +785 -0
- data/include/grpc/impl/codegen/log.h +112 -0
- data/include/grpc/impl/codegen/port_platform.h +720 -0
- data/include/grpc/impl/codegen/propagation_bits.h +52 -0
- data/include/grpc/impl/codegen/slice.h +127 -0
- data/include/grpc/impl/codegen/status.h +154 -0
- data/include/grpc/impl/codegen/sync.h +65 -0
- data/include/grpc/impl/codegen/sync_abseil.h +36 -0
- data/include/grpc/impl/codegen/sync_custom.h +38 -0
- data/include/grpc/impl/codegen/sync_generic.h +48 -0
- data/include/grpc/impl/codegen/sync_posix.h +52 -0
- data/include/grpc/impl/codegen/sync_windows.h +36 -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 +38 -0
- data/src/core/ext/filters/client_channel/backend_metric.cc +81 -0
- data/src/core/ext/filters/client_channel/backend_metric.h +36 -0
- data/src/core/ext/filters/client_channel/backup_poller.cc +181 -0
- data/src/core/ext/filters/client_channel/backup_poller.h +41 -0
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +264 -0
- data/src/core/ext/filters/client_channel/client_channel.cc +4059 -0
- data/src/core/ext/filters/client_channel/client_channel.h +82 -0
- data/src/core/ext/filters/client_channel/client_channel_channelz.cc +95 -0
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +78 -0
- data/src/core/ext/filters/client_channel/client_channel_factory.cc +55 -0
- data/src/core/ext/filters/client_channel/client_channel_factory.h +47 -0
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +70 -0
- data/src/core/ext/filters/client_channel/connector.h +79 -0
- data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +179 -0
- data/src/core/ext/filters/client_channel/global_subchannel_pool.h +68 -0
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +606 -0
- data/src/core/ext/filters/client_channel/health/health_check_client.h +175 -0
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +389 -0
- data/src/core/ext/filters/client_channel/http_connect_handshaker.h +34 -0
- data/src/core/ext/filters/client_channel/http_proxy.cc +216 -0
- data/src/core/ext/filters/client_channel/http_proxy.h +28 -0
- data/src/core/ext/filters/client_channel/lb_policy.cc +138 -0
- data/src/core/ext/filters/client_channel/lb_policy.h +421 -0
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.cc +83 -0
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +99 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +297 -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 +157 -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 +1754 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +43 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc +89 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +40 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +45 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +121 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +91 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +75 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +193 -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 +509 -0
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +871 -0
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +504 -0
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +448 -0
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +734 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +417 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/eds.cc +938 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/lrs.cc +528 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.h +32 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc +834 -0
- data/src/core/ext/filters/client_channel/lb_policy_factory.h +47 -0
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +182 -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 +96 -0
- data/src/core/ext/filters/client_channel/local_subchannel_pool.h +57 -0
- data/src/core/ext/filters/client_channel/parse_address.cc +238 -0
- data/src/core/ext/filters/client_channel/parse_address.h +53 -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.cc +85 -0
- data/src/core/ext/filters/client_channel/resolver.h +144 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +535 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +484 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +104 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +177 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +107 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +897 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +819 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +97 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +68 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc +38 -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 +318 -0
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +383 -0
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +93 -0
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +188 -0
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +184 -0
- data/src/core/ext/filters/client_channel/resolver_factory.h +73 -0
- data/src/core/ext/filters/client_channel/resolver_registry.cc +197 -0
- data/src/core/ext/filters/client_channel/resolver_registry.h +89 -0
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +443 -0
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +127 -0
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +348 -0
- data/src/core/ext/filters/client_channel/resolving_lb_policy.h +123 -0
- data/src/core/ext/filters/client_channel/retry_throttle.cc +191 -0
- data/src/core/ext/filters/client_channel/retry_throttle.h +77 -0
- data/src/core/ext/filters/client_channel/server_address.cc +48 -0
- data/src/core/ext/filters/client_channel/server_address.h +90 -0
- data/src/core/ext/filters/client_channel/service_config.cc +221 -0
- data/src/core/ext/filters/client_channel/service_config.h +123 -0
- data/src/core/ext/filters/client_channel/service_config_call_data.h +68 -0
- data/src/core/ext/filters/client_channel/service_config_parser.cc +87 -0
- data/src/core/ext/filters/client_channel/service_config_parser.h +89 -0
- data/src/core/ext/filters/client_channel/subchannel.cc +1127 -0
- data/src/core/ext/filters/client_channel/subchannel.h +427 -0
- data/src/core/ext/filters/client_channel/subchannel_interface.h +94 -0
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.cc +97 -0
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +91 -0
- data/src/core/ext/filters/client_channel/xds/xds_api.cc +1906 -0
- data/src/core/ext/filters/client_channel/xds/xds_api.h +280 -0
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +342 -0
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +88 -0
- data/src/core/ext/filters/client_channel/xds/xds_channel.h +46 -0
- data/src/core/ext/filters/client_channel/xds/xds_channel_args.h +26 -0
- data/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc +106 -0
- data/src/core/ext/filters/client_channel/xds/xds_client.cc +2367 -0
- data/src/core/ext/filters/client_channel/xds/xds_client.h +309 -0
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +115 -0
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.h +211 -0
- data/src/core/ext/filters/client_idle/client_idle_filter.cc +440 -0
- data/src/core/ext/filters/deadline/deadline_filter.cc +386 -0
- data/src/core/ext/filters/deadline/deadline_filter.h +90 -0
- data/src/core/ext/filters/http/client/http_client_filter.cc +596 -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 +104 -0
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +546 -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 +358 -0
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.h +29 -0
- data/src/core/ext/filters/http/server/http_server_filter.cc +528 -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 +556 -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 +423 -0
- data/src/core/ext/filters/message_size/message_size_filter.h +59 -0
- data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc +210 -0
- data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h +27 -0
- data/src/core/ext/filters/workarounds/workaround_utils.cc +53 -0
- data/src/core/ext/filters/workarounds/workaround_utils.h +39 -0
- data/src/core/ext/transport/chttp2/alpn/alpn.cc +44 -0
- data/src/core/ext/transport/chttp2/alpn/alpn.h +36 -0
- data/src/core/ext/transport/chttp2/client/authority.cc +42 -0
- data/src/core/ext/transport/chttp2/client/authority.h +36 -0
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +206 -0
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +58 -0
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +112 -0
- data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +79 -0
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +225 -0
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +451 -0
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +33 -0
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +45 -0
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +75 -0
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +86 -0
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +250 -0
- data/src/core/ext/transport/chttp2/transport/bin_decoder.h +56 -0
- data/src/core/ext/transport/chttp2/transport/bin_encoder.cc +230 -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 +3346 -0
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +52 -0
- data/src/core/ext/transport/chttp2/transport/context_list.cc +69 -0
- data/src/core/ext/transport/chttp2/transport/context_list.h +53 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +408 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.h +474 -0
- data/src/core/ext/transport/chttp2/transport/frame.h +47 -0
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +307 -0
- data/src/core/ext/transport/chttp2/transport/frame_data.h +82 -0
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +187 -0
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +62 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +133 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +44 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +122 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +50 -0
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +242 -0
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +60 -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 +44 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +900 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +107 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +1761 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +117 -0
- data/src/core/ext/transport/chttp2/transport/hpack_table.cc +246 -0
- data/src/core/ext/transport/chttp2/transport/hpack_table.h +148 -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/incoming_metadata.cc +66 -0
- data/src/core/ext/transport/chttp2/transport/incoming_metadata.h +58 -0
- data/src/core/ext/transport/chttp2/transport/internal.h +864 -0
- data/src/core/ext/transport/chttp2/transport/parsing.cc +803 -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 +56 -0
- data/src/core/ext/transport/chttp2/transport/varint.h +60 -0
- data/src/core/ext/transport/chttp2/transport/writing.cc +706 -0
- data/src/core/ext/transport/inproc/inproc_plugin.cc +28 -0
- data/src/core/ext/transport/inproc/inproc_transport.cc +1296 -0
- data/src/core/ext/transport/inproc/inproc_transport.h +35 -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 +54 -0
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +21 -0
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +35 -0
- data/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c +114 -0
- data/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h +418 -0
- data/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c +72 -0
- data/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h +197 -0
- data/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c +105 -0
- data/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h +378 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +28 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +53 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +403 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +1447 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +74 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +218 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h +69 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +55 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +305 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +112 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +328 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h +78 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +313 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +897 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +96 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +322 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h +72 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +197 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +642 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +172 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +673 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +36 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h +80 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +152 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +518 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h +89 -0
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +129 -0
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h +392 -0
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +31 -0
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +53 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c +92 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h +240 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +18 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +33 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c +91 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +266 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +112 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h +324 -0
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.c +31 -0
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h +53 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c +109 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +399 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c +18 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h +33 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +145 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +527 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c +43 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +112 -0
- data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.c +30 -0
- data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h +53 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.h +199 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c +18 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h +33 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +815 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +3032 -0
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c +59 -0
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +134 -0
- data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.c +28 -0
- data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h +53 -0
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +228 -0
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +725 -0
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c +316 -0
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +1132 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c +33 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +65 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c +51 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h +125 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c +24 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h +50 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c +54 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h +134 -0
- data/src/core/ext/upb-generated/envoy/type/http.upb.c +17 -0
- data/src/core/ext/upb-generated/envoy/type/http.upb.h +36 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +144 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +133 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +258 -0
- data/src/core/ext/upb-generated/envoy/type/percent.upb.c +39 -0
- data/src/core/ext/upb-generated/envoy/type/percent.upb.h +87 -0
- data/src/core/ext/upb-generated/envoy/type/range.upb.c +50 -0
- data/src/core/ext/upb-generated/envoy/type/range.upb.h +112 -0
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.c +29 -0
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c +89 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +249 -0
- data/src/core/ext/upb-generated/gogoproto/gogo.upb.c +17 -0
- data/src/core/ext/upb-generated/gogoproto/gogo.upb.h +30 -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/http.upb.c +66 -0
- data/src/core/ext/upb-generated/google/api/http.upb.h +190 -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 +58 -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 +1696 -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 +58 -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 +50 -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 +215 -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 +58 -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 +238 -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 +74 -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 +126 -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 +693 -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 +109 -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 +84 -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 +393 -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 +104 -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 +65 -0
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c +58 -0
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h +144 -0
- data/src/core/ext/upb-generated/validate/validate.upb.c +448 -0
- data/src/core/ext/upb-generated/validate/validate.upb.h +2073 -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/channel_args.cc +380 -0
- data/src/core/lib/channel/channel_args.h +135 -0
- data/src/core/lib/channel/channel_stack.cc +252 -0
- data/src/core/lib/channel/channel_stack.h +304 -0
- data/src/core/lib/channel/channel_stack_builder.cc +323 -0
- data/src/core/lib/channel/channel_stack_builder.h +166 -0
- data/src/core/lib/channel/channel_trace.cc +194 -0
- data/src/core/lib/channel/channel_trace.h +134 -0
- data/src/core/lib/channel/channelz.cc +543 -0
- data/src/core/lib/channel/channelz.h +334 -0
- data/src/core/lib/channel/channelz_registry.cc +267 -0
- data/src/core/lib/channel/channelz_registry.h +97 -0
- data/src/core/lib/channel/connected_channel.cc +246 -0
- data/src/core/lib/channel/connected_channel.h +34 -0
- data/src/core/lib/channel/context.h +49 -0
- data/src/core/lib/channel/handshaker.cc +262 -0
- data/src/core/lib/channel/handshaker.h +179 -0
- data/src/core/lib/channel/handshaker_factory.h +42 -0
- data/src/core/lib/channel/handshaker_registry.cc +105 -0
- data/src/core/lib/channel/handshaker_registry.h +54 -0
- data/src/core/lib/channel/status_util.cc +99 -0
- data/src/core/lib/channel/status_util.h +58 -0
- data/src/core/lib/compression/algorithm_metadata.h +61 -0
- data/src/core/lib/compression/compression.cc +179 -0
- data/src/core/lib/compression/compression_args.cc +134 -0
- data/src/core/lib/compression/compression_args.h +56 -0
- data/src/core/lib/compression/compression_internal.cc +280 -0
- data/src/core/lib/compression/compression_internal.h +96 -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 +80 -0
- data/src/core/lib/compression/stream_compression.h +116 -0
- data/src/core/lib/compression/stream_compression_gzip.cc +230 -0
- data/src/core/lib/compression/stream_compression_gzip.h +28 -0
- data/src/core/lib/compression/stream_compression_identity.cc +92 -0
- data/src/core/lib/compression/stream_compression_identity.h +29 -0
- data/src/core/lib/debug/stats.cc +172 -0
- data/src/core/lib/debug/stats.h +70 -0
- data/src/core/lib/debug/stats_data.cc +687 -0
- data/src/core/lib/debug/stats_data.h +555 -0
- data/src/core/lib/debug/trace.cc +154 -0
- data/src/core/lib/debug/trace.h +131 -0
- data/src/core/lib/gpr/alloc.cc +74 -0
- data/src/core/lib/gpr/alloc.h +28 -0
- data/src/core/lib/gpr/arena.h +47 -0
- data/src/core/lib/gpr/atm.cc +35 -0
- data/src/core/lib/gpr/cpu_iphone.cc +36 -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 +76 -0
- data/src/core/lib/gpr/env_posix.cc +47 -0
- data/src/core/lib/gpr/env_windows.cc +74 -0
- data/src/core/lib/gpr/log.cc +98 -0
- data/src/core/lib/gpr/log_android.cc +76 -0
- data/src/core/lib/gpr/log_linux.cc +97 -0
- data/src/core/lib/gpr/log_posix.cc +95 -0
- data/src/core/lib/gpr/log_windows.cc +102 -0
- data/src/core/lib/gpr/murmur_hash.cc +80 -0
- data/src/core/lib/gpr/murmur_hash.h +29 -0
- data/src/core/lib/gpr/spinlock.h +45 -0
- data/src/core/lib/gpr/string.cc +341 -0
- data/src/core/lib/gpr/string.h +111 -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 +116 -0
- data/src/core/lib/gpr/sync_posix.cc +176 -0
- data/src/core/lib/gpr/sync_windows.cc +120 -0
- data/src/core/lib/gpr/time.cc +263 -0
- data/src/core/lib/gpr/time_posix.cc +186 -0
- data/src/core/lib/gpr/time_precise.cc +165 -0
- data/src/core/lib/gpr/time_precise.h +66 -0
- data/src/core/lib/gpr/time_windows.cc +98 -0
- data/src/core/lib/gpr/tls.h +68 -0
- data/src/core/lib/gpr/tls_gcc.h +52 -0
- data/src/core/lib/gpr/tls_msvc.h +52 -0
- data/src/core/lib/gpr/tls_pthread.cc +30 -0
- data/src/core/lib/gpr/tls_pthread.h +56 -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 +70 -0
- data/src/core/lib/gpr/tmpfile_windows.cc +69 -0
- data/src/core/lib/gpr/useful.h +65 -0
- data/src/core/lib/gpr/wrap_memcpy.cc +42 -0
- data/src/core/lib/gprpp/arena.cc +103 -0
- data/src/core/lib/gprpp/arena.h +120 -0
- data/src/core/lib/gprpp/atomic.h +104 -0
- data/src/core/lib/gprpp/debug_location.h +53 -0
- data/src/core/lib/gprpp/fork.cc +242 -0
- data/src/core/lib/gprpp/fork.h +103 -0
- data/src/core/lib/gprpp/global_config.h +96 -0
- data/src/core/lib/gprpp/global_config_custom.h +29 -0
- data/src/core/lib/gprpp/global_config_env.cc +135 -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 +213 -0
- data/src/core/lib/gprpp/map.h +53 -0
- data/src/core/lib/gprpp/memory.h +51 -0
- data/src/core/lib/gprpp/mpscq.cc +108 -0
- data/src/core/lib/gprpp/mpscq.h +98 -0
- data/src/core/lib/gprpp/orphanable.h +129 -0
- data/src/core/lib/gprpp/ref_counted.h +312 -0
- data/src/core/lib/gprpp/ref_counted_ptr.h +192 -0
- data/src/core/lib/gprpp/sync.h +135 -0
- data/src/core/lib/gprpp/thd.h +174 -0
- data/src/core/lib/gprpp/thd_posix.cc +204 -0
- data/src/core/lib/gprpp/thd_windows.cc +176 -0
- data/src/core/lib/http/format_request.cc +103 -0
- data/src/core/lib/http/format_request.h +34 -0
- data/src/core/lib/http/httpcli.cc +303 -0
- data/src/core/lib/http/httpcli.h +126 -0
- data/src/core/lib/http/httpcli_security_connector.cc +214 -0
- data/src/core/lib/http/parser.cc +372 -0
- data/src/core/lib/http/parser.h +113 -0
- data/src/core/lib/iomgr/block_annotate.h +57 -0
- data/src/core/lib/iomgr/buffer_list.cc +308 -0
- data/src/core/lib/iomgr/buffer_list.h +165 -0
- data/src/core/lib/iomgr/call_combiner.cc +256 -0
- data/src/core/lib/iomgr/call_combiner.h +217 -0
- data/src/core/lib/iomgr/cfstream_handle.cc +209 -0
- data/src/core/lib/iomgr/cfstream_handle.h +90 -0
- data/src/core/lib/iomgr/closure.h +255 -0
- data/src/core/lib/iomgr/combiner.cc +339 -0
- data/src/core/lib/iomgr/combiner.h +88 -0
- data/src/core/lib/iomgr/dualstack_socket_posix.cc +47 -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 +106 -0
- data/src/core/lib/iomgr/endpoint_cfstream.cc +376 -0
- data/src/core/lib/iomgr/endpoint_cfstream.h +49 -0
- data/src/core/lib/iomgr/endpoint_pair.h +33 -0
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +73 -0
- data/src/core/lib/iomgr/endpoint_pair_uv.cc +40 -0
- data/src/core/lib/iomgr/endpoint_pair_windows.cc +87 -0
- data/src/core/lib/iomgr/error.cc +812 -0
- data/src/core/lib/iomgr/error.h +276 -0
- data/src/core/lib/iomgr/error_cfstream.cc +52 -0
- data/src/core/lib/iomgr/error_cfstream.h +31 -0
- data/src/core/lib/iomgr/error_internal.h +61 -0
- data/src/core/lib/iomgr/ev_apple.cc +356 -0
- data/src/core/lib/iomgr/ev_apple.h +43 -0
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +1365 -0
- data/src/core/lib/iomgr/ev_epoll1_linux.h +31 -0
- data/src/core/lib/iomgr/ev_epollex_linux.cc +1656 -0
- data/src/core/lib/iomgr/ev_epollex_linux.h +30 -0
- data/src/core/lib/iomgr/ev_poll_posix.cc +1427 -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/exec_ctx.cc +224 -0
- data/src/core/lib/iomgr/exec_ctx.h +380 -0
- data/src/core/lib/iomgr/executor.cc +469 -0
- data/src/core/lib/iomgr/executor.h +122 -0
- data/src/core/lib/iomgr/executor/mpmcqueue.cc +183 -0
- data/src/core/lib/iomgr/executor/mpmcqueue.h +175 -0
- data/src/core/lib/iomgr/executor/threadpool.cc +137 -0
- data/src/core/lib/iomgr/executor/threadpool.h +149 -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 +67 -0
- data/src/core/lib/iomgr/internal_errqueue.h +191 -0
- data/src/core/lib/iomgr/iocp_windows.cc +157 -0
- data/src/core/lib/iomgr/iocp_windows.h +48 -0
- data/src/core/lib/iomgr/iomgr.cc +194 -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 +57 -0
- data/src/core/lib/iomgr/iomgr_internal.h +73 -0
- data/src/core/lib/iomgr/iomgr_posix.cc +89 -0
- data/src/core/lib/iomgr/iomgr_posix.h +26 -0
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +171 -0
- data/src/core/lib/iomgr/iomgr_uv.cc +43 -0
- data/src/core/lib/iomgr/iomgr_windows.cc +106 -0
- data/src/core/lib/iomgr/is_epollexclusive_available.cc +105 -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 +255 -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/poller/eventmanager_libuv.cc +87 -0
- data/src/core/lib/iomgr/poller/eventmanager_libuv.h +88 -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 +106 -0
- data/src/core/lib/iomgr/pollset_custom.h +35 -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 +48 -0
- data/src/core/lib/iomgr/pollset_set_custom.h +26 -0
- data/src/core/lib/iomgr/pollset_set_windows.cc +51 -0
- data/src/core/lib/iomgr/pollset_set_windows.h +26 -0
- data/src/core/lib/iomgr/pollset_uv.cc +93 -0
- data/src/core/lib/iomgr/pollset_uv.h +32 -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 +244 -0
- data/src/core/lib/iomgr/python_util.h +46 -0
- data/src/core/lib/iomgr/resolve_address.cc +50 -0
- data/src/core/lib/iomgr/resolve_address.h +81 -0
- data/src/core/lib/iomgr/resolve_address_custom.cc +173 -0
- data/src/core/lib/iomgr/resolve_address_custom.h +45 -0
- data/src/core/lib/iomgr/resolve_address_posix.cc +178 -0
- data/src/core/lib/iomgr/resolve_address_windows.cc +154 -0
- data/src/core/lib/iomgr/resource_quota.cc +1013 -0
- data/src/core/lib/iomgr/resource_quota.h +177 -0
- data/src/core/lib/iomgr/sockaddr.h +32 -0
- data/src/core/lib/iomgr/sockaddr_custom.h +54 -0
- data/src/core/lib/iomgr/sockaddr_posix.h +55 -0
- data/src/core/lib/iomgr/sockaddr_utils.cc +293 -0
- data/src/core/lib/iomgr/sockaddr_utils.h +79 -0
- data/src/core/lib/iomgr/sockaddr_windows.h +55 -0
- data/src/core/lib/iomgr/socket_factory_posix.cc +94 -0
- data/src/core/lib/iomgr/socket_factory_posix.h +68 -0
- data/src/core/lib/iomgr/socket_mutator.cc +83 -0
- data/src/core/lib/iomgr/socket_mutator.h +60 -0
- data/src/core/lib/iomgr/socket_utils.h +47 -0
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +473 -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_uv.cc +49 -0
- data/src/core/lib/iomgr/socket_utils_windows.cc +47 -0
- data/src/core/lib/iomgr/socket_windows.cc +203 -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 +36 -0
- data/src/core/lib/iomgr/tcp_client.h +52 -0
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +215 -0
- data/src/core/lib/iomgr/tcp_client_custom.cc +163 -0
- data/src/core/lib/iomgr/tcp_client_posix.cc +360 -0
- data/src/core/lib/iomgr/tcp_client_posix.h +68 -0
- data/src/core/lib/iomgr/tcp_client_windows.cc +232 -0
- data/src/core/lib/iomgr/tcp_custom.cc +370 -0
- data/src/core/lib/iomgr/tcp_custom.h +84 -0
- data/src/core/lib/iomgr/tcp_posix.cc +1855 -0
- data/src/core/lib/iomgr/tcp_posix.h +60 -0
- data/src/core/lib/iomgr/tcp_server.cc +78 -0
- data/src/core/lib/iomgr/tcp_server.h +143 -0
- data/src/core/lib/iomgr/tcp_server_custom.cc +485 -0
- data/src/core/lib/iomgr/tcp_server_posix.cc +638 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +125 -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 +181 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc +36 -0
- data/src/core/lib/iomgr/tcp_server_windows.cc +564 -0
- data/src/core/lib/iomgr/tcp_uv.cc +419 -0
- data/src/core/lib/iomgr/tcp_windows.cc +533 -0
- data/src/core/lib/iomgr/tcp_windows.h +53 -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 +45 -0
- data/src/core/lib/iomgr/timer.h +127 -0
- data/src/core/lib/iomgr/timer_custom.cc +95 -0
- data/src/core/lib/iomgr/timer_custom.h +43 -0
- data/src/core/lib/iomgr/timer_generic.cc +747 -0
- data/src/core/lib/iomgr/timer_generic.h +39 -0
- data/src/core/lib/iomgr/timer_heap.cc +135 -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/timer_uv.cc +66 -0
- data/src/core/lib/iomgr/udp_server.cc +747 -0
- data/src/core/lib/iomgr/udp_server.h +101 -0
- data/src/core/lib/iomgr/unix_sockets_posix.cc +104 -0
- data/src/core/lib/iomgr/unix_sockets_posix.h +43 -0
- data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +49 -0
- data/src/core/lib/iomgr/wakeup_fd_eventfd.cc +82 -0
- data/src/core/lib/iomgr/wakeup_fd_nospecial.cc +38 -0
- data/src/core/lib/iomgr/wakeup_fd_pipe.cc +100 -0
- data/src/core/lib/iomgr/wakeup_fd_pipe.h +28 -0
- data/src/core/lib/iomgr/wakeup_fd_posix.cc +69 -0
- data/src/core/lib/iomgr/wakeup_fd_posix.h +96 -0
- data/src/core/lib/iomgr/work_serializer.cc +155 -0
- data/src/core/lib/iomgr/work_serializer.h +65 -0
- data/src/core/lib/json/json.h +240 -0
- data/src/core/lib/json/json_reader.cc +855 -0
- data/src/core/lib/json/json_writer.cc +337 -0
- data/src/core/lib/profiling/basic_timers.cc +293 -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/context/security_context.cc +321 -0
- data/src/core/lib/security/context/security_context.h +150 -0
- data/src/core/lib/security/credentials/alts/alts_credentials.cc +110 -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 +229 -0
- data/src/core/lib/security/credentials/composite/composite_credentials.h +106 -0
- data/src/core/lib/security/credentials/credentials.cc +162 -0
- data/src/core/lib/security/credentials/credentials.h +283 -0
- data/src/core/lib/security/credentials/credentials_metadata.cc +62 -0
- data/src/core/lib/security/credentials/fake/fake_credentials.cc +112 -0
- data/src/core/lib/security/credentials/fake/fake_credentials.h +87 -0
- data/src/core/lib/security/credentials/google_default/credentials_generic.cc +41 -0
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +383 -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 +80 -0
- data/src/core/lib/security/credentials/iam/iam_credentials.h +49 -0
- data/src/core/lib/security/credentials/jwt/json_token.cc +288 -0
- data/src/core/lib/security/credentials/jwt/json_token.h +75 -0
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +172 -0
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +80 -0
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +925 -0
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +122 -0
- data/src/core/lib/security/credentials/local/local_credentials.cc +64 -0
- data/src/core/lib/security/credentials/local/local_credentials.h +61 -0
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +771 -0
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +171 -0
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +269 -0
- data/src/core/lib/security/credentials/plugin/plugin_credentials.h +72 -0
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +364 -0
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +99 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +245 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +313 -0
- data/src/core/lib/security/credentials/tls/tls_credentials.cc +128 -0
- data/src/core/lib/security/credentials/tls/tls_credentials.h +62 -0
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +301 -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 +324 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.h +45 -0
- data/src/core/lib/security/security_connector/load_system_roots.h +29 -0
- data/src/core/lib/security/security_connector/load_system_roots_fallback.cc +32 -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 +44 -0
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +281 -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 +129 -0
- data/src/core/lib/security/security_connector/security_connector.h +176 -0
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +439 -0
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +77 -0
- data/src/core/lib/security/security_connector/ssl_utils.cc +563 -0
- data/src/core/lib/security/security_connector/ssl_utils.h +184 -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 +603 -0
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +183 -0
- data/src/core/lib/security/transport/auth_filters.h +35 -0
- data/src/core/lib/security/transport/client_auth_filter.cc +466 -0
- data/src/core/lib/security/transport/secure_endpoint.cc +446 -0
- data/src/core/lib/security/transport/secure_endpoint.h +41 -0
- data/src/core/lib/security/transport/security_handshaker.cc +574 -0
- data/src/core/lib/security/transport/security_handshaker.h +45 -0
- data/src/core/lib/security/transport/server_auth_filter.cc +326 -0
- data/src/core/lib/security/transport/target_authority_table.cc +75 -0
- data/src/core/lib/security/transport/target_authority_table.h +40 -0
- data/src/core/lib/security/transport/tsi_error.cc +29 -0
- data/src/core/lib/security/transport/tsi_error.h +29 -0
- data/src/core/lib/security/util/json_util.cc +73 -0
- data/src/core/lib/security/util/json_util.h +44 -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 +169 -0
- data/src/core/lib/slice/percent_encoding.h +65 -0
- data/src/core/lib/slice/slice.cc +559 -0
- data/src/core/lib/slice/slice_buffer.cc +413 -0
- data/src/core/lib/slice/slice_hash_table.h +199 -0
- data/src/core/lib/slice/slice_intern.cc +375 -0
- data/src/core/lib/slice/slice_internal.h +364 -0
- data/src/core/lib/slice/slice_string_helpers.cc +127 -0
- data/src/core/lib/slice/slice_string_helpers.h +49 -0
- data/src/core/lib/slice/slice_utils.h +200 -0
- data/src/core/lib/slice/slice_weak_hash_table.h +102 -0
- data/src/core/lib/surface/api_trace.cc +24 -0
- data/src/core/lib/surface/api_trace.h +52 -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 +2044 -0
- data/src/core/lib/surface/call.h +125 -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 +543 -0
- data/src/core/lib/surface/channel.h +158 -0
- data/src/core/lib/surface/channel_init.cc +109 -0
- data/src/core/lib/surface/channel_init.h +78 -0
- data/src/core/lib/surface/channel_ping.cc +64 -0
- data/src/core/lib/surface/channel_stack_type.cc +58 -0
- data/src/core/lib/surface/channel_stack_type.h +47 -0
- data/src/core/lib/surface/completion_queue.cc +1438 -0
- data/src/core/lib/surface/completion_queue.h +97 -0
- data/src/core/lib/surface/completion_queue_factory.cc +88 -0
- data/src/core/lib/surface/completion_queue_factory.h +38 -0
- data/src/core/lib/surface/event_string.cc +61 -0
- data/src/core/lib/surface/event_string.h +31 -0
- data/src/core/lib/surface/init.cc +250 -0
- data/src/core/lib/surface/init.h +27 -0
- data/src/core/lib/surface/init_secure.cc +81 -0
- data/src/core/lib/surface/lame_client.cc +191 -0
- data/src/core/lib/surface/lame_client.h +28 -0
- data/src/core/lib/surface/metadata_array.cc +36 -0
- data/src/core/lib/surface/server.cc +1800 -0
- data/src/core/lib/surface/server.h +99 -0
- data/src/core/lib/surface/validate_metadata.cc +105 -0
- data/src/core/lib/surface/validate_metadata.h +41 -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 +94 -0
- data/src/core/lib/transport/byte_stream.cc +158 -0
- data/src/core/lib/transport/byte_stream.h +165 -0
- data/src/core/lib/transport/connectivity_state.cc +180 -0
- data/src/core/lib/transport/connectivity_state.h +131 -0
- data/src/core/lib/transport/error_utils.cc +141 -0
- data/src/core/lib/transport/error_utils.h +46 -0
- data/src/core/lib/transport/http2_errors.h +41 -0
- data/src/core/lib/transport/metadata.cc +679 -0
- data/src/core/lib/transport/metadata.h +446 -0
- data/src/core/lib/transport/metadata_batch.cc +392 -0
- data/src/core/lib/transport/metadata_batch.h +191 -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 +1230 -0
- data/src/core/lib/transport/static_metadata.h +597 -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 +61 -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 +259 -0
- data/src/core/lib/transport/transport.h +456 -0
- data/src/core/lib/transport/transport_impl.h +71 -0
- data/src/core/lib/transport/transport_op_string.cc +169 -0
- data/src/core/lib/uri/uri_parser.cc +314 -0
- data/src/core/lib/uri/uri_parser.h +49 -0
- data/src/core/plugin_registry/grpc_plugin_registry.cc +121 -0
- data/src/core/tsi/alts/crypt/aes_gcm.cc +687 -0
- data/src/core/tsi/alts/crypt/gsec.cc +189 -0
- data/src/core/tsi/alts/crypt/gsec.h +454 -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 +407 -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 +218 -0
- data/src/core/tsi/alts/frame_protector/frame_handler.h +236 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +899 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +161 -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 +674 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +104 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +88 -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 +476 -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 +789 -0
- data/src/core/tsi/fake_transport_security.h +47 -0
- data/src/core/tsi/local_transport_security.cc +211 -0
- data/src/core/tsi/local_transport_security.h +51 -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 +214 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +90 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +75 -0
- data/src/core/tsi/ssl_transport_security.cc +2124 -0
- data/src/core/tsi/ssl_transport_security.h +353 -0
- data/src/core/tsi/ssl_types.h +42 -0
- data/src/core/tsi/transport_security.cc +370 -0
- data/src/core/tsi/transport_security.h +127 -0
- data/src/core/tsi/transport_security_grpc.cc +73 -0
- data/src/core/tsi/transport_security_grpc.h +79 -0
- data/src/core/tsi/transport_security_interface.h +476 -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 +107 -0
- data/src/ruby/ext/grpc/rb_byte_buffer.c +64 -0
- data/src/ruby/ext/grpc/rb_byte_buffer.h +35 -0
- data/src/ruby/ext/grpc/rb_call.c +1050 -0
- data/src/ruby/ext/grpc/rb_call.h +53 -0
- data/src/ruby/ext/grpc/rb_call_credentials.c +297 -0
- data/src/ruby/ext/grpc/rb_call_credentials.h +31 -0
- data/src/ruby/ext/grpc/rb_channel.c +835 -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 +267 -0
- data/src/ruby/ext/grpc/rb_channel_credentials.h +32 -0
- data/src/ruby/ext/grpc/rb_completion_queue.c +100 -0
- data/src/ruby/ext/grpc/rb_completion_queue.h +36 -0
- data/src/ruby/ext/grpc/rb_compression_options.c +470 -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 +143 -0
- data/src/ruby/ext/grpc/rb_event_thread.h +21 -0
- data/src/ruby/ext/grpc/rb_grpc.c +328 -0
- data/src/ruby/ext/grpc/rb_grpc.h +76 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +573 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +865 -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 +372 -0
- data/src/ruby/ext/grpc/rb_server.h +32 -0
- data/src/ruby/ext/grpc/rb_server_credentials.c +243 -0
- data/src/ruby/ext/grpc/rb_server_credentials.h +32 -0
- data/src/ruby/lib/grpc.rb +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 +501 -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/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 +105 -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 +118 -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 +82 -0
- data/src/ruby/spec/channel_spec.rb +234 -0
- data/src/ruby/spec/client_auth_spec.rb +126 -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/generic/active_call_spec.rb +672 -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/package_option_spec.rb +82 -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 +79 -0
- data/src/ruby/spec/server_spec.rb +209 -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/third_party/abseil-cpp/absl/algorithm/algorithm.h +159 -0
- data/third_party/abseil-cpp/absl/base/attributes.h +621 -0
- data/third_party/abseil-cpp/absl/base/call_once.h +226 -0
- data/third_party/abseil-cpp/absl/base/casts.h +184 -0
- data/third_party/abseil-cpp/absl/base/config.h +671 -0
- data/third_party/abseil-cpp/absl/base/const_init.h +76 -0
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.cc +129 -0
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +389 -0
- data/third_party/abseil-cpp/absl/base/internal/atomic_hook.h +200 -0
- data/third_party/abseil-cpp/absl/base/internal/bits.h +218 -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/endian.h +266 -0
- data/third_party/abseil-cpp/absl/base/internal/errno_saver.h +43 -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_scheduling.h +107 -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 +240 -0
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +183 -0
- data/third_party/abseil-cpp/absl/base/internal/scheduling_mode.h +58 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +233 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +243 -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 +66 -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 +416 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.h +66 -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 +152 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.h +259 -0
- data/third_party/abseil-cpp/absl/base/internal/throw_delegate.cc +108 -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 +66 -0
- data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +158 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +140 -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 +220 -0
- data/third_party/abseil-cpp/absl/base/optimization.h +181 -0
- data/third_party/abseil-cpp/absl/base/options.h +211 -0
- data/third_party/abseil-cpp/absl/base/policy_checks.h +111 -0
- data/third_party/abseil-cpp/absl/base/port.h +26 -0
- data/third_party/abseil-cpp/absl/base/thread_annotations.h +280 -0
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +848 -0
- data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +265 -0
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +892 -0
- data/third_party/abseil-cpp/absl/memory/memory.h +695 -0
- data/third_party/abseil-cpp/absl/meta/type_traits.h +759 -0
- data/third_party/abseil-cpp/absl/numeric/int128.cc +404 -0
- data/third_party/abseil-cpp/absl/numeric/int128.h +1091 -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/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/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/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 +388 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +432 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +245 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +209 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +326 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +51 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +415 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +493 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +23 -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 +104 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +334 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +333 -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 +455 -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 +40 -0
- data/third_party/abseil-cpp/absl/strings/match.h +90 -0
- data/third_party/abseil-cpp/absl/strings/numbers.cc +965 -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 +537 -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 +513 -0
- data/third_party/abseil-cpp/absl/strings/string_view.cc +235 -0
- data/third_party/abseil-cpp/absl/strings/string_view.h +622 -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 +693 -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 +569 -0
- data/third_party/abseil-cpp/absl/time/clock.h +74 -0
- data/third_party/abseil-cpp/absl/time/duration.cc +922 -0
- data/third_party/abseil-cpp/absl/time/format.cc +153 -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 +622 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +384 -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 +922 -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 +121 -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 +958 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.h +138 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc +308 -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 +115 -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 +499 -0
- data/third_party/abseil-cpp/absl/time/time.h +1584 -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/internal/optional.h +396 -0
- data/third_party/abseil-cpp/absl/types/internal/span.h +128 -0
- data/third_party/abseil-cpp/absl/types/optional.h +776 -0
- data/third_party/abseil-cpp/absl/types/span.h +713 -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 +97 -0
- data/third_party/address_sorting/address_sorting_windows.c +95 -0
- data/third_party/address_sorting/include/address_sorting/address_sorting.h +113 -0
- data/third_party/boringssl-with-bazel/err_data.c +1439 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c +271 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c +123 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.c +93 -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 +261 -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 +305 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c +286 -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 +93 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strnid.c +313 -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 +151 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c +303 -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 +446 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_locl.h +104 -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/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/tasn_dec.c +1244 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c +664 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c +244 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c +387 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c +131 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c +280 -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 +466 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio.c +700 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.c +330 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/connect.c +545 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/fd.c +279 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/file.c +317 -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 +488 -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 +206 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket_helper.c +118 -0
- data/third_party/boringssl-with-bazel/src/crypto/bn_extra/bn_asn1.c +64 -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 +265 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbb.c +719 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c +688 -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 +184 -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 +143 -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 +418 -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 +688 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/internal.h +128 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/tls_cbc.c +491 -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 +810 -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-arm-linux.c +220 -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/check.c +217 -0
- data/third_party/boringssl-with-bazel/src/crypto/dh/dh.c +533 -0
- data/third_party/boringssl-with-bazel/src/crypto/dh/dh_asn1.c +160 -0
- data/third_party/boringssl-with-bazel/src/crypto/dh/params.c +93 -0
- data/third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c +240 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c +980 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c +339 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_asn1.c +574 -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 +425 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/internal.h +78 -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 +850 -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 +443 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c +388 -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 +273 -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 +213 -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 +106 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.c +263 -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 +445 -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 +886 -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 +325 -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 +694 -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 +1068 -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 +502 -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 +620 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c +1302 -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 +785 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/des/internal.h +240 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c +271 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digests.c +296 -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 +268 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec.c +1252 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_key.c +465 -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 +775 -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 +1178 -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 +632 -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 +736 -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 +328 -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/is_fips.c +29 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md4/md4.c +256 -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 +301 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cbc.c +167 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cfb.c +202 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ctr.c +200 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm.c +729 -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 +441 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ofb.c +96 -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 +163 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c +378 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/urandom.c +391 -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 +127 -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 +898 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +1358 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c +654 -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 +371 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha256.c +343 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha512.c +544 -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/hrss/hrss.c +2100 -0
- data/third_party/boringssl-with-bazel/src/crypto/hrss/internal.h +61 -0
- data/third_party/boringssl-with-bazel/src/crypto/internal.h +834 -0
- data/third_party/boringssl-with-bazel/src/crypto/lhash/lhash.c +348 -0
- data/third_party/boringssl-with-bazel/src/crypto/mem.c +359 -0
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj.c +549 -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 +261 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_info.c +360 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_lib.c +777 -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 +257 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pkey.c +218 -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 +49 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7.c +159 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.c +385 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/internal.h +131 -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 +1305 -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 +318 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_arm.c +305 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.c +856 -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 +220 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c +52 -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 +30 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c +70 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c +69 -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 +325 -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 +431 -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 +210 -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 +278 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c +1474 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c +720 -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_strex.c +653 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_verify.c +114 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c +153 -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 +458 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/by_file.c +275 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/charmap.h +15 -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 +66 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c +385 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +125 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_req.c +244 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +544 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c +111 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/vpm_int.h +71 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509.c +157 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_att.c +381 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c +476 -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 +206 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_lu.c +834 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c +198 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_r2x.c +116 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_req.c +341 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c +185 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c +326 -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 +278 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +2487 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c +671 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c +210 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +389 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509rset.c +81 -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 +151 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +399 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_attrib.c +111 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c +541 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_exten.c +75 -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 +554 -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 +368 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_req.c +109 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c +69 -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 +69 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +334 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.c +198 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/ext_dat.h +141 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +56 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_cache.c +286 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c +130 -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 +130 -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 +842 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akey.c +207 -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 +629 -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 +141 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c +463 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c +503 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_crld.c +561 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_enum.c +100 -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 +246 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ia5.c +122 -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 +371 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ncons.c +501 -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 +288 -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_pku.c +110 -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 +229 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +843 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_skey.c +155 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_sxnet.c +274 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +1395 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +459 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/aes.h +195 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +121 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +911 -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 +892 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +575 -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 +933 -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 +561 -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 +638 -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 +180 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cpu.h +212 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/crypto.h +149 -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 +177 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +319 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +331 -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 +424 -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 +205 -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 +465 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +1050 -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 +64 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hmac.h +186 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hrss.h +100 -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 +282 -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 +175 -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 +236 -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 +67 -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 +435 -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 +215 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs8.h +269 -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 +111 -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 +818 -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 +199 -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 +5198 -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 +632 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +291 -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 +1207 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +681 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +831 -0
- data/third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc +179 -0
- data/third_party/boringssl-with-bazel/src/ssl/d1_both.cc +837 -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/handoff.cc +675 -0
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +703 -0
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +1890 -0
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +1805 -0
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +3572 -0
- data/third_party/boringssl-with-bazel/src/ssl/s3_both.cc +724 -0
- data/third_party/boringssl-with-bazel/src/ssl/s3_lib.cc +221 -0
- data/third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc +458 -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 +856 -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 +1019 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +1718 -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 +397 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +3015 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc +835 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +1333 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc +230 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +277 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +394 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc +1358 -0
- data/third_party/boringssl-with-bazel/src/ssl/t1_enc.cc +365 -0
- data/third_party/boringssl-with-bazel/src/ssl/t1_lib.cc +3870 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +689 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +1017 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +513 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +1096 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls_method.cc +317 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls_record.cc +703 -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/upb/upb/decode.c +609 -0
- data/third_party/upb/upb/decode.h +21 -0
- data/third_party/upb/upb/encode.c +378 -0
- data/third_party/upb/upb/encode.h +21 -0
- data/third_party/upb/upb/generated_util.h +105 -0
- data/third_party/upb/upb/msg.c +111 -0
- data/third_party/upb/upb/msg.h +69 -0
- data/third_party/upb/upb/port.c +26 -0
- data/third_party/upb/upb/port_def.inc +150 -0
- data/third_party/upb/upb/port_undef.inc +21 -0
- data/third_party/upb/upb/table.c +913 -0
- data/third_party/upb/upb/table.int.h +507 -0
- data/third_party/upb/upb/upb.c +261 -0
- data/third_party/upb/upb/upb.h +364 -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 +2029 -0
@@ -0,0 +1,83 @@
|
|
1
|
+
//
|
2
|
+
// Copyright 2018 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
|
+
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_CHILD_POLICY_HANDLER_H
|
18
|
+
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_CHILD_POLICY_HANDLER_H
|
19
|
+
|
20
|
+
#include <grpc/support/port_platform.h>
|
21
|
+
|
22
|
+
#include "src/core/ext/filters/client_channel/lb_policy.h"
|
23
|
+
#include "src/core/lib/debug/trace.h"
|
24
|
+
#include "src/core/lib/gprpp/orphanable.h"
|
25
|
+
|
26
|
+
namespace grpc_core {
|
27
|
+
|
28
|
+
// A class that makes it easy to gracefully switch child policies.
|
29
|
+
//
|
30
|
+
// Callers should instantiate this instead of using
|
31
|
+
// LoadBalancingPolicyRegistry::CreateLoadBalancingPolicy(). Once
|
32
|
+
// instantiated, this object will automatically take care of
|
33
|
+
// constructing the child policy as needed upon receiving an update.
|
34
|
+
class ChildPolicyHandler : public LoadBalancingPolicy {
|
35
|
+
public:
|
36
|
+
ChildPolicyHandler(Args args, TraceFlag* tracer)
|
37
|
+
: LoadBalancingPolicy(std::move(args)), tracer_(tracer) {}
|
38
|
+
|
39
|
+
virtual const char* name() const override { return "child_policy_handler"; }
|
40
|
+
|
41
|
+
void UpdateLocked(UpdateArgs args) override;
|
42
|
+
void ExitIdleLocked() override;
|
43
|
+
void ResetBackoffLocked() override;
|
44
|
+
|
45
|
+
// Returns true if transitioning from the old config to the new config
|
46
|
+
// requires instantiating a new policy object.
|
47
|
+
virtual bool ConfigChangeRequiresNewPolicyInstance(
|
48
|
+
LoadBalancingPolicy::Config* old_config,
|
49
|
+
LoadBalancingPolicy::Config* new_config) const;
|
50
|
+
|
51
|
+
// Instantiates a new policy of the specified name.
|
52
|
+
// May be overridden by subclasses to avoid recursion when an LB
|
53
|
+
// policy factory returns a ChildPolicyHandler.
|
54
|
+
virtual OrphanablePtr<LoadBalancingPolicy> CreateLoadBalancingPolicy(
|
55
|
+
const char* name, LoadBalancingPolicy::Args args) const;
|
56
|
+
|
57
|
+
private:
|
58
|
+
class Helper;
|
59
|
+
|
60
|
+
void ShutdownLocked() override;
|
61
|
+
|
62
|
+
OrphanablePtr<LoadBalancingPolicy> CreateChildPolicy(
|
63
|
+
const char* child_policy_name, const grpc_channel_args& args);
|
64
|
+
|
65
|
+
// Passed in from caller at construction time.
|
66
|
+
TraceFlag* tracer_;
|
67
|
+
|
68
|
+
bool shutting_down_ = false;
|
69
|
+
|
70
|
+
// The most recent config passed to UpdateLocked().
|
71
|
+
// If pending_child_policy_ is non-null, this is the config passed to
|
72
|
+
// pending_child_policy_; otherwise, it's the config passed to child_policy_.
|
73
|
+
RefCountedPtr<LoadBalancingPolicy::Config> current_config_;
|
74
|
+
|
75
|
+
// Child LB policy.
|
76
|
+
OrphanablePtr<LoadBalancingPolicy> child_policy_;
|
77
|
+
OrphanablePtr<LoadBalancingPolicy> pending_child_policy_;
|
78
|
+
};
|
79
|
+
|
80
|
+
} // namespace grpc_core
|
81
|
+
|
82
|
+
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_CHILD_POLICY_HANDLER_H \
|
83
|
+
*/
|
@@ -0,0 +1,157 @@
|
|
1
|
+
/*
|
2
|
+
*
|
3
|
+
* Copyright 2017 gRPC authors.
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*
|
17
|
+
*/
|
18
|
+
|
19
|
+
#include <grpc/support/port_platform.h>
|
20
|
+
|
21
|
+
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h"
|
22
|
+
|
23
|
+
#include <string.h>
|
24
|
+
|
25
|
+
#include <grpc/support/atm.h>
|
26
|
+
#include <grpc/support/log.h>
|
27
|
+
|
28
|
+
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h"
|
29
|
+
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h"
|
30
|
+
#include "src/core/lib/iomgr/error.h"
|
31
|
+
#include "src/core/lib/profiling/timers.h"
|
32
|
+
|
33
|
+
static grpc_error* clr_init_channel_elem(grpc_channel_element* /*elem*/,
|
34
|
+
grpc_channel_element_args* /*args*/) {
|
35
|
+
return GRPC_ERROR_NONE;
|
36
|
+
}
|
37
|
+
|
38
|
+
static void clr_destroy_channel_elem(grpc_channel_element* /*elem*/) {}
|
39
|
+
|
40
|
+
namespace {
|
41
|
+
|
42
|
+
struct call_data {
|
43
|
+
// Stats object to update.
|
44
|
+
grpc_core::RefCountedPtr<grpc_core::GrpcLbClientStats> client_stats;
|
45
|
+
// State for intercepting send_initial_metadata.
|
46
|
+
grpc_closure on_complete_for_send;
|
47
|
+
grpc_closure* original_on_complete_for_send;
|
48
|
+
bool send_initial_metadata_succeeded = false;
|
49
|
+
// State for intercepting recv_initial_metadata.
|
50
|
+
grpc_closure recv_initial_metadata_ready;
|
51
|
+
grpc_closure* original_recv_initial_metadata_ready;
|
52
|
+
bool recv_initial_metadata_succeeded = false;
|
53
|
+
};
|
54
|
+
|
55
|
+
} // namespace
|
56
|
+
|
57
|
+
static void on_complete_for_send(void* arg, grpc_error* error) {
|
58
|
+
call_data* calld = static_cast<call_data*>(arg);
|
59
|
+
if (error == GRPC_ERROR_NONE) {
|
60
|
+
calld->send_initial_metadata_succeeded = true;
|
61
|
+
}
|
62
|
+
grpc_core::Closure::Run(DEBUG_LOCATION, calld->original_on_complete_for_send,
|
63
|
+
GRPC_ERROR_REF(error));
|
64
|
+
}
|
65
|
+
|
66
|
+
static void recv_initial_metadata_ready(void* arg, grpc_error* error) {
|
67
|
+
call_data* calld = static_cast<call_data*>(arg);
|
68
|
+
if (error == GRPC_ERROR_NONE) {
|
69
|
+
calld->recv_initial_metadata_succeeded = true;
|
70
|
+
}
|
71
|
+
grpc_core::Closure::Run(DEBUG_LOCATION,
|
72
|
+
calld->original_recv_initial_metadata_ready,
|
73
|
+
GRPC_ERROR_REF(error));
|
74
|
+
}
|
75
|
+
|
76
|
+
static grpc_error* clr_init_call_elem(grpc_call_element* elem,
|
77
|
+
const grpc_call_element_args* args) {
|
78
|
+
GPR_ASSERT(args->context != nullptr);
|
79
|
+
new (elem->call_data) call_data();
|
80
|
+
return GRPC_ERROR_NONE;
|
81
|
+
}
|
82
|
+
|
83
|
+
static void clr_destroy_call_elem(grpc_call_element* elem,
|
84
|
+
const grpc_call_final_info* /*final_info*/,
|
85
|
+
grpc_closure* /*ignored*/) {
|
86
|
+
call_data* calld = static_cast<call_data*>(elem->call_data);
|
87
|
+
if (calld->client_stats != nullptr) {
|
88
|
+
// Record call finished, optionally setting client_failed_to_send and
|
89
|
+
// received.
|
90
|
+
calld->client_stats->AddCallFinished(
|
91
|
+
!calld->send_initial_metadata_succeeded /* client_failed_to_send */,
|
92
|
+
calld->recv_initial_metadata_succeeded /* known_received */);
|
93
|
+
}
|
94
|
+
calld->~call_data();
|
95
|
+
}
|
96
|
+
|
97
|
+
static void clr_start_transport_stream_op_batch(
|
98
|
+
grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
|
99
|
+
call_data* calld = static_cast<call_data*>(elem->call_data);
|
100
|
+
GPR_TIMER_SCOPE("clr_start_transport_stream_op_batch", 0);
|
101
|
+
// Handle send_initial_metadata.
|
102
|
+
if (batch->send_initial_metadata) {
|
103
|
+
// Grab client stats object from metadata.
|
104
|
+
grpc_linked_mdelem* client_stats_md =
|
105
|
+
batch->payload->send_initial_metadata.send_initial_metadata->list.head;
|
106
|
+
for (; client_stats_md != nullptr;
|
107
|
+
client_stats_md = client_stats_md->next) {
|
108
|
+
if (GRPC_SLICE_START_PTR(GRPC_MDKEY(client_stats_md->md)) ==
|
109
|
+
static_cast<const void*>(grpc_core::kGrpcLbClientStatsMetadataKey)) {
|
110
|
+
break;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
if (client_stats_md != nullptr) {
|
114
|
+
grpc_core::GrpcLbClientStats* client_stats =
|
115
|
+
const_cast<grpc_core::GrpcLbClientStats*>(
|
116
|
+
reinterpret_cast<const grpc_core::GrpcLbClientStats*>(
|
117
|
+
GRPC_SLICE_START_PTR(GRPC_MDVALUE(client_stats_md->md))));
|
118
|
+
if (client_stats != nullptr) {
|
119
|
+
calld->client_stats.reset(client_stats);
|
120
|
+
// Intercept completion.
|
121
|
+
calld->original_on_complete_for_send = batch->on_complete;
|
122
|
+
GRPC_CLOSURE_INIT(&calld->on_complete_for_send, on_complete_for_send,
|
123
|
+
calld, grpc_schedule_on_exec_ctx);
|
124
|
+
batch->on_complete = &calld->on_complete_for_send;
|
125
|
+
}
|
126
|
+
// Remove metadata so it doesn't go out on the wire.
|
127
|
+
grpc_metadata_batch_remove(
|
128
|
+
batch->payload->send_initial_metadata.send_initial_metadata,
|
129
|
+
client_stats_md);
|
130
|
+
}
|
131
|
+
}
|
132
|
+
// Intercept completion of recv_initial_metadata.
|
133
|
+
if (batch->recv_initial_metadata) {
|
134
|
+
calld->original_recv_initial_metadata_ready =
|
135
|
+
batch->payload->recv_initial_metadata.recv_initial_metadata_ready;
|
136
|
+
GRPC_CLOSURE_INIT(&calld->recv_initial_metadata_ready,
|
137
|
+
recv_initial_metadata_ready, calld,
|
138
|
+
grpc_schedule_on_exec_ctx);
|
139
|
+
batch->payload->recv_initial_metadata.recv_initial_metadata_ready =
|
140
|
+
&calld->recv_initial_metadata_ready;
|
141
|
+
}
|
142
|
+
// Chain to next filter.
|
143
|
+
grpc_call_next_op(elem, batch);
|
144
|
+
}
|
145
|
+
|
146
|
+
const grpc_channel_filter grpc_client_load_reporting_filter = {
|
147
|
+
clr_start_transport_stream_op_batch,
|
148
|
+
grpc_channel_next_op,
|
149
|
+
sizeof(call_data),
|
150
|
+
clr_init_call_elem,
|
151
|
+
grpc_call_stack_ignore_set_pollset_or_pollset_set,
|
152
|
+
clr_destroy_call_elem,
|
153
|
+
0, // sizeof(channel_data)
|
154
|
+
clr_init_channel_elem,
|
155
|
+
clr_destroy_channel_elem,
|
156
|
+
grpc_channel_next_get_info,
|
157
|
+
"client_load_reporting"};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/*
|
2
|
+
*
|
3
|
+
* Copyright 2017 gRPC authors.
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*
|
17
|
+
*/
|
18
|
+
|
19
|
+
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H
|
20
|
+
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H
|
21
|
+
|
22
|
+
#include <grpc/support/port_platform.h>
|
23
|
+
|
24
|
+
#include "src/core/lib/channel/channel_stack.h"
|
25
|
+
|
26
|
+
extern const grpc_channel_filter grpc_client_load_reporting_filter;
|
27
|
+
|
28
|
+
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H \
|
29
|
+
*/
|
@@ -0,0 +1,1754 @@
|
|
1
|
+
/*
|
2
|
+
*
|
3
|
+
* Copyright 2016 gRPC authors.
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*
|
17
|
+
*/
|
18
|
+
|
19
|
+
/// Implementation of the gRPC LB policy.
|
20
|
+
///
|
21
|
+
/// This policy takes as input a list of resolved addresses, which must
|
22
|
+
/// include at least one balancer address.
|
23
|
+
///
|
24
|
+
/// An internal channel (\a lb_channel_) is created for the addresses
|
25
|
+
/// from that are balancers. This channel behaves just like a regular
|
26
|
+
/// channel that uses pick_first to select from the list of balancer
|
27
|
+
/// addresses.
|
28
|
+
///
|
29
|
+
/// When we get our initial update, we instantiate the internal *streaming*
|
30
|
+
/// call to the LB server (whichever address pick_first chose). The call
|
31
|
+
/// will be complete when either the balancer sends status or when we cancel
|
32
|
+
/// the call (e.g., because we are shutting down). In needed, we retry the
|
33
|
+
/// call. If we received at least one valid message from the server, a new
|
34
|
+
/// call attempt will be made immediately; otherwise, we apply back-off
|
35
|
+
/// delays between attempts.
|
36
|
+
///
|
37
|
+
/// We maintain an internal round_robin policy instance for distributing
|
38
|
+
/// requests across backends. Whenever we receive a new serverlist from
|
39
|
+
/// the balancer, we update the round_robin policy with the new list of
|
40
|
+
/// addresses. If we cannot communicate with the balancer on startup,
|
41
|
+
/// however, we may enter fallback mode, in which case we will populate
|
42
|
+
/// the child policy's addresses from the backend addresses returned by the
|
43
|
+
/// resolver.
|
44
|
+
///
|
45
|
+
/// Once a child policy instance is in place (and getting updated as described),
|
46
|
+
/// calls for a pick, a ping, or a cancellation will be serviced right
|
47
|
+
/// away by forwarding them to the child policy instance. Any time there's no
|
48
|
+
/// child policy available (i.e., right after the creation of the gRPCLB
|
49
|
+
/// policy), pick requests are queued.
|
50
|
+
///
|
51
|
+
/// \see https://github.com/grpc/grpc/blob/master/doc/load-balancing.md for the
|
52
|
+
/// high level design and details.
|
53
|
+
|
54
|
+
// With the addition of a libuv endpoint, sockaddr.h now includes uv.h when
|
55
|
+
// using that endpoint. Because of various transitive includes in uv.h,
|
56
|
+
// including windows.h on Windows, uv.h must be included before other system
|
57
|
+
// headers. Therefore, sockaddr.h must always be included first.
|
58
|
+
#include <grpc/support/port_platform.h>
|
59
|
+
|
60
|
+
#include "src/core/lib/iomgr/sockaddr.h"
|
61
|
+
#include "src/core/lib/iomgr/socket_utils.h"
|
62
|
+
|
63
|
+
#include <inttypes.h>
|
64
|
+
#include <limits.h>
|
65
|
+
#include <string.h>
|
66
|
+
|
67
|
+
#include "absl/container/inlined_vector.h"
|
68
|
+
#include "absl/strings/str_format.h"
|
69
|
+
#include "absl/strings/str_join.h"
|
70
|
+
|
71
|
+
#include <grpc/byte_buffer_reader.h>
|
72
|
+
#include <grpc/grpc.h>
|
73
|
+
#include <grpc/support/alloc.h>
|
74
|
+
#include <grpc/support/string_util.h>
|
75
|
+
#include <grpc/support/time.h>
|
76
|
+
|
77
|
+
#include "src/core/ext/filters/client_channel/client_channel.h"
|
78
|
+
#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
|
79
|
+
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h"
|
80
|
+
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h"
|
81
|
+
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h"
|
82
|
+
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h"
|
83
|
+
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h"
|
84
|
+
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h"
|
85
|
+
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
|
86
|
+
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
|
87
|
+
#include "src/core/ext/filters/client_channel/parse_address.h"
|
88
|
+
#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
|
89
|
+
#include "src/core/ext/filters/client_channel/server_address.h"
|
90
|
+
#include "src/core/lib/backoff/backoff.h"
|
91
|
+
#include "src/core/lib/channel/channel_args.h"
|
92
|
+
#include "src/core/lib/channel/channel_stack.h"
|
93
|
+
#include "src/core/lib/gpr/string.h"
|
94
|
+
#include "src/core/lib/gprpp/manual_constructor.h"
|
95
|
+
#include "src/core/lib/gprpp/memory.h"
|
96
|
+
#include "src/core/lib/gprpp/orphanable.h"
|
97
|
+
#include "src/core/lib/gprpp/ref_counted_ptr.h"
|
98
|
+
#include "src/core/lib/iomgr/sockaddr.h"
|
99
|
+
#include "src/core/lib/iomgr/sockaddr_utils.h"
|
100
|
+
#include "src/core/lib/iomgr/timer.h"
|
101
|
+
#include "src/core/lib/slice/slice_hash_table.h"
|
102
|
+
#include "src/core/lib/slice/slice_internal.h"
|
103
|
+
#include "src/core/lib/slice/slice_string_helpers.h"
|
104
|
+
#include "src/core/lib/surface/call.h"
|
105
|
+
#include "src/core/lib/surface/channel.h"
|
106
|
+
#include "src/core/lib/surface/channel_init.h"
|
107
|
+
#include "src/core/lib/transport/static_metadata.h"
|
108
|
+
|
109
|
+
#define GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS 1
|
110
|
+
#define GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER 1.6
|
111
|
+
#define GRPC_GRPCLB_RECONNECT_MAX_BACKOFF_SECONDS 120
|
112
|
+
#define GRPC_GRPCLB_RECONNECT_JITTER 0.2
|
113
|
+
#define GRPC_GRPCLB_DEFAULT_FALLBACK_TIMEOUT_MS 10000
|
114
|
+
|
115
|
+
#define GRPC_ARG_GRPCLB_ADDRESS_LB_TOKEN "grpc.grpclb_address_lb_token"
|
116
|
+
#define GRPC_ARG_GRPCLB_ADDRESS_CLIENT_STATS "grpc.grpclb_address_client_stats"
|
117
|
+
|
118
|
+
namespace grpc_core {
|
119
|
+
|
120
|
+
TraceFlag grpc_lb_glb_trace(false, "glb");
|
121
|
+
|
122
|
+
const char kGrpcLbClientStatsMetadataKey[] = "grpclb_client_stats";
|
123
|
+
const char kGrpcLbLbTokenMetadataKey[] = "lb-token";
|
124
|
+
|
125
|
+
namespace {
|
126
|
+
|
127
|
+
constexpr char kGrpclb[] = "grpclb";
|
128
|
+
|
129
|
+
class GrpcLbConfig : public LoadBalancingPolicy::Config {
|
130
|
+
public:
|
131
|
+
explicit GrpcLbConfig(RefCountedPtr<LoadBalancingPolicy::Config> child_policy)
|
132
|
+
: child_policy_(std::move(child_policy)) {}
|
133
|
+
const char* name() const override { return kGrpclb; }
|
134
|
+
|
135
|
+
RefCountedPtr<LoadBalancingPolicy::Config> child_policy() const {
|
136
|
+
return child_policy_;
|
137
|
+
}
|
138
|
+
|
139
|
+
private:
|
140
|
+
RefCountedPtr<LoadBalancingPolicy::Config> child_policy_;
|
141
|
+
};
|
142
|
+
|
143
|
+
class GrpcLb : public LoadBalancingPolicy {
|
144
|
+
public:
|
145
|
+
explicit GrpcLb(Args args);
|
146
|
+
|
147
|
+
const char* name() const override { return kGrpclb; }
|
148
|
+
|
149
|
+
void UpdateLocked(UpdateArgs args) override;
|
150
|
+
void ResetBackoffLocked() override;
|
151
|
+
|
152
|
+
private:
|
153
|
+
/// Contains a call to the LB server and all the data related to the call.
|
154
|
+
class BalancerCallState : public InternallyRefCounted<BalancerCallState> {
|
155
|
+
public:
|
156
|
+
explicit BalancerCallState(
|
157
|
+
RefCountedPtr<LoadBalancingPolicy> parent_grpclb_policy);
|
158
|
+
~BalancerCallState();
|
159
|
+
|
160
|
+
// It's the caller's responsibility to ensure that Orphan() is called from
|
161
|
+
// inside the combiner.
|
162
|
+
void Orphan() override;
|
163
|
+
|
164
|
+
void StartQuery();
|
165
|
+
|
166
|
+
GrpcLbClientStats* client_stats() const { return client_stats_.get(); }
|
167
|
+
|
168
|
+
bool seen_initial_response() const { return seen_initial_response_; }
|
169
|
+
bool seen_serverlist() const { return seen_serverlist_; }
|
170
|
+
|
171
|
+
private:
|
172
|
+
GrpcLb* grpclb_policy() const {
|
173
|
+
return static_cast<GrpcLb*>(grpclb_policy_.get());
|
174
|
+
}
|
175
|
+
|
176
|
+
void ScheduleNextClientLoadReportLocked();
|
177
|
+
void SendClientLoadReportLocked();
|
178
|
+
|
179
|
+
static void MaybeSendClientLoadReport(void* arg, grpc_error* error);
|
180
|
+
static void ClientLoadReportDone(void* arg, grpc_error* error);
|
181
|
+
static void OnInitialRequestSent(void* arg, grpc_error* error);
|
182
|
+
static void OnBalancerMessageReceived(void* arg, grpc_error* error);
|
183
|
+
static void OnBalancerStatusReceived(void* arg, grpc_error* error);
|
184
|
+
|
185
|
+
void MaybeSendClientLoadReportLocked(grpc_error* error);
|
186
|
+
void ClientLoadReportDoneLocked(grpc_error* error);
|
187
|
+
void OnInitialRequestSentLocked();
|
188
|
+
void OnBalancerMessageReceivedLocked();
|
189
|
+
void OnBalancerStatusReceivedLocked(grpc_error* error);
|
190
|
+
|
191
|
+
// The owning LB policy.
|
192
|
+
RefCountedPtr<LoadBalancingPolicy> grpclb_policy_;
|
193
|
+
|
194
|
+
// The streaming call to the LB server. Always non-NULL.
|
195
|
+
grpc_call* lb_call_ = nullptr;
|
196
|
+
|
197
|
+
// recv_initial_metadata
|
198
|
+
grpc_metadata_array lb_initial_metadata_recv_;
|
199
|
+
|
200
|
+
// send_message
|
201
|
+
grpc_byte_buffer* send_message_payload_ = nullptr;
|
202
|
+
grpc_closure lb_on_initial_request_sent_;
|
203
|
+
|
204
|
+
// recv_message
|
205
|
+
grpc_byte_buffer* recv_message_payload_ = nullptr;
|
206
|
+
grpc_closure lb_on_balancer_message_received_;
|
207
|
+
bool seen_initial_response_ = false;
|
208
|
+
bool seen_serverlist_ = false;
|
209
|
+
|
210
|
+
// recv_trailing_metadata
|
211
|
+
grpc_closure lb_on_balancer_status_received_;
|
212
|
+
grpc_metadata_array lb_trailing_metadata_recv_;
|
213
|
+
grpc_status_code lb_call_status_;
|
214
|
+
grpc_slice lb_call_status_details_;
|
215
|
+
|
216
|
+
// The stats for client-side load reporting associated with this LB call.
|
217
|
+
// Created after the first serverlist is received.
|
218
|
+
RefCountedPtr<GrpcLbClientStats> client_stats_;
|
219
|
+
grpc_millis client_stats_report_interval_ = 0;
|
220
|
+
grpc_timer client_load_report_timer_;
|
221
|
+
bool client_load_report_timer_callback_pending_ = false;
|
222
|
+
bool last_client_load_report_counters_were_zero_ = false;
|
223
|
+
bool client_load_report_is_due_ = false;
|
224
|
+
// The closure used for either the load report timer or the callback for
|
225
|
+
// completion of sending the load report.
|
226
|
+
grpc_closure client_load_report_closure_;
|
227
|
+
};
|
228
|
+
|
229
|
+
class Serverlist : public RefCounted<Serverlist> {
|
230
|
+
public:
|
231
|
+
// Takes ownership of serverlist.
|
232
|
+
explicit Serverlist(std::vector<GrpcLbServer> serverlist)
|
233
|
+
: serverlist_(std::move(serverlist)) {}
|
234
|
+
|
235
|
+
bool operator==(const Serverlist& other) const;
|
236
|
+
|
237
|
+
const std::vector<GrpcLbServer>& serverlist() const { return serverlist_; }
|
238
|
+
|
239
|
+
// Returns a text representation suitable for logging.
|
240
|
+
std::string AsText() const;
|
241
|
+
|
242
|
+
// Extracts all non-drop entries into a ServerAddressList.
|
243
|
+
ServerAddressList GetServerAddressList(
|
244
|
+
GrpcLbClientStats* client_stats) const;
|
245
|
+
|
246
|
+
// Returns true if the serverlist contains at least one drop entry and
|
247
|
+
// no backend address entries.
|
248
|
+
bool ContainsAllDropEntries() const;
|
249
|
+
|
250
|
+
// Returns the LB token to use for a drop, or null if the call
|
251
|
+
// should not be dropped.
|
252
|
+
//
|
253
|
+
// Note: This is called from the picker, so it will be invoked in
|
254
|
+
// the channel's data plane mutex, NOT the control plane
|
255
|
+
// work_serializer. It should not be accessed by any other part of the LB
|
256
|
+
// policy.
|
257
|
+
const char* ShouldDrop();
|
258
|
+
|
259
|
+
private:
|
260
|
+
std::vector<GrpcLbServer> serverlist_;
|
261
|
+
|
262
|
+
// Guarded by the channel's data plane mutex, NOT the control
|
263
|
+
// plane work_serializer. It should not be accessed by anything but the
|
264
|
+
// picker via the ShouldDrop() method.
|
265
|
+
size_t drop_index_ = 0;
|
266
|
+
};
|
267
|
+
|
268
|
+
class Picker : public SubchannelPicker {
|
269
|
+
public:
|
270
|
+
Picker(GrpcLb* parent, RefCountedPtr<Serverlist> serverlist,
|
271
|
+
std::unique_ptr<SubchannelPicker> child_picker,
|
272
|
+
RefCountedPtr<GrpcLbClientStats> client_stats)
|
273
|
+
: parent_(parent),
|
274
|
+
serverlist_(std::move(serverlist)),
|
275
|
+
child_picker_(std::move(child_picker)),
|
276
|
+
client_stats_(std::move(client_stats)) {}
|
277
|
+
|
278
|
+
PickResult Pick(PickArgs args) override;
|
279
|
+
|
280
|
+
private:
|
281
|
+
// Storing the address for logging, but not holding a ref.
|
282
|
+
// DO NOT DEFERENCE!
|
283
|
+
GrpcLb* parent_;
|
284
|
+
|
285
|
+
// Serverlist to be used for determining drops.
|
286
|
+
RefCountedPtr<Serverlist> serverlist_;
|
287
|
+
|
288
|
+
std::unique_ptr<SubchannelPicker> child_picker_;
|
289
|
+
RefCountedPtr<GrpcLbClientStats> client_stats_;
|
290
|
+
};
|
291
|
+
|
292
|
+
class Helper : public ChannelControlHelper {
|
293
|
+
public:
|
294
|
+
explicit Helper(RefCountedPtr<GrpcLb> parent)
|
295
|
+
: parent_(std::move(parent)) {}
|
296
|
+
|
297
|
+
RefCountedPtr<SubchannelInterface> CreateSubchannel(
|
298
|
+
const grpc_channel_args& args) override;
|
299
|
+
void UpdateState(grpc_connectivity_state state,
|
300
|
+
std::unique_ptr<SubchannelPicker> picker) override;
|
301
|
+
void RequestReresolution() override;
|
302
|
+
void AddTraceEvent(TraceSeverity severity,
|
303
|
+
absl::string_view message) override;
|
304
|
+
|
305
|
+
private:
|
306
|
+
RefCountedPtr<GrpcLb> parent_;
|
307
|
+
};
|
308
|
+
|
309
|
+
class StateWatcher : public AsyncConnectivityStateWatcherInterface {
|
310
|
+
public:
|
311
|
+
explicit StateWatcher(RefCountedPtr<GrpcLb> parent)
|
312
|
+
: AsyncConnectivityStateWatcherInterface(parent->work_serializer()),
|
313
|
+
parent_(std::move(parent)) {}
|
314
|
+
|
315
|
+
~StateWatcher() { parent_.reset(DEBUG_LOCATION, "StateWatcher"); }
|
316
|
+
|
317
|
+
private:
|
318
|
+
void OnConnectivityStateChange(grpc_connectivity_state new_state) override {
|
319
|
+
if (parent_->fallback_at_startup_checks_pending_ &&
|
320
|
+
new_state == GRPC_CHANNEL_TRANSIENT_FAILURE) {
|
321
|
+
// In TRANSIENT_FAILURE. Cancel the fallback timer and go into
|
322
|
+
// fallback mode immediately.
|
323
|
+
gpr_log(GPR_INFO,
|
324
|
+
"[grpclb %p] balancer channel in state TRANSIENT_FAILURE; "
|
325
|
+
"entering fallback mode",
|
326
|
+
parent_.get());
|
327
|
+
parent_->fallback_at_startup_checks_pending_ = false;
|
328
|
+
grpc_timer_cancel(&parent_->lb_fallback_timer_);
|
329
|
+
parent_->fallback_mode_ = true;
|
330
|
+
parent_->CreateOrUpdateChildPolicyLocked();
|
331
|
+
// Cancel the watch, since we don't care about the channel state once we
|
332
|
+
// go into fallback mode.
|
333
|
+
parent_->CancelBalancerChannelConnectivityWatchLocked();
|
334
|
+
}
|
335
|
+
}
|
336
|
+
|
337
|
+
RefCountedPtr<GrpcLb> parent_;
|
338
|
+
};
|
339
|
+
|
340
|
+
~GrpcLb();
|
341
|
+
|
342
|
+
void ShutdownLocked() override;
|
343
|
+
|
344
|
+
// Helper functions used in UpdateLocked().
|
345
|
+
void ProcessAddressesAndChannelArgsLocked(const ServerAddressList& addresses,
|
346
|
+
const grpc_channel_args& args);
|
347
|
+
|
348
|
+
void CancelBalancerChannelConnectivityWatchLocked();
|
349
|
+
|
350
|
+
// Methods for dealing with fallback state.
|
351
|
+
void MaybeEnterFallbackModeAfterStartup();
|
352
|
+
static void OnFallbackTimer(void* arg, grpc_error* error);
|
353
|
+
void OnFallbackTimerLocked(grpc_error* error);
|
354
|
+
|
355
|
+
// Methods for dealing with the balancer call.
|
356
|
+
void StartBalancerCallLocked();
|
357
|
+
void StartBalancerCallRetryTimerLocked();
|
358
|
+
static void OnBalancerCallRetryTimer(void* arg, grpc_error* error);
|
359
|
+
void OnBalancerCallRetryTimerLocked(grpc_error* error);
|
360
|
+
|
361
|
+
// Methods for dealing with the child policy.
|
362
|
+
grpc_channel_args* CreateChildPolicyArgsLocked(
|
363
|
+
bool is_backend_from_grpclb_load_balancer);
|
364
|
+
OrphanablePtr<LoadBalancingPolicy> CreateChildPolicyLocked(
|
365
|
+
const grpc_channel_args* args);
|
366
|
+
void CreateOrUpdateChildPolicyLocked();
|
367
|
+
|
368
|
+
// Who the client is trying to communicate with.
|
369
|
+
const char* server_name_ = nullptr;
|
370
|
+
|
371
|
+
// Current channel args from the resolver.
|
372
|
+
grpc_channel_args* args_ = nullptr;
|
373
|
+
|
374
|
+
// Internal state.
|
375
|
+
bool shutting_down_ = false;
|
376
|
+
|
377
|
+
// The channel for communicating with the LB server.
|
378
|
+
grpc_channel* lb_channel_ = nullptr;
|
379
|
+
StateWatcher* watcher_ = nullptr;
|
380
|
+
// Response generator to inject address updates into lb_channel_.
|
381
|
+
RefCountedPtr<FakeResolverResponseGenerator> response_generator_;
|
382
|
+
|
383
|
+
// The data associated with the current LB call. It holds a ref to this LB
|
384
|
+
// policy. It's initialized every time we query for backends. It's reset to
|
385
|
+
// NULL whenever the current LB call is no longer needed (e.g., the LB policy
|
386
|
+
// is shutting down, or the LB call has ended). A non-NULL lb_calld_ always
|
387
|
+
// contains a non-NULL lb_call_.
|
388
|
+
OrphanablePtr<BalancerCallState> lb_calld_;
|
389
|
+
// Timeout in milliseconds for the LB call. 0 means no deadline.
|
390
|
+
int lb_call_timeout_ms_ = 0;
|
391
|
+
// Balancer call retry state.
|
392
|
+
BackOff lb_call_backoff_;
|
393
|
+
bool retry_timer_callback_pending_ = false;
|
394
|
+
grpc_timer lb_call_retry_timer_;
|
395
|
+
grpc_closure lb_on_call_retry_;
|
396
|
+
|
397
|
+
// The deserialized response from the balancer. May be nullptr until one
|
398
|
+
// such response has arrived.
|
399
|
+
RefCountedPtr<Serverlist> serverlist_;
|
400
|
+
|
401
|
+
// Whether we're in fallback mode.
|
402
|
+
bool fallback_mode_ = false;
|
403
|
+
// The backend addresses from the resolver.
|
404
|
+
ServerAddressList fallback_backend_addresses_;
|
405
|
+
// State for fallback-at-startup checks.
|
406
|
+
// Timeout after startup after which we will go into fallback mode if
|
407
|
+
// we have not received a serverlist from the balancer.
|
408
|
+
int fallback_at_startup_timeout_ = 0;
|
409
|
+
bool fallback_at_startup_checks_pending_ = false;
|
410
|
+
grpc_timer lb_fallback_timer_;
|
411
|
+
grpc_closure lb_on_fallback_;
|
412
|
+
|
413
|
+
// The child policy to use for the backends.
|
414
|
+
OrphanablePtr<LoadBalancingPolicy> child_policy_;
|
415
|
+
// The child policy config.
|
416
|
+
RefCountedPtr<LoadBalancingPolicy::Config> child_policy_config_;
|
417
|
+
// Child policy in state READY.
|
418
|
+
bool child_policy_ready_ = false;
|
419
|
+
};
|
420
|
+
|
421
|
+
//
|
422
|
+
// GrpcLb::Serverlist
|
423
|
+
//
|
424
|
+
|
425
|
+
bool GrpcLb::Serverlist::operator==(const Serverlist& other) const {
|
426
|
+
return serverlist_ == other.serverlist_;
|
427
|
+
}
|
428
|
+
|
429
|
+
void ParseServer(const GrpcLbServer& server, grpc_resolved_address* addr) {
|
430
|
+
memset(addr, 0, sizeof(*addr));
|
431
|
+
if (server.drop) return;
|
432
|
+
const uint16_t netorder_port = grpc_htons((uint16_t)server.port);
|
433
|
+
/* the addresses are given in binary format (a in(6)_addr struct) in
|
434
|
+
* server->ip_address.bytes. */
|
435
|
+
if (server.ip_size == 4) {
|
436
|
+
addr->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in));
|
437
|
+
grpc_sockaddr_in* addr4 = reinterpret_cast<grpc_sockaddr_in*>(&addr->addr);
|
438
|
+
addr4->sin_family = GRPC_AF_INET;
|
439
|
+
memcpy(&addr4->sin_addr, server.ip_addr, server.ip_size);
|
440
|
+
addr4->sin_port = netorder_port;
|
441
|
+
} else if (server.ip_size == 16) {
|
442
|
+
addr->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in6));
|
443
|
+
grpc_sockaddr_in6* addr6 = (grpc_sockaddr_in6*)&addr->addr;
|
444
|
+
addr6->sin6_family = GRPC_AF_INET6;
|
445
|
+
memcpy(&addr6->sin6_addr, server.ip_addr, server.ip_size);
|
446
|
+
addr6->sin6_port = netorder_port;
|
447
|
+
}
|
448
|
+
}
|
449
|
+
|
450
|
+
std::string GrpcLb::Serverlist::AsText() const {
|
451
|
+
std::vector<std::string> entries;
|
452
|
+
for (size_t i = 0; i < serverlist_.size(); ++i) {
|
453
|
+
const GrpcLbServer& server = serverlist_[i];
|
454
|
+
std::string ipport;
|
455
|
+
if (server.drop) {
|
456
|
+
ipport = "(drop)";
|
457
|
+
} else {
|
458
|
+
grpc_resolved_address addr;
|
459
|
+
ParseServer(server, &addr);
|
460
|
+
ipport = grpc_sockaddr_to_string(&addr, false);
|
461
|
+
}
|
462
|
+
entries.push_back(absl::StrFormat(" %" PRIuPTR ": %s token=%s\n", i,
|
463
|
+
ipport, server.load_balance_token));
|
464
|
+
}
|
465
|
+
return absl::StrJoin(entries, "");
|
466
|
+
}
|
467
|
+
|
468
|
+
// vtables for channel args for LB token and client stats.
|
469
|
+
void* lb_token_copy(void* token) {
|
470
|
+
return gpr_strdup(static_cast<char*>(token));
|
471
|
+
}
|
472
|
+
void lb_token_destroy(void* token) { gpr_free(token); }
|
473
|
+
void* client_stats_copy(void* p) {
|
474
|
+
GrpcLbClientStats* client_stats = static_cast<GrpcLbClientStats*>(p);
|
475
|
+
client_stats->Ref().release();
|
476
|
+
return p;
|
477
|
+
}
|
478
|
+
void client_stats_destroy(void* p) {
|
479
|
+
GrpcLbClientStats* client_stats = static_cast<GrpcLbClientStats*>(p);
|
480
|
+
client_stats->Unref();
|
481
|
+
}
|
482
|
+
int equal_cmp(void* /*p1*/, void* /*p2*/) {
|
483
|
+
// Always indicate a match, since we don't want this channel arg to
|
484
|
+
// affect the subchannel's key in the index.
|
485
|
+
// TODO(roth): Is this right? This does prevent us from needlessly
|
486
|
+
// recreating the subchannel whenever the LB token or client stats
|
487
|
+
// changes (i.e., when the balancer call is terminated and reestablished).
|
488
|
+
// However, it means that we don't actually recreate the subchannel,
|
489
|
+
// which means that we won't ever switch over to using the new LB
|
490
|
+
// token or client stats. A better approach might be to find somewhere
|
491
|
+
// other than the subchannel args to store the LB token and client
|
492
|
+
// stats. They could be stored in a map and then looked up for each
|
493
|
+
// call. Or we could do something more complicated whereby
|
494
|
+
// we create our own subchannel wrapper to store them, although that would
|
495
|
+
// involve a lot of refcounting overhead.
|
496
|
+
// Given that we're trying to move from grpclb to xds at this point,
|
497
|
+
// and that no one has actually reported any problems with this, we
|
498
|
+
// probably won't bother fixing this at this point.
|
499
|
+
return 0;
|
500
|
+
}
|
501
|
+
const grpc_arg_pointer_vtable lb_token_arg_vtable = {
|
502
|
+
lb_token_copy, lb_token_destroy, equal_cmp};
|
503
|
+
const grpc_arg_pointer_vtable client_stats_arg_vtable = {
|
504
|
+
client_stats_copy, client_stats_destroy, equal_cmp};
|
505
|
+
|
506
|
+
bool IsServerValid(const GrpcLbServer& server, size_t idx, bool log) {
|
507
|
+
if (server.drop) return false;
|
508
|
+
if (GPR_UNLIKELY(server.port >> 16 != 0)) {
|
509
|
+
if (log) {
|
510
|
+
gpr_log(GPR_ERROR,
|
511
|
+
"Invalid port '%d' at index %lu of serverlist. Ignoring.",
|
512
|
+
server.port, (unsigned long)idx);
|
513
|
+
}
|
514
|
+
return false;
|
515
|
+
}
|
516
|
+
if (GPR_UNLIKELY(server.ip_size != 4 && server.ip_size != 16)) {
|
517
|
+
if (log) {
|
518
|
+
gpr_log(GPR_ERROR,
|
519
|
+
"Expected IP to be 4 or 16 bytes, got %d at index %lu of "
|
520
|
+
"serverlist. Ignoring",
|
521
|
+
server.ip_size, (unsigned long)idx);
|
522
|
+
}
|
523
|
+
return false;
|
524
|
+
}
|
525
|
+
return true;
|
526
|
+
}
|
527
|
+
|
528
|
+
// Returns addresses extracted from the serverlist.
|
529
|
+
ServerAddressList GrpcLb::Serverlist::GetServerAddressList(
|
530
|
+
GrpcLbClientStats* client_stats) const {
|
531
|
+
ServerAddressList addresses;
|
532
|
+
for (size_t i = 0; i < serverlist_.size(); ++i) {
|
533
|
+
const GrpcLbServer& server = serverlist_[i];
|
534
|
+
if (!IsServerValid(server, i, false)) continue;
|
535
|
+
// Address processing.
|
536
|
+
grpc_resolved_address addr;
|
537
|
+
ParseServer(server, &addr);
|
538
|
+
// LB token processing.
|
539
|
+
char lb_token[GPR_ARRAY_SIZE(server.load_balance_token) + 1];
|
540
|
+
if (server.load_balance_token[0] != 0) {
|
541
|
+
const size_t lb_token_max_length =
|
542
|
+
GPR_ARRAY_SIZE(server.load_balance_token);
|
543
|
+
const size_t lb_token_length =
|
544
|
+
strnlen(server.load_balance_token, lb_token_max_length);
|
545
|
+
memcpy(lb_token, server.load_balance_token, lb_token_length);
|
546
|
+
lb_token[lb_token_length] = '\0';
|
547
|
+
} else {
|
548
|
+
char* uri = grpc_sockaddr_to_uri(&addr);
|
549
|
+
gpr_log(GPR_INFO,
|
550
|
+
"Missing LB token for backend address '%s'. The empty token will "
|
551
|
+
"be used instead",
|
552
|
+
uri);
|
553
|
+
gpr_free(uri);
|
554
|
+
lb_token[0] = '\0';
|
555
|
+
}
|
556
|
+
// Add address.
|
557
|
+
absl::InlinedVector<grpc_arg, 2> args_to_add;
|
558
|
+
args_to_add.emplace_back(grpc_channel_arg_pointer_create(
|
559
|
+
const_cast<char*>(GRPC_ARG_GRPCLB_ADDRESS_LB_TOKEN), lb_token,
|
560
|
+
&lb_token_arg_vtable));
|
561
|
+
if (client_stats != nullptr) {
|
562
|
+
args_to_add.emplace_back(grpc_channel_arg_pointer_create(
|
563
|
+
const_cast<char*>(GRPC_ARG_GRPCLB_ADDRESS_CLIENT_STATS), client_stats,
|
564
|
+
&client_stats_arg_vtable));
|
565
|
+
}
|
566
|
+
grpc_channel_args* args = grpc_channel_args_copy_and_add(
|
567
|
+
nullptr, args_to_add.data(), args_to_add.size());
|
568
|
+
addresses.emplace_back(addr, args);
|
569
|
+
}
|
570
|
+
return addresses;
|
571
|
+
}
|
572
|
+
|
573
|
+
bool GrpcLb::Serverlist::ContainsAllDropEntries() const {
|
574
|
+
if (serverlist_.empty()) return false;
|
575
|
+
for (const GrpcLbServer& server : serverlist_) {
|
576
|
+
if (!server.drop) return false;
|
577
|
+
}
|
578
|
+
return true;
|
579
|
+
}
|
580
|
+
|
581
|
+
const char* GrpcLb::Serverlist::ShouldDrop() {
|
582
|
+
if (serverlist_.empty()) return nullptr;
|
583
|
+
GrpcLbServer& server = serverlist_[drop_index_];
|
584
|
+
drop_index_ = (drop_index_ + 1) % serverlist_.size();
|
585
|
+
return server.drop ? server.load_balance_token : nullptr;
|
586
|
+
}
|
587
|
+
|
588
|
+
//
|
589
|
+
// GrpcLb::Picker
|
590
|
+
//
|
591
|
+
|
592
|
+
GrpcLb::PickResult GrpcLb::Picker::Pick(PickArgs args) {
|
593
|
+
PickResult result;
|
594
|
+
// Check if we should drop the call.
|
595
|
+
const char* drop_token = serverlist_->ShouldDrop();
|
596
|
+
if (drop_token != nullptr) {
|
597
|
+
// Update client load reporting stats to indicate the number of
|
598
|
+
// dropped calls. Note that we have to do this here instead of in
|
599
|
+
// the client_load_reporting filter, because we do not create a
|
600
|
+
// subchannel call (and therefore no client_load_reporting filter)
|
601
|
+
// for dropped calls.
|
602
|
+
if (client_stats_ != nullptr) {
|
603
|
+
client_stats_->AddCallDropped(drop_token);
|
604
|
+
}
|
605
|
+
result.type = PickResult::PICK_COMPLETE;
|
606
|
+
return result;
|
607
|
+
}
|
608
|
+
// Forward pick to child policy.
|
609
|
+
result = child_picker_->Pick(args);
|
610
|
+
// If pick succeeded, add LB token to initial metadata.
|
611
|
+
if (result.type == PickResult::PICK_COMPLETE &&
|
612
|
+
result.subchannel != nullptr) {
|
613
|
+
// Encode client stats object into metadata for use by
|
614
|
+
// client_load_reporting filter.
|
615
|
+
const grpc_arg* arg =
|
616
|
+
grpc_channel_args_find(result.subchannel->channel_args(),
|
617
|
+
GRPC_ARG_GRPCLB_ADDRESS_CLIENT_STATS);
|
618
|
+
if (arg != nullptr && arg->type == GRPC_ARG_POINTER &&
|
619
|
+
arg->value.pointer.p != nullptr) {
|
620
|
+
GrpcLbClientStats* client_stats =
|
621
|
+
static_cast<GrpcLbClientStats*>(arg->value.pointer.p);
|
622
|
+
client_stats->Ref().release(); // Ref passed via metadata.
|
623
|
+
// The metadata value is a hack: we pretend the pointer points to
|
624
|
+
// a string and rely on the client_load_reporting filter to know
|
625
|
+
// how to interpret it.
|
626
|
+
args.initial_metadata->Add(
|
627
|
+
kGrpcLbClientStatsMetadataKey,
|
628
|
+
absl::string_view(reinterpret_cast<const char*>(client_stats), 0));
|
629
|
+
// Update calls-started.
|
630
|
+
client_stats->AddCallStarted();
|
631
|
+
}
|
632
|
+
// Encode the LB token in metadata.
|
633
|
+
arg = grpc_channel_args_find(result.subchannel->channel_args(),
|
634
|
+
GRPC_ARG_GRPCLB_ADDRESS_LB_TOKEN);
|
635
|
+
if (arg == nullptr) {
|
636
|
+
gpr_log(GPR_ERROR, "[grpclb %p picker %p] No LB token for subchannel %p",
|
637
|
+
parent_, this, result.subchannel.get());
|
638
|
+
abort();
|
639
|
+
}
|
640
|
+
args.initial_metadata->Add(kGrpcLbLbTokenMetadataKey,
|
641
|
+
static_cast<char*>(arg->value.pointer.p));
|
642
|
+
}
|
643
|
+
return result;
|
644
|
+
}
|
645
|
+
|
646
|
+
//
|
647
|
+
// GrpcLb::Helper
|
648
|
+
//
|
649
|
+
|
650
|
+
RefCountedPtr<SubchannelInterface> GrpcLb::Helper::CreateSubchannel(
|
651
|
+
const grpc_channel_args& args) {
|
652
|
+
if (parent_->shutting_down_) return nullptr;
|
653
|
+
return parent_->channel_control_helper()->CreateSubchannel(args);
|
654
|
+
}
|
655
|
+
|
656
|
+
void GrpcLb::Helper::UpdateState(grpc_connectivity_state state,
|
657
|
+
std::unique_ptr<SubchannelPicker> picker) {
|
658
|
+
if (parent_->shutting_down_) return;
|
659
|
+
// Record whether child policy reports READY.
|
660
|
+
parent_->child_policy_ready_ = state == GRPC_CHANNEL_READY;
|
661
|
+
// Enter fallback mode if needed.
|
662
|
+
parent_->MaybeEnterFallbackModeAfterStartup();
|
663
|
+
// There are three cases to consider here:
|
664
|
+
// 1. We're in fallback mode. In this case, we're always going to use
|
665
|
+
// the child policy's result, so we pass its picker through as-is.
|
666
|
+
// 2. The serverlist contains only drop entries. In this case, we
|
667
|
+
// want to use our own picker so that we can return the drops.
|
668
|
+
// 3. Not in fallback mode and serverlist is not all drops (i.e., it
|
669
|
+
// may be empty or contain at least one backend address). There are
|
670
|
+
// two sub-cases:
|
671
|
+
// a. The child policy is reporting state READY. In this case, we wrap
|
672
|
+
// the child's picker in our own, so that we can handle drops and LB
|
673
|
+
// token metadata for each pick.
|
674
|
+
// b. The child policy is reporting a state other than READY. In this
|
675
|
+
// case, we don't want to use our own picker, because we don't want
|
676
|
+
// to process drops for picks that yield a QUEUE result; this would
|
677
|
+
// result in dropping too many calls, since we will see the
|
678
|
+
// queued picks multiple times, and we'd consider each one a
|
679
|
+
// separate call for the drop calculation.
|
680
|
+
//
|
681
|
+
// Cases 1 and 3b: return picker from the child policy as-is.
|
682
|
+
if (parent_->serverlist_ == nullptr ||
|
683
|
+
(!parent_->serverlist_->ContainsAllDropEntries() &&
|
684
|
+
state != GRPC_CHANNEL_READY)) {
|
685
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
686
|
+
gpr_log(GPR_INFO,
|
687
|
+
"[grpclb %p helper %p] state=%s passing child picker %p as-is",
|
688
|
+
parent_.get(), this, ConnectivityStateName(state), picker.get());
|
689
|
+
}
|
690
|
+
parent_->channel_control_helper()->UpdateState(state, std::move(picker));
|
691
|
+
return;
|
692
|
+
}
|
693
|
+
// Cases 2 and 3a: wrap picker from the child in our own picker.
|
694
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
695
|
+
gpr_log(GPR_INFO, "[grpclb %p helper %p] state=%s wrapping child picker %p",
|
696
|
+
parent_.get(), this, ConnectivityStateName(state), picker.get());
|
697
|
+
}
|
698
|
+
RefCountedPtr<GrpcLbClientStats> client_stats;
|
699
|
+
if (parent_->lb_calld_ != nullptr &&
|
700
|
+
parent_->lb_calld_->client_stats() != nullptr) {
|
701
|
+
client_stats = parent_->lb_calld_->client_stats()->Ref();
|
702
|
+
}
|
703
|
+
parent_->channel_control_helper()->UpdateState(
|
704
|
+
state,
|
705
|
+
absl::make_unique<Picker>(parent_.get(), parent_->serverlist_,
|
706
|
+
std::move(picker), std::move(client_stats)));
|
707
|
+
}
|
708
|
+
|
709
|
+
void GrpcLb::Helper::RequestReresolution() {
|
710
|
+
if (parent_->shutting_down_) return;
|
711
|
+
// If we are talking to a balancer, we expect to get updated addresses
|
712
|
+
// from the balancer, so we can ignore the re-resolution request from
|
713
|
+
// the child policy. Otherwise, pass the re-resolution request up to the
|
714
|
+
// channel.
|
715
|
+
if (parent_->lb_calld_ == nullptr ||
|
716
|
+
!parent_->lb_calld_->seen_initial_response()) {
|
717
|
+
parent_->channel_control_helper()->RequestReresolution();
|
718
|
+
}
|
719
|
+
}
|
720
|
+
|
721
|
+
void GrpcLb::Helper::AddTraceEvent(TraceSeverity severity,
|
722
|
+
absl::string_view message) {
|
723
|
+
if (parent_->shutting_down_) return;
|
724
|
+
parent_->channel_control_helper()->AddTraceEvent(severity, message);
|
725
|
+
}
|
726
|
+
|
727
|
+
//
|
728
|
+
// GrpcLb::BalancerCallState
|
729
|
+
//
|
730
|
+
|
731
|
+
GrpcLb::BalancerCallState::BalancerCallState(
|
732
|
+
RefCountedPtr<LoadBalancingPolicy> parent_grpclb_policy)
|
733
|
+
: InternallyRefCounted<BalancerCallState>(&grpc_lb_glb_trace),
|
734
|
+
grpclb_policy_(std::move(parent_grpclb_policy)) {
|
735
|
+
GPR_ASSERT(grpclb_policy_ != nullptr);
|
736
|
+
GPR_ASSERT(!grpclb_policy()->shutting_down_);
|
737
|
+
// Init the LB call. Note that the LB call will progress every time there's
|
738
|
+
// activity in grpclb_policy_->interested_parties(), which is comprised of
|
739
|
+
// the polling entities from client_channel.
|
740
|
+
GPR_ASSERT(grpclb_policy()->server_name_ != nullptr);
|
741
|
+
GPR_ASSERT(grpclb_policy()->server_name_[0] != '\0');
|
742
|
+
// Closure Initialization
|
743
|
+
GRPC_CLOSURE_INIT(&lb_on_initial_request_sent_, OnInitialRequestSent, this,
|
744
|
+
grpc_schedule_on_exec_ctx);
|
745
|
+
GRPC_CLOSURE_INIT(&lb_on_balancer_message_received_,
|
746
|
+
OnBalancerMessageReceived, this, grpc_schedule_on_exec_ctx);
|
747
|
+
GRPC_CLOSURE_INIT(&lb_on_balancer_status_received_, OnBalancerStatusReceived,
|
748
|
+
this, grpc_schedule_on_exec_ctx);
|
749
|
+
GRPC_CLOSURE_INIT(&client_load_report_closure_, MaybeSendClientLoadReport,
|
750
|
+
this, grpc_schedule_on_exec_ctx);
|
751
|
+
const grpc_millis deadline =
|
752
|
+
grpclb_policy()->lb_call_timeout_ms_ == 0
|
753
|
+
? GRPC_MILLIS_INF_FUTURE
|
754
|
+
: ExecCtx::Get()->Now() + grpclb_policy()->lb_call_timeout_ms_;
|
755
|
+
lb_call_ = grpc_channel_create_pollset_set_call(
|
756
|
+
grpclb_policy()->lb_channel_, nullptr, GRPC_PROPAGATE_DEFAULTS,
|
757
|
+
grpclb_policy_->interested_parties(),
|
758
|
+
GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD,
|
759
|
+
nullptr, deadline, nullptr);
|
760
|
+
// Init the LB call request payload.
|
761
|
+
upb::Arena arena;
|
762
|
+
grpc_slice request_payload_slice =
|
763
|
+
GrpcLbRequestCreate(grpclb_policy()->server_name_, arena.ptr());
|
764
|
+
send_message_payload_ =
|
765
|
+
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
|
766
|
+
grpc_slice_unref_internal(request_payload_slice);
|
767
|
+
// Init other data associated with the LB call.
|
768
|
+
grpc_metadata_array_init(&lb_initial_metadata_recv_);
|
769
|
+
grpc_metadata_array_init(&lb_trailing_metadata_recv_);
|
770
|
+
}
|
771
|
+
|
772
|
+
GrpcLb::BalancerCallState::~BalancerCallState() {
|
773
|
+
GPR_ASSERT(lb_call_ != nullptr);
|
774
|
+
grpc_call_unref(lb_call_);
|
775
|
+
grpc_metadata_array_destroy(&lb_initial_metadata_recv_);
|
776
|
+
grpc_metadata_array_destroy(&lb_trailing_metadata_recv_);
|
777
|
+
grpc_byte_buffer_destroy(send_message_payload_);
|
778
|
+
grpc_byte_buffer_destroy(recv_message_payload_);
|
779
|
+
grpc_slice_unref_internal(lb_call_status_details_);
|
780
|
+
}
|
781
|
+
|
782
|
+
void GrpcLb::BalancerCallState::Orphan() {
|
783
|
+
GPR_ASSERT(lb_call_ != nullptr);
|
784
|
+
// If we are here because grpclb_policy wants to cancel the call,
|
785
|
+
// lb_on_balancer_status_received_ will complete the cancellation and clean
|
786
|
+
// up. Otherwise, we are here because grpclb_policy has to orphan a failed
|
787
|
+
// call, then the following cancellation will be a no-op.
|
788
|
+
grpc_call_cancel(lb_call_, nullptr);
|
789
|
+
if (client_load_report_timer_callback_pending_) {
|
790
|
+
grpc_timer_cancel(&client_load_report_timer_);
|
791
|
+
}
|
792
|
+
// Note that the initial ref is hold by lb_on_balancer_status_received_
|
793
|
+
// instead of the caller of this function. So the corresponding unref happens
|
794
|
+
// in lb_on_balancer_status_received_ instead of here.
|
795
|
+
}
|
796
|
+
|
797
|
+
void GrpcLb::BalancerCallState::StartQuery() {
|
798
|
+
GPR_ASSERT(lb_call_ != nullptr);
|
799
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
800
|
+
gpr_log(GPR_INFO, "[grpclb %p] lb_calld=%p: Starting LB call %p",
|
801
|
+
grpclb_policy_.get(), this, lb_call_);
|
802
|
+
}
|
803
|
+
// Create the ops.
|
804
|
+
grpc_call_error call_error;
|
805
|
+
grpc_op ops[3];
|
806
|
+
memset(ops, 0, sizeof(ops));
|
807
|
+
// Op: send initial metadata.
|
808
|
+
grpc_op* op = ops;
|
809
|
+
op->op = GRPC_OP_SEND_INITIAL_METADATA;
|
810
|
+
op->data.send_initial_metadata.count = 0;
|
811
|
+
op->flags = GRPC_INITIAL_METADATA_WAIT_FOR_READY |
|
812
|
+
GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET;
|
813
|
+
op->reserved = nullptr;
|
814
|
+
op++;
|
815
|
+
// Op: send request message.
|
816
|
+
GPR_ASSERT(send_message_payload_ != nullptr);
|
817
|
+
op->op = GRPC_OP_SEND_MESSAGE;
|
818
|
+
op->data.send_message.send_message = send_message_payload_;
|
819
|
+
op->flags = 0;
|
820
|
+
op->reserved = nullptr;
|
821
|
+
op++;
|
822
|
+
// TODO(roth): We currently track this ref manually. Once the
|
823
|
+
// ClosureRef API is ready, we should pass the RefCountedPtr<> along
|
824
|
+
// with the callback.
|
825
|
+
auto self = Ref(DEBUG_LOCATION, "on_initial_request_sent");
|
826
|
+
self.release();
|
827
|
+
call_error = grpc_call_start_batch_and_execute(
|
828
|
+
lb_call_, ops, (size_t)(op - ops), &lb_on_initial_request_sent_);
|
829
|
+
GPR_ASSERT(GRPC_CALL_OK == call_error);
|
830
|
+
// Op: recv initial metadata.
|
831
|
+
op = ops;
|
832
|
+
op->op = GRPC_OP_RECV_INITIAL_METADATA;
|
833
|
+
op->data.recv_initial_metadata.recv_initial_metadata =
|
834
|
+
&lb_initial_metadata_recv_;
|
835
|
+
op->flags = 0;
|
836
|
+
op->reserved = nullptr;
|
837
|
+
op++;
|
838
|
+
// Op: recv response.
|
839
|
+
op->op = GRPC_OP_RECV_MESSAGE;
|
840
|
+
op->data.recv_message.recv_message = &recv_message_payload_;
|
841
|
+
op->flags = 0;
|
842
|
+
op->reserved = nullptr;
|
843
|
+
op++;
|
844
|
+
// TODO(roth): We currently track this ref manually. Once the
|
845
|
+
// ClosureRef API is ready, we should pass the RefCountedPtr<> along
|
846
|
+
// with the callback.
|
847
|
+
self = Ref(DEBUG_LOCATION, "on_message_received");
|
848
|
+
self.release();
|
849
|
+
call_error = grpc_call_start_batch_and_execute(
|
850
|
+
lb_call_, ops, (size_t)(op - ops), &lb_on_balancer_message_received_);
|
851
|
+
GPR_ASSERT(GRPC_CALL_OK == call_error);
|
852
|
+
// Op: recv server status.
|
853
|
+
op = ops;
|
854
|
+
op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
|
855
|
+
op->data.recv_status_on_client.trailing_metadata =
|
856
|
+
&lb_trailing_metadata_recv_;
|
857
|
+
op->data.recv_status_on_client.status = &lb_call_status_;
|
858
|
+
op->data.recv_status_on_client.status_details = &lb_call_status_details_;
|
859
|
+
op->flags = 0;
|
860
|
+
op->reserved = nullptr;
|
861
|
+
op++;
|
862
|
+
// This callback signals the end of the LB call, so it relies on the initial
|
863
|
+
// ref instead of a new ref. When it's invoked, it's the initial ref that is
|
864
|
+
// unreffed.
|
865
|
+
call_error = grpc_call_start_batch_and_execute(
|
866
|
+
lb_call_, ops, (size_t)(op - ops), &lb_on_balancer_status_received_);
|
867
|
+
GPR_ASSERT(GRPC_CALL_OK == call_error);
|
868
|
+
}
|
869
|
+
|
870
|
+
void GrpcLb::BalancerCallState::ScheduleNextClientLoadReportLocked() {
|
871
|
+
const grpc_millis next_client_load_report_time =
|
872
|
+
ExecCtx::Get()->Now() + client_stats_report_interval_;
|
873
|
+
GRPC_CLOSURE_INIT(&client_load_report_closure_, MaybeSendClientLoadReport,
|
874
|
+
this, grpc_schedule_on_exec_ctx);
|
875
|
+
grpc_timer_init(&client_load_report_timer_, next_client_load_report_time,
|
876
|
+
&client_load_report_closure_);
|
877
|
+
client_load_report_timer_callback_pending_ = true;
|
878
|
+
}
|
879
|
+
|
880
|
+
void GrpcLb::BalancerCallState::MaybeSendClientLoadReport(void* arg,
|
881
|
+
grpc_error* error) {
|
882
|
+
BalancerCallState* lb_calld = static_cast<BalancerCallState*>(arg);
|
883
|
+
GRPC_ERROR_REF(error); // ref owned by lambda
|
884
|
+
lb_calld->grpclb_policy()->work_serializer()->Run(
|
885
|
+
[lb_calld, error]() { lb_calld->MaybeSendClientLoadReportLocked(error); },
|
886
|
+
DEBUG_LOCATION);
|
887
|
+
}
|
888
|
+
|
889
|
+
void GrpcLb::BalancerCallState::MaybeSendClientLoadReportLocked(
|
890
|
+
grpc_error* error) {
|
891
|
+
client_load_report_timer_callback_pending_ = false;
|
892
|
+
if (error != GRPC_ERROR_NONE || this != grpclb_policy()->lb_calld_.get()) {
|
893
|
+
Unref(DEBUG_LOCATION, "client_load_report");
|
894
|
+
GRPC_ERROR_UNREF(error);
|
895
|
+
return;
|
896
|
+
}
|
897
|
+
// If we've already sent the initial request, then we can go ahead and send
|
898
|
+
// the load report. Otherwise, we need to wait until the initial request has
|
899
|
+
// been sent to send this (see OnInitialRequestSentLocked()).
|
900
|
+
if (send_message_payload_ == nullptr) {
|
901
|
+
SendClientLoadReportLocked();
|
902
|
+
} else {
|
903
|
+
client_load_report_is_due_ = true;
|
904
|
+
}
|
905
|
+
}
|
906
|
+
|
907
|
+
void GrpcLb::BalancerCallState::SendClientLoadReportLocked() {
|
908
|
+
// Construct message payload.
|
909
|
+
GPR_ASSERT(send_message_payload_ == nullptr);
|
910
|
+
// Get snapshot of stats.
|
911
|
+
int64_t num_calls_started;
|
912
|
+
int64_t num_calls_finished;
|
913
|
+
int64_t num_calls_finished_with_client_failed_to_send;
|
914
|
+
int64_t num_calls_finished_known_received;
|
915
|
+
std::unique_ptr<GrpcLbClientStats::DroppedCallCounts> drop_token_counts;
|
916
|
+
client_stats_->Get(&num_calls_started, &num_calls_finished,
|
917
|
+
&num_calls_finished_with_client_failed_to_send,
|
918
|
+
&num_calls_finished_known_received, &drop_token_counts);
|
919
|
+
// Skip client load report if the counters were all zero in the last
|
920
|
+
// report and they are still zero in this one.
|
921
|
+
if (num_calls_started == 0 && num_calls_finished == 0 &&
|
922
|
+
num_calls_finished_with_client_failed_to_send == 0 &&
|
923
|
+
num_calls_finished_known_received == 0 &&
|
924
|
+
(drop_token_counts == nullptr || drop_token_counts->size() == 0)) {
|
925
|
+
if (last_client_load_report_counters_were_zero_) {
|
926
|
+
ScheduleNextClientLoadReportLocked();
|
927
|
+
return;
|
928
|
+
}
|
929
|
+
last_client_load_report_counters_were_zero_ = true;
|
930
|
+
} else {
|
931
|
+
last_client_load_report_counters_were_zero_ = false;
|
932
|
+
}
|
933
|
+
// Populate load report.
|
934
|
+
upb::Arena arena;
|
935
|
+
grpc_slice request_payload_slice = GrpcLbLoadReportRequestCreate(
|
936
|
+
num_calls_started, num_calls_finished,
|
937
|
+
num_calls_finished_with_client_failed_to_send,
|
938
|
+
num_calls_finished_known_received, drop_token_counts.get(), arena.ptr());
|
939
|
+
send_message_payload_ =
|
940
|
+
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
|
941
|
+
grpc_slice_unref_internal(request_payload_slice);
|
942
|
+
// Send the report.
|
943
|
+
grpc_op op;
|
944
|
+
memset(&op, 0, sizeof(op));
|
945
|
+
op.op = GRPC_OP_SEND_MESSAGE;
|
946
|
+
op.data.send_message.send_message = send_message_payload_;
|
947
|
+
GRPC_CLOSURE_INIT(&client_load_report_closure_, ClientLoadReportDone, this,
|
948
|
+
grpc_schedule_on_exec_ctx);
|
949
|
+
grpc_call_error call_error = grpc_call_start_batch_and_execute(
|
950
|
+
lb_call_, &op, 1, &client_load_report_closure_);
|
951
|
+
if (GPR_UNLIKELY(call_error != GRPC_CALL_OK)) {
|
952
|
+
gpr_log(GPR_ERROR,
|
953
|
+
"[grpclb %p] lb_calld=%p call_error=%d sending client load report",
|
954
|
+
grpclb_policy_.get(), this, call_error);
|
955
|
+
GPR_ASSERT(GRPC_CALL_OK == call_error);
|
956
|
+
}
|
957
|
+
}
|
958
|
+
|
959
|
+
void GrpcLb::BalancerCallState::ClientLoadReportDone(void* arg,
|
960
|
+
grpc_error* error) {
|
961
|
+
BalancerCallState* lb_calld = static_cast<BalancerCallState*>(arg);
|
962
|
+
GRPC_ERROR_REF(error); // ref owned by lambda
|
963
|
+
lb_calld->grpclb_policy()->work_serializer()->Run(
|
964
|
+
[lb_calld, error]() { lb_calld->ClientLoadReportDoneLocked(error); },
|
965
|
+
DEBUG_LOCATION);
|
966
|
+
}
|
967
|
+
|
968
|
+
void GrpcLb::BalancerCallState::ClientLoadReportDoneLocked(grpc_error* error) {
|
969
|
+
grpc_byte_buffer_destroy(send_message_payload_);
|
970
|
+
send_message_payload_ = nullptr;
|
971
|
+
if (error != GRPC_ERROR_NONE || this != grpclb_policy()->lb_calld_.get()) {
|
972
|
+
Unref(DEBUG_LOCATION, "client_load_report");
|
973
|
+
GRPC_ERROR_UNREF(error);
|
974
|
+
return;
|
975
|
+
}
|
976
|
+
ScheduleNextClientLoadReportLocked();
|
977
|
+
}
|
978
|
+
|
979
|
+
void GrpcLb::BalancerCallState::OnInitialRequestSent(void* arg,
|
980
|
+
grpc_error* /*error*/) {
|
981
|
+
BalancerCallState* lb_calld = static_cast<BalancerCallState*>(arg);
|
982
|
+
lb_calld->grpclb_policy()->work_serializer()->Run(
|
983
|
+
[lb_calld]() { lb_calld->OnInitialRequestSentLocked(); }, DEBUG_LOCATION);
|
984
|
+
}
|
985
|
+
|
986
|
+
void GrpcLb::BalancerCallState::OnInitialRequestSentLocked() {
|
987
|
+
grpc_byte_buffer_destroy(send_message_payload_);
|
988
|
+
send_message_payload_ = nullptr;
|
989
|
+
// If we attempted to send a client load report before the initial request was
|
990
|
+
// sent (and this lb_calld is still in use), send the load report now.
|
991
|
+
if (client_load_report_is_due_ && this == grpclb_policy()->lb_calld_.get()) {
|
992
|
+
SendClientLoadReportLocked();
|
993
|
+
client_load_report_is_due_ = false;
|
994
|
+
}
|
995
|
+
Unref(DEBUG_LOCATION, "on_initial_request_sent");
|
996
|
+
}
|
997
|
+
|
998
|
+
void GrpcLb::BalancerCallState::OnBalancerMessageReceived(
|
999
|
+
void* arg, grpc_error* /*error*/) {
|
1000
|
+
BalancerCallState* lb_calld = static_cast<BalancerCallState*>(arg);
|
1001
|
+
lb_calld->grpclb_policy()->work_serializer()->Run(
|
1002
|
+
[lb_calld]() { lb_calld->OnBalancerMessageReceivedLocked(); },
|
1003
|
+
DEBUG_LOCATION);
|
1004
|
+
}
|
1005
|
+
|
1006
|
+
void GrpcLb::BalancerCallState::OnBalancerMessageReceivedLocked() {
|
1007
|
+
// Null payload means the LB call was cancelled.
|
1008
|
+
if (this != grpclb_policy()->lb_calld_.get() ||
|
1009
|
+
recv_message_payload_ == nullptr) {
|
1010
|
+
Unref(DEBUG_LOCATION, "on_message_received");
|
1011
|
+
return;
|
1012
|
+
}
|
1013
|
+
grpc_byte_buffer_reader bbr;
|
1014
|
+
grpc_byte_buffer_reader_init(&bbr, recv_message_payload_);
|
1015
|
+
grpc_slice response_slice = grpc_byte_buffer_reader_readall(&bbr);
|
1016
|
+
grpc_byte_buffer_reader_destroy(&bbr);
|
1017
|
+
grpc_byte_buffer_destroy(recv_message_payload_);
|
1018
|
+
recv_message_payload_ = nullptr;
|
1019
|
+
GrpcLbResponse response;
|
1020
|
+
upb::Arena arena;
|
1021
|
+
if (!GrpcLbResponseParse(response_slice, arena.ptr(), &response) ||
|
1022
|
+
(response.type == response.INITIAL && seen_initial_response_)) {
|
1023
|
+
char* response_slice_str =
|
1024
|
+
grpc_dump_slice(response_slice, GPR_DUMP_ASCII | GPR_DUMP_HEX);
|
1025
|
+
gpr_log(GPR_ERROR,
|
1026
|
+
"[grpclb %p] lb_calld=%p: Invalid LB response received: '%s'. "
|
1027
|
+
"Ignoring.",
|
1028
|
+
grpclb_policy(), this, response_slice_str);
|
1029
|
+
gpr_free(response_slice_str);
|
1030
|
+
} else {
|
1031
|
+
switch (response.type) {
|
1032
|
+
case response.INITIAL: {
|
1033
|
+
if (response.client_stats_report_interval != 0) {
|
1034
|
+
client_stats_report_interval_ =
|
1035
|
+
GPR_MAX(GPR_MS_PER_SEC, response.client_stats_report_interval);
|
1036
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1037
|
+
gpr_log(GPR_INFO,
|
1038
|
+
"[grpclb %p] lb_calld=%p: Received initial LB response "
|
1039
|
+
"message; client load reporting interval = %" PRId64
|
1040
|
+
" milliseconds",
|
1041
|
+
grpclb_policy(), this, client_stats_report_interval_);
|
1042
|
+
}
|
1043
|
+
} else if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1044
|
+
gpr_log(GPR_INFO,
|
1045
|
+
"[grpclb %p] lb_calld=%p: Received initial LB response "
|
1046
|
+
"message; client load reporting NOT enabled",
|
1047
|
+
grpclb_policy(), this);
|
1048
|
+
}
|
1049
|
+
seen_initial_response_ = true;
|
1050
|
+
break;
|
1051
|
+
}
|
1052
|
+
case response.SERVERLIST: {
|
1053
|
+
GPR_ASSERT(lb_call_ != nullptr);
|
1054
|
+
auto serverlist_wrapper =
|
1055
|
+
MakeRefCounted<Serverlist>(std::move(response.serverlist));
|
1056
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1057
|
+
gpr_log(GPR_INFO,
|
1058
|
+
"[grpclb %p] lb_calld=%p: Serverlist with %" PRIuPTR
|
1059
|
+
" servers received:\n%s",
|
1060
|
+
grpclb_policy(), this,
|
1061
|
+
serverlist_wrapper->serverlist().size(),
|
1062
|
+
serverlist_wrapper->AsText().c_str());
|
1063
|
+
}
|
1064
|
+
seen_serverlist_ = true;
|
1065
|
+
// Start sending client load report only after we start using the
|
1066
|
+
// serverlist returned from the current LB call.
|
1067
|
+
if (client_stats_report_interval_ > 0 && client_stats_ == nullptr) {
|
1068
|
+
client_stats_ = MakeRefCounted<GrpcLbClientStats>();
|
1069
|
+
// Ref held by callback.
|
1070
|
+
Ref(DEBUG_LOCATION, "client_load_report").release();
|
1071
|
+
ScheduleNextClientLoadReportLocked();
|
1072
|
+
}
|
1073
|
+
// Check if the serverlist differs from the previous one.
|
1074
|
+
if (grpclb_policy()->serverlist_ != nullptr &&
|
1075
|
+
*grpclb_policy()->serverlist_ == *serverlist_wrapper) {
|
1076
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1077
|
+
gpr_log(GPR_INFO,
|
1078
|
+
"[grpclb %p] lb_calld=%p: Incoming server list identical "
|
1079
|
+
"to current, ignoring.",
|
1080
|
+
grpclb_policy(), this);
|
1081
|
+
}
|
1082
|
+
} else { // New serverlist.
|
1083
|
+
// Dispose of the fallback.
|
1084
|
+
// TODO(roth): Ideally, we should stay in fallback mode until we
|
1085
|
+
// know that we can reach at least one of the backends in the new
|
1086
|
+
// serverlist. Unfortunately, we can't do that, since we need to
|
1087
|
+
// send the new addresses to the child policy in order to determine
|
1088
|
+
// if they are reachable, and if we don't exit fallback mode now,
|
1089
|
+
// CreateOrUpdateChildPolicyLocked() will use the fallback
|
1090
|
+
// addresses instead of the addresses from the new serverlist.
|
1091
|
+
// However, if we can't reach any of the servers in the new
|
1092
|
+
// serverlist, then the child policy will never switch away from
|
1093
|
+
// the fallback addresses, but the grpclb policy will still think
|
1094
|
+
// that we're not in fallback mode, which means that we won't send
|
1095
|
+
// updates to the child policy when the fallback addresses are
|
1096
|
+
// updated by the resolver. This is sub-optimal, but the only way
|
1097
|
+
// to fix it is to maintain a completely separate child policy for
|
1098
|
+
// fallback mode, and that's more work than we want to put into
|
1099
|
+
// the grpclb implementation at this point, since we're deprecating
|
1100
|
+
// it in favor of the xds policy. We will implement this the
|
1101
|
+
// right way in the xds policy instead.
|
1102
|
+
if (grpclb_policy()->fallback_mode_) {
|
1103
|
+
gpr_log(GPR_INFO,
|
1104
|
+
"[grpclb %p] Received response from balancer; exiting "
|
1105
|
+
"fallback mode",
|
1106
|
+
grpclb_policy());
|
1107
|
+
grpclb_policy()->fallback_mode_ = false;
|
1108
|
+
}
|
1109
|
+
if (grpclb_policy()->fallback_at_startup_checks_pending_) {
|
1110
|
+
grpclb_policy()->fallback_at_startup_checks_pending_ = false;
|
1111
|
+
grpc_timer_cancel(&grpclb_policy()->lb_fallback_timer_);
|
1112
|
+
grpclb_policy()->CancelBalancerChannelConnectivityWatchLocked();
|
1113
|
+
}
|
1114
|
+
// Update the serverlist in the GrpcLb instance. This serverlist
|
1115
|
+
// instance will be destroyed either upon the next update or when the
|
1116
|
+
// GrpcLb instance is destroyed.
|
1117
|
+
grpclb_policy()->serverlist_ = std::move(serverlist_wrapper);
|
1118
|
+
grpclb_policy()->CreateOrUpdateChildPolicyLocked();
|
1119
|
+
}
|
1120
|
+
break;
|
1121
|
+
}
|
1122
|
+
case response.FALLBACK: {
|
1123
|
+
if (!grpclb_policy()->fallback_mode_) {
|
1124
|
+
gpr_log(GPR_INFO,
|
1125
|
+
"[grpclb %p] Entering fallback mode as requested by balancer",
|
1126
|
+
grpclb_policy());
|
1127
|
+
if (grpclb_policy()->fallback_at_startup_checks_pending_) {
|
1128
|
+
grpclb_policy()->fallback_at_startup_checks_pending_ = false;
|
1129
|
+
grpc_timer_cancel(&grpclb_policy()->lb_fallback_timer_);
|
1130
|
+
grpclb_policy()->CancelBalancerChannelConnectivityWatchLocked();
|
1131
|
+
}
|
1132
|
+
grpclb_policy()->fallback_mode_ = true;
|
1133
|
+
grpclb_policy()->CreateOrUpdateChildPolicyLocked();
|
1134
|
+
// Reset serverlist, so that if the balancer exits fallback
|
1135
|
+
// mode by sending the same serverlist we were previously
|
1136
|
+
// using, we don't incorrectly ignore it as a duplicate.
|
1137
|
+
grpclb_policy()->serverlist_.reset();
|
1138
|
+
}
|
1139
|
+
break;
|
1140
|
+
}
|
1141
|
+
}
|
1142
|
+
}
|
1143
|
+
grpc_slice_unref_internal(response_slice);
|
1144
|
+
if (!grpclb_policy()->shutting_down_) {
|
1145
|
+
// Keep listening for serverlist updates.
|
1146
|
+
grpc_op op;
|
1147
|
+
memset(&op, 0, sizeof(op));
|
1148
|
+
op.op = GRPC_OP_RECV_MESSAGE;
|
1149
|
+
op.data.recv_message.recv_message = &recv_message_payload_;
|
1150
|
+
op.flags = 0;
|
1151
|
+
op.reserved = nullptr;
|
1152
|
+
// Reuse the "OnBalancerMessageReceivedLocked" ref taken in StartQuery().
|
1153
|
+
const grpc_call_error call_error = grpc_call_start_batch_and_execute(
|
1154
|
+
lb_call_, &op, 1, &lb_on_balancer_message_received_);
|
1155
|
+
GPR_ASSERT(GRPC_CALL_OK == call_error);
|
1156
|
+
} else {
|
1157
|
+
Unref(DEBUG_LOCATION, "on_message_received+grpclb_shutdown");
|
1158
|
+
}
|
1159
|
+
}
|
1160
|
+
|
1161
|
+
void GrpcLb::BalancerCallState::OnBalancerStatusReceived(void* arg,
|
1162
|
+
grpc_error* error) {
|
1163
|
+
BalancerCallState* lb_calld = static_cast<BalancerCallState*>(arg);
|
1164
|
+
GRPC_ERROR_REF(error); // owned by lambda
|
1165
|
+
lb_calld->grpclb_policy()->work_serializer()->Run(
|
1166
|
+
[lb_calld, error]() { lb_calld->OnBalancerStatusReceivedLocked(error); },
|
1167
|
+
DEBUG_LOCATION);
|
1168
|
+
}
|
1169
|
+
|
1170
|
+
void GrpcLb::BalancerCallState::OnBalancerStatusReceivedLocked(
|
1171
|
+
grpc_error* error) {
|
1172
|
+
GPR_ASSERT(lb_call_ != nullptr);
|
1173
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1174
|
+
char* status_details = grpc_slice_to_c_string(lb_call_status_details_);
|
1175
|
+
gpr_log(GPR_INFO,
|
1176
|
+
"[grpclb %p] lb_calld=%p: Status from LB server received. "
|
1177
|
+
"Status = %d, details = '%s', (lb_call: %p), error '%s'",
|
1178
|
+
grpclb_policy(), this, lb_call_status_, status_details, lb_call_,
|
1179
|
+
grpc_error_string(error));
|
1180
|
+
gpr_free(status_details);
|
1181
|
+
}
|
1182
|
+
GRPC_ERROR_UNREF(error);
|
1183
|
+
// If this lb_calld is still in use, this call ended because of a failure so
|
1184
|
+
// we want to retry connecting. Otherwise, we have deliberately ended this
|
1185
|
+
// call and no further action is required.
|
1186
|
+
if (this == grpclb_policy()->lb_calld_.get()) {
|
1187
|
+
// If the fallback-at-startup checks are pending, go into fallback mode
|
1188
|
+
// immediately. This short-circuits the timeout for the fallback-at-startup
|
1189
|
+
// case.
|
1190
|
+
if (grpclb_policy()->fallback_at_startup_checks_pending_) {
|
1191
|
+
GPR_ASSERT(!seen_serverlist_);
|
1192
|
+
gpr_log(GPR_INFO,
|
1193
|
+
"[grpclb %p] Balancer call finished without receiving "
|
1194
|
+
"serverlist; entering fallback mode",
|
1195
|
+
grpclb_policy());
|
1196
|
+
grpclb_policy()->fallback_at_startup_checks_pending_ = false;
|
1197
|
+
grpc_timer_cancel(&grpclb_policy()->lb_fallback_timer_);
|
1198
|
+
grpclb_policy()->CancelBalancerChannelConnectivityWatchLocked();
|
1199
|
+
grpclb_policy()->fallback_mode_ = true;
|
1200
|
+
grpclb_policy()->CreateOrUpdateChildPolicyLocked();
|
1201
|
+
} else {
|
1202
|
+
// This handles the fallback-after-startup case.
|
1203
|
+
grpclb_policy()->MaybeEnterFallbackModeAfterStartup();
|
1204
|
+
}
|
1205
|
+
grpclb_policy()->lb_calld_.reset();
|
1206
|
+
GPR_ASSERT(!grpclb_policy()->shutting_down_);
|
1207
|
+
grpclb_policy()->channel_control_helper()->RequestReresolution();
|
1208
|
+
if (seen_initial_response_) {
|
1209
|
+
// If we lose connection to the LB server, reset the backoff and restart
|
1210
|
+
// the LB call immediately.
|
1211
|
+
grpclb_policy()->lb_call_backoff_.Reset();
|
1212
|
+
grpclb_policy()->StartBalancerCallLocked();
|
1213
|
+
} else {
|
1214
|
+
// If this LB call fails establishing any connection to the LB server,
|
1215
|
+
// retry later.
|
1216
|
+
grpclb_policy()->StartBalancerCallRetryTimerLocked();
|
1217
|
+
}
|
1218
|
+
}
|
1219
|
+
Unref(DEBUG_LOCATION, "lb_call_ended");
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
//
|
1223
|
+
// helper code for creating balancer channel
|
1224
|
+
//
|
1225
|
+
|
1226
|
+
ServerAddressList ExtractBalancerAddresses(const grpc_channel_args& args) {
|
1227
|
+
const ServerAddressList* addresses =
|
1228
|
+
FindGrpclbBalancerAddressesInChannelArgs(args);
|
1229
|
+
if (addresses != nullptr) return *addresses;
|
1230
|
+
return ServerAddressList();
|
1231
|
+
}
|
1232
|
+
|
1233
|
+
/* Returns the channel args for the LB channel, used to create a bidirectional
|
1234
|
+
* stream for the reception of load balancing updates.
|
1235
|
+
*
|
1236
|
+
* Inputs:
|
1237
|
+
* - \a addresses: corresponding to the balancers.
|
1238
|
+
* - \a response_generator: in order to propagate updates from the resolver
|
1239
|
+
* above the grpclb policy.
|
1240
|
+
* - \a args: other args inherited from the grpclb policy. */
|
1241
|
+
grpc_channel_args* BuildBalancerChannelArgs(
|
1242
|
+
const ServerAddressList& addresses,
|
1243
|
+
FakeResolverResponseGenerator* response_generator,
|
1244
|
+
const grpc_channel_args* args) {
|
1245
|
+
// Channel args to remove.
|
1246
|
+
static const char* args_to_remove[] = {
|
1247
|
+
// LB policy name, since we want to use the default (pick_first) in
|
1248
|
+
// the LB channel.
|
1249
|
+
GRPC_ARG_LB_POLICY_NAME,
|
1250
|
+
// Strip out the service config, since we don't want the LB policy
|
1251
|
+
// config specified for the parent channel to affect the LB channel.
|
1252
|
+
GRPC_ARG_SERVICE_CONFIG,
|
1253
|
+
// The channel arg for the server URI, since that will be different for
|
1254
|
+
// the LB channel than for the parent channel. The client channel
|
1255
|
+
// factory will re-add this arg with the right value.
|
1256
|
+
GRPC_ARG_SERVER_URI,
|
1257
|
+
// The fake resolver response generator, because we are replacing it
|
1258
|
+
// with the one from the grpclb policy, used to propagate updates to
|
1259
|
+
// the LB channel.
|
1260
|
+
GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR,
|
1261
|
+
// The LB channel should use the authority indicated by the target
|
1262
|
+
// authority table (see \a ModifyGrpclbBalancerChannelArgs),
|
1263
|
+
// as opposed to the authority from the parent channel.
|
1264
|
+
GRPC_ARG_DEFAULT_AUTHORITY,
|
1265
|
+
// Just as for \a GRPC_ARG_DEFAULT_AUTHORITY, the LB channel should be
|
1266
|
+
// treated as a stand-alone channel and not inherit this argument from the
|
1267
|
+
// args of the parent channel.
|
1268
|
+
GRPC_SSL_TARGET_NAME_OVERRIDE_ARG,
|
1269
|
+
// Don't want to pass down channelz node from parent; the balancer
|
1270
|
+
// channel will get its own.
|
1271
|
+
GRPC_ARG_CHANNELZ_CHANNEL_NODE,
|
1272
|
+
};
|
1273
|
+
// Channel args to add.
|
1274
|
+
absl::InlinedVector<grpc_arg, 3> args_to_add;
|
1275
|
+
// The fake resolver response generator, which we use to inject
|
1276
|
+
// address updates into the LB channel.
|
1277
|
+
args_to_add.emplace_back(
|
1278
|
+
grpc_core::FakeResolverResponseGenerator::MakeChannelArg(
|
1279
|
+
response_generator));
|
1280
|
+
// A channel arg indicating the target is a grpclb load balancer.
|
1281
|
+
args_to_add.emplace_back(grpc_channel_arg_integer_create(
|
1282
|
+
const_cast<char*>(GRPC_ARG_ADDRESS_IS_GRPCLB_LOAD_BALANCER), 1));
|
1283
|
+
// The parent channel's channelz uuid.
|
1284
|
+
channelz::ChannelNode* channelz_node = nullptr;
|
1285
|
+
const grpc_arg* arg =
|
1286
|
+
grpc_channel_args_find(args, GRPC_ARG_CHANNELZ_CHANNEL_NODE);
|
1287
|
+
if (arg != nullptr && arg->type == GRPC_ARG_POINTER &&
|
1288
|
+
arg->value.pointer.p != nullptr) {
|
1289
|
+
channelz_node = static_cast<channelz::ChannelNode*>(arg->value.pointer.p);
|
1290
|
+
args_to_add.emplace_back(
|
1291
|
+
channelz::MakeParentUuidArg(channelz_node->uuid()));
|
1292
|
+
}
|
1293
|
+
// Construct channel args.
|
1294
|
+
grpc_channel_args* new_args = grpc_channel_args_copy_and_add_and_remove(
|
1295
|
+
args, args_to_remove, GPR_ARRAY_SIZE(args_to_remove), args_to_add.data(),
|
1296
|
+
args_to_add.size());
|
1297
|
+
// Make any necessary modifications for security.
|
1298
|
+
return ModifyGrpclbBalancerChannelArgs(addresses, new_args);
|
1299
|
+
}
|
1300
|
+
|
1301
|
+
//
|
1302
|
+
// ctor and dtor
|
1303
|
+
//
|
1304
|
+
|
1305
|
+
GrpcLb::GrpcLb(Args args)
|
1306
|
+
: LoadBalancingPolicy(std::move(args)),
|
1307
|
+
response_generator_(MakeRefCounted<FakeResolverResponseGenerator>()),
|
1308
|
+
lb_call_backoff_(
|
1309
|
+
BackOff::Options()
|
1310
|
+
.set_initial_backoff(GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS *
|
1311
|
+
1000)
|
1312
|
+
.set_multiplier(GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER)
|
1313
|
+
.set_jitter(GRPC_GRPCLB_RECONNECT_JITTER)
|
1314
|
+
.set_max_backoff(GRPC_GRPCLB_RECONNECT_MAX_BACKOFF_SECONDS *
|
1315
|
+
1000)) {
|
1316
|
+
// Closure Initialization
|
1317
|
+
GRPC_CLOSURE_INIT(&lb_on_fallback_, &GrpcLb::OnFallbackTimer, this,
|
1318
|
+
grpc_schedule_on_exec_ctx);
|
1319
|
+
GRPC_CLOSURE_INIT(&lb_on_call_retry_, &GrpcLb::OnBalancerCallRetryTimer, this,
|
1320
|
+
grpc_schedule_on_exec_ctx);
|
1321
|
+
// Record server name.
|
1322
|
+
const grpc_arg* arg = grpc_channel_args_find(args.args, GRPC_ARG_SERVER_URI);
|
1323
|
+
const char* server_uri = grpc_channel_arg_get_string(arg);
|
1324
|
+
GPR_ASSERT(server_uri != nullptr);
|
1325
|
+
grpc_uri* uri = grpc_uri_parse(server_uri, true);
|
1326
|
+
GPR_ASSERT(uri->path[0] != '\0');
|
1327
|
+
server_name_ = gpr_strdup(uri->path[0] == '/' ? uri->path + 1 : uri->path);
|
1328
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1329
|
+
gpr_log(GPR_INFO,
|
1330
|
+
"[grpclb %p] Will use '%s' as the server name for LB request.",
|
1331
|
+
this, server_name_);
|
1332
|
+
}
|
1333
|
+
grpc_uri_destroy(uri);
|
1334
|
+
// Record LB call timeout.
|
1335
|
+
arg = grpc_channel_args_find(args.args, GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS);
|
1336
|
+
lb_call_timeout_ms_ = grpc_channel_arg_get_integer(arg, {0, 0, INT_MAX});
|
1337
|
+
// Record fallback-at-startup timeout.
|
1338
|
+
arg = grpc_channel_args_find(args.args, GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS);
|
1339
|
+
fallback_at_startup_timeout_ = grpc_channel_arg_get_integer(
|
1340
|
+
arg, {GRPC_GRPCLB_DEFAULT_FALLBACK_TIMEOUT_MS, 0, INT_MAX});
|
1341
|
+
}
|
1342
|
+
|
1343
|
+
GrpcLb::~GrpcLb() {
|
1344
|
+
gpr_free((void*)server_name_);
|
1345
|
+
grpc_channel_args_destroy(args_);
|
1346
|
+
}
|
1347
|
+
|
1348
|
+
void GrpcLb::ShutdownLocked() {
|
1349
|
+
shutting_down_ = true;
|
1350
|
+
lb_calld_.reset();
|
1351
|
+
if (retry_timer_callback_pending_) {
|
1352
|
+
grpc_timer_cancel(&lb_call_retry_timer_);
|
1353
|
+
}
|
1354
|
+
if (fallback_at_startup_checks_pending_) {
|
1355
|
+
fallback_at_startup_checks_pending_ = false;
|
1356
|
+
grpc_timer_cancel(&lb_fallback_timer_);
|
1357
|
+
CancelBalancerChannelConnectivityWatchLocked();
|
1358
|
+
}
|
1359
|
+
if (child_policy_ != nullptr) {
|
1360
|
+
grpc_pollset_set_del_pollset_set(child_policy_->interested_parties(),
|
1361
|
+
interested_parties());
|
1362
|
+
child_policy_.reset();
|
1363
|
+
}
|
1364
|
+
// We destroy the LB channel here instead of in our destructor because
|
1365
|
+
// destroying the channel triggers a last callback to
|
1366
|
+
// OnBalancerChannelConnectivityChangedLocked(), and we need to be
|
1367
|
+
// alive when that callback is invoked.
|
1368
|
+
if (lb_channel_ != nullptr) {
|
1369
|
+
grpc_channel_destroy(lb_channel_);
|
1370
|
+
lb_channel_ = nullptr;
|
1371
|
+
}
|
1372
|
+
}
|
1373
|
+
|
1374
|
+
//
|
1375
|
+
// public methods
|
1376
|
+
//
|
1377
|
+
|
1378
|
+
void GrpcLb::ResetBackoffLocked() {
|
1379
|
+
if (lb_channel_ != nullptr) {
|
1380
|
+
grpc_channel_reset_connect_backoff(lb_channel_);
|
1381
|
+
}
|
1382
|
+
if (child_policy_ != nullptr) {
|
1383
|
+
child_policy_->ResetBackoffLocked();
|
1384
|
+
}
|
1385
|
+
}
|
1386
|
+
|
1387
|
+
void GrpcLb::UpdateLocked(UpdateArgs args) {
|
1388
|
+
const bool is_initial_update = lb_channel_ == nullptr;
|
1389
|
+
auto* grpclb_config = static_cast<const GrpcLbConfig*>(args.config.get());
|
1390
|
+
if (grpclb_config != nullptr) {
|
1391
|
+
child_policy_config_ = grpclb_config->child_policy();
|
1392
|
+
} else {
|
1393
|
+
child_policy_config_ = nullptr;
|
1394
|
+
}
|
1395
|
+
ProcessAddressesAndChannelArgsLocked(args.addresses, *args.args);
|
1396
|
+
// Update the existing child policy.
|
1397
|
+
if (child_policy_ != nullptr) CreateOrUpdateChildPolicyLocked();
|
1398
|
+
// If this is the initial update, start the fallback-at-startup checks
|
1399
|
+
// and the balancer call.
|
1400
|
+
if (is_initial_update) {
|
1401
|
+
fallback_at_startup_checks_pending_ = true;
|
1402
|
+
// Start timer.
|
1403
|
+
grpc_millis deadline = ExecCtx::Get()->Now() + fallback_at_startup_timeout_;
|
1404
|
+
Ref(DEBUG_LOCATION, "on_fallback_timer").release(); // Ref for callback
|
1405
|
+
grpc_timer_init(&lb_fallback_timer_, deadline, &lb_on_fallback_);
|
1406
|
+
// Start watching the channel's connectivity state. If the channel
|
1407
|
+
// goes into state TRANSIENT_FAILURE before the timer fires, we go into
|
1408
|
+
// fallback mode even if the fallback timeout has not elapsed.
|
1409
|
+
grpc_channel_element* client_channel_elem = grpc_channel_stack_last_element(
|
1410
|
+
grpc_channel_get_channel_stack(lb_channel_));
|
1411
|
+
GPR_ASSERT(client_channel_elem->filter == &grpc_client_channel_filter);
|
1412
|
+
// Ref held by callback.
|
1413
|
+
watcher_ = new StateWatcher(Ref(DEBUG_LOCATION, "StateWatcher"));
|
1414
|
+
grpc_client_channel_start_connectivity_watch(
|
1415
|
+
client_channel_elem, GRPC_CHANNEL_IDLE,
|
1416
|
+
OrphanablePtr<AsyncConnectivityStateWatcherInterface>(watcher_));
|
1417
|
+
// Start balancer call.
|
1418
|
+
StartBalancerCallLocked();
|
1419
|
+
}
|
1420
|
+
}
|
1421
|
+
|
1422
|
+
//
|
1423
|
+
// helpers for UpdateLocked()
|
1424
|
+
//
|
1425
|
+
|
1426
|
+
ServerAddressList AddNullLbTokenToAddresses(
|
1427
|
+
const ServerAddressList& addresses) {
|
1428
|
+
static const char* lb_token = "";
|
1429
|
+
grpc_arg arg = grpc_channel_arg_pointer_create(
|
1430
|
+
const_cast<char*>(GRPC_ARG_GRPCLB_ADDRESS_LB_TOKEN),
|
1431
|
+
const_cast<char*>(lb_token), &lb_token_arg_vtable);
|
1432
|
+
ServerAddressList addresses_out;
|
1433
|
+
for (size_t i = 0; i < addresses.size(); ++i) {
|
1434
|
+
addresses_out.emplace_back(
|
1435
|
+
addresses[i].address(),
|
1436
|
+
grpc_channel_args_copy_and_add(addresses[i].args(), &arg, 1));
|
1437
|
+
}
|
1438
|
+
return addresses_out;
|
1439
|
+
}
|
1440
|
+
|
1441
|
+
void GrpcLb::ProcessAddressesAndChannelArgsLocked(
|
1442
|
+
const ServerAddressList& addresses, const grpc_channel_args& args) {
|
1443
|
+
// Update fallback address list.
|
1444
|
+
fallback_backend_addresses_ = AddNullLbTokenToAddresses(addresses);
|
1445
|
+
// Make sure that GRPC_ARG_LB_POLICY_NAME is set in channel args,
|
1446
|
+
// since we use this to trigger the client_load_reporting filter.
|
1447
|
+
static const char* args_to_remove[] = {GRPC_ARG_LB_POLICY_NAME};
|
1448
|
+
grpc_arg new_arg = grpc_channel_arg_string_create(
|
1449
|
+
(char*)GRPC_ARG_LB_POLICY_NAME, (char*)"grpclb");
|
1450
|
+
grpc_channel_args_destroy(args_);
|
1451
|
+
args_ = grpc_channel_args_copy_and_add_and_remove(
|
1452
|
+
&args, args_to_remove, GPR_ARRAY_SIZE(args_to_remove), &new_arg, 1);
|
1453
|
+
// Construct args for balancer channel.
|
1454
|
+
ServerAddressList balancer_addresses = ExtractBalancerAddresses(args);
|
1455
|
+
grpc_channel_args* lb_channel_args = BuildBalancerChannelArgs(
|
1456
|
+
balancer_addresses, response_generator_.get(), &args);
|
1457
|
+
// Create balancer channel if needed.
|
1458
|
+
if (lb_channel_ == nullptr) {
|
1459
|
+
char* uri_str;
|
1460
|
+
gpr_asprintf(&uri_str, "fake:///%s", server_name_);
|
1461
|
+
lb_channel_ = CreateGrpclbBalancerChannel(uri_str, *lb_channel_args);
|
1462
|
+
GPR_ASSERT(lb_channel_ != nullptr);
|
1463
|
+
gpr_free(uri_str);
|
1464
|
+
}
|
1465
|
+
// Propagate updates to the LB channel (pick_first) through the fake
|
1466
|
+
// resolver.
|
1467
|
+
Resolver::Result result;
|
1468
|
+
result.addresses = std::move(balancer_addresses);
|
1469
|
+
result.args = lb_channel_args;
|
1470
|
+
response_generator_->SetResponse(std::move(result));
|
1471
|
+
}
|
1472
|
+
|
1473
|
+
void GrpcLb::CancelBalancerChannelConnectivityWatchLocked() {
|
1474
|
+
grpc_channel_element* client_channel_elem = grpc_channel_stack_last_element(
|
1475
|
+
grpc_channel_get_channel_stack(lb_channel_));
|
1476
|
+
GPR_ASSERT(client_channel_elem->filter == &grpc_client_channel_filter);
|
1477
|
+
grpc_client_channel_stop_connectivity_watch(client_channel_elem, watcher_);
|
1478
|
+
}
|
1479
|
+
|
1480
|
+
//
|
1481
|
+
// code for balancer channel and call
|
1482
|
+
//
|
1483
|
+
|
1484
|
+
void GrpcLb::StartBalancerCallLocked() {
|
1485
|
+
GPR_ASSERT(lb_channel_ != nullptr);
|
1486
|
+
if (shutting_down_) return;
|
1487
|
+
// Init the LB call data.
|
1488
|
+
GPR_ASSERT(lb_calld_ == nullptr);
|
1489
|
+
lb_calld_ = MakeOrphanable<BalancerCallState>(Ref());
|
1490
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1491
|
+
gpr_log(GPR_INFO,
|
1492
|
+
"[grpclb %p] Query for backends (lb_channel: %p, lb_calld: %p)",
|
1493
|
+
this, lb_channel_, lb_calld_.get());
|
1494
|
+
}
|
1495
|
+
lb_calld_->StartQuery();
|
1496
|
+
}
|
1497
|
+
|
1498
|
+
void GrpcLb::StartBalancerCallRetryTimerLocked() {
|
1499
|
+
grpc_millis next_try = lb_call_backoff_.NextAttemptTime();
|
1500
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1501
|
+
gpr_log(GPR_INFO, "[grpclb %p] Connection to LB server lost...", this);
|
1502
|
+
grpc_millis timeout = next_try - ExecCtx::Get()->Now();
|
1503
|
+
if (timeout > 0) {
|
1504
|
+
gpr_log(GPR_INFO, "[grpclb %p] ... retry_timer_active in %" PRId64 "ms.",
|
1505
|
+
this, timeout);
|
1506
|
+
} else {
|
1507
|
+
gpr_log(GPR_INFO, "[grpclb %p] ... retry_timer_active immediately.",
|
1508
|
+
this);
|
1509
|
+
}
|
1510
|
+
}
|
1511
|
+
// TODO(roth): We currently track this ref manually. Once the
|
1512
|
+
// ClosureRef API is ready, we should pass the RefCountedPtr<> along
|
1513
|
+
// with the callback.
|
1514
|
+
auto self = Ref(DEBUG_LOCATION, "on_balancer_call_retry_timer");
|
1515
|
+
self.release();
|
1516
|
+
retry_timer_callback_pending_ = true;
|
1517
|
+
grpc_timer_init(&lb_call_retry_timer_, next_try, &lb_on_call_retry_);
|
1518
|
+
}
|
1519
|
+
|
1520
|
+
void GrpcLb::OnBalancerCallRetryTimer(void* arg, grpc_error* error) {
|
1521
|
+
GrpcLb* grpclb_policy = static_cast<GrpcLb*>(arg);
|
1522
|
+
GRPC_ERROR_REF(error); // ref owned by lambda
|
1523
|
+
grpclb_policy->work_serializer()->Run(
|
1524
|
+
[grpclb_policy, error]() {
|
1525
|
+
grpclb_policy->OnBalancerCallRetryTimerLocked(error);
|
1526
|
+
},
|
1527
|
+
DEBUG_LOCATION);
|
1528
|
+
}
|
1529
|
+
|
1530
|
+
void GrpcLb::OnBalancerCallRetryTimerLocked(grpc_error* error) {
|
1531
|
+
retry_timer_callback_pending_ = false;
|
1532
|
+
if (!shutting_down_ && error == GRPC_ERROR_NONE && lb_calld_ == nullptr) {
|
1533
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1534
|
+
gpr_log(GPR_INFO, "[grpclb %p] Restarting call to LB server", this);
|
1535
|
+
}
|
1536
|
+
StartBalancerCallLocked();
|
1537
|
+
}
|
1538
|
+
Unref(DEBUG_LOCATION, "on_balancer_call_retry_timer");
|
1539
|
+
GRPC_ERROR_UNREF(error);
|
1540
|
+
}
|
1541
|
+
|
1542
|
+
//
|
1543
|
+
// code for handling fallback mode
|
1544
|
+
//
|
1545
|
+
|
1546
|
+
void GrpcLb::MaybeEnterFallbackModeAfterStartup() {
|
1547
|
+
// Enter fallback mode if all of the following are true:
|
1548
|
+
// - We are not currently in fallback mode.
|
1549
|
+
// - We are not currently waiting for the initial fallback timeout.
|
1550
|
+
// - We are not currently in contact with the balancer.
|
1551
|
+
// - The child policy is not in state READY.
|
1552
|
+
if (!fallback_mode_ && !fallback_at_startup_checks_pending_ &&
|
1553
|
+
(lb_calld_ == nullptr || !lb_calld_->seen_serverlist()) &&
|
1554
|
+
!child_policy_ready_) {
|
1555
|
+
gpr_log(GPR_INFO,
|
1556
|
+
"[grpclb %p] lost contact with balancer and backends from "
|
1557
|
+
"most recent serverlist; entering fallback mode",
|
1558
|
+
this);
|
1559
|
+
fallback_mode_ = true;
|
1560
|
+
CreateOrUpdateChildPolicyLocked();
|
1561
|
+
}
|
1562
|
+
}
|
1563
|
+
|
1564
|
+
void GrpcLb::OnFallbackTimer(void* arg, grpc_error* error) {
|
1565
|
+
GrpcLb* grpclb_policy = static_cast<GrpcLb*>(arg);
|
1566
|
+
GRPC_ERROR_REF(error); // ref owned by lambda
|
1567
|
+
grpclb_policy->work_serializer()->Run(
|
1568
|
+
[grpclb_policy, error]() { grpclb_policy->OnFallbackTimerLocked(error); },
|
1569
|
+
DEBUG_LOCATION);
|
1570
|
+
}
|
1571
|
+
|
1572
|
+
void GrpcLb::OnFallbackTimerLocked(grpc_error* error) {
|
1573
|
+
// If we receive a serverlist after the timer fires but before this callback
|
1574
|
+
// actually runs, don't fall back.
|
1575
|
+
if (fallback_at_startup_checks_pending_ && !shutting_down_ &&
|
1576
|
+
error == GRPC_ERROR_NONE) {
|
1577
|
+
gpr_log(GPR_INFO,
|
1578
|
+
"[grpclb %p] No response from balancer after fallback timeout; "
|
1579
|
+
"entering fallback mode",
|
1580
|
+
this);
|
1581
|
+
fallback_at_startup_checks_pending_ = false;
|
1582
|
+
CancelBalancerChannelConnectivityWatchLocked();
|
1583
|
+
fallback_mode_ = true;
|
1584
|
+
CreateOrUpdateChildPolicyLocked();
|
1585
|
+
}
|
1586
|
+
Unref(DEBUG_LOCATION, "on_fallback_timer");
|
1587
|
+
GRPC_ERROR_UNREF(error);
|
1588
|
+
}
|
1589
|
+
|
1590
|
+
//
|
1591
|
+
// code for interacting with the child policy
|
1592
|
+
//
|
1593
|
+
|
1594
|
+
grpc_channel_args* GrpcLb::CreateChildPolicyArgsLocked(
|
1595
|
+
bool is_backend_from_grpclb_load_balancer) {
|
1596
|
+
absl::InlinedVector<grpc_arg, 2> args_to_add;
|
1597
|
+
args_to_add.emplace_back(grpc_channel_arg_integer_create(
|
1598
|
+
const_cast<char*>(GRPC_ARG_ADDRESS_IS_BACKEND_FROM_GRPCLB_LOAD_BALANCER),
|
1599
|
+
is_backend_from_grpclb_load_balancer));
|
1600
|
+
if (is_backend_from_grpclb_load_balancer) {
|
1601
|
+
args_to_add.emplace_back(grpc_channel_arg_integer_create(
|
1602
|
+
const_cast<char*>(GRPC_ARG_INHIBIT_HEALTH_CHECKING), 1));
|
1603
|
+
}
|
1604
|
+
return grpc_channel_args_copy_and_add(args_, args_to_add.data(),
|
1605
|
+
args_to_add.size());
|
1606
|
+
}
|
1607
|
+
|
1608
|
+
OrphanablePtr<LoadBalancingPolicy> GrpcLb::CreateChildPolicyLocked(
|
1609
|
+
const grpc_channel_args* args) {
|
1610
|
+
LoadBalancingPolicy::Args lb_policy_args;
|
1611
|
+
lb_policy_args.work_serializer = work_serializer();
|
1612
|
+
lb_policy_args.args = args;
|
1613
|
+
lb_policy_args.channel_control_helper = absl::make_unique<Helper>(Ref());
|
1614
|
+
OrphanablePtr<LoadBalancingPolicy> lb_policy =
|
1615
|
+
MakeOrphanable<ChildPolicyHandler>(std::move(lb_policy_args),
|
1616
|
+
&grpc_lb_glb_trace);
|
1617
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1618
|
+
gpr_log(GPR_INFO, "[grpclb %p] Created new child policy handler (%p)", this,
|
1619
|
+
lb_policy.get());
|
1620
|
+
}
|
1621
|
+
// Add the gRPC LB's interested_parties pollset_set to that of the newly
|
1622
|
+
// created child policy. This will make the child policy progress upon
|
1623
|
+
// activity on gRPC LB, which in turn is tied to the application's call.
|
1624
|
+
grpc_pollset_set_add_pollset_set(lb_policy->interested_parties(),
|
1625
|
+
interested_parties());
|
1626
|
+
return lb_policy;
|
1627
|
+
}
|
1628
|
+
|
1629
|
+
void GrpcLb::CreateOrUpdateChildPolicyLocked() {
|
1630
|
+
if (shutting_down_) return;
|
1631
|
+
// Construct update args.
|
1632
|
+
UpdateArgs update_args;
|
1633
|
+
bool is_backend_from_grpclb_load_balancer = false;
|
1634
|
+
if (fallback_mode_) {
|
1635
|
+
// If CreateOrUpdateChildPolicyLocked() is invoked when we haven't
|
1636
|
+
// received any serverlist from the balancer, we use the fallback backends
|
1637
|
+
// returned by the resolver. Note that the fallback backend list may be
|
1638
|
+
// empty, in which case the new round_robin policy will keep the requested
|
1639
|
+
// picks pending.
|
1640
|
+
update_args.addresses = fallback_backend_addresses_;
|
1641
|
+
} else {
|
1642
|
+
update_args.addresses = serverlist_->GetServerAddressList(
|
1643
|
+
lb_calld_ == nullptr ? nullptr : lb_calld_->client_stats());
|
1644
|
+
is_backend_from_grpclb_load_balancer = true;
|
1645
|
+
}
|
1646
|
+
update_args.args =
|
1647
|
+
CreateChildPolicyArgsLocked(is_backend_from_grpclb_load_balancer);
|
1648
|
+
GPR_ASSERT(update_args.args != nullptr);
|
1649
|
+
update_args.config = child_policy_config_;
|
1650
|
+
// Create child policy if needed.
|
1651
|
+
if (child_policy_ == nullptr) {
|
1652
|
+
child_policy_ = CreateChildPolicyLocked(update_args.args);
|
1653
|
+
}
|
1654
|
+
// Update the policy.
|
1655
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1656
|
+
gpr_log(GPR_INFO, "[grpclb %p] Updating child policy handler %p", this,
|
1657
|
+
child_policy_.get());
|
1658
|
+
}
|
1659
|
+
child_policy_->UpdateLocked(std::move(update_args));
|
1660
|
+
}
|
1661
|
+
|
1662
|
+
//
|
1663
|
+
// factory
|
1664
|
+
//
|
1665
|
+
|
1666
|
+
class GrpcLbFactory : public LoadBalancingPolicyFactory {
|
1667
|
+
public:
|
1668
|
+
OrphanablePtr<LoadBalancingPolicy> CreateLoadBalancingPolicy(
|
1669
|
+
LoadBalancingPolicy::Args args) const override {
|
1670
|
+
return MakeOrphanable<GrpcLb>(std::move(args));
|
1671
|
+
}
|
1672
|
+
|
1673
|
+
const char* name() const override { return kGrpclb; }
|
1674
|
+
|
1675
|
+
RefCountedPtr<LoadBalancingPolicy::Config> ParseLoadBalancingConfig(
|
1676
|
+
const Json& json, grpc_error** error) const override {
|
1677
|
+
GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE);
|
1678
|
+
if (json.type() == Json::Type::JSON_NULL) {
|
1679
|
+
return MakeRefCounted<GrpcLbConfig>(nullptr);
|
1680
|
+
}
|
1681
|
+
std::vector<grpc_error*> error_list;
|
1682
|
+
Json child_policy_config_json_tmp;
|
1683
|
+
const Json* child_policy_config_json;
|
1684
|
+
auto it = json.object_value().find("childPolicy");
|
1685
|
+
if (it == json.object_value().end()) {
|
1686
|
+
child_policy_config_json_tmp = Json::Array{Json::Object{
|
1687
|
+
{"round_robin", Json::Object()},
|
1688
|
+
}};
|
1689
|
+
child_policy_config_json = &child_policy_config_json_tmp;
|
1690
|
+
} else {
|
1691
|
+
child_policy_config_json = &it->second;
|
1692
|
+
}
|
1693
|
+
grpc_error* parse_error = GRPC_ERROR_NONE;
|
1694
|
+
RefCountedPtr<LoadBalancingPolicy::Config> child_policy_config =
|
1695
|
+
LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(
|
1696
|
+
*child_policy_config_json, &parse_error);
|
1697
|
+
if (parse_error != GRPC_ERROR_NONE) {
|
1698
|
+
std::vector<grpc_error*> child_errors;
|
1699
|
+
child_errors.push_back(parse_error);
|
1700
|
+
error_list.push_back(
|
1701
|
+
GRPC_ERROR_CREATE_FROM_VECTOR("field:childPolicy", &child_errors));
|
1702
|
+
}
|
1703
|
+
if (error_list.empty()) {
|
1704
|
+
return MakeRefCounted<GrpcLbConfig>(std::move(child_policy_config));
|
1705
|
+
} else {
|
1706
|
+
*error = GRPC_ERROR_CREATE_FROM_VECTOR("GrpcLb Parser", &error_list);
|
1707
|
+
return nullptr;
|
1708
|
+
}
|
1709
|
+
}
|
1710
|
+
};
|
1711
|
+
|
1712
|
+
} // namespace
|
1713
|
+
|
1714
|
+
} // namespace grpc_core
|
1715
|
+
|
1716
|
+
//
|
1717
|
+
// Plugin registration
|
1718
|
+
//
|
1719
|
+
|
1720
|
+
namespace {
|
1721
|
+
|
1722
|
+
// Only add client_load_reporting filter if the grpclb LB policy is used.
|
1723
|
+
bool maybe_add_client_load_reporting_filter(grpc_channel_stack_builder* builder,
|
1724
|
+
void* arg) {
|
1725
|
+
const grpc_channel_args* args =
|
1726
|
+
grpc_channel_stack_builder_get_channel_arguments(builder);
|
1727
|
+
const grpc_arg* channel_arg =
|
1728
|
+
grpc_channel_args_find(args, GRPC_ARG_LB_POLICY_NAME);
|
1729
|
+
if (channel_arg != nullptr && channel_arg->type == GRPC_ARG_STRING &&
|
1730
|
+
strcmp(channel_arg->value.string, "grpclb") == 0) {
|
1731
|
+
// TODO(roth): When we get around to re-attempting
|
1732
|
+
// https://github.com/grpc/grpc/pull/16214, we should try to keep
|
1733
|
+
// this filter at the very top of the subchannel stack, since that
|
1734
|
+
// will minimize the number of metadata elements that the filter
|
1735
|
+
// needs to iterate through to find the ClientStats object.
|
1736
|
+
return grpc_channel_stack_builder_prepend_filter(
|
1737
|
+
builder, (const grpc_channel_filter*)arg, nullptr, nullptr);
|
1738
|
+
}
|
1739
|
+
return true;
|
1740
|
+
}
|
1741
|
+
|
1742
|
+
} // namespace
|
1743
|
+
|
1744
|
+
void grpc_lb_policy_grpclb_init() {
|
1745
|
+
grpc_core::LoadBalancingPolicyRegistry::Builder::
|
1746
|
+
RegisterLoadBalancingPolicyFactory(
|
1747
|
+
absl::make_unique<grpc_core::GrpcLbFactory>());
|
1748
|
+
grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL,
|
1749
|
+
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
|
1750
|
+
maybe_add_client_load_reporting_filter,
|
1751
|
+
(void*)&grpc_client_load_reporting_filter);
|
1752
|
+
}
|
1753
|
+
|
1754
|
+
void grpc_lb_policy_grpclb_shutdown() {}
|