grpc 1.31.1 → 1.35.0.pre1
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 +4 -4
- data/Makefile +719 -17819
- data/etc/roots.pem +257 -573
- data/include/grpc/compression.h +1 -1
- data/include/grpc/grpc.h +15 -7
- data/include/grpc/grpc_security.h +254 -186
- data/include/grpc/impl/codegen/README.md +22 -0
- data/include/grpc/impl/codegen/atm_windows.h +4 -0
- data/include/grpc/impl/codegen/byte_buffer.h +1 -1
- data/include/grpc/impl/codegen/grpc_types.h +10 -8
- data/include/grpc/impl/codegen/log.h +0 -2
- data/include/grpc/impl/codegen/port_platform.h +28 -56
- data/include/grpc/impl/codegen/sync_windows.h +4 -0
- data/include/grpc/slice_buffer.h +3 -3
- data/include/grpc/support/sync.h +3 -3
- data/include/grpc/support/time.h +7 -7
- data/src/core/ext/filters/client_channel/backend_metric.cc +2 -4
- data/src/core/ext/filters/client_channel/backup_poller.cc +3 -2
- data/src/core/ext/filters/client_channel/client_channel.cc +2831 -1540
- data/src/core/ext/filters/client_channel/client_channel.h +1 -5
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +0 -3
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +1 -1
- data/src/core/ext/filters/client_channel/config_selector.cc +0 -4
- data/src/core/ext/filters/client_channel/config_selector.h +40 -8
- data/src/core/ext/filters/client_channel/dynamic_filters.cc +186 -0
- data/src/core/ext/filters/client_channel/dynamic_filters.h +99 -0
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +16 -8
- data/src/core/ext/filters/client_channel/health/health_check_client.h +4 -4
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +7 -9
- data/src/core/ext/filters/client_channel/http_proxy.cc +21 -20
- data/src/core/ext/filters/client_channel/lb_policy.cc +6 -2
- data/src/core/ext/filters/client_channel/lb_policy.h +8 -7
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.cc +48 -35
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +7 -5
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +10 -7
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +210 -192
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc +0 -13
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +0 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +1 -37
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +3 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +23 -17
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +79 -30
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +10 -9
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +14 -34
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +26 -15
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +350 -130
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.h +52 -24
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h +24 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +812 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +722 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +1262 -0
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +8 -1
- data/src/core/ext/filters/client_channel/resolver.cc +3 -1
- data/src/core/ext/filters/client_channel/resolver.h +4 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +9 -16
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +1 -32
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +3 -3
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +457 -19
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +5 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +7 -10
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +4 -4
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +1 -1
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +35 -28
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +664 -63
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h +28 -0
- data/src/core/ext/filters/client_channel/resolver_factory.h +6 -6
- data/src/core/ext/filters/client_channel/resolver_registry.cc +40 -39
- data/src/core/ext/filters/client_channel/resolver_registry.h +2 -2
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +29 -74
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +12 -11
- data/src/core/ext/filters/client_channel/retry_throttle.cc +5 -3
- data/src/core/ext/filters/client_channel/retry_throttle.h +4 -2
- data/src/core/ext/filters/client_channel/server_address.cc +120 -7
- data/src/core/ext/filters/client_channel/server_address.h +44 -21
- data/src/core/ext/filters/client_channel/service_config.cc +18 -13
- data/src/core/ext/filters/client_channel/service_config.h +8 -5
- data/src/core/ext/filters/client_channel/service_config_call_data.h +19 -1
- data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +2 -2
- data/src/core/ext/filters/client_channel/service_config_parser.cc +8 -6
- data/src/core/ext/filters/client_channel/service_config_parser.h +8 -5
- data/src/core/ext/filters/client_channel/subchannel.cc +115 -87
- data/src/core/ext/filters/client_channel/subchannel.h +30 -24
- data/src/core/ext/filters/client_channel/subchannel_interface.h +41 -5
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +6 -2
- data/src/core/ext/filters/deadline/deadline_filter.cc +87 -79
- data/src/core/ext/filters/deadline/deadline_filter.h +7 -11
- data/src/core/ext/filters/http/client/http_client_filter.cc +1 -1
- data/src/core/ext/filters/http/client_authority_filter.cc +6 -6
- data/src/core/ext/filters/http/http_filters_plugin.cc +6 -3
- data/src/core/ext/filters/http/server/http_server_filter.cc +3 -3
- data/src/core/ext/filters/max_age/max_age_filter.cc +3 -2
- data/src/core/ext/filters/message_size/message_size_filter.cc +3 -2
- data/src/core/ext/filters/message_size/message_size_filter.h +2 -1
- data/src/core/ext/filters/workarounds/workaround_utils.cc +1 -1
- data/src/core/ext/transport/chttp2/client/authority.cc +3 -3
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +87 -31
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +19 -2
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +20 -8
- data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +21 -10
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +34 -47
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +200 -100
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +2 -1
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +2 -2
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +16 -9
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +3 -2
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +7 -7
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +267 -319
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +11 -3
- data/src/core/ext/transport/chttp2/transport/flow_control.h +13 -3
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +2 -1
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +2 -1
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +6 -6
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +12 -8
- data/src/core/ext/transport/chttp2/transport/internal.h +10 -2
- data/src/core/ext/transport/chttp2/transport/parsing.cc +19 -31
- data/src/core/ext/transport/chttp2/transport/writing.cc +8 -8
- data/src/core/ext/transport/inproc/inproc_transport.cc +52 -18
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +1 -0
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +1 -1
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +7 -0
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +244 -0
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +865 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c +74 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h +253 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +458 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +1818 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h +77 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c +55 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h +349 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +124 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +428 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h +88 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +310 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +991 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +103 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +388 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h +78 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h +149 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +241 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +839 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +170 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +752 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c +36 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h +88 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +176 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +730 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c +28 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h +65 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/core → config/core/v3}/socket_option.upb.c +8 -8
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +95 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +36 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h +92 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c +91 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h +243 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +91 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +305 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c +112 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h +367 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c +33 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h +73 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +128 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +512 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +155 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +591 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +41 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +107 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +178 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +662 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +220 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +900 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +3640 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +60 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +159 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c +50 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h +122 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +364 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +1475 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c +20 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +35 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +110 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +426 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +76 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +236 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +147 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +621 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/cluster/v3}/cds.upb.c +6 -7
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/{v2 → v3}/ads.upb.c +6 -5
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +139 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +487 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/endpoint/v3}/eds.upb.c +6 -7
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/listener/v3}/lds.upb.c +6 -7
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c +55 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h +151 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/route/v3}/rds.upb.c +6 -7
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/route/v3}/srds.upb.c +6 -7
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +128 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h +84 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h +78 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +64 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +166 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +54 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +146 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h +207 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h +301 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c +90 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h +283 -0
- data/src/core/ext/upb-generated/envoy/type/{http.upb.c → v3/http.upb.c} +2 -2
- data/src/core/ext/upb-generated/envoy/type/{http.upb.h → v3/http.upb.h} +9 -8
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c +40 -0
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h +99 -0
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.c +51 -0
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.h +130 -0
- data/src/core/ext/upb-generated/envoy/type/{semantic_version.upb.c → v3/semantic_version.upb.c} +7 -6
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h +68 -0
- data/src/core/ext/upb-generated/google/api/annotations.upb.h +1 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c +242 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h +830 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +234 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +842 -0
- data/src/core/ext/upb-generated/google/api/http.upb.c +3 -3
- data/src/core/ext/upb-generated/google/api/http.upb.h +25 -6
- data/src/core/ext/upb-generated/google/protobuf/any.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/any.upb.h +7 -0
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +103 -103
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +455 -292
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +7 -0
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +7 -0
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +4 -4
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +23 -4
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +7 -0
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +9 -9
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +55 -0
- data/src/core/ext/upb-generated/google/rpc/status.upb.c +1 -1
- data/src/core/ext/upb-generated/google/rpc/status.upb.h +10 -3
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +4 -4
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +11 -3
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +41 -41
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +149 -76
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +5 -5
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +21 -6
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +2 -2
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +13 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +17 -17
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +82 -25
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +3 -3
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +19 -0
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.c +31 -0
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.h +64 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +1 -0
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.c +2 -2
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.h +9 -2
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c +27 -0
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h +60 -0
- data/src/core/ext/upb-generated/udpa/core/v1/authority.upb.c +28 -0
- data/src/core/ext/upb-generated/udpa/core/v1/authority.upb.h +60 -0
- data/src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.c +52 -0
- data/src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.h +143 -0
- data/src/core/ext/upb-generated/udpa/core/v1/context_params.upb.c +42 -0
- data/src/core/ext/upb-generated/udpa/core/v1/context_params.upb.h +84 -0
- data/src/core/ext/upb-generated/udpa/core/v1/resource.upb.c +36 -0
- data/src/core/ext/upb-generated/udpa/core/v1/resource.upb.h +94 -0
- data/src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.c +54 -0
- data/src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.h +173 -0
- data/src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.c +36 -0
- data/src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.h +92 -0
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c +3 -3
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h +7 -0
- data/src/core/ext/upb-generated/validate/validate.upb.c +68 -68
- data/src/core/ext/upb-generated/validate/validate.upb.h +296 -157
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c +38 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c +41 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c +254 -0
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h +105 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +558 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +145 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c +133 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c +127 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +266 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h +125 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c +143 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c +66 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c +263 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c +233 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +228 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h +80 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c +110 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +113 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c +146 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +190 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c +185 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c +62 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +97 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +915 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +280 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c +71 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c +64 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +511 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +115 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c +48 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +166 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c +105 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +249 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c +60 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c +152 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c +83 -0
- data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c +82 -0
- data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c +83 -0
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c +86 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c +74 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c +64 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +73 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c +81 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c +92 -0
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c +95 -0
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c +34 -0
- data/src/core/ext/{upb-generated/gogoproto/gogo.upb.h → upbdefs-generated/envoy/type/v3/http.upbdefs.h} +10 -9
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c +47 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c +61 -0
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c +38 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c +386 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h +165 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c +39 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c +37 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c +65 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c +39 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c +66 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h +75 -0
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c +42 -0
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c +70 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c +33 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c +49 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c +43 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/core/v1/authority.upbdefs.c +42 -0
- data/src/core/ext/upbdefs-generated/udpa/core/v1/authority.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/core/v1/collection_entry.upbdefs.c +62 -0
- data/src/core/ext/upbdefs-generated/udpa/core/v1/collection_entry.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/udpa/core/v1/context_params.upbdefs.c +45 -0
- data/src/core/ext/upbdefs-generated/udpa/core/v1/context_params.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/udpa/core/v1/resource.upbdefs.c +49 -0
- data/src/core/ext/upbdefs-generated/udpa/core/v1/resource.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/core/v1/resource_locator.upbdefs.c +68 -0
- data/src/core/ext/upbdefs-generated/udpa/core/v1/resource_locator.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/udpa/core/v1/resource_name.upbdefs.c +51 -0
- data/src/core/ext/upbdefs-generated/udpa/core/v1/resource_name.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c +307 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h +145 -0
- data/src/core/ext/xds/certificate_provider_factory.h +61 -0
- data/src/core/ext/xds/certificate_provider_registry.cc +103 -0
- data/src/core/ext/xds/certificate_provider_registry.h +57 -0
- data/src/core/ext/xds/certificate_provider_store.cc +87 -0
- data/src/core/ext/xds/certificate_provider_store.h +112 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +144 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.h +69 -0
- data/src/core/ext/xds/xds_api.cc +2308 -0
- data/src/core/ext/xds/xds_api.h +469 -0
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_bootstrap.cc +208 -19
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_bootstrap.h +31 -11
- data/src/core/ext/xds/xds_certificate_provider.cc +299 -0
- data/src/core/ext/xds/xds_certificate_provider.h +112 -0
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_channel_args.h +9 -6
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client.cc +656 -865
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client.h +126 -99
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client_stats.cc +61 -18
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client_stats.h +38 -10
- data/src/core/ext/xds/xds_server_config_fetcher.cc +131 -0
- data/src/core/lib/channel/channel_args.cc +9 -8
- data/src/core/lib/channel/channel_args.h +0 -1
- data/src/core/lib/channel/channel_trace.cc +4 -2
- data/src/core/lib/channel/channel_trace.h +1 -1
- data/src/core/lib/channel/channelz.cc +37 -74
- data/src/core/lib/channel/channelz.h +14 -23
- data/src/core/lib/channel/channelz_registry.cc +15 -12
- data/src/core/lib/channel/channelz_registry.h +3 -1
- data/src/core/lib/channel/handshaker.cc +2 -2
- data/src/core/lib/channel/handshaker.h +2 -2
- data/src/core/lib/compression/compression.cc +8 -4
- data/src/core/lib/compression/compression_args.cc +3 -2
- data/src/core/lib/compression/compression_internal.cc +10 -5
- data/src/core/lib/compression/compression_internal.h +2 -1
- data/src/core/lib/compression/stream_compression_identity.cc +1 -3
- data/src/core/lib/debug/stats.h +2 -2
- data/src/core/lib/debug/stats_data.cc +1 -0
- data/src/core/lib/debug/stats_data.h +13 -13
- data/src/core/lib/gpr/alloc.cc +3 -2
- data/src/core/lib/gpr/cpu_iphone.cc +10 -2
- data/src/core/lib/gpr/log.cc +53 -16
- data/src/core/lib/gpr/log_linux.cc +19 -3
- data/src/core/lib/gpr/log_posix.cc +15 -1
- data/src/core/lib/gpr/log_windows.cc +18 -4
- data/src/core/lib/gpr/murmur_hash.cc +1 -1
- data/src/core/lib/gpr/spinlock.h +10 -2
- data/src/core/lib/gpr/string.cc +23 -22
- data/src/core/lib/gpr/string.h +5 -6
- data/src/core/lib/gpr/sync.cc +4 -4
- data/src/core/lib/gpr/sync_posix.cc +2 -8
- data/src/core/lib/gpr/time.cc +12 -12
- data/src/core/lib/gpr/time_precise.cc +5 -2
- data/src/core/lib/gpr/time_precise.h +6 -2
- data/src/core/lib/gpr/tls.h +4 -0
- data/src/core/lib/gpr/tls_msvc.h +2 -0
- data/src/core/lib/gpr/tls_stdcpp.h +48 -0
- data/src/core/lib/gpr/useful.h +5 -4
- data/src/core/lib/gprpp/arena.h +3 -2
- data/src/core/lib/gprpp/dual_ref_counted.h +331 -0
- data/src/core/lib/gprpp/examine_stack.cc +43 -0
- data/src/core/lib/gprpp/examine_stack.h +46 -0
- data/src/core/lib/gprpp/fork.cc +2 -2
- data/src/core/lib/gprpp/manual_constructor.h +1 -1
- data/src/core/lib/gprpp/orphanable.h +4 -8
- data/src/core/lib/gprpp/ref_counted.h +91 -68
- data/src/core/lib/gprpp/ref_counted_ptr.h +166 -7
- data/src/core/lib/gprpp/stat.h +38 -0
- data/src/core/lib/gprpp/stat_posix.cc +49 -0
- data/src/core/lib/gprpp/stat_windows.cc +48 -0
- data/src/core/lib/gprpp/thd.h +2 -2
- data/src/core/lib/gprpp/thd_posix.cc +42 -37
- data/src/core/lib/gprpp/thd_windows.cc +3 -1
- data/src/core/lib/http/httpcli.cc +1 -1
- data/src/core/lib/http/httpcli.h +2 -3
- data/src/core/lib/http/httpcli_security_connector.cc +1 -1
- data/src/core/lib/http/parser.cc +47 -27
- data/src/core/lib/iomgr/call_combiner.cc +8 -5
- data/src/core/lib/iomgr/combiner.cc +2 -1
- data/src/core/lib/iomgr/endpoint.cc +5 -1
- data/src/core/lib/iomgr/endpoint.h +8 -4
- data/src/core/lib/iomgr/endpoint_cfstream.cc +36 -11
- data/src/core/lib/iomgr/error.cc +17 -12
- data/src/core/lib/iomgr/error_internal.h +1 -1
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +20 -13
- data/src/core/lib/iomgr/ev_epollex_linux.cc +25 -17
- data/src/core/lib/iomgr/ev_poll_posix.cc +9 -7
- data/src/core/lib/iomgr/ev_posix.cc +0 -2
- data/src/core/lib/iomgr/exec_ctx.cc +1 -1
- data/src/core/lib/iomgr/exec_ctx.h +16 -12
- data/src/core/lib/iomgr/executor.cc +2 -1
- data/src/core/lib/iomgr/executor.h +1 -1
- data/src/core/lib/iomgr/executor/mpmcqueue.h +5 -5
- data/src/core/lib/iomgr/executor/threadpool.h +4 -4
- data/src/core/lib/iomgr/iomgr.cc +1 -11
- data/src/core/lib/iomgr/iomgr.h +0 -10
- data/src/core/lib/iomgr/load_file.h +1 -1
- data/src/core/lib/iomgr/lockfree_event.cc +19 -14
- data/src/core/lib/iomgr/lockfree_event.h +2 -2
- data/src/core/{ext/filters/client_channel → lib/iomgr}/parse_address.cc +128 -44
- data/src/core/lib/iomgr/parse_address.h +77 -0
- data/src/core/lib/iomgr/poller/eventmanager_libuv.cc +2 -1
- data/src/core/lib/iomgr/poller/eventmanager_libuv.h +1 -1
- data/src/core/lib/iomgr/pollset_set_custom.cc +1 -1
- data/src/core/lib/iomgr/python_util.h +4 -4
- data/src/core/lib/iomgr/resolve_address.cc +4 -4
- data/src/core/lib/iomgr/resolve_address_posix.cc +1 -5
- data/src/core/lib/iomgr/resource_quota.cc +4 -4
- data/src/core/lib/iomgr/sockaddr_utils.cc +12 -11
- data/src/core/lib/iomgr/sockaddr_utils.h +3 -2
- data/src/core/lib/iomgr/socket_factory_posix.cc +3 -2
- data/src/core/lib/iomgr/socket_mutator.cc +3 -2
- data/src/core/lib/iomgr/tcp_client.cc +3 -3
- data/src/core/lib/iomgr/tcp_client_custom.cc +7 -6
- data/src/core/lib/iomgr/tcp_custom.cc +53 -32
- data/src/core/lib/iomgr/tcp_posix.cc +43 -21
- data/src/core/lib/iomgr/tcp_server_custom.cc +28 -22
- data/src/core/lib/iomgr/tcp_windows.cc +26 -10
- data/src/core/lib/iomgr/timer_custom.cc +5 -5
- data/src/core/lib/iomgr/timer_generic.cc +3 -3
- data/src/core/lib/iomgr/timer_manager.cc +2 -2
- data/src/core/lib/iomgr/udp_server.cc +1 -2
- data/src/core/lib/iomgr/udp_server.h +1 -2
- data/src/core/lib/iomgr/unix_sockets_posix.cc +32 -21
- data/src/core/lib/iomgr/unix_sockets_posix.h +5 -0
- data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +7 -0
- data/src/core/lib/iomgr/wakeup_fd_pipe.cc +2 -2
- data/src/core/lib/json/json.h +12 -2
- data/src/core/lib/json/json_reader.cc +8 -4
- data/src/core/lib/json/json_util.cc +58 -0
- data/src/core/lib/json/json_util.h +204 -0
- data/src/core/lib/json/json_writer.cc +2 -1
- data/src/core/lib/security/authorization/authorization_engine.cc +177 -0
- data/src/core/lib/security/authorization/authorization_engine.h +84 -0
- data/src/core/lib/security/authorization/evaluate_args.cc +148 -0
- data/src/core/lib/security/authorization/evaluate_args.h +59 -0
- data/src/core/lib/security/authorization/mock_cel/activation.h +57 -0
- data/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h +44 -0
- data/src/core/lib/security/authorization/mock_cel/cel_expression.h +69 -0
- data/src/core/lib/security/authorization/mock_cel/cel_value.h +97 -0
- data/src/core/lib/security/authorization/mock_cel/evaluator_core.h +67 -0
- data/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h +57 -0
- data/src/core/lib/security/context/security_context.cc +4 -3
- data/src/core/lib/security/context/security_context.h +3 -1
- data/src/core/lib/security/credentials/alts/check_gcp_environment.cc +1 -1
- data/src/core/lib/security/credentials/credentials.cc +7 -7
- data/src/core/lib/security/credentials/credentials.h +3 -3
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +413 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.h +80 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.cc +213 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.h +72 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +497 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.h +120 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +135 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.h +48 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +213 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.h +58 -0
- data/src/core/lib/security/credentials/fake/fake_credentials.cc +2 -1
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +74 -50
- data/src/core/lib/security/credentials/insecure/insecure_credentials.cc +64 -0
- data/src/core/lib/security/credentials/jwt/json_token.cc +6 -3
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +4 -3
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +8 -4
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +39 -46
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +5 -4
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +1 -1
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +5 -5
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +1 -1
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +346 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +213 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +399 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +138 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +78 -150
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +57 -187
- data/src/core/lib/security/credentials/tls/tls_credentials.cc +16 -12
- data/src/core/lib/security/credentials/tls/tls_credentials.h +2 -2
- data/src/core/lib/security/credentials/tls/tls_utils.cc +91 -0
- data/src/core/lib/security/credentials/tls/tls_utils.h +38 -0
- data/src/core/lib/security/credentials/xds/xds_credentials.cc +175 -0
- data/src/core/lib/security/credentials/xds/xds_credentials.h +69 -0
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +1 -1
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +10 -15
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc +121 -0
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +87 -0
- data/src/core/lib/security/security_connector/load_system_roots.h +4 -0
- data/src/core/lib/security/security_connector/load_system_roots_linux.h +2 -0
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +3 -3
- data/src/core/lib/security/security_connector/security_connector.cc +4 -3
- data/src/core/lib/security/security_connector/security_connector.h +4 -2
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +4 -4
- data/src/core/lib/security/security_connector/ssl_utils.cc +2 -2
- data/src/core/lib/security/security_connector/ssl_utils.h +19 -19
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +342 -279
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +105 -61
- data/src/core/lib/security/transport/secure_endpoint.cc +9 -3
- data/src/core/lib/security/transport/security_handshaker.cc +3 -3
- data/src/core/lib/security/transport/server_auth_filter.cc +2 -1
- data/src/core/lib/security/util/json_util.h +1 -0
- data/src/core/lib/slice/slice.cc +7 -4
- data/src/core/lib/slice/slice_buffer.cc +2 -1
- data/src/core/lib/slice/slice_intern.cc +6 -7
- data/src/core/lib/slice/slice_internal.h +2 -2
- data/src/core/lib/surface/call.cc +53 -44
- data/src/core/lib/surface/call.h +2 -1
- data/src/core/lib/surface/call_details.cc +8 -8
- data/src/core/lib/surface/channel.cc +53 -61
- data/src/core/lib/surface/channel.h +21 -5
- data/src/core/lib/surface/channel_init.cc +1 -1
- data/src/core/lib/surface/completion_queue.cc +38 -294
- data/src/core/lib/surface/completion_queue.h +16 -24
- data/src/core/lib/surface/init.cc +32 -16
- data/src/core/lib/surface/lame_client.cc +20 -46
- data/src/core/lib/surface/lame_client.h +4 -0
- data/src/core/lib/surface/server.cc +1107 -1239
- data/src/core/lib/surface/server.h +394 -86
- data/src/core/lib/surface/validate_metadata.h +3 -0
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/authority_override.cc +40 -0
- data/src/core/lib/transport/authority_override.h +37 -0
- data/src/core/lib/transport/bdp_estimator.cc +1 -1
- data/src/core/lib/transport/bdp_estimator.h +2 -1
- data/src/core/lib/transport/byte_stream.h +3 -3
- data/src/core/lib/transport/connectivity_state.cc +18 -13
- data/src/core/lib/transport/connectivity_state.h +26 -12
- data/src/core/lib/transport/error_utils.cc +13 -0
- data/src/core/lib/transport/error_utils.h +7 -1
- data/src/core/lib/transport/metadata.cc +11 -1
- data/src/core/lib/transport/metadata.h +2 -2
- data/src/core/lib/transport/metadata_batch.h +4 -4
- data/src/core/lib/transport/static_metadata.cc +296 -277
- data/src/core/lib/transport/static_metadata.h +80 -73
- data/src/core/lib/transport/status_metadata.cc +4 -3
- data/src/core/lib/transport/timeout_encoding.cc +4 -4
- data/src/core/lib/transport/transport.cc +5 -3
- data/src/core/lib/transport/transport.h +15 -8
- data/src/core/lib/uri/uri_parser.cc +131 -247
- data/src/core/lib/uri/uri_parser.h +58 -20
- data/src/core/plugin_registry/grpc_plugin_registry.cc +41 -20
- data/src/core/tsi/alts/crypt/gsec.cc +5 -4
- data/src/core/tsi/alts/frame_protector/frame_handler.cc +8 -6
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +1 -1
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +49 -26
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc +8 -6
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +4 -4
- data/src/core/tsi/fake_transport_security.cc +6 -3
- data/src/core/tsi/local_transport_security.cc +5 -1
- data/src/core/tsi/local_transport_security.h +6 -7
- data/src/core/tsi/ssl/session_cache/ssl_session.h +3 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +4 -1
- data/src/core/tsi/ssl_transport_security.cc +81 -67
- data/src/core/tsi/ssl_transport_security.h +9 -6
- data/src/core/tsi/transport_security.cc +10 -8
- data/src/core/tsi/transport_security_interface.h +1 -1
- data/src/ruby/ext/grpc/extconf.rb +1 -1
- data/src/ruby/ext/grpc/rb_channel_credentials.c +9 -0
- data/src/ruby/ext/grpc/rb_event_thread.c +2 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +38 -18
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +74 -44
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +28 -0
- data/src/ruby/pb/src/proto/grpc/testing/test_services_pb.rb +18 -0
- data/src/ruby/spec/channel_credentials_spec.rb +10 -0
- data/src/ruby/spec/generic/active_call_spec.rb +19 -8
- data/src/ruby/spec/pb/codegen/package_option_spec.rb +2 -6
- data/third_party/abseil-cpp/absl/algorithm/container.h +1764 -0
- data/third_party/abseil-cpp/absl/base/attributes.h +99 -38
- data/third_party/abseil-cpp/absl/base/call_once.h +1 -1
- data/third_party/abseil-cpp/absl/base/casts.h +9 -6
- data/third_party/abseil-cpp/absl/base/config.h +60 -17
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +428 -335
- data/third_party/abseil-cpp/absl/base/internal/bits.h +17 -16
- data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +166 -0
- data/third_party/abseil-cpp/absl/base/internal/dynamic_annotations.h +398 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.cc +93 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.h +130 -0
- data/third_party/abseil-cpp/absl/base/internal/invoke.h +4 -4
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +620 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h +126 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +29 -1
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +2 -2
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +7 -5
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +25 -38
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +19 -25
- data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +8 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +28 -5
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.h +8 -0
- data/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h +3 -1
- data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +2 -2
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +3 -3
- data/third_party/abseil-cpp/absl/base/macros.h +36 -109
- data/third_party/abseil-cpp/absl/base/optimization.h +61 -1
- data/third_party/abseil-cpp/absl/base/options.h +31 -4
- data/third_party/abseil-cpp/absl/base/policy_checks.h +1 -1
- data/third_party/abseil-cpp/absl/base/thread_annotations.h +94 -39
- data/third_party/abseil-cpp/absl/container/fixed_array.h +532 -0
- data/third_party/abseil-cpp/absl/container/flat_hash_map.h +606 -0
- data/third_party/abseil-cpp/absl/container/flat_hash_set.h +504 -0
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +33 -36
- data/third_party/abseil-cpp/absl/container/internal/common.h +206 -0
- data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +33 -8
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +460 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +161 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +208 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtable_debug_hooks.h +85 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +270 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +321 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc +30 -0
- data/third_party/abseil-cpp/absl/container/internal/have_sse.h +50 -0
- data/third_party/abseil-cpp/absl/container/internal/layout.h +743 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +197 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +48 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +1903 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +139 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.h +32 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +1945 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.h +71 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +382 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +134 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +196 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +134 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +89 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +108 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +248 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +24 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +93 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +346 -0
- data/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +149 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +173 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.h +158 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +140 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.h +231 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.cc +36 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.h +99 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_darwin.inc +101 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +1560 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_unimplemented.inc +40 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +81 -0
- data/third_party/abseil-cpp/absl/functional/bind_front.h +184 -0
- data/third_party/abseil-cpp/absl/functional/function_ref.h +139 -0
- data/third_party/abseil-cpp/absl/functional/internal/front_binder.h +95 -0
- data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +106 -0
- data/third_party/abseil-cpp/absl/hash/hash.h +325 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.cc +346 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.h +96 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +55 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +996 -0
- data/third_party/abseil-cpp/absl/memory/memory.h +4 -0
- data/third_party/abseil-cpp/absl/meta/type_traits.h +2 -8
- data/third_party/abseil-cpp/absl/numeric/int128.cc +13 -27
- data/third_party/abseil-cpp/absl/numeric/int128.h +16 -15
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +51 -0
- data/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +399 -0
- data/third_party/abseil-cpp/absl/status/status.cc +445 -0
- data/third_party/abseil-cpp/absl/status/status.h +817 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.cc +38 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.h +51 -0
- data/third_party/abseil-cpp/absl/status/statusor.cc +71 -0
- data/third_party/abseil-cpp/absl/status/statusor.h +760 -0
- data/third_party/abseil-cpp/absl/strings/charconv.cc +2 -2
- data/third_party/abseil-cpp/absl/strings/cord.cc +1998 -0
- data/third_party/abseil-cpp/absl/strings/cord.h +1276 -0
- data/third_party/abseil-cpp/absl/strings/escaping.cc +9 -9
- data/third_party/abseil-cpp/absl/strings/internal/char_map.h +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h +2 -2
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +2 -2
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +173 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +222 -136
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +136 -64
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +14 -21
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +7 -14
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +31 -7
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +147 -135
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +999 -87
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +3 -3
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +4 -12
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +8 -6
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +13 -11
- data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +2 -2
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +4 -4
- data/third_party/abseil-cpp/absl/strings/str_cat.h +1 -1
- data/third_party/abseil-cpp/absl/strings/str_format.h +289 -13
- data/third_party/abseil-cpp/absl/strings/str_split.cc +2 -2
- data/third_party/abseil-cpp/absl/strings/str_split.h +1 -0
- data/third_party/abseil-cpp/absl/strings/string_view.h +26 -19
- data/third_party/abseil-cpp/absl/strings/substitute.cc +5 -5
- data/third_party/abseil-cpp/absl/strings/substitute.h +32 -29
- data/third_party/abseil-cpp/absl/synchronization/barrier.cc +52 -0
- data/third_party/abseil-cpp/absl/synchronization/barrier.h +79 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.cc +57 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.h +99 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +140 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.h +60 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +697 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.h +141 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +155 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.inc +249 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc +106 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +115 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc +492 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +159 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +2739 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +1065 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.cc +78 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.h +123 -0
- data/third_party/abseil-cpp/absl/time/civil_time.cc +9 -9
- data/third_party/abseil-cpp/absl/time/clock.cc +3 -3
- data/third_party/abseil-cpp/absl/time/duration.cc +90 -59
- data/third_party/abseil-cpp/absl/time/format.cc +43 -36
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h +26 -16
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +4 -2
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/zone_info_source.h +1 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +136 -29
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc +13 -21
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.h +1 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc +136 -129
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.h +4 -5
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc +8 -7
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h +6 -6
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc +2 -1
- data/third_party/abseil-cpp/absl/time/time.h +15 -16
- data/third_party/abseil-cpp/absl/types/bad_variant_access.cc +64 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.h +82 -0
- data/third_party/abseil-cpp/absl/types/internal/variant.h +1646 -0
- data/third_party/abseil-cpp/absl/types/optional.h +9 -9
- data/third_party/abseil-cpp/absl/types/span.h +49 -36
- data/third_party/abseil-cpp/absl/types/variant.h +861 -0
- data/third_party/abseil-cpp/absl/utility/utility.h +2 -2
- data/third_party/address_sorting/include/address_sorting/address_sorting.h +2 -0
- data/third_party/boringssl-with-bazel/err_data.c +479 -467
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c +0 -6
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c +9 -43
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c +55 -4
- data/third_party/boringssl-with-bazel/src/crypto/dsa/internal.h +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c +16 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_dsa_asn1.c +6 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c +173 -35
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/internal.h +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +30 -10
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +56 -22
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c +8 -2
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +543 -0
- data/third_party/boringssl-with-bazel/src/crypto/hpke/internal.h +237 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h +118 -49
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c +267 -95
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c +210 -34
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/voprf.c +766 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_strex.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c +6 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c +7 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.c +21 -18
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c +24 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_txt.c +67 -67
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +29 -35
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c +13 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +9 -8
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +10 -10
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_name.c +28 -40
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c +20 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +3 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/ext_dat.h +1 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c +5 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c +7 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_genn.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_info.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +55 -8
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_skey.c +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +24 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +54 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +0 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +6 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +4 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +6 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/crypto.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/des.h +6 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +12 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +9 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +4 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslconf.h +3 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +202 -134
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +103 -10
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +5 -2
- data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +42 -14
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +199 -78
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +482 -432
- data/third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc +18 -5
- data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +35 -0
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +18 -18
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +2 -3
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +1 -1
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +49 -10
- data/third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc +42 -1
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc +3 -6
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +8 -9
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +77 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +11 -14
- data/third_party/boringssl-with-bazel/src/ssl/t1_lib.cc +250 -20
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +1 -2
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +57 -19
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +140 -41
- data/third_party/boringssl-with-bazel/src/ssl/tls_record.cc +5 -3
- data/third_party/upb/third_party/wyhash/wyhash.h +145 -0
- data/third_party/upb/upb/decode.c +275 -145
- data/third_party/upb/upb/decode.h +20 -1
- data/third_party/upb/upb/decode.int.h +163 -0
- data/third_party/upb/upb/decode_fast.c +1040 -0
- data/third_party/upb/upb/decode_fast.h +126 -0
- data/third_party/upb/upb/def.c +2178 -0
- data/third_party/upb/upb/def.h +315 -0
- data/third_party/upb/upb/def.hpp +439 -0
- data/third_party/upb/upb/encode.c +229 -171
- data/third_party/upb/upb/encode.h +27 -2
- data/third_party/upb/upb/json_decode.c +1443 -0
- data/third_party/upb/upb/json_decode.h +23 -0
- data/third_party/upb/upb/json_encode.c +713 -0
- data/third_party/upb/upb/json_encode.h +36 -0
- data/third_party/upb/upb/msg.c +167 -88
- data/third_party/upb/upb/msg.h +175 -35
- data/third_party/upb/upb/port_def.inc +75 -62
- data/third_party/upb/upb/port_undef.inc +3 -7
- data/third_party/upb/upb/reflection.c +408 -0
- data/third_party/upb/upb/reflection.h +168 -0
- data/third_party/upb/upb/table.c +34 -208
- data/third_party/upb/upb/table.int.h +14 -14
- data/third_party/upb/upb/text_encode.c +421 -0
- data/third_party/upb/upb/text_encode.h +38 -0
- data/third_party/upb/upb/upb.c +33 -54
- data/third_party/upb/upb/upb.h +56 -1
- data/third_party/upb/upb/upb.hpp +6 -4
- data/third_party/upb/upb/upb.int.h +29 -0
- metadata +508 -172
- data/src/core/ext/filters/client_channel/lb_policy/xds/eds.cc +0 -938
- data/src/core/ext/filters/client_channel/lb_policy/xds/lrs.cc +0 -528
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc +0 -1143
- data/src/core/ext/filters/client_channel/parse_address.h +0 -53
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +0 -485
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +0 -68
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +0 -353
- data/src/core/ext/filters/client_channel/resolving_lb_policy.h +0 -142
- data/src/core/ext/filters/client_channel/xds/xds_api.cc +0 -2110
- data/src/core/ext/filters/client_channel/xds/xds_api.h +0 -345
- data/src/core/ext/filters/client_channel/xds/xds_channel.h +0 -46
- data/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc +0 -106
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +0 -21
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +0 -34
- data/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c +0 -114
- data/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h +0 -429
- data/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c +0 -72
- data/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h +0 -198
- data/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c +0 -105
- data/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h +0 -388
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +0 -403
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +0 -1453
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +0 -74
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +0 -226
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +0 -35
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h +0 -69
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +0 -55
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +0 -323
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +0 -112
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +0 -334
- data/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.c +0 -35
- data/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h +0 -79
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +0 -313
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +0 -891
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +0 -96
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +0 -328
- data/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c +0 -34
- data/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h +0 -71
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +0 -197
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +0 -649
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +0 -172
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +0 -693
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +0 -36
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h +0 -80
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +0 -152
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +0 -536
- data/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h +0 -88
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +0 -129
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h +0 -386
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c +0 -92
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h +0 -224
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +0 -18
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +0 -32
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c +0 -91
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +0 -273
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +0 -112
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h +0 -332
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c +0 -109
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +0 -415
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c +0 -18
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h +0 -32
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +0 -145
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +0 -538
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c +0 -43
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +0 -111
- data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.c +0 -63
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.h +0 -204
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c +0 -18
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h +0 -32
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +0 -815
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +0 -2984
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c +0 -59
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +0 -135
- data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +0 -228
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +0 -732
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c +0 -316
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +0 -1167
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c +0 -33
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +0 -65
- data/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c +0 -51
- data/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h +0 -125
- data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h +0 -49
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c +0 -54
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h +0 -136
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c +0 -63
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +0 -145
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c +0 -53
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +0 -133
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c +0 -88
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +0 -258
- data/src/core/ext/upb-generated/envoy/type/percent.upb.c +0 -39
- data/src/core/ext/upb-generated/envoy/type/percent.upb.h +0 -86
- data/src/core/ext/upb-generated/envoy/type/range.upb.c +0 -50
- data/src/core/ext/upb-generated/envoy/type/range.upb.h +0 -111
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h +0 -61
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c +0 -89
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +0 -250
- data/src/core/ext/upb-generated/gogoproto/gogo.upb.c +0 -17
- data/src/core/lib/gprpp/map.h +0 -53
- data/src/core/lib/security/transport/target_authority_table.cc +0 -75
- data/src/core/lib/security/transport/target_authority_table.h +0 -40
- data/src/core/lib/slice/slice_hash_table.h +0 -199
- data/src/core/lib/slice/slice_weak_hash_table.h +0 -102
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.cc +0 -129
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pku.c +0 -110
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_sxnet.c +0 -274
- data/third_party/upb/upb/port.c +0 -26
@@ -1,1143 +0,0 @@
|
|
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
|
-
#include <grpc/support/port_platform.h>
|
18
|
-
|
19
|
-
#include <inttypes.h>
|
20
|
-
#include <limits.h>
|
21
|
-
#include <string.h>
|
22
|
-
|
23
|
-
#include "absl/container/inlined_vector.h"
|
24
|
-
#include "absl/strings/match.h"
|
25
|
-
#include "absl/strings/numbers.h"
|
26
|
-
#include "absl/strings/str_cat.h"
|
27
|
-
#include "absl/strings/str_join.h"
|
28
|
-
#include "absl/strings/str_split.h"
|
29
|
-
#include "absl/strings/string_view.h"
|
30
|
-
#include "re2/re2.h"
|
31
|
-
|
32
|
-
#include <grpc/grpc.h>
|
33
|
-
|
34
|
-
#include "src/core/ext/filters/client_channel/lb_policy.h"
|
35
|
-
#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
|
36
|
-
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
|
37
|
-
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
|
38
|
-
#include "src/core/ext/filters/client_channel/xds/xds_api.h"
|
39
|
-
#include "src/core/lib/channel/channel_args.h"
|
40
|
-
#include "src/core/lib/gpr/string.h"
|
41
|
-
#include "src/core/lib/gprpp/orphanable.h"
|
42
|
-
#include "src/core/lib/gprpp/ref_counted_ptr.h"
|
43
|
-
#include "src/core/lib/iomgr/timer.h"
|
44
|
-
#include "src/core/lib/iomgr/work_serializer.h"
|
45
|
-
|
46
|
-
#define GRPC_XDS_ROUTING_CHILD_RETENTION_INTERVAL_MS (15 * 60 * 1000)
|
47
|
-
|
48
|
-
namespace grpc_core {
|
49
|
-
|
50
|
-
TraceFlag grpc_xds_routing_lb_trace(false, "xds_routing_lb");
|
51
|
-
|
52
|
-
namespace {
|
53
|
-
|
54
|
-
constexpr char kXdsRouting[] = "xds_routing_experimental";
|
55
|
-
|
56
|
-
// Config for xds_routing LB policy.
|
57
|
-
class XdsRoutingLbConfig : public LoadBalancingPolicy::Config {
|
58
|
-
public:
|
59
|
-
struct Route {
|
60
|
-
XdsApi::RdsUpdate::RdsRoute::Matchers matchers;
|
61
|
-
std::string action;
|
62
|
-
};
|
63
|
-
using RouteTable = std::vector<Route>;
|
64
|
-
using ActionMap =
|
65
|
-
std::map<std::string, RefCountedPtr<LoadBalancingPolicy::Config>>;
|
66
|
-
|
67
|
-
XdsRoutingLbConfig(ActionMap action_map, RouteTable route_table)
|
68
|
-
: action_map_(std::move(action_map)),
|
69
|
-
route_table_(std::move(route_table)) {}
|
70
|
-
|
71
|
-
const char* name() const override { return kXdsRouting; }
|
72
|
-
|
73
|
-
const ActionMap& action_map() const { return action_map_; }
|
74
|
-
|
75
|
-
const RouteTable& route_table() const { return route_table_; }
|
76
|
-
|
77
|
-
private:
|
78
|
-
ActionMap action_map_;
|
79
|
-
RouteTable route_table_;
|
80
|
-
};
|
81
|
-
|
82
|
-
// xds_routing LB policy.
|
83
|
-
class XdsRoutingLb : public LoadBalancingPolicy {
|
84
|
-
public:
|
85
|
-
explicit XdsRoutingLb(Args args);
|
86
|
-
|
87
|
-
const char* name() const override { return kXdsRouting; }
|
88
|
-
|
89
|
-
void UpdateLocked(UpdateArgs args) override;
|
90
|
-
void ExitIdleLocked() override;
|
91
|
-
void ResetBackoffLocked() override;
|
92
|
-
|
93
|
-
private:
|
94
|
-
// A simple wrapper for ref-counting a picker from the child policy.
|
95
|
-
class ChildPickerWrapper : public RefCounted<ChildPickerWrapper> {
|
96
|
-
public:
|
97
|
-
ChildPickerWrapper(std::string name,
|
98
|
-
std::unique_ptr<SubchannelPicker> picker)
|
99
|
-
: name_(std::move(name)), picker_(std::move(picker)) {}
|
100
|
-
PickResult Pick(PickArgs args) { return picker_->Pick(args); }
|
101
|
-
|
102
|
-
const std::string& name() const { return name_; }
|
103
|
-
|
104
|
-
private:
|
105
|
-
std::string name_;
|
106
|
-
std::unique_ptr<SubchannelPicker> picker_;
|
107
|
-
};
|
108
|
-
|
109
|
-
// Picks a child using prefix or path matching and then delegates to that
|
110
|
-
// child's picker.
|
111
|
-
class RoutePicker : public SubchannelPicker {
|
112
|
-
public:
|
113
|
-
struct Route {
|
114
|
-
const XdsApi::RdsUpdate::RdsRoute::Matchers* matchers;
|
115
|
-
RefCountedPtr<ChildPickerWrapper> picker;
|
116
|
-
};
|
117
|
-
|
118
|
-
// Maintains an ordered xds route table as provided by RDS response.
|
119
|
-
using RouteTable = std::vector<Route>;
|
120
|
-
|
121
|
-
RoutePicker(RouteTable route_table,
|
122
|
-
RefCountedPtr<XdsRoutingLbConfig> config)
|
123
|
-
: route_table_(std::move(route_table)), config_(std::move(config)) {}
|
124
|
-
|
125
|
-
PickResult Pick(PickArgs args) override;
|
126
|
-
|
127
|
-
private:
|
128
|
-
RouteTable route_table_;
|
129
|
-
// Take a reference to config so that we can use
|
130
|
-
// XdsApi::RdsUpdate::RdsRoute::Matchers from it.
|
131
|
-
RefCountedPtr<XdsRoutingLbConfig> config_;
|
132
|
-
};
|
133
|
-
|
134
|
-
// Each XdsRoutingChild holds a ref to its parent XdsRoutingLb.
|
135
|
-
class XdsRoutingChild : public InternallyRefCounted<XdsRoutingChild> {
|
136
|
-
public:
|
137
|
-
XdsRoutingChild(RefCountedPtr<XdsRoutingLb> xds_routing_policy,
|
138
|
-
const std::string& name);
|
139
|
-
~XdsRoutingChild();
|
140
|
-
|
141
|
-
void Orphan() override;
|
142
|
-
|
143
|
-
void UpdateLocked(RefCountedPtr<LoadBalancingPolicy::Config> config,
|
144
|
-
const ServerAddressList& addresses,
|
145
|
-
const grpc_channel_args* args);
|
146
|
-
void ExitIdleLocked();
|
147
|
-
void ResetBackoffLocked();
|
148
|
-
void DeactivateLocked();
|
149
|
-
|
150
|
-
grpc_connectivity_state connectivity_state() const {
|
151
|
-
return connectivity_state_;
|
152
|
-
}
|
153
|
-
RefCountedPtr<ChildPickerWrapper> picker_wrapper() const {
|
154
|
-
return picker_wrapper_;
|
155
|
-
}
|
156
|
-
|
157
|
-
private:
|
158
|
-
class Helper : public ChannelControlHelper {
|
159
|
-
public:
|
160
|
-
explicit Helper(RefCountedPtr<XdsRoutingChild> xds_routing_child)
|
161
|
-
: xds_routing_child_(std::move(xds_routing_child)) {}
|
162
|
-
|
163
|
-
~Helper() { xds_routing_child_.reset(DEBUG_LOCATION, "Helper"); }
|
164
|
-
|
165
|
-
RefCountedPtr<SubchannelInterface> CreateSubchannel(
|
166
|
-
const grpc_channel_args& args) override;
|
167
|
-
void UpdateState(grpc_connectivity_state state,
|
168
|
-
std::unique_ptr<SubchannelPicker> picker) override;
|
169
|
-
void RequestReresolution() override;
|
170
|
-
void AddTraceEvent(TraceSeverity severity,
|
171
|
-
absl::string_view message) override;
|
172
|
-
|
173
|
-
private:
|
174
|
-
RefCountedPtr<XdsRoutingChild> xds_routing_child_;
|
175
|
-
};
|
176
|
-
|
177
|
-
// Methods for dealing with the child policy.
|
178
|
-
OrphanablePtr<LoadBalancingPolicy> CreateChildPolicyLocked(
|
179
|
-
const grpc_channel_args* args);
|
180
|
-
|
181
|
-
static void OnDelayedRemovalTimer(void* arg, grpc_error* error);
|
182
|
-
void OnDelayedRemovalTimerLocked(grpc_error* error);
|
183
|
-
|
184
|
-
// The owning LB policy.
|
185
|
-
RefCountedPtr<XdsRoutingLb> xds_routing_policy_;
|
186
|
-
|
187
|
-
// Points to the corresponding key in XdsRoutingLb::actions_.
|
188
|
-
const std::string name_;
|
189
|
-
|
190
|
-
OrphanablePtr<LoadBalancingPolicy> child_policy_;
|
191
|
-
|
192
|
-
RefCountedPtr<ChildPickerWrapper> picker_wrapper_;
|
193
|
-
grpc_connectivity_state connectivity_state_ = GRPC_CHANNEL_IDLE;
|
194
|
-
bool seen_failure_since_ready_ = false;
|
195
|
-
|
196
|
-
// States for delayed removal.
|
197
|
-
grpc_timer delayed_removal_timer_;
|
198
|
-
grpc_closure on_delayed_removal_timer_;
|
199
|
-
bool delayed_removal_timer_callback_pending_ = false;
|
200
|
-
bool shutdown_ = false;
|
201
|
-
};
|
202
|
-
|
203
|
-
~XdsRoutingLb();
|
204
|
-
|
205
|
-
void ShutdownLocked() override;
|
206
|
-
|
207
|
-
void UpdateStateLocked();
|
208
|
-
|
209
|
-
// Current config from the resolver.
|
210
|
-
RefCountedPtr<XdsRoutingLbConfig> config_;
|
211
|
-
|
212
|
-
// Internal state.
|
213
|
-
bool shutting_down_ = false;
|
214
|
-
|
215
|
-
// Children.
|
216
|
-
std::map<std::string, OrphanablePtr<XdsRoutingChild>> actions_;
|
217
|
-
};
|
218
|
-
|
219
|
-
//
|
220
|
-
// XdsRoutingLb::RoutePicker
|
221
|
-
//
|
222
|
-
|
223
|
-
bool PathMatch(
|
224
|
-
const absl::string_view& path,
|
225
|
-
const XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher& path_matcher) {
|
226
|
-
switch (path_matcher.type) {
|
227
|
-
case XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher::PathMatcherType::
|
228
|
-
PREFIX:
|
229
|
-
return absl::StartsWith(path, path_matcher.string_matcher);
|
230
|
-
case XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher::PathMatcherType::
|
231
|
-
PATH:
|
232
|
-
return path == path_matcher.string_matcher;
|
233
|
-
case XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher::PathMatcherType::
|
234
|
-
REGEX:
|
235
|
-
return RE2::FullMatch(path.data(), *path_matcher.regex_matcher);
|
236
|
-
default:
|
237
|
-
return false;
|
238
|
-
}
|
239
|
-
}
|
240
|
-
|
241
|
-
absl::optional<absl::string_view> GetMetadataValue(
|
242
|
-
const std::string& key,
|
243
|
-
LoadBalancingPolicy::MetadataInterface* initial_metadata,
|
244
|
-
std::string* concatenated_value) {
|
245
|
-
// Find all values for the specified key.
|
246
|
-
GPR_DEBUG_ASSERT(initial_metadata != nullptr);
|
247
|
-
absl::InlinedVector<absl::string_view, 1> values;
|
248
|
-
for (const auto p : *initial_metadata) {
|
249
|
-
if (p.first == key) values.push_back(p.second);
|
250
|
-
}
|
251
|
-
// If none found, no match.
|
252
|
-
if (values.empty()) return absl::nullopt;
|
253
|
-
// If exactly one found, return it as-is.
|
254
|
-
if (values.size() == 1) return values.front();
|
255
|
-
// If more than one found, concatenate the values, using
|
256
|
-
// *concatenated_values as a temporary holding place for the
|
257
|
-
// concatenated string.
|
258
|
-
*concatenated_value = absl::StrJoin(values, ",");
|
259
|
-
return *concatenated_value;
|
260
|
-
}
|
261
|
-
|
262
|
-
bool HeaderMatchHelper(
|
263
|
-
const XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher& header_matcher,
|
264
|
-
LoadBalancingPolicy::MetadataInterface* initial_metadata) {
|
265
|
-
std::string concatenated_value;
|
266
|
-
absl::optional<absl::string_view> value;
|
267
|
-
// Note: If we ever allow binary headers here, we still need to
|
268
|
-
// special-case ignore "grpc-tags-bin" and "grpc-trace-bin", since
|
269
|
-
// they are not visible to the LB policy in grpc-go.
|
270
|
-
if (absl::EndsWith(header_matcher.name, "-bin") ||
|
271
|
-
header_matcher.name == "grpc-previous-rpc-attempts") {
|
272
|
-
value = absl::nullopt;
|
273
|
-
} else if (header_matcher.name == "content-type") {
|
274
|
-
value = "application/grpc";
|
275
|
-
} else {
|
276
|
-
value = GetMetadataValue(header_matcher.name, initial_metadata,
|
277
|
-
&concatenated_value);
|
278
|
-
}
|
279
|
-
if (!value.has_value()) {
|
280
|
-
if (header_matcher.type == XdsApi::RdsUpdate::RdsRoute::Matchers::
|
281
|
-
HeaderMatcher::HeaderMatcherType::PRESENT) {
|
282
|
-
return !header_matcher.present_match;
|
283
|
-
} else {
|
284
|
-
// For all other header matcher types, we need the header value to
|
285
|
-
// exist to consider matches.
|
286
|
-
return false;
|
287
|
-
}
|
288
|
-
}
|
289
|
-
switch (header_matcher.type) {
|
290
|
-
case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher::
|
291
|
-
HeaderMatcherType::EXACT:
|
292
|
-
return value.value() == header_matcher.string_matcher;
|
293
|
-
case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher::
|
294
|
-
HeaderMatcherType::REGEX:
|
295
|
-
return RE2::FullMatch(value.value().data(), *header_matcher.regex_match);
|
296
|
-
case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher::
|
297
|
-
HeaderMatcherType::RANGE:
|
298
|
-
int64_t int_value;
|
299
|
-
if (!absl::SimpleAtoi(value.value(), &int_value)) {
|
300
|
-
return false;
|
301
|
-
}
|
302
|
-
return int_value >= header_matcher.range_start &&
|
303
|
-
int_value < header_matcher.range_end;
|
304
|
-
case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher::
|
305
|
-
HeaderMatcherType::PREFIX:
|
306
|
-
return absl::StartsWith(value.value(), header_matcher.string_matcher);
|
307
|
-
case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher::
|
308
|
-
HeaderMatcherType::SUFFIX:
|
309
|
-
return absl::EndsWith(value.value(), header_matcher.string_matcher);
|
310
|
-
default:
|
311
|
-
return false;
|
312
|
-
}
|
313
|
-
}
|
314
|
-
|
315
|
-
bool HeadersMatch(
|
316
|
-
const std::vector<XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher>&
|
317
|
-
header_matchers,
|
318
|
-
LoadBalancingPolicy::MetadataInterface* initial_metadata) {
|
319
|
-
for (const auto& header_matcher : header_matchers) {
|
320
|
-
bool match = HeaderMatchHelper(header_matcher, initial_metadata);
|
321
|
-
if (header_matcher.invert_match) match = !match;
|
322
|
-
if (!match) return false;
|
323
|
-
}
|
324
|
-
return true;
|
325
|
-
}
|
326
|
-
|
327
|
-
bool UnderFraction(const uint32_t fraction_per_million) {
|
328
|
-
// Generate a random number in [0, 1000000).
|
329
|
-
const uint32_t random_number = rand() % 1000000;
|
330
|
-
return random_number < fraction_per_million;
|
331
|
-
}
|
332
|
-
|
333
|
-
XdsRoutingLb::PickResult XdsRoutingLb::RoutePicker::Pick(PickArgs args) {
|
334
|
-
for (const Route& route : route_table_) {
|
335
|
-
// Path matching.
|
336
|
-
if (!PathMatch(args.path, route.matchers->path_matcher)) continue;
|
337
|
-
// Header Matching.
|
338
|
-
if (!HeadersMatch(route.matchers->header_matchers, args.initial_metadata)) {
|
339
|
-
continue;
|
340
|
-
}
|
341
|
-
// Match fraction check
|
342
|
-
if (route.matchers->fraction_per_million.has_value() &&
|
343
|
-
!UnderFraction(route.matchers->fraction_per_million.value())) {
|
344
|
-
continue;
|
345
|
-
}
|
346
|
-
// Found a match
|
347
|
-
return route.picker->Pick(args);
|
348
|
-
}
|
349
|
-
PickResult result;
|
350
|
-
result.type = PickResult::PICK_FAILED;
|
351
|
-
result.error =
|
352
|
-
grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
353
|
-
"xds routing picker: no matching route"),
|
354
|
-
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_INTERNAL);
|
355
|
-
return result;
|
356
|
-
}
|
357
|
-
|
358
|
-
//
|
359
|
-
// XdsRoutingLb
|
360
|
-
//
|
361
|
-
|
362
|
-
XdsRoutingLb::XdsRoutingLb(Args args) : LoadBalancingPolicy(std::move(args)) {}
|
363
|
-
|
364
|
-
XdsRoutingLb::~XdsRoutingLb() {
|
365
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_routing_lb_trace)) {
|
366
|
-
gpr_log(GPR_INFO, "[xds_routing_lb %p] destroying xds_routing LB policy",
|
367
|
-
this);
|
368
|
-
}
|
369
|
-
}
|
370
|
-
|
371
|
-
void XdsRoutingLb::ShutdownLocked() {
|
372
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_routing_lb_trace)) {
|
373
|
-
gpr_log(GPR_INFO, "[xds_routing_lb %p] shutting down", this);
|
374
|
-
}
|
375
|
-
shutting_down_ = true;
|
376
|
-
actions_.clear();
|
377
|
-
}
|
378
|
-
|
379
|
-
void XdsRoutingLb::ExitIdleLocked() {
|
380
|
-
for (auto& p : actions_) p.second->ExitIdleLocked();
|
381
|
-
}
|
382
|
-
|
383
|
-
void XdsRoutingLb::ResetBackoffLocked() {
|
384
|
-
for (auto& p : actions_) p.second->ResetBackoffLocked();
|
385
|
-
}
|
386
|
-
|
387
|
-
void XdsRoutingLb::UpdateLocked(UpdateArgs args) {
|
388
|
-
if (shutting_down_) return;
|
389
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_routing_lb_trace)) {
|
390
|
-
gpr_log(GPR_INFO, "[xds_routing_lb %p] Received update", this);
|
391
|
-
}
|
392
|
-
// Update config.
|
393
|
-
config_ = std::move(args.config);
|
394
|
-
// Deactivate the actions not in the new config.
|
395
|
-
for (const auto& p : actions_) {
|
396
|
-
const std::string& name = p.first;
|
397
|
-
XdsRoutingChild* child = p.second.get();
|
398
|
-
if (config_->action_map().find(name) == config_->action_map().end()) {
|
399
|
-
child->DeactivateLocked();
|
400
|
-
}
|
401
|
-
}
|
402
|
-
// Add or update the actions in the new config.
|
403
|
-
for (const auto& p : config_->action_map()) {
|
404
|
-
const std::string& name = p.first;
|
405
|
-
const RefCountedPtr<LoadBalancingPolicy::Config>& config = p.second;
|
406
|
-
auto it = actions_.find(name);
|
407
|
-
if (it == actions_.end()) {
|
408
|
-
it = actions_
|
409
|
-
.emplace(name, MakeOrphanable<XdsRoutingChild>(
|
410
|
-
Ref(DEBUG_LOCATION, "XdsRoutingChild"), name))
|
411
|
-
.first;
|
412
|
-
}
|
413
|
-
it->second->UpdateLocked(config, args.addresses, args.args);
|
414
|
-
}
|
415
|
-
}
|
416
|
-
|
417
|
-
void XdsRoutingLb::UpdateStateLocked() {
|
418
|
-
// Also count the number of children in each state, to determine the
|
419
|
-
// overall state.
|
420
|
-
size_t num_ready = 0;
|
421
|
-
size_t num_connecting = 0;
|
422
|
-
size_t num_idle = 0;
|
423
|
-
size_t num_transient_failures = 0;
|
424
|
-
for (const auto& p : actions_) {
|
425
|
-
const auto& child_name = p.first;
|
426
|
-
const XdsRoutingChild* child = p.second.get();
|
427
|
-
// Skip the actions that are not in the latest update.
|
428
|
-
if (config_->action_map().find(child_name) == config_->action_map().end()) {
|
429
|
-
continue;
|
430
|
-
}
|
431
|
-
switch (child->connectivity_state()) {
|
432
|
-
case GRPC_CHANNEL_READY: {
|
433
|
-
++num_ready;
|
434
|
-
break;
|
435
|
-
}
|
436
|
-
case GRPC_CHANNEL_CONNECTING: {
|
437
|
-
++num_connecting;
|
438
|
-
break;
|
439
|
-
}
|
440
|
-
case GRPC_CHANNEL_IDLE: {
|
441
|
-
++num_idle;
|
442
|
-
break;
|
443
|
-
}
|
444
|
-
case GRPC_CHANNEL_TRANSIENT_FAILURE: {
|
445
|
-
++num_transient_failures;
|
446
|
-
break;
|
447
|
-
}
|
448
|
-
default:
|
449
|
-
GPR_UNREACHABLE_CODE(return );
|
450
|
-
}
|
451
|
-
}
|
452
|
-
// Determine aggregated connectivity state.
|
453
|
-
grpc_connectivity_state connectivity_state;
|
454
|
-
if (num_ready > 0) {
|
455
|
-
connectivity_state = GRPC_CHANNEL_READY;
|
456
|
-
} else if (num_connecting > 0) {
|
457
|
-
connectivity_state = GRPC_CHANNEL_CONNECTING;
|
458
|
-
} else if (num_idle > 0) {
|
459
|
-
connectivity_state = GRPC_CHANNEL_IDLE;
|
460
|
-
} else {
|
461
|
-
connectivity_state = GRPC_CHANNEL_TRANSIENT_FAILURE;
|
462
|
-
}
|
463
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_routing_lb_trace)) {
|
464
|
-
gpr_log(GPR_INFO, "[xds_routing_lb %p] connectivity changed to %s", this,
|
465
|
-
ConnectivityStateName(connectivity_state));
|
466
|
-
}
|
467
|
-
std::unique_ptr<SubchannelPicker> picker;
|
468
|
-
switch (connectivity_state) {
|
469
|
-
case GRPC_CHANNEL_READY: {
|
470
|
-
RoutePicker::RouteTable route_table;
|
471
|
-
for (const auto& config_route : config_->route_table()) {
|
472
|
-
RoutePicker::Route route;
|
473
|
-
route.matchers = &config_route.matchers;
|
474
|
-
route.picker = actions_[config_route.action]->picker_wrapper();
|
475
|
-
if (route.picker == nullptr) {
|
476
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_routing_lb_trace)) {
|
477
|
-
gpr_log(GPR_INFO,
|
478
|
-
"[xds_routing_lb %p] child %s has not yet returned a "
|
479
|
-
"picker; creating a QueuePicker.",
|
480
|
-
this, config_route.action.c_str());
|
481
|
-
}
|
482
|
-
route.picker = MakeRefCounted<ChildPickerWrapper>(
|
483
|
-
config_route.action, absl::make_unique<QueuePicker>(
|
484
|
-
Ref(DEBUG_LOCATION, "QueuePicker")));
|
485
|
-
}
|
486
|
-
route_table.push_back(std::move(route));
|
487
|
-
}
|
488
|
-
picker = absl::make_unique<RoutePicker>(std::move(route_table), config_);
|
489
|
-
break;
|
490
|
-
}
|
491
|
-
case GRPC_CHANNEL_CONNECTING:
|
492
|
-
case GRPC_CHANNEL_IDLE:
|
493
|
-
picker =
|
494
|
-
absl::make_unique<QueuePicker>(Ref(DEBUG_LOCATION, "QueuePicker"));
|
495
|
-
break;
|
496
|
-
default:
|
497
|
-
picker = absl::make_unique<TransientFailurePicker>(grpc_error_set_int(
|
498
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
499
|
-
"TRANSIENT_FAILURE from XdsRoutingLb"),
|
500
|
-
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
|
501
|
-
}
|
502
|
-
channel_control_helper()->UpdateState(connectivity_state, std::move(picker));
|
503
|
-
}
|
504
|
-
|
505
|
-
//
|
506
|
-
// XdsRoutingLb::XdsRoutingChild
|
507
|
-
//
|
508
|
-
|
509
|
-
XdsRoutingLb::XdsRoutingChild::XdsRoutingChild(
|
510
|
-
RefCountedPtr<XdsRoutingLb> xds_routing_policy, const std::string& name)
|
511
|
-
: xds_routing_policy_(std::move(xds_routing_policy)), name_(name) {
|
512
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_routing_lb_trace)) {
|
513
|
-
gpr_log(GPR_INFO, "[xds_routing_lb %p] created XdsRoutingChild %p for %s",
|
514
|
-
xds_routing_policy_.get(), this, name_.c_str());
|
515
|
-
}
|
516
|
-
GRPC_CLOSURE_INIT(&on_delayed_removal_timer_, OnDelayedRemovalTimer, this,
|
517
|
-
grpc_schedule_on_exec_ctx);
|
518
|
-
}
|
519
|
-
|
520
|
-
XdsRoutingLb::XdsRoutingChild::~XdsRoutingChild() {
|
521
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_routing_lb_trace)) {
|
522
|
-
gpr_log(GPR_INFO,
|
523
|
-
"[xds_routing_lb %p] XdsRoutingChild %p: destroying child",
|
524
|
-
xds_routing_policy_.get(), this);
|
525
|
-
}
|
526
|
-
xds_routing_policy_.reset(DEBUG_LOCATION, "XdsRoutingChild");
|
527
|
-
}
|
528
|
-
|
529
|
-
void XdsRoutingLb::XdsRoutingChild::Orphan() {
|
530
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_routing_lb_trace)) {
|
531
|
-
gpr_log(GPR_INFO,
|
532
|
-
"[xds_routing_lb %p] XdsRoutingChild %p %s: shutting down child",
|
533
|
-
xds_routing_policy_.get(), this, name_.c_str());
|
534
|
-
}
|
535
|
-
// Remove the child policy's interested_parties pollset_set from the
|
536
|
-
// xDS policy.
|
537
|
-
grpc_pollset_set_del_pollset_set(child_policy_->interested_parties(),
|
538
|
-
xds_routing_policy_->interested_parties());
|
539
|
-
child_policy_.reset();
|
540
|
-
// Drop our ref to the child's picker, in case it's holding a ref to
|
541
|
-
// the child.
|
542
|
-
picker_wrapper_.reset();
|
543
|
-
if (delayed_removal_timer_callback_pending_) {
|
544
|
-
grpc_timer_cancel(&delayed_removal_timer_);
|
545
|
-
}
|
546
|
-
shutdown_ = true;
|
547
|
-
Unref();
|
548
|
-
}
|
549
|
-
|
550
|
-
OrphanablePtr<LoadBalancingPolicy>
|
551
|
-
XdsRoutingLb::XdsRoutingChild::CreateChildPolicyLocked(
|
552
|
-
const grpc_channel_args* args) {
|
553
|
-
LoadBalancingPolicy::Args lb_policy_args;
|
554
|
-
lb_policy_args.work_serializer = xds_routing_policy_->work_serializer();
|
555
|
-
lb_policy_args.args = args;
|
556
|
-
lb_policy_args.channel_control_helper =
|
557
|
-
absl::make_unique<Helper>(this->Ref(DEBUG_LOCATION, "Helper"));
|
558
|
-
OrphanablePtr<LoadBalancingPolicy> lb_policy =
|
559
|
-
MakeOrphanable<ChildPolicyHandler>(std::move(lb_policy_args),
|
560
|
-
&grpc_xds_routing_lb_trace);
|
561
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_routing_lb_trace)) {
|
562
|
-
gpr_log(GPR_INFO,
|
563
|
-
"[xds_routing_lb %p] XdsRoutingChild %p %s: Created new child "
|
564
|
-
"policy handler %p",
|
565
|
-
xds_routing_policy_.get(), this, name_.c_str(), lb_policy.get());
|
566
|
-
}
|
567
|
-
// Add the xDS's interested_parties pollset_set to that of the newly created
|
568
|
-
// child policy. This will make the child policy progress upon activity on
|
569
|
-
// xDS LB, which in turn is tied to the application's call.
|
570
|
-
grpc_pollset_set_add_pollset_set(lb_policy->interested_parties(),
|
571
|
-
xds_routing_policy_->interested_parties());
|
572
|
-
return lb_policy;
|
573
|
-
}
|
574
|
-
|
575
|
-
void XdsRoutingLb::XdsRoutingChild::UpdateLocked(
|
576
|
-
RefCountedPtr<LoadBalancingPolicy::Config> config,
|
577
|
-
const ServerAddressList& addresses, const grpc_channel_args* args) {
|
578
|
-
if (xds_routing_policy_->shutting_down_) return;
|
579
|
-
// Update child weight.
|
580
|
-
// Reactivate if needed.
|
581
|
-
if (delayed_removal_timer_callback_pending_) {
|
582
|
-
delayed_removal_timer_callback_pending_ = false;
|
583
|
-
grpc_timer_cancel(&delayed_removal_timer_);
|
584
|
-
}
|
585
|
-
// Create child policy if needed.
|
586
|
-
if (child_policy_ == nullptr) {
|
587
|
-
child_policy_ = CreateChildPolicyLocked(args);
|
588
|
-
}
|
589
|
-
// Construct update args.
|
590
|
-
UpdateArgs update_args;
|
591
|
-
update_args.config = std::move(config);
|
592
|
-
update_args.addresses = addresses;
|
593
|
-
update_args.args = grpc_channel_args_copy(args);
|
594
|
-
// Update the policy.
|
595
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_routing_lb_trace)) {
|
596
|
-
gpr_log(GPR_INFO,
|
597
|
-
"[xds_routing_lb %p] XdsRoutingChild %p %s: Updating child "
|
598
|
-
"policy handler %p",
|
599
|
-
xds_routing_policy_.get(), this, name_.c_str(),
|
600
|
-
child_policy_.get());
|
601
|
-
}
|
602
|
-
child_policy_->UpdateLocked(std::move(update_args));
|
603
|
-
}
|
604
|
-
|
605
|
-
void XdsRoutingLb::XdsRoutingChild::ExitIdleLocked() {
|
606
|
-
child_policy_->ExitIdleLocked();
|
607
|
-
}
|
608
|
-
|
609
|
-
void XdsRoutingLb::XdsRoutingChild::ResetBackoffLocked() {
|
610
|
-
child_policy_->ResetBackoffLocked();
|
611
|
-
}
|
612
|
-
|
613
|
-
void XdsRoutingLb::XdsRoutingChild::DeactivateLocked() {
|
614
|
-
// If already deactivated, don't do that again.
|
615
|
-
if (delayed_removal_timer_callback_pending_ == true) return;
|
616
|
-
// Set the child weight to 0 so that future picker won't contain this child.
|
617
|
-
// Start a timer to delete the child.
|
618
|
-
Ref(DEBUG_LOCATION, "XdsRoutingChild+timer").release();
|
619
|
-
grpc_timer_init(
|
620
|
-
&delayed_removal_timer_,
|
621
|
-
ExecCtx::Get()->Now() + GRPC_XDS_ROUTING_CHILD_RETENTION_INTERVAL_MS,
|
622
|
-
&on_delayed_removal_timer_);
|
623
|
-
delayed_removal_timer_callback_pending_ = true;
|
624
|
-
}
|
625
|
-
|
626
|
-
void XdsRoutingLb::XdsRoutingChild::OnDelayedRemovalTimer(void* arg,
|
627
|
-
grpc_error* error) {
|
628
|
-
XdsRoutingChild* self = static_cast<XdsRoutingChild*>(arg);
|
629
|
-
GRPC_ERROR_REF(error); // Ref owned by the lambda
|
630
|
-
self->xds_routing_policy_->work_serializer()->Run(
|
631
|
-
[self, error]() { self->OnDelayedRemovalTimerLocked(error); },
|
632
|
-
DEBUG_LOCATION);
|
633
|
-
}
|
634
|
-
|
635
|
-
void XdsRoutingLb::XdsRoutingChild::OnDelayedRemovalTimerLocked(
|
636
|
-
grpc_error* error) {
|
637
|
-
delayed_removal_timer_callback_pending_ = false;
|
638
|
-
if (error == GRPC_ERROR_NONE && !shutdown_) {
|
639
|
-
xds_routing_policy_->actions_.erase(name_);
|
640
|
-
}
|
641
|
-
Unref(DEBUG_LOCATION, "XdsRoutingChild+timer");
|
642
|
-
GRPC_ERROR_UNREF(error);
|
643
|
-
}
|
644
|
-
|
645
|
-
//
|
646
|
-
// XdsRoutingLb::XdsRoutingChild::Helper
|
647
|
-
//
|
648
|
-
|
649
|
-
RefCountedPtr<SubchannelInterface>
|
650
|
-
XdsRoutingLb::XdsRoutingChild::Helper::CreateSubchannel(
|
651
|
-
const grpc_channel_args& args) {
|
652
|
-
if (xds_routing_child_->xds_routing_policy_->shutting_down_) return nullptr;
|
653
|
-
return xds_routing_child_->xds_routing_policy_->channel_control_helper()
|
654
|
-
->CreateSubchannel(args);
|
655
|
-
}
|
656
|
-
|
657
|
-
void XdsRoutingLb::XdsRoutingChild::Helper::UpdateState(
|
658
|
-
grpc_connectivity_state state, std::unique_ptr<SubchannelPicker> picker) {
|
659
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_routing_lb_trace)) {
|
660
|
-
gpr_log(GPR_INFO,
|
661
|
-
"[xds_routing_lb %p] child %s: received update: state=%s picker=%p",
|
662
|
-
xds_routing_child_->xds_routing_policy_.get(),
|
663
|
-
xds_routing_child_->name_.c_str(), ConnectivityStateName(state),
|
664
|
-
picker.get());
|
665
|
-
}
|
666
|
-
if (xds_routing_child_->xds_routing_policy_->shutting_down_) return;
|
667
|
-
// Cache the picker in the XdsRoutingChild.
|
668
|
-
xds_routing_child_->picker_wrapper_ = MakeRefCounted<ChildPickerWrapper>(
|
669
|
-
xds_routing_child_->name_, std::move(picker));
|
670
|
-
// Decide what state to report for aggregation purposes.
|
671
|
-
// If we haven't seen a failure since the last time we were in state
|
672
|
-
// READY, then we report the state change as-is. However, once we do see
|
673
|
-
// a failure, we report TRANSIENT_FAILURE and ignore any subsequent state
|
674
|
-
// changes until we go back into state READY.
|
675
|
-
if (!xds_routing_child_->seen_failure_since_ready_) {
|
676
|
-
if (state == GRPC_CHANNEL_TRANSIENT_FAILURE) {
|
677
|
-
xds_routing_child_->seen_failure_since_ready_ = true;
|
678
|
-
}
|
679
|
-
} else {
|
680
|
-
if (state != GRPC_CHANNEL_READY) return;
|
681
|
-
xds_routing_child_->seen_failure_since_ready_ = false;
|
682
|
-
}
|
683
|
-
xds_routing_child_->connectivity_state_ = state;
|
684
|
-
// Notify the LB policy.
|
685
|
-
xds_routing_child_->xds_routing_policy_->UpdateStateLocked();
|
686
|
-
}
|
687
|
-
|
688
|
-
void XdsRoutingLb::XdsRoutingChild::Helper::RequestReresolution() {
|
689
|
-
if (xds_routing_child_->xds_routing_policy_->shutting_down_) return;
|
690
|
-
xds_routing_child_->xds_routing_policy_->channel_control_helper()
|
691
|
-
->RequestReresolution();
|
692
|
-
}
|
693
|
-
|
694
|
-
void XdsRoutingLb::XdsRoutingChild::Helper::AddTraceEvent(
|
695
|
-
TraceSeverity severity, absl::string_view message) {
|
696
|
-
if (xds_routing_child_->xds_routing_policy_->shutting_down_) return;
|
697
|
-
xds_routing_child_->xds_routing_policy_->channel_control_helper()
|
698
|
-
->AddTraceEvent(severity, message);
|
699
|
-
}
|
700
|
-
|
701
|
-
//
|
702
|
-
// factory
|
703
|
-
//
|
704
|
-
|
705
|
-
class XdsRoutingLbFactory : public LoadBalancingPolicyFactory {
|
706
|
-
public:
|
707
|
-
OrphanablePtr<LoadBalancingPolicy> CreateLoadBalancingPolicy(
|
708
|
-
LoadBalancingPolicy::Args args) const override {
|
709
|
-
return MakeOrphanable<XdsRoutingLb>(std::move(args));
|
710
|
-
}
|
711
|
-
|
712
|
-
const char* name() const override { return kXdsRouting; }
|
713
|
-
|
714
|
-
RefCountedPtr<LoadBalancingPolicy::Config> ParseLoadBalancingConfig(
|
715
|
-
const Json& json, grpc_error** error) const override {
|
716
|
-
GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE);
|
717
|
-
if (json.type() == Json::Type::JSON_NULL) {
|
718
|
-
// xds_routing was mentioned as a policy in the deprecated
|
719
|
-
// loadBalancingPolicy field or in the client API.
|
720
|
-
*error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
721
|
-
"field:loadBalancingPolicy error:xds_routing policy requires "
|
722
|
-
"configuration. Please use loadBalancingConfig field of service "
|
723
|
-
"config instead.");
|
724
|
-
return nullptr;
|
725
|
-
}
|
726
|
-
std::vector<grpc_error*> error_list;
|
727
|
-
// action map.
|
728
|
-
XdsRoutingLbConfig::ActionMap action_map;
|
729
|
-
std::set<std::string /*action_name*/> actions_to_be_used;
|
730
|
-
auto it = json.object_value().find("actions");
|
731
|
-
if (it == json.object_value().end()) {
|
732
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
733
|
-
"field:actions error:required field not present"));
|
734
|
-
} else if (it->second.type() != Json::Type::OBJECT) {
|
735
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
736
|
-
"field:actions error:type should be object"));
|
737
|
-
} else {
|
738
|
-
for (const auto& p : it->second.object_value()) {
|
739
|
-
if (p.first.empty()) {
|
740
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
741
|
-
"field:actions element error: name cannot be empty"));
|
742
|
-
continue;
|
743
|
-
}
|
744
|
-
RefCountedPtr<LoadBalancingPolicy::Config> child_config;
|
745
|
-
std::vector<grpc_error*> child_errors =
|
746
|
-
ParseChildConfig(p.second, &child_config);
|
747
|
-
if (!child_errors.empty()) {
|
748
|
-
// Can't use GRPC_ERROR_CREATE_FROM_VECTOR() here, because the error
|
749
|
-
// string is not static in this case.
|
750
|
-
grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
|
751
|
-
absl::StrCat("field:actions name:", p.first).c_str());
|
752
|
-
for (grpc_error* child_error : child_errors) {
|
753
|
-
error = grpc_error_add_child(error, child_error);
|
754
|
-
}
|
755
|
-
error_list.push_back(error);
|
756
|
-
} else {
|
757
|
-
action_map[p.first] = std::move(child_config);
|
758
|
-
actions_to_be_used.insert(p.first);
|
759
|
-
}
|
760
|
-
}
|
761
|
-
}
|
762
|
-
if (action_map.empty()) {
|
763
|
-
error_list.push_back(
|
764
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING("no valid actions configured"));
|
765
|
-
}
|
766
|
-
XdsRoutingLbConfig::RouteTable route_table;
|
767
|
-
it = json.object_value().find("routes");
|
768
|
-
if (it == json.object_value().end()) {
|
769
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
770
|
-
"field:routes error:required field not present"));
|
771
|
-
} else if (it->second.type() != Json::Type::ARRAY) {
|
772
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
773
|
-
"field:routes error:type should be array"));
|
774
|
-
} else {
|
775
|
-
const Json::Array& array = it->second.array_value();
|
776
|
-
for (size_t i = 0; i < array.size(); ++i) {
|
777
|
-
XdsRoutingLbConfig::Route route;
|
778
|
-
std::vector<grpc_error*> route_errors =
|
779
|
-
ParseRoute(array[i], action_map, &route, &actions_to_be_used);
|
780
|
-
if (!route_errors.empty()) {
|
781
|
-
// Can't use GRPC_ERROR_CREATE_FROM_VECTOR() here, because the error
|
782
|
-
// string is not static in this case.
|
783
|
-
grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
|
784
|
-
absl::StrCat("field:routes element: ", i, " error").c_str());
|
785
|
-
for (grpc_error* route_error : route_errors) {
|
786
|
-
error = grpc_error_add_child(error, route_error);
|
787
|
-
}
|
788
|
-
error_list.push_back(error);
|
789
|
-
}
|
790
|
-
route_table.emplace_back(std::move(route));
|
791
|
-
}
|
792
|
-
}
|
793
|
-
if (route_table.empty()) {
|
794
|
-
grpc_error* error =
|
795
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING("no valid routes configured");
|
796
|
-
error_list.push_back(error);
|
797
|
-
}
|
798
|
-
if (!actions_to_be_used.empty()) {
|
799
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
800
|
-
"some actions were not referenced by any route"));
|
801
|
-
}
|
802
|
-
if (!error_list.empty()) {
|
803
|
-
*error = GRPC_ERROR_CREATE_FROM_VECTOR(
|
804
|
-
"xds_routing_experimental LB policy config", &error_list);
|
805
|
-
return nullptr;
|
806
|
-
}
|
807
|
-
return MakeRefCounted<XdsRoutingLbConfig>(std::move(action_map),
|
808
|
-
std::move(route_table));
|
809
|
-
}
|
810
|
-
|
811
|
-
private:
|
812
|
-
static std::vector<grpc_error*> ParseChildConfig(
|
813
|
-
const Json& json,
|
814
|
-
RefCountedPtr<LoadBalancingPolicy::Config>* child_config) {
|
815
|
-
std::vector<grpc_error*> error_list;
|
816
|
-
if (json.type() != Json::Type::OBJECT) {
|
817
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
818
|
-
"value should be of type object"));
|
819
|
-
return error_list;
|
820
|
-
}
|
821
|
-
auto it = json.object_value().find("childPolicy");
|
822
|
-
if (it == json.object_value().end()) {
|
823
|
-
error_list.push_back(
|
824
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING("did not find childPolicy"));
|
825
|
-
} else {
|
826
|
-
grpc_error* parse_error = GRPC_ERROR_NONE;
|
827
|
-
*child_config = LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(
|
828
|
-
it->second, &parse_error);
|
829
|
-
if (*child_config == nullptr) {
|
830
|
-
GPR_DEBUG_ASSERT(parse_error != GRPC_ERROR_NONE);
|
831
|
-
std::vector<grpc_error*> child_errors;
|
832
|
-
child_errors.push_back(parse_error);
|
833
|
-
error_list.push_back(
|
834
|
-
GRPC_ERROR_CREATE_FROM_VECTOR("field:childPolicy", &child_errors));
|
835
|
-
}
|
836
|
-
}
|
837
|
-
return error_list;
|
838
|
-
}
|
839
|
-
|
840
|
-
static std::vector<grpc_error*> ParseRoute(
|
841
|
-
const Json& json, const XdsRoutingLbConfig::ActionMap& action_map,
|
842
|
-
XdsRoutingLbConfig::Route* route,
|
843
|
-
std::set<std::string /*action_name*/>* actions_to_be_used) {
|
844
|
-
std::vector<grpc_error*> error_list;
|
845
|
-
if (json.type() != Json::Type::OBJECT) {
|
846
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
847
|
-
"value should be of type object"));
|
848
|
-
return error_list;
|
849
|
-
}
|
850
|
-
// Parse and ensure one and only one path matcher is set: prefix, path, or
|
851
|
-
// regex.
|
852
|
-
bool path_matcher_seen = false;
|
853
|
-
auto it = json.object_value().find("prefix");
|
854
|
-
if (it != json.object_value().end()) {
|
855
|
-
if (it->second.type() != Json::Type::STRING) {
|
856
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
857
|
-
"field:prefix error: should be string"));
|
858
|
-
} else {
|
859
|
-
path_matcher_seen = true;
|
860
|
-
route->matchers.path_matcher.type = XdsApi::RdsUpdate::RdsRoute::
|
861
|
-
Matchers::PathMatcher::PathMatcherType::PREFIX;
|
862
|
-
route->matchers.path_matcher.string_matcher = it->second.string_value();
|
863
|
-
}
|
864
|
-
}
|
865
|
-
it = json.object_value().find("path");
|
866
|
-
if (it != json.object_value().end()) {
|
867
|
-
if (path_matcher_seen) {
|
868
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
869
|
-
"field:path error: other path matcher already specified"));
|
870
|
-
} else {
|
871
|
-
path_matcher_seen = true;
|
872
|
-
if (it->second.type() != Json::Type::STRING) {
|
873
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
874
|
-
"field:path error: should be string"));
|
875
|
-
} else {
|
876
|
-
route->matchers.path_matcher.type = XdsApi::RdsUpdate::RdsRoute::
|
877
|
-
Matchers::PathMatcher::PathMatcherType::PATH;
|
878
|
-
route->matchers.path_matcher.string_matcher =
|
879
|
-
it->second.string_value();
|
880
|
-
}
|
881
|
-
}
|
882
|
-
}
|
883
|
-
it = json.object_value().find("regex");
|
884
|
-
if (it != json.object_value().end()) {
|
885
|
-
if (path_matcher_seen) {
|
886
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
887
|
-
"field:regex error: other path matcher already specified"));
|
888
|
-
} else {
|
889
|
-
path_matcher_seen = true;
|
890
|
-
if (it->second.type() != Json::Type::STRING) {
|
891
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
892
|
-
"field:regex error: should be string"));
|
893
|
-
} else {
|
894
|
-
route->matchers.path_matcher.type = XdsApi::RdsUpdate::RdsRoute::
|
895
|
-
Matchers::PathMatcher::PathMatcherType::REGEX;
|
896
|
-
route->matchers.path_matcher.regex_matcher =
|
897
|
-
absl::make_unique<RE2>(it->second.string_value());
|
898
|
-
}
|
899
|
-
}
|
900
|
-
}
|
901
|
-
if (!path_matcher_seen) {
|
902
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
903
|
-
"one path matcher: prefix, path, or regex is required"));
|
904
|
-
}
|
905
|
-
// Parse Header Matcher: headers.
|
906
|
-
it = json.object_value().find("headers");
|
907
|
-
if (it != json.object_value().end()) {
|
908
|
-
if (it->second.type() != Json::Type::ARRAY) {
|
909
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
910
|
-
"field:headers error: should be array"));
|
911
|
-
} else {
|
912
|
-
const Json::Array& array = it->second.array_value();
|
913
|
-
for (size_t i = 0; i < array.size(); ++i) {
|
914
|
-
const Json& header_json = array[i];
|
915
|
-
if (header_json.type() != Json::Type::OBJECT) {
|
916
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
917
|
-
"value should be of type object"));
|
918
|
-
} else {
|
919
|
-
route->matchers.header_matchers.emplace_back();
|
920
|
-
XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher&
|
921
|
-
header_matcher = route->matchers.header_matchers.back();
|
922
|
-
auto header_it = header_json.object_value().find("name");
|
923
|
-
if (header_it == header_json.object_value().end()) {
|
924
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
925
|
-
"field:name error:required field missing"));
|
926
|
-
} else {
|
927
|
-
if (header_it->second.type() != Json::Type::STRING) {
|
928
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
929
|
-
"field:name error: should be string"));
|
930
|
-
} else {
|
931
|
-
header_matcher.name = header_it->second.string_value();
|
932
|
-
}
|
933
|
-
}
|
934
|
-
header_it = header_json.object_value().find("invert_match");
|
935
|
-
if (header_it != header_json.object_value().end()) {
|
936
|
-
if (header_it->second.type() == Json::Type::JSON_TRUE) {
|
937
|
-
header_matcher.invert_match = true;
|
938
|
-
} else if (header_it->second.type() == Json::Type::JSON_FALSE) {
|
939
|
-
header_matcher.invert_match = false;
|
940
|
-
} else {
|
941
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
942
|
-
"field:present_match error: should be boolean"));
|
943
|
-
}
|
944
|
-
}
|
945
|
-
// Parse and ensure one and only one header matcher is set per
|
946
|
-
// header matcher.
|
947
|
-
bool header_matcher_seen = false;
|
948
|
-
header_it = header_json.object_value().find("exact_match");
|
949
|
-
if (header_it != header_json.object_value().end()) {
|
950
|
-
header_matcher_seen = true;
|
951
|
-
if (header_it->second.type() != Json::Type::STRING) {
|
952
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
953
|
-
"field:exact_match error: should be string"));
|
954
|
-
} else {
|
955
|
-
header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers::
|
956
|
-
HeaderMatcher::HeaderMatcherType::EXACT;
|
957
|
-
header_matcher.string_matcher =
|
958
|
-
header_it->second.string_value();
|
959
|
-
}
|
960
|
-
}
|
961
|
-
header_it = header_json.object_value().find("regex_match");
|
962
|
-
if (header_it != header_json.object_value().end()) {
|
963
|
-
if (header_matcher_seen) {
|
964
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
965
|
-
"field:regex_match error: other header matcher already "
|
966
|
-
"specified"));
|
967
|
-
} else {
|
968
|
-
header_matcher_seen = true;
|
969
|
-
if (header_it->second.type() != Json::Type::STRING) {
|
970
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
971
|
-
"field:regex_match error: should be string"));
|
972
|
-
} else {
|
973
|
-
header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers::
|
974
|
-
HeaderMatcher::HeaderMatcherType::REGEX;
|
975
|
-
header_matcher.regex_match =
|
976
|
-
absl::make_unique<RE2>(header_it->second.string_value());
|
977
|
-
}
|
978
|
-
}
|
979
|
-
}
|
980
|
-
header_it = header_json.object_value().find("range_match");
|
981
|
-
if (header_it != header_json.object_value().end()) {
|
982
|
-
if (header_matcher_seen) {
|
983
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
984
|
-
"field:range_match error: other header matcher already "
|
985
|
-
"specified"));
|
986
|
-
} else {
|
987
|
-
header_matcher_seen = true;
|
988
|
-
if (header_it->second.type() != Json::Type::OBJECT) {
|
989
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
990
|
-
"field:range_match error: should be object"));
|
991
|
-
} else {
|
992
|
-
auto range_it =
|
993
|
-
header_it->second.object_value().find("start");
|
994
|
-
if (range_it != header_it->second.object_value().end()) {
|
995
|
-
if (range_it->second.type() != Json::Type::NUMBER) {
|
996
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
997
|
-
"field:start error: should be of number"));
|
998
|
-
} else {
|
999
|
-
header_matcher.range_start = gpr_parse_nonnegative_int(
|
1000
|
-
range_it->second.string_value().c_str());
|
1001
|
-
}
|
1002
|
-
} else {
|
1003
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1004
|
-
"field:start missing"));
|
1005
|
-
}
|
1006
|
-
range_it = header_it->second.object_value().find("end");
|
1007
|
-
if (range_it != header_it->second.object_value().end()) {
|
1008
|
-
if (range_it->second.type() != Json::Type::NUMBER) {
|
1009
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1010
|
-
"field:end error: should be of number"));
|
1011
|
-
} else {
|
1012
|
-
header_matcher.range_end = gpr_parse_nonnegative_int(
|
1013
|
-
range_it->second.string_value().c_str());
|
1014
|
-
}
|
1015
|
-
} else {
|
1016
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1017
|
-
"field:end missing"));
|
1018
|
-
}
|
1019
|
-
if (header_matcher.range_end > header_matcher.range_start) {
|
1020
|
-
header_matcher.type = XdsApi::RdsUpdate::RdsRoute::
|
1021
|
-
Matchers::HeaderMatcher::HeaderMatcherType::RANGE;
|
1022
|
-
}
|
1023
|
-
}
|
1024
|
-
}
|
1025
|
-
}
|
1026
|
-
header_it = header_json.object_value().find("present_match");
|
1027
|
-
if (header_it != header_json.object_value().end()) {
|
1028
|
-
if (header_matcher_seen) {
|
1029
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1030
|
-
"field:present_match error: other header matcher already "
|
1031
|
-
"specified"));
|
1032
|
-
} else {
|
1033
|
-
header_matcher_seen = true;
|
1034
|
-
if (header_it->second.type() == Json::Type::JSON_TRUE) {
|
1035
|
-
header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers::
|
1036
|
-
HeaderMatcher::HeaderMatcherType::PRESENT;
|
1037
|
-
header_matcher.present_match = true;
|
1038
|
-
} else if (header_it->second.type() == Json::Type::JSON_FALSE) {
|
1039
|
-
header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers::
|
1040
|
-
HeaderMatcher::HeaderMatcherType::PRESENT;
|
1041
|
-
header_matcher.present_match = false;
|
1042
|
-
} else {
|
1043
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1044
|
-
"field:present_match error: should be boolean"));
|
1045
|
-
}
|
1046
|
-
}
|
1047
|
-
}
|
1048
|
-
header_it = header_json.object_value().find("prefix_match");
|
1049
|
-
if (header_it != header_json.object_value().end()) {
|
1050
|
-
if (header_matcher_seen) {
|
1051
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1052
|
-
"field:prefix_match error: other header matcher already "
|
1053
|
-
"specified"));
|
1054
|
-
} else {
|
1055
|
-
header_matcher_seen = true;
|
1056
|
-
if (header_it->second.type() != Json::Type::STRING) {
|
1057
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1058
|
-
"field:prefix_match error: should be string"));
|
1059
|
-
} else {
|
1060
|
-
header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers::
|
1061
|
-
HeaderMatcher::HeaderMatcherType::PREFIX;
|
1062
|
-
header_matcher.string_matcher =
|
1063
|
-
header_it->second.string_value();
|
1064
|
-
}
|
1065
|
-
}
|
1066
|
-
}
|
1067
|
-
header_it = header_json.object_value().find("suffix_match");
|
1068
|
-
if (header_it != header_json.object_value().end()) {
|
1069
|
-
if (header_matcher_seen) {
|
1070
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1071
|
-
"field:suffix_match error: other header matcher already "
|
1072
|
-
"specified"));
|
1073
|
-
} else {
|
1074
|
-
header_matcher_seen = true;
|
1075
|
-
if (header_it->second.type() != Json::Type::STRING) {
|
1076
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1077
|
-
"field:suffix_match error: should be string"));
|
1078
|
-
} else {
|
1079
|
-
header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers::
|
1080
|
-
HeaderMatcher::HeaderMatcherType::SUFFIX;
|
1081
|
-
header_matcher.string_matcher =
|
1082
|
-
header_it->second.string_value();
|
1083
|
-
}
|
1084
|
-
}
|
1085
|
-
}
|
1086
|
-
}
|
1087
|
-
}
|
1088
|
-
}
|
1089
|
-
}
|
1090
|
-
// Parse Fraction numerator.
|
1091
|
-
it = json.object_value().find("match_fraction");
|
1092
|
-
if (it != json.object_value().end()) {
|
1093
|
-
if (it->second.type() != Json::Type::NUMBER) {
|
1094
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1095
|
-
"field:match_fraction error:must be of type number"));
|
1096
|
-
} else {
|
1097
|
-
route->matchers.fraction_per_million =
|
1098
|
-
gpr_parse_nonnegative_int(it->second.string_value().c_str());
|
1099
|
-
}
|
1100
|
-
}
|
1101
|
-
// Parse action.
|
1102
|
-
it = json.object_value().find("action");
|
1103
|
-
if (it == json.object_value().end()) {
|
1104
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1105
|
-
"field:action error:required field missing"));
|
1106
|
-
} else if (it->second.type() != Json::Type::STRING) {
|
1107
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1108
|
-
"field:action error:should be of type string"));
|
1109
|
-
} else {
|
1110
|
-
route->action = it->second.string_value();
|
1111
|
-
if (route->action.empty()) {
|
1112
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1113
|
-
"field:action error:cannot be empty"));
|
1114
|
-
} else {
|
1115
|
-
// Validate action exists and mark it as used.
|
1116
|
-
if (action_map.find(route->action) == action_map.end()) {
|
1117
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1118
|
-
absl::StrCat("field:action error:", route->action,
|
1119
|
-
" does not exist")
|
1120
|
-
.c_str()));
|
1121
|
-
}
|
1122
|
-
actions_to_be_used->erase(route->action);
|
1123
|
-
}
|
1124
|
-
}
|
1125
|
-
return error_list;
|
1126
|
-
}
|
1127
|
-
};
|
1128
|
-
|
1129
|
-
} // namespace
|
1130
|
-
|
1131
|
-
} // namespace grpc_core
|
1132
|
-
|
1133
|
-
//
|
1134
|
-
// Plugin registration
|
1135
|
-
//
|
1136
|
-
|
1137
|
-
void grpc_lb_policy_xds_routing_init() {
|
1138
|
-
grpc_core::LoadBalancingPolicyRegistry::Builder::
|
1139
|
-
RegisterLoadBalancingPolicyFactory(
|
1140
|
-
absl::make_unique<grpc_core::XdsRoutingLbFactory>());
|
1141
|
-
}
|
1142
|
-
|
1143
|
-
void grpc_lb_policy_xds_routing_shutdown() {}
|