grpc 1.40.0 → 1.43.1
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 +137 -82
- data/etc/roots.pem +335 -326
- data/include/grpc/byte_buffer.h +1 -1
- data/include/grpc/byte_buffer_reader.h +1 -1
- data/include/grpc/event_engine/endpoint_config.h +6 -11
- data/include/grpc/event_engine/event_engine.h +164 -95
- data/include/grpc/event_engine/internal/memory_allocator_impl.h +68 -0
- data/include/grpc/event_engine/memory_allocator.h +226 -0
- data/include/grpc/event_engine/memory_request.h +57 -0
- data/include/grpc/event_engine/port.h +1 -3
- data/include/grpc/fork.h +1 -1
- data/include/grpc/grpc.h +14 -4
- data/include/grpc/grpc_posix.h +5 -2
- data/include/grpc/grpc_security.h +294 -145
- data/include/grpc/grpc_security_constants.h +2 -14
- data/include/grpc/impl/codegen/atm.h +5 -3
- data/include/grpc/impl/codegen/atm_gcc_atomic.h +2 -0
- data/include/grpc/impl/codegen/atm_gcc_sync.h +2 -0
- data/include/grpc/impl/codegen/atm_windows.h +2 -0
- data/include/grpc/impl/codegen/byte_buffer.h +2 -0
- data/include/grpc/impl/codegen/byte_buffer_reader.h +2 -0
- data/include/grpc/impl/codegen/compression_types.h +2 -0
- data/include/grpc/impl/codegen/connectivity_state.h +2 -0
- data/include/grpc/impl/codegen/fork.h +2 -0
- data/include/grpc/impl/codegen/gpr_slice.h +2 -0
- data/include/grpc/impl/codegen/gpr_types.h +2 -0
- data/include/grpc/impl/codegen/grpc_types.h +4 -5
- data/include/grpc/impl/codegen/log.h +2 -0
- data/include/grpc/impl/codegen/port_platform.h +37 -22
- data/include/grpc/impl/codegen/propagation_bits.h +2 -0
- data/include/grpc/impl/codegen/slice.h +2 -0
- data/include/grpc/impl/codegen/status.h +2 -0
- data/include/grpc/impl/codegen/sync.h +8 -5
- data/include/grpc/impl/codegen/sync_abseil.h +2 -0
- data/include/grpc/impl/codegen/sync_custom.h +2 -0
- data/include/grpc/impl/codegen/sync_generic.h +3 -0
- data/include/grpc/impl/codegen/sync_posix.h +4 -2
- data/include/grpc/impl/codegen/sync_windows.h +2 -0
- data/include/grpc/slice.h +1 -1
- data/include/grpc/status.h +1 -1
- data/include/grpc/support/atm.h +1 -1
- data/include/grpc/support/atm_gcc_atomic.h +1 -1
- data/include/grpc/support/atm_gcc_sync.h +1 -1
- data/include/grpc/support/atm_windows.h +1 -1
- data/include/grpc/support/log.h +1 -1
- data/include/grpc/support/port_platform.h +1 -1
- data/include/grpc/support/sync.h +1 -1
- data/include/grpc/support/sync_abseil.h +1 -1
- data/include/grpc/support/sync_custom.h +1 -1
- data/include/grpc/support/sync_generic.h +1 -1
- data/include/grpc/support/sync_posix.h +1 -1
- data/include/grpc/support/sync_windows.h +1 -1
- data/include/grpc/support/time.h +2 -2
- data/src/core/ext/filters/census/grpc_context.cc +1 -0
- data/src/core/ext/filters/client_channel/backend_metric.cc +21 -24
- data/src/core/ext/filters/client_channel/backend_metric.h +3 -2
- data/src/core/ext/filters/client_channel/backup_poller.cc +2 -1
- data/src/core/ext/filters/client_channel/backup_poller.h +1 -0
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +72 -91
- data/src/core/ext/filters/client_channel/client_channel.cc +256 -308
- data/src/core/ext/filters/client_channel/client_channel.h +80 -32
- data/src/core/ext/filters/client_channel/client_channel_channelz.cc +6 -5
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +1 -1
- data/src/core/ext/filters/client_channel/client_channel_factory.cc +2 -1
- data/src/core/ext/filters/client_channel/client_channel_factory.h +17 -19
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +15 -15
- data/src/core/ext/filters/client_channel/config_selector.cc +2 -1
- data/src/core/ext/filters/client_channel/config_selector.h +4 -5
- data/src/core/ext/filters/client_channel/connector.h +18 -18
- data/src/core/ext/filters/client_channel/dynamic_filters.cc +5 -5
- data/src/core/ext/filters/client_channel/global_subchannel_pool.h +0 -1
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +19 -17
- data/src/core/ext/filters/client_channel/health/health_check_client.h +5 -4
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +20 -21
- data/src/core/ext/filters/client_channel/http_connect_handshaker.h +10 -2
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +6 -2
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +6 -15
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +169 -92
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +4 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +1 -2
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +3 -4
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +4 -4
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +2 -3
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +23 -7
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +29 -33
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +5 -6
- data/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +2502 -0
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +6 -1
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +2 -2
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +9 -9
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +47 -99
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +97 -41
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +10 -9
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +55 -109
- data/src/core/ext/filters/client_channel/lb_policy.h +96 -103
- data/src/core/ext/filters/client_channel/lb_policy_factory.h +1 -0
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +4 -7
- data/src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc +139 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +16 -18
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +3 -2
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +4 -3
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +17 -20
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +26 -58
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +21 -1
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +10 -5
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +5 -3
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +11 -17
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +283 -349
- data/src/core/ext/filters/client_channel/resolver.h +1 -1
- data/src/core/ext/filters/client_channel/resolver_factory.h +2 -0
- data/src/core/ext/filters/client_channel/resolver_registry.cc +12 -15
- data/src/core/ext/filters/client_channel/resolver_registry.h +1 -2
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +3 -4
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +1 -1
- data/src/core/ext/filters/client_channel/retry_filter.cc +48 -86
- data/src/core/ext/filters/client_channel/retry_service_config.h +1 -1
- data/src/core/ext/filters/client_channel/retry_throttle.cc +17 -48
- data/src/core/ext/filters/client_channel/server_address.h +1 -1
- data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +49 -36
- data/src/core/ext/filters/client_channel/subchannel.cc +89 -147
- data/src/core/ext/filters/client_channel/subchannel.h +29 -49
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.cc +22 -7
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +11 -2
- data/src/core/ext/filters/client_idle/client_idle_filter.cc +29 -206
- data/src/core/ext/filters/client_idle/idle_filter_state.cc +96 -0
- data/src/core/ext/filters/client_idle/idle_filter_state.h +66 -0
- data/src/core/ext/filters/deadline/deadline_filter.cc +23 -26
- data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +28 -26
- data/src/core/ext/filters/fault_injection/service_config_parser.cc +6 -14
- data/src/core/ext/filters/fault_injection/service_config_parser.h +1 -1
- data/src/core/ext/filters/http/client/http_client_filter.cc +50 -68
- data/src/core/ext/filters/http/client_authority_filter.cc +16 -16
- data/src/core/ext/filters/http/http_filters_plugin.cc +51 -71
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +19 -13
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +8 -9
- data/src/core/ext/filters/http/server/http_server_filter.cc +72 -84
- data/src/core/ext/filters/max_age/max_age_filter.cc +24 -26
- data/src/core/ext/filters/message_size/message_size_filter.cc +28 -29
- data/src/core/ext/filters/message_size/message_size_filter.h +1 -1
- data/src/core/ext/filters/server_config_selector/server_config_selector.cc +67 -0
- data/src/core/ext/filters/server_config_selector/server_config_selector.h +70 -0
- data/src/core/ext/filters/server_config_selector/server_config_selector_filter.cc +265 -0
- data/src/core/ext/filters/{workarounds/workaround_cronet_compression_filter.h → server_config_selector/server_config_selector_filter.h} +11 -6
- data/src/core/ext/{filters/client_channel → service_config}/service_config.cc +2 -2
- data/src/core/ext/{filters/client_channel → service_config}/service_config.h +4 -4
- data/src/core/ext/service_config/service_config_call_data.h +72 -0
- data/src/core/ext/{filters/client_channel → service_config}/service_config_parser.cc +3 -3
- data/src/core/ext/{filters/client_channel → service_config}/service_config_parser.h +8 -6
- data/src/core/ext/transport/chttp2/alpn/alpn.cc +2 -1
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +10 -12
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +26 -29
- data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +9 -8
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +33 -54
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +66 -70
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +2 -4
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +7 -5
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +11 -15
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +3 -1
- data/src/core/ext/transport/chttp2/transport/bin_decoder.h +2 -1
- data/src/core/ext/transport/chttp2/transport/bin_encoder.cc +1 -0
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +120 -134
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +4 -2
- data/src/core/ext/transport/chttp2/transport/context_list.cc +2 -3
- data/src/core/ext/transport/chttp2/transport/context_list.h +3 -5
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +62 -43
- data/src/core/ext/transport/chttp2/transport/flow_control.h +15 -9
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +11 -11
- data/src/core/ext/transport/chttp2/transport/frame_data.h +1 -0
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +6 -4
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +1 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +6 -5
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +1 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +5 -8
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +1 -0
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +38 -7
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +1 -0
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +12 -7
- data/src/core/ext/transport/chttp2/transport/frame_window_update.h +1 -0
- data/src/core/ext/transport/chttp2/transport/hpack_constants.h +41 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +378 -668
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +272 -70
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_index.h +107 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc +86 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.h +69 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +792 -1041
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +75 -177
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +146 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +137 -0
- data/src/core/ext/transport/chttp2/transport/hpack_utils.cc +46 -0
- data/src/core/ext/transport/chttp2/transport/hpack_utils.h +30 -0
- data/src/core/ext/transport/chttp2/transport/internal.h +14 -9
- data/src/core/ext/transport/chttp2/transport/parsing.cc +50 -203
- data/src/core/ext/transport/chttp2/transport/popularity_count.h +60 -0
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/varint.cc +7 -3
- data/src/core/ext/transport/chttp2/transport/varint.h +39 -28
- data/src/core/ext/transport/chttp2/transport/writing.cc +61 -50
- data/src/core/ext/transport/inproc/inproc_transport.cc +126 -119
- data/src/core/ext/transport/inproc/inproc_transport.h +1 -1
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c +198 -166
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h +223 -89
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c +42 -1
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +19 -1
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +27 -3
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +18 -5
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +108 -83
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +153 -61
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c +189 -161
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h +173 -69
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c +36 -23
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h +33 -13
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +279 -211
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +370 -102
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c +17 -6
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c +37 -26
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +57 -40
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +73 -29
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c +17 -6
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +172 -126
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +256 -85
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +52 -37
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +53 -21
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c +16 -5
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c +26 -14
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h +23 -9
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +115 -91
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +133 -53
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +91 -72
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +98 -33
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c +18 -7
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +122 -93
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +166 -57
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c +14 -3
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.c +22 -10
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.h +23 -9
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c +19 -8
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +23 -12
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.c +18 -7
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c +42 -28
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h +33 -13
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +82 -32
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +176 -17
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c +59 -44
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h +53 -21
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c +16 -5
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +74 -58
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +63 -25
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +82 -65
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +73 -29
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.c +26 -15
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +20 -8
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +23 -9
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c +64 -46
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h +83 -33
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c +76 -45
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h +143 -43
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +101 -77
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +107 -29
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +42 -29
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +33 -13
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +516 -446
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +620 -267
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +27 -14
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +33 -13
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c +22 -10
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h +23 -9
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c +14 -3
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c +36 -21
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h +53 -21
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c +45 -32
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h +33 -13
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c +23 -12
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +211 -183
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +193 -77
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c +8 -1
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +6 -4
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +75 -45
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +120 -34
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +34 -21
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +33 -13
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +88 -70
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +110 -55
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.c +13 -2
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c +13 -2
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +76 -59
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +63 -25
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.c +13 -2
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.c +13 -2
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c +26 -14
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h +23 -9
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.c +13 -2
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.c +13 -2
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c +62 -47
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h +53 -21
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.c +27 -13
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.h +43 -17
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +24 -11
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +27 -9
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c +18 -7
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c +17 -6
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c +16 -5
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h +13 -5
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +28 -15
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +33 -13
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +26 -14
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +23 -9
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c +21 -9
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h +23 -9
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c +31 -18
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h +33 -13
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c +39 -22
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h +73 -29
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c +42 -27
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h +53 -21
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.c +8 -1
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.h +3 -1
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c +18 -6
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h +23 -9
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.c +23 -10
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.h +33 -13
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c +16 -5
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h +13 -5
- data/src/core/ext/upb-generated/google/api/annotations.upb.c +21 -1
- data/src/core/ext/upb-generated/google/api/annotations.upb.h +8 -1
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c +117 -94
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h +113 -45
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/eval.upb.c +102 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/eval.upb.h +306 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/explain.upb.c +56 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/explain.upb.h +135 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +123 -99
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +123 -49
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/value.upb.c +115 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/value.upb.h +371 -0
- data/src/core/ext/upb-generated/google/api/http.upb.c +36 -23
- data/src/core/ext/upb-generated/google/api/http.upb.h +33 -13
- data/src/core/ext/upb-generated/google/protobuf/any.upb.c +15 -4
- data/src/core/ext/upb-generated/google/protobuf/any.upb.h +13 -5
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +248 -211
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +273 -109
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +15 -4
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +13 -5
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +13 -2
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +13 -5
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +38 -24
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +33 -13
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +15 -4
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +13 -5
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +38 -19
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +93 -37
- data/src/core/ext/upb-generated/google/rpc/status.upb.c +18 -7
- data/src/core/ext/upb-generated/google/rpc/status.upb.h +13 -5
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +27 -15
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +13 -5
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +106 -84
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +103 -41
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +21 -9
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +23 -9
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +17 -5
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +23 -9
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +66 -48
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +115 -63
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c +68 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h +156 -0
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +68 -8
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +58 -13
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.c +28 -6
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.h +18 -5
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c +20 -1
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +8 -1
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.c +28 -4
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.h +18 -5
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c +27 -3
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h +18 -5
- data/src/core/ext/upb-generated/validate/validate.upb.c +321 -252
- data/src/core/ext/upb-generated/validate/validate.upb.h +251 -93
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.c +103 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.h +199 -0
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.c +15 -4
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.h +13 -5
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c +26 -14
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h +23 -9
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c +21 -9
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h +13 -5
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.c +20 -9
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.h +13 -5
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c +29 -17
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h +23 -9
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c +20 -9
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h +13 -5
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.c +71 -0
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.h +132 -0
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.c +44 -0
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.h +85 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c +2 -49
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c +2 -2
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c +2 -35
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +2 -41
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +2 -11
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +407 -434
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +10 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c +2 -19
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +100 -138
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c +2 -15
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c +2 -9
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c +2 -33
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c +61 -77
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +61 -79
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.c +2 -9
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c +2 -13
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +87 -75
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h +10 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c +2 -15
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +2 -17
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c +2 -19
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c +2 -9
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c +2 -21
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c +29 -39
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +2 -11
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +803 -894
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c +2 -11
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c +2 -9
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c +2 -15
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c +2 -11
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +98 -143
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c +2 -2
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +132 -129
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c +2 -11
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +180 -190
- data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c +2 -19
- data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c +2 -9
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c +2 -15
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.c +2 -13
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c +16 -22
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +2 -11
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c +2 -9
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c +2 -9
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c +2 -11
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c +2 -19
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c +2 -15
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c +2 -2
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c +2 -9
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c +2 -11
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c +2 -2
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c +2 -11
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c +105 -162
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c +2 -13
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c +2 -23
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c +2 -7
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c +7 -15
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c +21 -30
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c +6 -5
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c +7 -10
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c +7 -11
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c +2 -51
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.c +64 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c +15 -19
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c +27 -33
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c +18 -24
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c +19 -23
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c +35 -41
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c +21 -25
- data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.h +35 -0
- data/src/core/ext/xds/certificate_provider_registry.cc +3 -3
- data/src/core/ext/xds/certificate_provider_store.h +1 -1
- data/src/core/ext/xds/xds_api.cc +1386 -1440
- data/src/core/ext/xds/xds_api.h +152 -115
- data/src/core/ext/xds/xds_bootstrap.cc +33 -55
- data/src/core/ext/xds/xds_bootstrap.h +10 -0
- data/src/core/ext/xds/xds_certificate_provider.cc +3 -3
- data/src/core/ext/xds/xds_certificate_provider.h +1 -2
- data/src/core/ext/xds/xds_channel_stack_modifier.cc +112 -0
- data/src/core/ext/xds/xds_channel_stack_modifier.h +52 -0
- data/src/core/ext/xds/xds_client.cc +793 -437
- data/src/core/ext/xds/xds_client.h +83 -69
- data/src/core/ext/xds/xds_client_stats.cc +16 -15
- data/src/core/ext/xds/xds_client_stats.h +7 -7
- data/src/core/ext/xds/xds_http_fault_filter.cc +4 -3
- data/src/core/ext/xds/xds_http_fault_filter.h +3 -2
- data/src/core/ext/xds/xds_http_filters.cc +1 -0
- data/src/core/ext/xds/xds_routing.cc +247 -0
- data/src/core/ext/xds/xds_routing.h +98 -0
- data/src/core/ext/xds/xds_server_config_fetcher.cc +976 -264
- data/src/core/lib/address_utils/parse_address.cc +6 -8
- data/src/core/lib/address_utils/sockaddr_utils.cc +2 -2
- data/src/core/lib/avl/avl.h +389 -88
- data/src/core/lib/backoff/backoff.cc +3 -3
- data/src/core/lib/channel/channel_args.cc +27 -8
- data/src/core/lib/channel/channel_args.h +11 -1
- data/src/core/lib/channel/channel_args_preconditioning.cc +47 -0
- data/src/core/lib/channel/channel_args_preconditioning.h +62 -0
- data/src/core/lib/channel/channel_stack.cc +5 -3
- data/src/core/lib/channel/channel_stack_builder.cc +3 -15
- data/src/core/lib/channel/channel_stack_builder.h +0 -8
- data/src/core/lib/channel/channel_trace.cc +11 -10
- data/src/core/lib/channel/channel_trace.h +2 -1
- data/src/core/lib/channel/channelz.cc +43 -39
- data/src/core/lib/channel/channelz.h +29 -29
- data/src/core/lib/channel/channelz_registry.cc +8 -7
- data/src/core/lib/channel/channelz_registry.h +1 -1
- data/src/core/lib/channel/connected_channel.cc +2 -3
- data/src/core/lib/channel/connected_channel.h +1 -2
- data/src/core/lib/channel/handshaker.cc +2 -1
- data/src/core/lib/channel/handshaker.h +1 -2
- data/src/core/lib/channel/handshaker_factory.h +10 -2
- data/src/core/lib/channel/handshaker_registry.cc +15 -70
- data/src/core/lib/channel/handshaker_registry.h +29 -12
- data/src/core/lib/channel/status_util.h +2 -2
- data/src/core/lib/compression/algorithm_metadata.h +1 -0
- data/src/core/lib/compression/compression.cc +2 -2
- data/src/core/lib/compression/compression_args.cc +15 -10
- data/src/core/lib/compression/compression_args.h +6 -4
- data/src/core/lib/compression/compression_internal.cc +4 -6
- data/src/core/lib/compression/compression_internal.h +1 -1
- data/src/core/lib/compression/message_compress.cc +2 -2
- data/src/core/lib/compression/stream_compression.cc +2 -1
- data/src/core/lib/compression/stream_compression.h +2 -1
- data/src/core/lib/compression/stream_compression_gzip.cc +2 -1
- data/src/core/lib/compression/stream_compression_identity.cc +2 -1
- data/src/core/lib/config/core_configuration.cc +98 -0
- data/src/core/lib/config/core_configuration.h +157 -0
- data/src/core/lib/debug/stats.cc +1 -1
- data/src/core/lib/debug/stats.h +1 -0
- data/src/core/lib/debug/stats_data.cc +15 -14
- data/src/core/lib/debug/stats_data.h +1 -0
- data/src/core/lib/debug/trace.cc +1 -0
- data/src/core/lib/debug/trace.h +4 -3
- data/src/core/lib/event_engine/{endpoint_config.cc → channel_args_endpoint_config.cc} +2 -2
- data/src/core/lib/event_engine/{endpoint_config_internal.h → channel_args_endpoint_config.h} +3 -3
- data/src/core/lib/event_engine/event_engine.cc +0 -13
- data/src/core/lib/event_engine/event_engine_factory.cc +49 -0
- data/src/core/lib/event_engine/event_engine_factory.h +33 -0
- data/src/core/lib/event_engine/memory_allocator.cc +70 -0
- data/src/core/lib/event_engine/sockaddr.cc +3 -3
- data/src/core/lib/gpr/alloc.cc +4 -3
- data/src/core/lib/gpr/atm.cc +1 -1
- data/src/core/lib/gpr/cpu_posix.cc +1 -1
- data/src/core/lib/gpr/env_linux.cc +1 -2
- data/src/core/lib/gpr/env_posix.cc +2 -3
- data/src/core/lib/gpr/log.cc +3 -3
- data/src/core/lib/gpr/log_android.cc +3 -2
- data/src/core/lib/gpr/log_linux.cc +7 -4
- data/src/core/lib/gpr/log_posix.cc +6 -3
- data/src/core/lib/gpr/string.cc +2 -2
- data/src/core/lib/gpr/string.h +2 -2
- data/src/core/lib/gpr/sync.cc +2 -2
- data/src/core/lib/gpr/sync_abseil.cc +7 -6
- data/src/core/lib/gpr/sync_posix.cc +3 -3
- data/src/core/lib/gpr/time.cc +3 -2
- data/src/core/lib/gpr/time_windows.cc +3 -2
- data/src/core/lib/gpr/tls.h +125 -40
- data/src/core/lib/gpr/tmpfile_posix.cc +1 -2
- data/src/core/lib/gpr/useful.h +79 -32
- data/src/core/lib/gprpp/arena.cc +2 -1
- data/src/core/lib/gprpp/arena.h +15 -5
- data/src/core/lib/gprpp/atomic_utils.h +47 -0
- data/src/core/lib/gprpp/bitset.h +188 -0
- data/src/core/lib/gprpp/chunked_vector.h +211 -0
- data/src/core/lib/{transport/authority_override.cc → gprpp/construct_destruct.h} +16 -17
- data/src/core/lib/gprpp/cpp_impl_of.h +45 -0
- data/src/core/lib/gprpp/dual_ref_counted.h +25 -26
- data/src/core/lib/gprpp/fork.cc +14 -12
- data/src/core/lib/gprpp/fork.h +4 -4
- data/src/core/lib/gprpp/global_config.h +1 -2
- data/src/core/lib/gprpp/global_config_env.cc +14 -14
- data/src/core/lib/gprpp/global_config_env.h +2 -2
- data/src/core/lib/gprpp/global_config_generic.h +2 -2
- data/src/core/lib/gprpp/manual_constructor.h +10 -8
- data/src/core/lib/gprpp/memory.h +9 -3
- data/src/core/lib/gprpp/mpscq.cc +7 -7
- data/src/core/lib/gprpp/mpscq.h +6 -5
- data/src/core/lib/gprpp/orphanable.h +4 -4
- data/src/core/lib/gprpp/ref_counted.h +19 -19
- data/src/core/lib/gprpp/ref_counted_ptr.h +2 -4
- data/src/core/lib/gprpp/status_helper.cc +27 -7
- data/src/core/lib/gprpp/status_helper.h +13 -2
- data/src/core/lib/gprpp/sync.h +3 -1
- data/src/core/lib/gprpp/table.h +423 -0
- data/src/core/lib/gprpp/thd_posix.cc +5 -5
- data/src/core/lib/gprpp/thd_windows.cc +4 -11
- data/src/core/lib/gprpp/time_util.cc +2 -2
- data/src/core/lib/gprpp/time_util.h +2 -2
- data/src/core/lib/http/format_request.cc +1 -0
- data/src/core/lib/http/format_request.h +1 -0
- data/src/core/lib/http/httpcli.cc +219 -197
- data/src/core/lib/http/httpcli.h +14 -9
- data/src/core/lib/http/httpcli_security_connector.cc +5 -8
- data/src/core/lib/http/parser.cc +2 -2
- data/src/core/lib/http/parser.h +1 -0
- data/src/core/lib/iomgr/buffer_list.cc +11 -10
- data/src/core/lib/iomgr/buffer_list.h +14 -15
- data/src/core/lib/iomgr/call_combiner.cc +30 -12
- data/src/core/lib/iomgr/cfstream_handle.cc +1 -1
- data/src/core/lib/iomgr/combiner.cc +9 -23
- data/src/core/lib/iomgr/combiner.h +1 -0
- data/src/core/lib/iomgr/dualstack_socket_posix.cc +1 -0
- data/src/core/lib/iomgr/endpoint.cc +0 -4
- data/src/core/lib/iomgr/endpoint.h +1 -4
- data/src/core/lib/iomgr/endpoint_cfstream.cc +15 -42
- data/src/core/lib/iomgr/endpoint_cfstream.h +4 -4
- data/src/core/lib/iomgr/endpoint_pair.h +1 -0
- data/src/core/lib/iomgr/endpoint_pair_event_engine.cc +1 -2
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +11 -9
- data/src/core/lib/iomgr/endpoint_pair_windows.cc +5 -6
- data/src/core/lib/iomgr/error.cc +113 -52
- data/src/core/lib/iomgr/error.h +73 -18
- data/src/core/lib/iomgr/error_cfstream.cc +7 -2
- data/src/core/lib/iomgr/error_internal.h +1 -0
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +17 -24
- data/src/core/lib/iomgr/ev_epollex_linux.cc +22 -29
- data/src/core/lib/iomgr/ev_poll_posix.cc +42 -45
- data/src/core/lib/iomgr/ev_posix.cc +1 -2
- data/src/core/lib/iomgr/event_engine/closure.cc +41 -18
- data/src/core/lib/iomgr/event_engine/closure.h +10 -1
- data/src/core/lib/iomgr/event_engine/endpoint.cc +7 -27
- data/src/core/lib/iomgr/event_engine/endpoint.h +1 -2
- data/src/core/lib/iomgr/event_engine/iomgr.cc +7 -28
- data/src/core/lib/iomgr/event_engine/pollset.cc +5 -4
- data/src/core/lib/iomgr/event_engine/resolver.cc +14 -9
- data/src/core/lib/iomgr/event_engine/tcp.cc +66 -34
- data/src/core/lib/iomgr/event_engine/timer.cc +10 -4
- data/src/core/lib/iomgr/exec_ctx.cc +4 -13
- data/src/core/lib/iomgr/exec_ctx.h +22 -30
- data/src/core/lib/iomgr/executor/mpmcqueue.cc +15 -16
- data/src/core/lib/iomgr/executor/mpmcqueue.h +7 -11
- data/src/core/lib/iomgr/executor/threadpool.cc +2 -2
- data/src/core/lib/iomgr/executor/threadpool.h +2 -1
- data/src/core/lib/iomgr/executor.cc +20 -38
- data/src/core/lib/iomgr/executor.h +1 -1
- data/src/core/lib/iomgr/grpc_if_nametoindex_posix.cc +2 -2
- data/src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc +2 -2
- data/src/core/lib/iomgr/internal_errqueue.cc +3 -2
- data/src/core/lib/iomgr/iocp_windows.cc +1 -0
- data/src/core/lib/iomgr/iomgr.cc +3 -1
- data/src/core/lib/iomgr/iomgr.h +2 -2
- data/src/core/lib/iomgr/iomgr_custom.cc +2 -2
- data/src/core/lib/iomgr/iomgr_custom.h +2 -2
- data/src/core/lib/iomgr/iomgr_internal.cc +6 -10
- data/src/core/lib/iomgr/iomgr_internal.h +3 -2
- data/src/core/lib/iomgr/iomgr_windows.cc +1 -2
- data/src/core/lib/iomgr/is_epollexclusive_available.cc +4 -4
- data/src/core/lib/iomgr/load_file.cc +2 -2
- data/src/core/lib/iomgr/lockfree_event.cc +18 -0
- data/src/core/lib/iomgr/polling_entity.cc +2 -2
- data/src/core/lib/iomgr/pollset_custom.cc +4 -5
- data/src/core/lib/iomgr/pollset_custom.h +3 -3
- data/src/core/lib/iomgr/pollset_set_custom.cc +1 -2
- data/src/core/lib/iomgr/pollset_set_windows.cc +1 -0
- data/src/core/lib/iomgr/port.h +0 -5
- data/src/core/lib/iomgr/python_util.h +1 -0
- data/src/core/lib/iomgr/resolve_address.cc +2 -1
- data/src/core/lib/iomgr/resolve_address.h +0 -4
- data/src/core/lib/iomgr/resolve_address_custom.cc +4 -4
- data/src/core/lib/iomgr/resolve_address_custom.h +0 -1
- data/src/core/lib/iomgr/resolve_address_posix.cc +7 -11
- data/src/core/lib/iomgr/resolve_address_windows.cc +6 -8
- data/src/core/lib/iomgr/sockaddr.h +1 -1
- data/src/core/lib/iomgr/socket_factory_posix.cc +5 -5
- data/src/core/lib/iomgr/socket_factory_posix.h +1 -0
- data/src/core/lib/iomgr/socket_mutator.cc +2 -2
- data/src/core/lib/iomgr/socket_mutator.h +2 -2
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +4 -5
- data/src/core/lib/iomgr/socket_utils_linux.cc +4 -4
- data/src/core/lib/iomgr/socket_utils_posix.cc +2 -2
- data/src/core/lib/iomgr/socket_utils_posix.h +2 -2
- data/src/core/lib/iomgr/socket_utils_windows.cc +2 -2
- data/src/core/lib/iomgr/tcp_client.h +2 -0
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +7 -23
- data/src/core/lib/iomgr/tcp_client_custom.cc +6 -20
- data/src/core/lib/iomgr/tcp_client_posix.cc +14 -24
- data/src/core/lib/iomgr/tcp_client_posix.h +3 -1
- data/src/core/lib/iomgr/tcp_client_windows.cc +7 -9
- data/src/core/lib/iomgr/tcp_custom.cc +12 -51
- data/src/core/lib/iomgr/tcp_custom.h +1 -1
- data/src/core/lib/iomgr/tcp_posix.cc +51 -87
- data/src/core/lib/iomgr/tcp_posix.h +9 -12
- data/src/core/lib/iomgr/tcp_server.h +4 -3
- data/src/core/lib/iomgr/tcp_server_custom.cc +7 -34
- data/src/core/lib/iomgr/tcp_server_posix.cc +15 -13
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +21 -17
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +1 -2
- data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +3 -4
- data/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc +4 -4
- data/src/core/lib/iomgr/tcp_server_windows.cc +6 -10
- data/src/core/lib/iomgr/tcp_windows.cc +5 -29
- data/src/core/lib/iomgr/tcp_windows.h +1 -1
- data/src/core/lib/iomgr/timer.cc +1 -0
- data/src/core/lib/iomgr/timer.h +1 -2
- data/src/core/lib/iomgr/timer_custom.cc +2 -2
- data/src/core/lib/iomgr/timer_generic.cc +21 -51
- data/src/core/lib/iomgr/timer_generic.h +1 -0
- data/src/core/lib/iomgr/timer_heap.cc +2 -3
- data/src/core/lib/iomgr/unix_sockets_posix.cc +4 -6
- data/src/core/lib/iomgr/unix_sockets_posix.h +3 -4
- data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +1 -1
- data/src/core/lib/iomgr/wakeup_fd_nospecial.cc +1 -0
- data/src/core/lib/iomgr/wakeup_fd_pipe.cc +2 -3
- data/src/core/lib/iomgr/wakeup_fd_posix.cc +1 -0
- data/src/core/lib/iomgr/work_serializer.cc +115 -44
- data/src/core/lib/iomgr/work_serializer.h +17 -5
- data/src/core/lib/json/json_reader.cc +92 -52
- data/src/core/lib/json/json_util.cc +69 -1
- data/src/core/lib/json/json_util.h +65 -115
- data/src/core/lib/json/json_writer.cc +0 -3
- data/src/core/lib/matchers/matchers.h +0 -1
- data/src/core/lib/profiling/basic_timers.cc +8 -6
- data/src/core/lib/profiling/stap_timers.cc +2 -2
- data/src/core/lib/promise/activity.cc +115 -0
- data/src/core/lib/promise/activity.h +499 -0
- data/src/core/lib/promise/context.h +86 -0
- data/src/core/lib/promise/detail/basic_seq.h +407 -0
- data/src/core/lib/promise/detail/promise_factory.h +189 -0
- data/src/core/lib/promise/detail/promise_like.h +85 -0
- data/src/core/lib/promise/detail/status.h +44 -0
- data/src/core/lib/promise/detail/switch.h +1455 -0
- data/src/core/lib/promise/exec_ctx_wakeup_scheduler.h +48 -0
- data/src/core/lib/promise/loop.h +108 -0
- data/src/core/lib/promise/map.h +88 -0
- data/src/core/lib/promise/poll.h +60 -0
- data/src/core/lib/promise/race.h +84 -0
- data/src/core/lib/promise/seq.h +71 -0
- data/src/core/lib/resource_quota/api.cc +108 -0
- data/src/core/lib/resource_quota/api.h +41 -0
- data/src/core/lib/resource_quota/memory_quota.cc +454 -0
- data/src/core/lib/resource_quota/memory_quota.h +421 -0
- data/src/core/lib/resource_quota/resource_quota.cc +33 -0
- data/src/core/lib/resource_quota/resource_quota.h +58 -0
- data/src/core/lib/{transport/authority_override.h → resource_quota/thread_quota.cc} +22 -16
- data/src/core/lib/resource_quota/thread_quota.h +57 -0
- data/src/core/lib/{iomgr/event_engine/iomgr.h → resource_quota/trace.cc} +4 -9
- data/src/core/lib/resource_quota/trace.h +24 -0
- data/src/core/lib/security/authorization/authorization_policy_provider.h +5 -4
- data/src/core/lib/security/authorization/authorization_policy_provider_vtable.cc +1 -1
- data/src/core/lib/security/authorization/evaluate_args.cc +22 -24
- data/src/core/lib/security/authorization/evaluate_args.h +2 -1
- data/src/core/lib/security/authorization/sdk_server_authz_filter.cc +173 -0
- data/src/core/lib/security/authorization/sdk_server_authz_filter.h +67 -0
- data/src/core/lib/security/context/security_context.cc +11 -8
- data/src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc +2 -2
- data/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc +2 -2
- data/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +2 -2
- data/src/core/lib/security/credentials/composite/composite_credentials.cc +5 -4
- data/src/core/lib/security/credentials/credentials.cc +10 -8
- data/src/core/lib/security/credentials/credentials.h +7 -2
- data/src/core/lib/security/credentials/credentials_metadata.cc +2 -3
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +24 -38
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.h +1 -2
- data/src/core/lib/security/credentials/external/aws_request_signer.cc +3 -3
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +69 -43
- data/src/core/lib/security/credentials/external/external_account_credentials.h +1 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +5 -8
- data/src/core/lib/security/credentials/google_default/credentials_generic.cc +1 -2
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +60 -10
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +2 -1
- data/src/core/lib/security/credentials/jwt/json_token.cc +1 -1
- data/src/core/lib/security/credentials/jwt/json_token.h +2 -1
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +31 -14
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +11 -3
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +9 -17
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +3 -3
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +21 -29
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +1 -0
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +4 -6
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +4 -4
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +0 -1
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +3 -2
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +10 -6
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +13 -13
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +13 -12
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc +201 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h +106 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +11 -90
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +21 -84
- data/src/core/lib/security/credentials/tls/tls_credentials.cc +21 -10
- data/src/core/lib/security/credentials/xds/xds_credentials.cc +28 -33
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +3 -3
- data/src/core/lib/security/security_connector/alts/alts_security_connector.h +2 -2
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +9 -12
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc +2 -2
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +7 -7
- data/src/core/lib/security/security_connector/load_system_roots_fallback.cc +1 -0
- data/src/core/lib/security/security_connector/load_system_roots_linux.cc +4 -5
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +4 -1
- data/src/core/lib/security/security_connector/security_connector.cc +9 -4
- data/src/core/lib/security/security_connector/security_connector.h +1 -1
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +4 -7
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +1 -2
- data/src/core/lib/security/security_connector/ssl_utils.cc +13 -6
- data/src/core/lib/security/security_connector/ssl_utils.h +1 -1
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +345 -200
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +64 -43
- data/src/core/lib/security/transport/auth_filters.h +1 -0
- data/src/core/lib/security/transport/client_auth_filter.cc +9 -11
- data/src/core/lib/security/transport/secure_endpoint.cc +4 -14
- data/src/core/lib/security/transport/secure_endpoint.h +1 -0
- data/src/core/lib/security/transport/security_handshaker.cc +80 -49
- data/src/core/lib/security/transport/security_handshaker.h +2 -1
- data/src/core/lib/security/transport/server_auth_filter.cc +3 -5
- data/src/core/lib/security/transport/tsi_error.cc +3 -5
- data/src/core/lib/security/util/json_util.cc +6 -8
- data/src/core/lib/slice/percent_encoding.cc +84 -97
- data/src/core/lib/slice/percent_encoding.h +23 -28
- data/src/core/lib/slice/slice.cc +9 -26
- data/src/core/lib/slice/slice.h +341 -0
- data/src/core/lib/{gpr/tls_pthread.cc → slice/slice_api.cc} +15 -6
- data/src/core/lib/slice/slice_buffer.cc +10 -7
- data/src/core/lib/slice/slice_intern.cc +11 -17
- data/src/core/lib/slice/slice_internal.h +3 -246
- data/src/core/lib/slice/slice_refcount.cc +17 -0
- data/src/core/lib/slice/slice_refcount.h +125 -0
- data/src/core/lib/slice/slice_refcount_base.h +181 -0
- data/src/core/lib/slice/slice_split.cc +100 -0
- data/src/core/lib/slice/slice_split.h +40 -0
- data/src/core/lib/slice/slice_string_helpers.cc +0 -83
- data/src/core/lib/slice/slice_string_helpers.h +0 -11
- data/src/core/lib/slice/static_slice.cc +377 -0
- data/src/core/lib/slice/static_slice.h +300 -0
- data/src/core/lib/surface/api_trace.cc +2 -1
- data/src/core/lib/surface/api_trace.h +1 -0
- data/src/core/lib/surface/builtins.cc +49 -0
- data/src/core/lib/surface/builtins.h +26 -0
- data/src/core/lib/surface/byte_buffer_reader.cc +1 -1
- data/src/core/lib/surface/call.cc +180 -170
- data/src/core/lib/surface/call.h +3 -9
- data/src/core/lib/surface/call_details.cc +2 -2
- data/src/core/lib/surface/call_log_batch.cc +2 -2
- data/src/core/lib/surface/channel.cc +20 -45
- data/src/core/lib/surface/channel.h +6 -13
- data/src/core/lib/surface/channel_init.cc +23 -76
- data/src/core/lib/surface/channel_init.h +52 -44
- data/src/core/lib/surface/channel_ping.cc +1 -2
- data/src/core/lib/surface/channel_stack_type.cc +2 -1
- data/src/core/lib/surface/completion_queue.cc +60 -69
- data/src/core/lib/surface/completion_queue_factory.cc +2 -1
- data/src/core/lib/surface/completion_queue_factory.h +1 -0
- data/src/core/lib/surface/event_string.cc +1 -0
- data/src/core/lib/surface/init.cc +4 -49
- data/src/core/lib/surface/init.h +0 -1
- data/src/core/lib/surface/init_secure.cc +36 -14
- data/src/core/lib/surface/lame_client.cc +46 -31
- data/src/core/lib/surface/lame_client.h +1 -1
- data/src/core/lib/surface/metadata_array.cc +2 -2
- data/src/core/lib/surface/server.cc +57 -65
- data/src/core/lib/surface/server.h +34 -30
- data/src/core/lib/surface/validate_metadata.cc +49 -18
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/bdp_estimator.cc +2 -2
- data/src/core/lib/transport/byte_stream.cc +4 -0
- data/src/core/lib/transport/byte_stream.h +1 -0
- data/src/core/lib/transport/connectivity_state.cc +8 -5
- data/src/core/lib/transport/connectivity_state.h +2 -2
- data/src/core/lib/transport/error_utils.cc +43 -17
- data/src/core/lib/transport/error_utils.h +1 -1
- data/src/core/lib/transport/metadata.cc +41 -20
- data/src/core/lib/transport/metadata.h +19 -16
- data/src/core/lib/transport/metadata_batch.cc +40 -371
- data/src/core/lib/transport/metadata_batch.h +986 -69
- data/src/core/lib/transport/parsed_metadata.cc +35 -0
- data/src/core/lib/transport/parsed_metadata.h +382 -0
- data/src/core/lib/transport/pid_controller.cc +4 -4
- data/src/core/lib/transport/static_metadata.cc +632 -849
- data/src/core/lib/transport/static_metadata.h +115 -397
- data/src/core/lib/transport/status_metadata.cc +1 -0
- data/src/core/lib/transport/transport.cc +8 -31
- data/src/core/lib/transport/transport.h +0 -1
- data/src/core/lib/transport/transport_op_string.cc +40 -20
- data/src/core/lib/uri/uri_parser.cc +19 -19
- data/src/core/lib/uri/uri_parser.h +2 -0
- data/src/core/plugin_registry/grpc_plugin_registry.cc +78 -41
- data/src/core/tsi/alts/crypt/aes_gcm.cc +6 -3
- data/src/core/tsi/alts/crypt/gsec.h +2 -3
- data/src/core/tsi/alts/frame_protector/alts_frame_protector.cc +13 -12
- data/src/core/tsi/alts/frame_protector/frame_handler.cc +10 -11
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +4 -5
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +2 -3
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +12 -2
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc +2 -2
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc +1 -1
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +2 -2
- data/src/core/tsi/fake_transport_security.cc +15 -7
- data/src/core/tsi/local_transport_security.cc +43 -80
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +20 -53
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +4 -3
- data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +2 -2
- data/src/core/tsi/ssl_transport_security.cc +51 -12
- data/src/core/tsi/ssl_transport_security.h +4 -1
- data/src/core/tsi/transport_security.cc +15 -3
- data/src/core/tsi/transport_security.h +16 -1
- data/src/core/tsi/transport_security_grpc.h +1 -0
- data/src/core/tsi/transport_security_interface.h +26 -0
- data/src/ruby/ext/grpc/extconf.rb +12 -9
- data/src/ruby/ext/grpc/rb_byte_buffer.c +2 -1
- data/src/ruby/ext/grpc/rb_call.c +5 -5
- data/src/ruby/ext/grpc/rb_call_credentials.c +5 -5
- data/src/ruby/ext/grpc/rb_channel.c +10 -8
- data/src/ruby/ext/grpc/rb_channel_args.c +2 -2
- data/src/ruby/ext/grpc/rb_channel_credentials.c +4 -4
- data/src/ruby/ext/grpc/rb_channel_credentials.h +1 -0
- data/src/ruby/ext/grpc/rb_completion_queue.c +3 -2
- data/src/ruby/ext/grpc/rb_compression_options.c +5 -4
- data/src/ruby/ext/grpc/rb_event_thread.c +4 -4
- data/src/ruby/ext/grpc/rb_grpc.c +5 -4
- data/src/ruby/ext/grpc/rb_grpc.h +1 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +10 -10
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +15 -15
- data/src/ruby/ext/grpc/rb_server.c +6 -5
- data/src/ruby/ext/grpc/rb_server_credentials.c +3 -3
- data/src/ruby/ext/grpc/rb_server_credentials.h +1 -0
- data/src/ruby/ext/grpc/rb_xds_channel_credentials.c +8 -5
- data/src/ruby/ext/grpc/rb_xds_channel_credentials.h +3 -1
- data/src/ruby/ext/grpc/rb_xds_server_credentials.c +6 -5
- data/src/ruby/ext/grpc/rb_xds_server_credentials.h +3 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/src/proto/grpc/testing/test_pb.rb +2 -2
- data/src/ruby/spec/client_server_spec.rb +1 -1
- data/third_party/abseil-cpp/absl/algorithm/container.h +101 -91
- data/third_party/abseil-cpp/absl/base/attributes.h +64 -31
- data/third_party/abseil-cpp/absl/base/config.h +67 -37
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +1 -26
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +3 -1
- data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.h +2 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +69 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.cc +4 -4
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.h +15 -10
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +16 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +4 -4
- data/third_party/abseil-cpp/absl/base/options.h +1 -1
- data/third_party/abseil-cpp/absl/container/fixed_array.h +0 -5
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +105 -97
- data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +17 -15
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +18 -102
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +37 -78
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +388 -423
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +3 -2
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +14 -8
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +251 -120
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +11 -1
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +12 -11
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +6 -2
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +12 -5
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_emscripten-inl.inc +110 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +234 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +25 -7
- data/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +8 -2
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +21 -3
- data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +2 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.cc +2 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +14 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_emscripten.inc +72 -0
- data/third_party/abseil-cpp/absl/functional/function_ref.h +4 -1
- data/third_party/abseil-cpp/absl/hash/hash.h +22 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +15 -16
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +88 -37
- data/third_party/abseil-cpp/absl/hash/internal/{wyhash.cc → low_level_hash.cc} +23 -11
- data/third_party/abseil-cpp/absl/hash/internal/{wyhash.h → low_level_hash.h} +14 -12
- data/third_party/abseil-cpp/absl/memory/memory.h +1 -1
- data/third_party/abseil-cpp/absl/meta/type_traits.h +32 -2
- data/third_party/abseil-cpp/absl/numeric/int128.cc +3 -10
- data/third_party/abseil-cpp/absl/numeric/int128.h +146 -73
- data/third_party/abseil-cpp/absl/numeric/int128_have_intrinsic.inc +19 -25
- data/third_party/abseil-cpp/absl/numeric/int128_no_intrinsic.inc +73 -70
- data/third_party/abseil-cpp/absl/{base → profiling}/internal/exponential_biased.cc +4 -4
- data/third_party/abseil-cpp/absl/{base → profiling}/internal/exponential_biased.h +6 -6
- data/third_party/abseil-cpp/absl/profiling/internal/sample_recorder.h +230 -0
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +5 -5
- data/third_party/abseil-cpp/absl/status/status.cc +9 -17
- data/third_party/abseil-cpp/absl/status/status.h +19 -15
- data/third_party/abseil-cpp/absl/status/statusor.cc +34 -2
- data/third_party/abseil-cpp/absl/status/statusor.h +31 -21
- data/third_party/abseil-cpp/absl/strings/charconv.cc +3 -3
- data/third_party/abseil-cpp/absl/strings/charconv.h +3 -2
- data/third_party/abseil-cpp/absl/strings/cord.cc +453 -359
- data/third_party/abseil-cpp/absl/strings/cord.h +197 -70
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.cc +6 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +140 -63
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.cc +1128 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.h +939 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.cc +185 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.h +265 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.cc +68 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.h +211 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_consume.cc +129 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_consume.h +50 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h +7 -7
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.cc +55 -181
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.h +42 -24
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring_reader.h +4 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_functions.cc +96 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_functions.h +85 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_handle.cc +139 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_handle.h +131 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.cc +445 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.h +298 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_statistics.h +87 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_update_scope.h +71 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h +121 -0
- data/third_party/abseil-cpp/absl/strings/internal/resize_uninitialized.h +48 -2
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +8 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +3 -4
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +6 -6
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +36 -18
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +62 -73
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +24 -16
- data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +35 -35
- data/third_party/abseil-cpp/absl/strings/numbers.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/numbers.h +34 -0
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +4 -4
- data/third_party/abseil-cpp/absl/strings/str_format.h +1 -2
- data/third_party/abseil-cpp/absl/strings/string_view.cc +16 -21
- data/third_party/abseil-cpp/absl/strings/string_view.h +120 -39
- data/third_party/abseil-cpp/absl/strings/substitute.cc +2 -1
- data/third_party/abseil-cpp/absl/strings/substitute.h +99 -74
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.cc +25 -15
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.h +5 -3
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc +1 -1
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +3 -3
- data/third_party/abseil-cpp/absl/time/civil_time.cc +1 -3
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +93 -20
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc +1 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.h +2 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc +83 -21
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +49 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h +1 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc +2 -3
- data/third_party/abseil-cpp/absl/time/time.h +67 -36
- data/third_party/abseil-cpp/absl/types/bad_optional_access.h +1 -1
- data/third_party/abseil-cpp/absl/types/bad_variant_access.h +2 -2
- data/third_party/abseil-cpp/absl/types/span.h +3 -3
- data/third_party/address_sorting/address_sorting_posix.c +1 -0
- data/third_party/boringssl-with-bazel/err_data.c +685 -673
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c +67 -54
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c +21 -22
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.c +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.c +6 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_mbstr.c +16 -23
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c +55 -37
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_print.c +19 -29
- data/third_party/boringssl-with-bazel/src/crypto/{x509 → asn1}/a_strex.c +269 -272
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strnid.c +106 -153
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_time.c +4 -4
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_type.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c +1 -40
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utf8.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c +59 -47
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_par.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.c +24 -28
- data/third_party/boringssl-with-bazel/src/crypto/{x509 → asn1}/charmap.h +0 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_int.c +5 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{asn1_locl.h → internal.h} +86 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c +57 -281
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c +290 -199
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c +9 -9
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c +10 -14
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c +8 -6
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/time_support.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/base64/base64.c +11 -8
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.c +1 -7
- data/third_party/boringssl-with-bazel/src/crypto/bio/connect.c +1 -5
- data/third_party/boringssl-with-bazel/src/crypto/bio/fd.c +0 -4
- data/third_party/boringssl-with-bazel/src/crypto/bio/file.c +1 -7
- data/third_party/boringssl-with-bazel/src/crypto/bio/pair.c +1 -6
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket.c +3 -17
- data/third_party/boringssl-with-bazel/src/crypto/blake2/blake2.c +4 -6
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/ber.c +3 -1
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbb.c +9 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c +8 -0
- data/third_party/boringssl-with-bazel/src/crypto/chacha/chacha.c +38 -47
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.c +45 -65
- data/third_party/boringssl-with-bazel/src/crypto/conf/conf.c +14 -3
- data/third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c +6 -3
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/evp/scrypt.c +32 -34
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div.c +26 -9
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd_extra.c +3 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h +5 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/sqrt.c +5 -9
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c +10 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/des/des.c +10 -11
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/des/internal.h +1 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md4/md4.c +4 -7
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/md5.c +4 -7
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/internal.h +5 -9
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/urandom.c +4 -6
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +24 -9
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +4 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c +7 -7
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha1.c +35 -35
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha256.c +11 -10
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha512.c +10 -37
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/hrss/hrss.c +219 -121
- data/third_party/boringssl-with-bazel/src/crypto/hrss/internal.h +9 -2
- data/third_party/boringssl-with-bazel/src/crypto/internal.h +62 -2
- data/third_party/boringssl-with-bazel/src/crypto/lhash/internal.h +253 -0
- data/third_party/boringssl-with-bazel/src/crypto/lhash/lhash.c +28 -23
- data/third_party/boringssl-with-bazel/src/crypto/mem.c +32 -9
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj.c +7 -3
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c +0 -9
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_info.c +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_lib.c +0 -8
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pk8.c +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pkey.c +0 -4
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/internal.h +16 -7
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7.c +9 -4
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.c +151 -12
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/pool/internal.h +5 -1
- data/third_party/boringssl-with-bazel/src/crypto/pool/pool.c +59 -22
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/fuchsia.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/siphash/siphash.c +6 -6
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_verify.c +15 -11
- data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.c +2 -18
- data/third_party/boringssl-with-bazel/src/crypto/x509/by_dir.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/by_file.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/internal.h +233 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/name_print.c +246 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c +15 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +10 -5
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +0 -179
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c +4 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_att.c +6 -23
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_lu.c +1 -5
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.c +25 -22
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +11 -54
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +2 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_algor.c +1 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +0 -16
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c +9 -11
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_exten.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_name.c +23 -21
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +12 -11
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +232 -11
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_cache.c +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_lib.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_map.c +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_node.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_tree.c +5 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akey.c +24 -5
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c +18 -8
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bitst.c +3 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c +6 -7
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_crld.c +4 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_enum.c +5 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_lib.c +23 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ncons.c +112 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pci.c +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c +14 -13
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +76 -31
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +1504 -561
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1t.h +5 -12
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +10 -6
- data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +3 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/bn.h +3 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +9 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +8 -2
- data/third_party/boringssl-with-bazel/src/include/openssl/conf.h +8 -5
- data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +4 -12
- data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +3 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dsa.h +17 -41
- data/third_party/boringssl-with-bazel/src/include/openssl/ec_key.h +12 -27
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdsa.h +8 -10
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +35 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/hkdf.h +4 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hpke.h +25 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hrss.h +14 -12
- data/third_party/boringssl-with-bazel/src/include/openssl/lhash.h +4 -205
- data/third_party/boringssl-with-bazel/src/include/openssl/mem.h +12 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/obj.h +5 -4
- data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +0 -20
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs7.h +15 -14
- data/third_party/boringssl-with-bazel/src/include/openssl/pool.h +7 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +29 -28
- data/third_party/boringssl-with-bazel/src/include/openssl/span.h +37 -15
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +87 -24
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +31 -32
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +725 -189
- data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +16 -695
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +52 -16
- data/third_party/boringssl-with-bazel/src/ssl/d1_both.cc +9 -16
- data/third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc +310 -359
- data/third_party/boringssl-with-bazel/src/ssl/{t1_lib.cc → extensions.cc} +110 -159
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +24 -13
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +145 -142
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +106 -99
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +90 -51
- data/third_party/boringssl-with-bazel/src/ssl/s3_lib.cc +1 -2
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +2 -2
- data/third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc +11 -5
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +2 -51
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +121 -65
- data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +6 -12
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +4 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc +28 -23
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +14 -27
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +210 -212
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +30 -41
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +48 -34
- data/third_party/re2/re2/compile.cc +91 -109
- data/third_party/re2/re2/dfa.cc +27 -39
- data/third_party/re2/re2/filtered_re2.cc +18 -2
- data/third_party/re2/re2/filtered_re2.h +10 -5
- data/third_party/re2/re2/nfa.cc +1 -1
- data/third_party/re2/re2/parse.cc +42 -23
- data/third_party/re2/re2/perl_groups.cc +34 -34
- data/third_party/re2/re2/prefilter.cc +3 -2
- data/third_party/re2/re2/prog.cc +182 -4
- data/third_party/re2/re2/prog.h +28 -9
- data/third_party/re2/re2/re2.cc +87 -118
- data/third_party/re2/re2/re2.h +156 -141
- data/third_party/re2/re2/regexp.cc +12 -5
- data/third_party/re2/re2/regexp.h +8 -2
- data/third_party/re2/re2/set.cc +31 -9
- data/third_party/re2/re2/set.h +9 -4
- data/third_party/re2/re2/simplify.cc +11 -3
- data/third_party/re2/re2/tostring.cc +1 -1
- data/third_party/re2/re2/walker-inl.h +1 -1
- data/third_party/re2/util/mutex.h +2 -2
- data/third_party/re2/util/pcre.h +3 -3
- data/third_party/upb/upb/decode.c +383 -183
- data/third_party/upb/upb/decode.h +32 -4
- data/third_party/upb/upb/decode_fast.c +513 -500
- data/third_party/upb/upb/decode_fast.h +27 -0
- data/third_party/upb/upb/{decode.int.h → decode_internal.h} +39 -8
- data/third_party/upb/upb/def.c +489 -254
- data/third_party/upb/upb/def.h +86 -33
- data/third_party/upb/upb/def.hpp +46 -4
- data/third_party/upb/upb/encode.c +137 -44
- data/third_party/upb/upb/encode.h +29 -2
- data/third_party/upb/upb/msg.c +182 -28
- data/third_party/upb/upb/msg.h +75 -580
- data/third_party/upb/upb/msg_internal.h +769 -0
- data/third_party/upb/upb/port_def.inc +85 -24
- data/third_party/upb/upb/port_undef.inc +38 -1
- data/third_party/upb/upb/reflection.c +126 -94
- data/third_party/upb/upb/reflection.h +42 -10
- data/third_party/upb/upb/reflection.hpp +37 -0
- data/third_party/upb/upb/table.c +211 -86
- data/third_party/upb/upb/{table.int.h → table_internal.h} +56 -180
- data/third_party/upb/upb/text_encode.c +35 -7
- data/third_party/upb/upb/text_encode.h +26 -0
- data/third_party/upb/upb/upb.c +67 -8
- data/third_party/upb/upb/upb.h +36 -6
- data/third_party/upb/upb/upb.hpp +24 -0
- data/third_party/upb/upb/upb_internal.h +58 -0
- metadata +182 -107
- data/include/grpc/event_engine/slice_allocator.h +0 -66
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +0 -179
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc +0 -38
- data/src/core/ext/filters/client_channel/service_config_call_data.h +0 -126
- data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc +0 -211
- data/src/core/ext/filters/workarounds/workaround_utils.cc +0 -53
- data/src/core/ext/filters/workarounds/workaround_utils.h +0 -39
- data/src/core/ext/transport/chttp2/client/authority.cc +0 -42
- data/src/core/ext/transport/chttp2/client/authority.h +0 -36
- data/src/core/ext/transport/chttp2/transport/chttp2_slice_allocator.cc +0 -66
- data/src/core/ext/transport/chttp2/transport/chttp2_slice_allocator.h +0 -74
- data/src/core/ext/transport/chttp2/transport/hpack_table.cc +0 -243
- data/src/core/ext/transport/chttp2/transport/hpack_table.h +0 -148
- data/src/core/ext/transport/chttp2/transport/incoming_metadata.cc +0 -66
- data/src/core/ext/transport/chttp2/transport/incoming_metadata.h +0 -58
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c +0 -58
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h +0 -124
- data/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.c +0 -33
- data/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.h +0 -77
- data/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.c +0 -44
- data/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.h +0 -35
- data/src/core/lib/avl/avl.cc +0 -306
- data/src/core/lib/gpr/tls_gcc.h +0 -52
- data/src/core/lib/gpr/tls_msvc.h +0 -54
- data/src/core/lib/gpr/tls_pthread.h +0 -56
- data/src/core/lib/gpr/tls_stdcpp.h +0 -48
- data/src/core/lib/gprpp/atomic.h +0 -104
- data/src/core/lib/iomgr/endpoint_pair_uv.cc +0 -40
- data/src/core/lib/iomgr/iomgr_uv.cc +0 -43
- data/src/core/lib/iomgr/pollset_uv.cc +0 -95
- data/src/core/lib/iomgr/pollset_uv.h +0 -36
- data/src/core/lib/iomgr/resource_quota.cc +0 -1019
- data/src/core/lib/iomgr/resource_quota.h +0 -177
- data/src/core/lib/iomgr/sockaddr_custom.h +0 -54
- data/src/core/lib/iomgr/socket_utils_uv.cc +0 -49
- data/src/core/lib/iomgr/tcp_uv.cc +0 -421
- data/src/core/lib/iomgr/timer_uv.cc +0 -66
- data/src/core/lib/iomgr/udp_server.cc +0 -748
- data/src/core/lib/iomgr/udp_server.h +0 -103
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_enum.c +0 -93
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_int.h +0 -217
- data/third_party/upb/third_party/wyhash/wyhash.h +0 -145
- data/third_party/upb/upb/upb.int.h +0 -29
@@ -23,15 +23,23 @@
|
|
23
23
|
|
24
24
|
#include <stdbool.h>
|
25
25
|
|
26
|
+
#include "absl/strings/match.h"
|
27
|
+
#include "absl/strings/str_join.h"
|
26
28
|
#include "absl/types/optional.h"
|
27
29
|
|
28
30
|
#include <grpc/grpc.h>
|
29
31
|
#include <grpc/slice.h>
|
30
32
|
#include <grpc/support/time.h>
|
31
33
|
|
34
|
+
#include "src/core/lib/gprpp/chunked_vector.h"
|
35
|
+
#include "src/core/lib/gprpp/table.h"
|
32
36
|
#include "src/core/lib/iomgr/exec_ctx.h"
|
37
|
+
#include "src/core/lib/slice/slice.h"
|
38
|
+
#include "src/core/lib/surface/validate_metadata.h"
|
33
39
|
#include "src/core/lib/transport/metadata.h"
|
40
|
+
#include "src/core/lib/transport/parsed_metadata.h"
|
34
41
|
#include "src/core/lib/transport/static_metadata.h"
|
42
|
+
#include "src/core/lib/transport/timeout_encoding.h"
|
35
43
|
|
36
44
|
typedef struct grpc_linked_mdelem {
|
37
45
|
grpc_linked_mdelem() {}
|
@@ -49,34 +57,951 @@ typedef struct grpc_mdelem_list {
|
|
49
57
|
grpc_linked_mdelem* tail;
|
50
58
|
} grpc_mdelem_list;
|
51
59
|
|
52
|
-
|
60
|
+
struct grpc_filtered_mdelem {
|
61
|
+
grpc_error_handle error;
|
62
|
+
grpc_mdelem md;
|
63
|
+
};
|
64
|
+
#define GRPC_FILTERED_ERROR(error) \
|
65
|
+
{ (error), GRPC_MDNULL }
|
66
|
+
#define GRPC_FILTERED_MDELEM(md) \
|
67
|
+
{ GRPC_ERROR_NONE, (md) }
|
68
|
+
#define GRPC_FILTERED_REMOVE() \
|
69
|
+
{ GRPC_ERROR_NONE, GRPC_MDNULL }
|
70
|
+
|
71
|
+
grpc_error_handle grpc_attach_md_to_error(grpc_error_handle src,
|
72
|
+
grpc_mdelem md);
|
73
|
+
|
74
|
+
namespace grpc_core {
|
75
|
+
|
76
|
+
// grpc-timeout metadata trait.
|
77
|
+
// ValueType is defined as grpc_millis - an absolute timestamp (i.e. a
|
78
|
+
// deadline!), that is converted to a duration by transports before being
|
79
|
+
// sent.
|
80
|
+
// TODO(ctiller): Move this elsewhere. During the transition we need to be able
|
81
|
+
// to name this in MetadataMap, but ultimately once the transition is done we
|
82
|
+
// should not need to.
|
83
|
+
struct GrpcTimeoutMetadata {
|
84
|
+
using ValueType = grpc_millis;
|
85
|
+
using MementoType = grpc_millis;
|
86
|
+
static absl::string_view key() { return "grpc-timeout"; }
|
87
|
+
static MementoType ParseMemento(Slice value) {
|
88
|
+
grpc_millis timeout;
|
89
|
+
if (GPR_UNLIKELY(!grpc_http2_decode_timeout(value.c_slice(), &timeout))) {
|
90
|
+
timeout = GRPC_MILLIS_INF_FUTURE;
|
91
|
+
}
|
92
|
+
return timeout;
|
93
|
+
}
|
94
|
+
static ValueType MementoToValue(MementoType timeout) {
|
95
|
+
if (timeout == GRPC_MILLIS_INF_FUTURE) {
|
96
|
+
return GRPC_MILLIS_INF_FUTURE;
|
97
|
+
}
|
98
|
+
return ExecCtx::Get()->Now() + timeout;
|
99
|
+
}
|
100
|
+
static Slice Encode(ValueType x) {
|
101
|
+
char timeout[GRPC_HTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE];
|
102
|
+
grpc_http2_encode_timeout(x, timeout);
|
103
|
+
return Slice::FromCopiedString(timeout);
|
104
|
+
}
|
105
|
+
static MementoType DisplayValue(MementoType x) { return x; }
|
106
|
+
};
|
107
|
+
|
108
|
+
// TE metadata trait.
|
109
|
+
struct TeMetadata {
|
110
|
+
// HTTP2 says that TE can either be empty or "trailers".
|
111
|
+
// Empty means this trait is not included, "trailers" means kTrailers, and
|
112
|
+
// kInvalid is used to remember an invalid value.
|
113
|
+
enum ValueType : uint8_t {
|
114
|
+
kTrailers,
|
115
|
+
kInvalid,
|
116
|
+
};
|
117
|
+
using MementoType = ValueType;
|
118
|
+
static absl::string_view key() { return "te"; }
|
119
|
+
static MementoType ParseMemento(Slice value) {
|
120
|
+
auto out = kInvalid;
|
121
|
+
if (value == "trailers") {
|
122
|
+
out = kTrailers;
|
123
|
+
}
|
124
|
+
return out;
|
125
|
+
}
|
126
|
+
static ValueType MementoToValue(MementoType te) { return te; }
|
127
|
+
static StaticSlice Encode(ValueType x) {
|
128
|
+
GPR_ASSERT(x == kTrailers);
|
129
|
+
return StaticSlice(GRPC_MDSTR_TRAILERS);
|
130
|
+
}
|
131
|
+
static const char* DisplayValue(MementoType te) {
|
132
|
+
switch (te) {
|
133
|
+
case ValueType::kTrailers:
|
134
|
+
return "trailers";
|
135
|
+
default:
|
136
|
+
return "<discarded-invalid-value>";
|
137
|
+
}
|
138
|
+
}
|
139
|
+
};
|
140
|
+
|
141
|
+
struct SimpleSliceBasedMetadata {
|
142
|
+
using ValueType = Slice;
|
143
|
+
using MementoType = Slice;
|
144
|
+
static MementoType ParseMemento(Slice value) { return value.TakeOwned(); }
|
145
|
+
static ValueType MementoToValue(MementoType value) { return value; }
|
146
|
+
static Slice Encode(const ValueType& x) { return x.Ref(); }
|
147
|
+
static absl::string_view DisplayValue(const MementoType& value) {
|
148
|
+
return value.as_string_view();
|
149
|
+
}
|
150
|
+
};
|
151
|
+
|
152
|
+
// user-agent metadata trait.
|
153
|
+
struct UserAgentMetadata : public SimpleSliceBasedMetadata {
|
154
|
+
static absl::string_view key() { return "user-agent"; }
|
155
|
+
};
|
156
|
+
|
157
|
+
// grpc-message metadata trait.
|
158
|
+
struct GrpcMessageMetadata : public SimpleSliceBasedMetadata {
|
159
|
+
static absl::string_view key() { return "grpc-message"; }
|
160
|
+
};
|
161
|
+
|
162
|
+
// host metadata trait.
|
163
|
+
struct HostMetadata : public SimpleSliceBasedMetadata {
|
164
|
+
static absl::string_view key() { return "host"; }
|
165
|
+
};
|
166
|
+
|
167
|
+
// x-endpoint-load-metrics-bin metadata trait.
|
168
|
+
struct XEndpointLoadMetricsBinMetadata : public SimpleSliceBasedMetadata {
|
169
|
+
static absl::string_view key() { return "x-endpoint-load-metrics-bin"; }
|
170
|
+
};
|
171
|
+
|
172
|
+
// grpc-server-stats-bin metadata trait.
|
173
|
+
struct GrpcServerStatsBinMetadata : public SimpleSliceBasedMetadata {
|
174
|
+
static absl::string_view key() { return "grpc-server-stats-bin"; }
|
175
|
+
};
|
176
|
+
|
177
|
+
// grpc-trace-bin metadata trait.
|
178
|
+
struct GrpcTraceBinMetadata : public SimpleSliceBasedMetadata {
|
179
|
+
static absl::string_view key() { return "grpc-trace-bin"; }
|
180
|
+
};
|
181
|
+
|
182
|
+
// grpc-tags-bin metadata trait.
|
183
|
+
struct GrpcTagsBinMetadata : public SimpleSliceBasedMetadata {
|
184
|
+
static absl::string_view key() { return "grpc-tags-bin"; }
|
185
|
+
};
|
186
|
+
|
187
|
+
namespace metadata_detail {
|
188
|
+
|
189
|
+
// Helper type - maps a string name to a trait.
|
190
|
+
template <typename... Traits>
|
191
|
+
struct NameLookup;
|
192
|
+
|
193
|
+
template <typename Trait, typename... Traits>
|
194
|
+
struct NameLookup<Trait, Traits...> {
|
195
|
+
// Call op->Found(Trait()) if op->name == Trait::key() for some Trait in
|
196
|
+
// Traits. If not found, call op->NotFount().
|
197
|
+
template <typename Op>
|
198
|
+
static auto Lookup(absl::string_view key, Op* op)
|
199
|
+
-> decltype(op->Found(Trait())) {
|
200
|
+
if (key == Trait::key()) {
|
201
|
+
return op->Found(Trait());
|
202
|
+
}
|
203
|
+
return NameLookup<Traits...>::Lookup(key, op);
|
204
|
+
}
|
205
|
+
};
|
206
|
+
|
207
|
+
template <>
|
208
|
+
struct NameLookup<> {
|
209
|
+
template <typename Op>
|
210
|
+
static auto Lookup(absl::string_view key, Op* op)
|
211
|
+
-> decltype(op->NotFound(key)) {
|
212
|
+
return op->NotFound(key);
|
213
|
+
}
|
214
|
+
};
|
215
|
+
|
216
|
+
// Helper to take a slice to a memento to a value.
|
217
|
+
// By splitting this part out we can scale code size as the number of (memento,
|
218
|
+
// value) types, rather than as the number of traits.
|
219
|
+
template <typename ParseMementoFn, typename MementoToValueFn>
|
220
|
+
struct ParseValue {
|
221
|
+
template <ParseMementoFn parse_memento, MementoToValueFn memento_to_value>
|
222
|
+
static GPR_ATTRIBUTE_NOINLINE auto Parse(Slice* value)
|
223
|
+
-> decltype(memento_to_value(parse_memento(std::move(*value)))) {
|
224
|
+
return memento_to_value(parse_memento(std::move(*value)));
|
225
|
+
}
|
226
|
+
};
|
227
|
+
|
228
|
+
// This is an "Op" type for NameLookup.
|
229
|
+
// Used for MetadataMap::Parse, its Found/NotFound methods turn a slice into a
|
230
|
+
// ParsedMetadata object.
|
231
|
+
template <typename Container>
|
232
|
+
class ParseHelper {
|
233
|
+
public:
|
234
|
+
ParseHelper(Slice value, size_t transport_size)
|
235
|
+
: value_(std::move(value)), transport_size_(transport_size) {}
|
236
|
+
|
237
|
+
template <typename Trait>
|
238
|
+
ParsedMetadata<Container> Found(Trait trait) {
|
239
|
+
return ParsedMetadata<Container>(
|
240
|
+
trait, Trait::ParseMemento(std::move(value_)), transport_size_);
|
241
|
+
}
|
242
|
+
|
243
|
+
GPR_ATTRIBUTE_NOINLINE ParsedMetadata<Container> NotFound(
|
244
|
+
absl::string_view key) {
|
245
|
+
return ParsedMetadata<Container>(
|
246
|
+
grpc_mdelem_from_slices(grpc_slice_intern(grpc_slice_from_static_buffer(
|
247
|
+
key.data(), key.size())),
|
248
|
+
value_.TakeCSlice()));
|
249
|
+
}
|
250
|
+
|
251
|
+
private:
|
252
|
+
Slice value_;
|
253
|
+
const size_t transport_size_;
|
254
|
+
};
|
255
|
+
|
256
|
+
// This is an "Op" type for NameLookup.
|
257
|
+
// Used for MetadataMap::Parse, its Found/NotFound methods turn a slice into a
|
258
|
+
// value and add it to a container.
|
259
|
+
template <typename Container>
|
260
|
+
class AppendHelper {
|
261
|
+
public:
|
262
|
+
AppendHelper(Container* container, Slice value)
|
263
|
+
: container_(container), value_(std::move(value)) {}
|
264
|
+
|
265
|
+
template <typename Trait>
|
266
|
+
GPR_ATTRIBUTE_NOINLINE void Found(Trait trait) {
|
267
|
+
container_->Set(
|
268
|
+
trait, ParseValue<decltype(Trait::ParseMemento),
|
269
|
+
decltype(Trait::MementoToValue)>::
|
270
|
+
template Parse<Trait::ParseMemento, Trait::MementoToValue>(
|
271
|
+
&value_));
|
272
|
+
}
|
273
|
+
|
274
|
+
void NotFound(absl::string_view key) {
|
275
|
+
GPR_ASSERT(GRPC_ERROR_NONE ==
|
276
|
+
container_->Append(grpc_mdelem_from_slices(
|
277
|
+
grpc_slice_intern(
|
278
|
+
grpc_slice_from_static_buffer(key.data(), key.length())),
|
279
|
+
value_.TakeCSlice())));
|
280
|
+
}
|
281
|
+
|
282
|
+
private:
|
283
|
+
Container* const container_;
|
284
|
+
Slice value_;
|
285
|
+
};
|
286
|
+
|
287
|
+
} // namespace metadata_detail
|
288
|
+
|
289
|
+
// MetadataMap encodes the mapping of metadata keys to metadata values.
|
290
|
+
// Right now the API presented is the minimal one that will allow us to
|
291
|
+
// substitute this type for grpc_metadata_batch in a relatively easy fashion. At
|
292
|
+
// that point we'll start iterating this API into something that's ergonomic
|
293
|
+
// again, whilst minimally holding the performance bar already set (and
|
294
|
+
// hopefully improving some things).
|
295
|
+
// In the meantime, we're not going to invest much time in ephemeral API
|
296
|
+
// documentation, so if you must use one of these APIs and it's not obvious
|
297
|
+
// how, reach out to ctiller.
|
298
|
+
//
|
299
|
+
// MetadataMap takes a list of traits. Each of these trait objects defines
|
300
|
+
// one metadata field that is used by core, and so should have more specialized
|
301
|
+
// handling than just using the generic APIs.
|
302
|
+
//
|
303
|
+
// Each trait object has the following signature:
|
304
|
+
// // Traits for the grpc-xyz metadata field:
|
305
|
+
// struct GrpcXyzMetadata {
|
306
|
+
// // The type that's stored on MetadataBatch
|
307
|
+
// using ValueType = ...;
|
308
|
+
// // The type that's stored in compression/decompression tables
|
309
|
+
// using MementoType = ...;
|
310
|
+
// // The string key for this metadata type (for transports that require it)
|
311
|
+
// static absl::string_view key() { return "grpc-xyz"; }
|
312
|
+
// // Parse a memento from a slice
|
313
|
+
// // Takes ownership of value
|
314
|
+
// static MementoType ParseMemento(Slice value) { ... }
|
315
|
+
// // Convert a memento to a value
|
316
|
+
// static ValueType MementoToValue(MementoType memento) { ... }
|
317
|
+
// // Convert a value to its canonical text wire format (the format that
|
318
|
+
// // ParseMemento will accept!)
|
319
|
+
// static Slice Encode(const ValueType& value);
|
320
|
+
// // Convert a value to something that can be passed to StrCat and displayed
|
321
|
+
// // for debugging
|
322
|
+
// static SomeStrCatableType DisplayValue(MementoType value) { ... }
|
323
|
+
// };
|
324
|
+
//
|
325
|
+
// About parsing and mementos:
|
326
|
+
//
|
327
|
+
// Many gRPC transports exchange metadata as key/value strings, but also allow
|
328
|
+
// for a more efficient representation as a single integer. We can use this
|
329
|
+
// integer representation to avoid reparsing too, by storing the parsed value
|
330
|
+
// in the compression table. This is what mementos are used for.
|
331
|
+
//
|
332
|
+
// A trait offers the capability to turn a slice into a memento via
|
333
|
+
// ParseMemento. This is exposed to users of MetadataMap via the Parse() method,
|
334
|
+
// that returns a ParsedMetadata object. That ParsedMetadata object can in turn
|
335
|
+
// be used to set the same value on many different MetadataMaps without having
|
336
|
+
// to reparse.
|
337
|
+
//
|
338
|
+
// Implementation wise, ParsedMetadata is a type erased wrapper around
|
339
|
+
// MementoType. When we set a value on MetadataMap, we first turn that memento
|
340
|
+
// into a value. For most types, this is going to be a no-op, but for example
|
341
|
+
// for grpc-timeout we make the memento the timeout expressed on the wire, but
|
342
|
+
// we make the value the timestamp of when the timeout will expire (i.e. the
|
343
|
+
// deadline).
|
344
|
+
template <typename... Traits>
|
345
|
+
class MetadataMap {
|
346
|
+
public:
|
347
|
+
explicit MetadataMap(Arena* arena);
|
348
|
+
~MetadataMap();
|
349
|
+
|
350
|
+
MetadataMap(const MetadataMap&) = delete;
|
351
|
+
MetadataMap& operator=(const MetadataMap&) = delete;
|
352
|
+
MetadataMap(MetadataMap&&) noexcept;
|
353
|
+
MetadataMap& operator=(MetadataMap&&) noexcept;
|
354
|
+
|
355
|
+
// Encode this metadata map into some encoder.
|
356
|
+
// For each field that is set in the MetadataMap, call
|
357
|
+
// encoder->Encode.
|
358
|
+
//
|
359
|
+
// For fields for which we have traits, this will be a method with
|
360
|
+
// the signature:
|
361
|
+
// void Encode(TraitsType, typename TraitsType::ValueType value);
|
362
|
+
// For fields for which we do not have traits, this will be a method
|
363
|
+
// with the signature:
|
364
|
+
// void Encode(grpc_mdelem md);
|
365
|
+
// TODO(ctiller): It's expected that the latter Encode method will
|
366
|
+
// become Encode(Slice, Slice) by the end of the current metadata API
|
367
|
+
// transitions.
|
368
|
+
template <typename Encoder>
|
369
|
+
void Encode(Encoder* encoder) const {
|
370
|
+
for (auto* l = list_.head; l; l = l->next) {
|
371
|
+
encoder->Encode(l->md);
|
372
|
+
}
|
373
|
+
table_.ForEach(EncodeWrapper<Encoder>{encoder});
|
374
|
+
}
|
375
|
+
|
376
|
+
// Get the pointer to the value of some known metadata.
|
377
|
+
// Returns nullptr if the metadata is not present.
|
378
|
+
// Causes a compilation error if Which is not an element of Traits.
|
379
|
+
template <typename Which>
|
380
|
+
const typename Which::ValueType* get_pointer(Which) const {
|
381
|
+
if (auto* p = table_.template get<Value<Which>>()) return &p->value;
|
382
|
+
return nullptr;
|
383
|
+
}
|
384
|
+
|
385
|
+
// Get the pointer to the value of some known metadata.
|
386
|
+
// Returns nullptr if the metadata is not present.
|
387
|
+
// Causes a compilation error if Which is not an element of Traits.
|
388
|
+
template <typename Which>
|
389
|
+
typename Which::ValueType* get_pointer(Which) {
|
390
|
+
if (auto* p = table_.template get<Value<Which>>()) return &p->value;
|
391
|
+
return nullptr;
|
392
|
+
}
|
393
|
+
|
394
|
+
// Get the value of some known metadata.
|
395
|
+
// Returns nullopt if the metadata is not present.
|
396
|
+
// Causes a compilation error if Which is not an element of Traits.
|
397
|
+
template <typename Which>
|
398
|
+
absl::optional<typename Which::ValueType> get(Which) const {
|
399
|
+
if (auto* p = table_.template get<Value<Which>>()) return p->value;
|
400
|
+
return absl::nullopt;
|
401
|
+
}
|
402
|
+
|
403
|
+
// Set the value of some known metadata.
|
404
|
+
// Returns a pointer to the new value.
|
405
|
+
template <typename Which, typename... Args>
|
406
|
+
typename Which::ValueType* Set(Which, Args&&... args) {
|
407
|
+
return &table_.template set<Value<Which>>(std::forward<Args>(args)...)
|
408
|
+
->value;
|
409
|
+
}
|
410
|
+
|
411
|
+
// Remove a specific piece of known metadata.
|
412
|
+
template <typename Which>
|
413
|
+
void Remove(Which) {
|
414
|
+
table_.template clear<Value<Which>>();
|
415
|
+
}
|
416
|
+
|
417
|
+
// Extract a piece of known metadata.
|
418
|
+
// Returns nullopt if the metadata was not present, or the value if it was.
|
419
|
+
// The same as:
|
420
|
+
// auto value = m.get(T());
|
421
|
+
// m.Remove(T());
|
422
|
+
template <typename Which>
|
423
|
+
absl::optional<typename Which::ValueType> Take(Which which) {
|
424
|
+
if (auto* p = get_pointer(which)) {
|
425
|
+
absl::optional<typename Which::ValueType> value(std::move(*p));
|
426
|
+
Remove(which);
|
427
|
+
return value;
|
428
|
+
}
|
429
|
+
return {};
|
430
|
+
}
|
431
|
+
|
432
|
+
// Parse metadata from a key/value pair, and return an object representing
|
433
|
+
// that result.
|
434
|
+
// TODO(ctiller): key should probably be an absl::string_view.
|
435
|
+
// Once we don't care about interning anymore, make that change!
|
436
|
+
static ParsedMetadata<MetadataMap> Parse(absl::string_view key, Slice value,
|
437
|
+
uint32_t transport_size) {
|
438
|
+
metadata_detail::ParseHelper<MetadataMap> helper(value.TakeOwned(),
|
439
|
+
transport_size);
|
440
|
+
return metadata_detail::NameLookup<Traits...>::Lookup(key, &helper);
|
441
|
+
}
|
442
|
+
|
443
|
+
// Set a value from a parsed metadata object.
|
444
|
+
GRPC_MUST_USE_RESULT grpc_error_handle
|
445
|
+
Set(const ParsedMetadata<MetadataMap>& m) {
|
446
|
+
return m.SetOnContainer(this);
|
447
|
+
}
|
448
|
+
|
449
|
+
// Append a key/value pair - takes ownership of value
|
450
|
+
void Append(absl::string_view key, Slice value) {
|
451
|
+
metadata_detail::AppendHelper<MetadataMap> helper(this, value.TakeOwned());
|
452
|
+
metadata_detail::NameLookup<Traits...>::Lookup(key, &helper);
|
453
|
+
}
|
454
|
+
|
455
|
+
//
|
456
|
+
// All APIs below this point are subject to change.
|
457
|
+
//
|
458
|
+
|
459
|
+
template <typename F>
|
460
|
+
void ForEach(F f) const {
|
461
|
+
for (auto* l = list_.head; l; l = l->next) {
|
462
|
+
f(l->md);
|
463
|
+
}
|
464
|
+
}
|
465
|
+
|
466
|
+
template <typename F>
|
467
|
+
grpc_error_handle Filter(F f, const char* composite_error_string) {
|
468
|
+
grpc_linked_mdelem* l = list_.head;
|
469
|
+
grpc_error_handle error = GRPC_ERROR_NONE;
|
470
|
+
auto add_error = [&](grpc_error_handle new_error) {
|
471
|
+
if (new_error == GRPC_ERROR_NONE) return;
|
472
|
+
if (error == GRPC_ERROR_NONE) {
|
473
|
+
error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(composite_error_string);
|
474
|
+
}
|
475
|
+
error = grpc_error_add_child(error, new_error);
|
476
|
+
};
|
477
|
+
while (l) {
|
478
|
+
grpc_linked_mdelem* next = l->next;
|
479
|
+
grpc_filtered_mdelem new_mdelem = f(l->md);
|
480
|
+
add_error(new_mdelem.error);
|
481
|
+
if (GRPC_MDISNULL(new_mdelem.md)) {
|
482
|
+
Remove(l);
|
483
|
+
} else if (new_mdelem.md.payload != l->md.payload) {
|
484
|
+
add_error(Substitute(l, new_mdelem.md));
|
485
|
+
}
|
486
|
+
l = next;
|
487
|
+
}
|
488
|
+
return error;
|
489
|
+
}
|
490
|
+
|
491
|
+
GRPC_MUST_USE_RESULT grpc_error_handle Append(grpc_mdelem md) {
|
492
|
+
return AddTail(elem_storage_.EmplaceBack(), md);
|
493
|
+
}
|
494
|
+
|
495
|
+
GRPC_MUST_USE_RESULT grpc_error_handle ReplaceOrAppend(grpc_slice key,
|
496
|
+
grpc_slice value) {
|
497
|
+
if (ReplaceIfExists(key, value)) return GRPC_ERROR_NONE;
|
498
|
+
return Append(grpc_mdelem_from_slices(key, value));
|
499
|
+
}
|
500
|
+
|
501
|
+
// Set key to value if it exists and return true, otherwise return false.
|
502
|
+
// If this function returns true, it takes ownership of key and value.
|
503
|
+
// If this function returns false, it does not take ownership of key nor
|
504
|
+
// value.
|
505
|
+
bool ReplaceIfExists(grpc_slice key, grpc_slice value);
|
506
|
+
|
507
|
+
void Clear();
|
508
|
+
bool empty() const { return count() == 0; }
|
509
|
+
|
510
|
+
size_t count() const { return list_.count + table_.count(); }
|
511
|
+
size_t non_deadline_count() const { return list_.count; }
|
512
|
+
size_t default_count() const { return list_.default_count; }
|
513
|
+
|
514
|
+
size_t TransportSize() const;
|
515
|
+
|
516
|
+
void Remove(grpc_linked_mdelem* storage);
|
517
|
+
void Remove(grpc_metadata_batch_callouts_index idx);
|
518
|
+
|
519
|
+
absl::optional<grpc_slice> Remove(grpc_slice key);
|
520
|
+
|
521
|
+
grpc_error_handle Substitute(grpc_linked_mdelem* storage,
|
522
|
+
grpc_mdelem new_mdelem);
|
523
|
+
|
524
|
+
absl::optional<absl::string_view> GetValue(
|
525
|
+
absl::string_view target_key, std::string* concatenated_value) const;
|
526
|
+
|
527
|
+
grpc_error_handle LinkHead(grpc_linked_mdelem* storage) GRPC_MUST_USE_RESULT;
|
528
|
+
grpc_error_handle LinkHead(grpc_linked_mdelem* storage,
|
529
|
+
grpc_metadata_batch_callouts_index idx)
|
530
|
+
GRPC_MUST_USE_RESULT;
|
531
|
+
grpc_error_handle LinkTail(grpc_linked_mdelem* storage) GRPC_MUST_USE_RESULT;
|
532
|
+
grpc_error_handle LinkTail(grpc_linked_mdelem* storage,
|
533
|
+
grpc_metadata_batch_callouts_index idx)
|
534
|
+
GRPC_MUST_USE_RESULT;
|
535
|
+
|
536
|
+
grpc_error_handle AddHead(grpc_linked_mdelem* storage) GRPC_MUST_USE_RESULT;
|
537
|
+
grpc_error_handle AddHead(grpc_linked_mdelem* storage,
|
538
|
+
grpc_mdelem elem_to_add) GRPC_MUST_USE_RESULT;
|
539
|
+
grpc_error_handle AddTail(grpc_linked_mdelem* storage) GRPC_MUST_USE_RESULT;
|
540
|
+
grpc_error_handle AddTail(grpc_linked_mdelem* storage,
|
541
|
+
grpc_mdelem elem_to_add) GRPC_MUST_USE_RESULT;
|
542
|
+
|
543
|
+
void CopyFrom(MetadataMap* src, grpc_linked_mdelem* storage);
|
544
|
+
|
545
|
+
#ifndef NDEBUG
|
546
|
+
void AssertOk();
|
547
|
+
#else
|
548
|
+
void AssertOk() {}
|
549
|
+
#endif
|
550
|
+
|
551
|
+
// TODO(ctiller): the following explicit deadline handling methods are
|
552
|
+
// deprecated in terms of the traits based APIs.
|
553
|
+
grpc_millis deadline() const {
|
554
|
+
return get(GrpcTimeoutMetadata()).value_or(GRPC_MILLIS_INF_FUTURE);
|
555
|
+
};
|
556
|
+
|
557
|
+
const grpc_metadata_batch_callouts* legacy_index() const { return &idx_; }
|
558
|
+
|
559
|
+
private:
|
560
|
+
// Generate a strong type for metadata values per trait.
|
561
|
+
template <typename Which>
|
562
|
+
struct Value {
|
563
|
+
Value() = default;
|
564
|
+
explicit Value(const typename Which::ValueType& value) : value(value) {}
|
565
|
+
explicit Value(typename Which::ValueType&& value)
|
566
|
+
: value(std::forward<typename Which::ValueType>(value)) {}
|
567
|
+
Value(const Value&) = delete;
|
568
|
+
Value& operator=(const Value&) = delete;
|
569
|
+
Value(Value&&) noexcept = default;
|
570
|
+
Value& operator=(Value&& other) noexcept {
|
571
|
+
value = std::move(other.value);
|
572
|
+
return *this;
|
573
|
+
}
|
574
|
+
GPR_NO_UNIQUE_ADDRESS typename Which::ValueType value;
|
575
|
+
};
|
576
|
+
// Callable for the ForEach in Encode() -- for each value, call the
|
577
|
+
// appropriate encoder method.
|
578
|
+
template <typename Encoder>
|
579
|
+
struct EncodeWrapper {
|
580
|
+
Encoder* encoder;
|
581
|
+
template <typename Which>
|
582
|
+
void operator()(const Value<Which>& which) {
|
583
|
+
encoder->Encode(Which(), which.value);
|
584
|
+
}
|
585
|
+
};
|
586
|
+
|
587
|
+
void AssertValidCallouts();
|
588
|
+
grpc_error_handle LinkCallout(grpc_linked_mdelem* storage,
|
589
|
+
grpc_metadata_batch_callouts_index idx)
|
590
|
+
GRPC_MUST_USE_RESULT;
|
591
|
+
grpc_error_handle MaybeLinkCallout(grpc_linked_mdelem* storage)
|
592
|
+
GRPC_MUST_USE_RESULT;
|
593
|
+
void MaybeUnlinkCallout(grpc_linked_mdelem* storage);
|
594
|
+
|
595
|
+
static void assert_valid_list(grpc_mdelem_list* list) {
|
596
|
+
#ifndef NDEBUG
|
597
|
+
grpc_linked_mdelem* l;
|
598
|
+
|
599
|
+
GPR_ASSERT((list->head == nullptr) == (list->tail == nullptr));
|
600
|
+
if (!list->head) return;
|
601
|
+
GPR_ASSERT(list->head->prev == nullptr);
|
602
|
+
GPR_ASSERT(list->tail->next == nullptr);
|
603
|
+
GPR_ASSERT((list->head == list->tail) == (list->head->next == nullptr));
|
604
|
+
|
605
|
+
size_t verified_count = 0;
|
606
|
+
for (l = list->head; l; l = l->next) {
|
607
|
+
GPR_ASSERT(!GRPC_MDISNULL(l->md));
|
608
|
+
GPR_ASSERT((l->prev == nullptr) == (l == list->head));
|
609
|
+
GPR_ASSERT((l->next == nullptr) == (l == list->tail));
|
610
|
+
if (l->next) GPR_ASSERT(l->next->prev == l);
|
611
|
+
if (l->prev) GPR_ASSERT(l->prev->next == l);
|
612
|
+
verified_count++;
|
613
|
+
}
|
614
|
+
GPR_ASSERT(list->count == verified_count);
|
615
|
+
#else
|
616
|
+
// Avoid unused-parameter warning for debug-only parameter
|
617
|
+
(void)list;
|
618
|
+
#endif /* NDEBUG */
|
619
|
+
}
|
620
|
+
|
621
|
+
static grpc_error_handle GPR_ATTRIBUTE_NOINLINE
|
622
|
+
error_with_md(grpc_mdelem md) {
|
623
|
+
return grpc_attach_md_to_error(
|
624
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Unallowed duplicate metadata"),
|
625
|
+
md);
|
626
|
+
}
|
627
|
+
|
628
|
+
static void link_head(grpc_mdelem_list* list, grpc_linked_mdelem* storage) {
|
629
|
+
assert_valid_list(list);
|
630
|
+
GPR_DEBUG_ASSERT(!GRPC_MDISNULL(storage->md));
|
631
|
+
storage->prev = nullptr;
|
632
|
+
storage->next = list->head;
|
633
|
+
storage->reserved = nullptr;
|
634
|
+
if (list->head != nullptr) {
|
635
|
+
list->head->prev = storage;
|
636
|
+
} else {
|
637
|
+
list->tail = storage;
|
638
|
+
}
|
639
|
+
list->head = storage;
|
640
|
+
list->count++;
|
641
|
+
assert_valid_list(list);
|
642
|
+
}
|
643
|
+
|
644
|
+
static void link_tail(grpc_mdelem_list* list, grpc_linked_mdelem* storage) {
|
645
|
+
assert_valid_list(list);
|
646
|
+
GPR_DEBUG_ASSERT(!GRPC_MDISNULL(storage->md));
|
647
|
+
storage->prev = list->tail;
|
648
|
+
storage->next = nullptr;
|
649
|
+
storage->reserved = nullptr;
|
650
|
+
if (list->tail != nullptr) {
|
651
|
+
list->tail->next = storage;
|
652
|
+
} else {
|
653
|
+
list->head = storage;
|
654
|
+
}
|
655
|
+
list->tail = storage;
|
656
|
+
list->count++;
|
657
|
+
assert_valid_list(list);
|
658
|
+
}
|
659
|
+
|
660
|
+
static void unlink_storage(grpc_mdelem_list* list,
|
661
|
+
grpc_linked_mdelem* storage) {
|
662
|
+
assert_valid_list(list);
|
663
|
+
if (storage->prev != nullptr) {
|
664
|
+
storage->prev->next = storage->next;
|
665
|
+
} else {
|
666
|
+
list->head = storage->next;
|
667
|
+
}
|
668
|
+
if (storage->next != nullptr) {
|
669
|
+
storage->next->prev = storage->prev;
|
670
|
+
} else {
|
671
|
+
list->tail = storage->prev;
|
672
|
+
}
|
673
|
+
list->count--;
|
674
|
+
assert_valid_list(list);
|
675
|
+
}
|
676
|
+
|
677
|
+
// Table of known metadata types.
|
678
|
+
Table<Value<Traits>...> table_;
|
53
679
|
/** Metadata elements in this batch */
|
54
|
-
grpc_mdelem_list
|
55
|
-
grpc_metadata_batch_callouts
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
680
|
+
grpc_mdelem_list list_;
|
681
|
+
grpc_metadata_batch_callouts idx_;
|
682
|
+
// Backing store for added metadata.
|
683
|
+
ChunkedVector<grpc_linked_mdelem, 10> elem_storage_;
|
684
|
+
};
|
685
|
+
|
686
|
+
template <typename... Traits>
|
687
|
+
void MetadataMap<Traits...>::AssertValidCallouts() {
|
688
|
+
#ifndef NDEBUG
|
689
|
+
for (grpc_linked_mdelem* l = list_.head; l != nullptr; l = l->next) {
|
690
|
+
grpc_slice key_interned = grpc_slice_intern(GRPC_MDKEY(l->md));
|
691
|
+
grpc_metadata_batch_callouts_index callout_idx =
|
692
|
+
GRPC_BATCH_INDEX_OF(key_interned);
|
693
|
+
if (callout_idx != GRPC_BATCH_CALLOUTS_COUNT) {
|
694
|
+
GPR_ASSERT(idx_.array[callout_idx] == l);
|
695
|
+
}
|
696
|
+
grpc_slice_unref_internal(key_interned);
|
697
|
+
}
|
698
|
+
#endif
|
699
|
+
}
|
700
|
+
|
701
|
+
#ifndef NDEBUG
|
702
|
+
template <typename... Traits>
|
703
|
+
void MetadataMap<Traits...>::AssertOk() {
|
704
|
+
assert_valid_list(&list_);
|
705
|
+
}
|
706
|
+
#endif /* NDEBUG */
|
707
|
+
|
708
|
+
template <typename... Traits>
|
709
|
+
MetadataMap<Traits...>::MetadataMap(Arena* arena) : elem_storage_(arena) {
|
710
|
+
memset(&list_, 0, sizeof(list_));
|
711
|
+
memset(&idx_, 0, sizeof(idx_));
|
712
|
+
}
|
713
|
+
|
714
|
+
template <typename... Traits>
|
715
|
+
MetadataMap<Traits...>::MetadataMap(MetadataMap&& other) noexcept
|
716
|
+
: table_(std::move(other.table_)) {
|
717
|
+
list_ = other.list_;
|
718
|
+
idx_ = other.idx_;
|
719
|
+
memset(&other.list_, 0, sizeof(list_));
|
720
|
+
memset(&other.idx_, 0, sizeof(idx_));
|
721
|
+
}
|
722
|
+
|
723
|
+
template <typename... Traits>
|
724
|
+
MetadataMap<Traits...>& MetadataMap<Traits...>::operator=(
|
725
|
+
MetadataMap&& other) noexcept {
|
726
|
+
Clear();
|
727
|
+
table_ = std::move(other.table_);
|
728
|
+
list_ = other.list_;
|
729
|
+
idx_ = other.idx_;
|
730
|
+
memset(&other.list_, 0, sizeof(list_));
|
731
|
+
memset(&other.idx_, 0, sizeof(idx_));
|
732
|
+
return *this;
|
733
|
+
}
|
734
|
+
|
735
|
+
template <typename... Traits>
|
736
|
+
MetadataMap<Traits...>::~MetadataMap() {
|
737
|
+
AssertValidCallouts();
|
738
|
+
for (auto* l = list_.head; l; l = l->next) {
|
739
|
+
GRPC_MDELEM_UNREF(l->md);
|
740
|
+
}
|
741
|
+
}
|
742
|
+
|
743
|
+
template <typename... Traits>
|
744
|
+
absl::optional<grpc_slice> MetadataMap<Traits...>::Remove(grpc_slice key) {
|
745
|
+
for (auto* l = list_.head; l; l = l->next) {
|
746
|
+
if (grpc_slice_eq(GRPC_MDKEY(l->md), key)) {
|
747
|
+
auto out = grpc_slice_ref_internal(GRPC_MDVALUE(l->md));
|
748
|
+
Remove(l);
|
749
|
+
return out;
|
750
|
+
}
|
751
|
+
}
|
752
|
+
return {};
|
753
|
+
}
|
754
|
+
|
755
|
+
template <typename... Traits>
|
756
|
+
grpc_error_handle MetadataMap<Traits...>::LinkCallout(
|
757
|
+
grpc_linked_mdelem* storage, grpc_metadata_batch_callouts_index idx) {
|
758
|
+
AssertValidCallouts();
|
759
|
+
GPR_DEBUG_ASSERT(idx >= 0 && idx < GRPC_BATCH_CALLOUTS_COUNT);
|
760
|
+
if (GPR_LIKELY(idx_.array[idx] == nullptr)) {
|
761
|
+
++list_.default_count;
|
762
|
+
idx_.array[idx] = storage;
|
763
|
+
AssertValidCallouts();
|
764
|
+
return GRPC_ERROR_NONE;
|
765
|
+
}
|
766
|
+
AssertValidCallouts();
|
767
|
+
return error_with_md(storage->md);
|
768
|
+
}
|
769
|
+
|
770
|
+
template <typename... Traits>
|
771
|
+
grpc_error_handle MetadataMap<Traits...>::MaybeLinkCallout(
|
772
|
+
grpc_linked_mdelem* storage) {
|
773
|
+
grpc_metadata_batch_callouts_index idx =
|
774
|
+
GRPC_BATCH_INDEX_OF(GRPC_MDKEY(storage->md));
|
775
|
+
if (idx == GRPC_BATCH_CALLOUTS_COUNT) {
|
776
|
+
return GRPC_ERROR_NONE;
|
777
|
+
}
|
778
|
+
return LinkCallout(storage, idx);
|
779
|
+
}
|
780
|
+
|
781
|
+
template <typename... Traits>
|
782
|
+
void MetadataMap<Traits...>::MaybeUnlinkCallout(grpc_linked_mdelem* storage) {
|
783
|
+
grpc_metadata_batch_callouts_index idx =
|
784
|
+
GRPC_BATCH_INDEX_OF(GRPC_MDKEY(storage->md));
|
785
|
+
if (idx == GRPC_BATCH_CALLOUTS_COUNT) {
|
786
|
+
return;
|
787
|
+
}
|
788
|
+
--list_.default_count;
|
789
|
+
GPR_DEBUG_ASSERT(idx_.array[idx] != nullptr);
|
790
|
+
idx_.array[idx] = nullptr;
|
791
|
+
}
|
792
|
+
|
793
|
+
template <typename... Traits>
|
794
|
+
grpc_error_handle MetadataMap<Traits...>::AddHead(grpc_linked_mdelem* storage,
|
795
|
+
grpc_mdelem elem_to_add) {
|
796
|
+
GPR_DEBUG_ASSERT(!GRPC_MDISNULL(elem_to_add));
|
797
|
+
storage->md = elem_to_add;
|
798
|
+
return LinkHead(storage);
|
799
|
+
}
|
800
|
+
|
801
|
+
template <typename... Traits>
|
802
|
+
grpc_error_handle MetadataMap<Traits...>::LinkHead(
|
803
|
+
grpc_linked_mdelem* storage) {
|
804
|
+
AssertValidCallouts();
|
805
|
+
grpc_error_handle err = MaybeLinkCallout(storage);
|
806
|
+
if (err != GRPC_ERROR_NONE) {
|
807
|
+
AssertValidCallouts();
|
808
|
+
return err;
|
809
|
+
}
|
810
|
+
link_head(&list_, storage);
|
811
|
+
AssertValidCallouts();
|
812
|
+
return GRPC_ERROR_NONE;
|
813
|
+
}
|
814
|
+
|
815
|
+
// TODO(arjunroy): Need to revisit this and see what guarantees exist between
|
816
|
+
// C-core and the internal-metadata subsystem. E.g. can we ensure a particular
|
817
|
+
// metadata is never added twice, even in the presence of user supplied data?
|
818
|
+
template <typename... Traits>
|
819
|
+
grpc_error_handle MetadataMap<Traits...>::LinkHead(
|
820
|
+
grpc_linked_mdelem* storage, grpc_metadata_batch_callouts_index idx) {
|
821
|
+
GPR_DEBUG_ASSERT(GRPC_BATCH_INDEX_OF(GRPC_MDKEY(storage->md)) == idx);
|
822
|
+
AssertValidCallouts();
|
823
|
+
grpc_error_handle err = LinkCallout(storage, idx);
|
824
|
+
if (GPR_UNLIKELY(err != GRPC_ERROR_NONE)) {
|
825
|
+
AssertValidCallouts();
|
826
|
+
return err;
|
827
|
+
}
|
828
|
+
link_head(&list_, storage);
|
829
|
+
AssertValidCallouts();
|
830
|
+
return GRPC_ERROR_NONE;
|
831
|
+
}
|
832
|
+
|
833
|
+
template <typename... Traits>
|
834
|
+
grpc_error_handle MetadataMap<Traits...>::AddTail(grpc_linked_mdelem* storage,
|
835
|
+
grpc_mdelem elem_to_add) {
|
836
|
+
GPR_DEBUG_ASSERT(!GRPC_MDISNULL(elem_to_add));
|
837
|
+
storage->md = elem_to_add;
|
838
|
+
return LinkTail(storage);
|
839
|
+
}
|
840
|
+
|
841
|
+
template <typename... Traits>
|
842
|
+
grpc_error_handle MetadataMap<Traits...>::LinkTail(
|
843
|
+
grpc_linked_mdelem* storage) {
|
844
|
+
AssertValidCallouts();
|
845
|
+
grpc_error_handle err = MaybeLinkCallout(storage);
|
846
|
+
if (err != GRPC_ERROR_NONE) {
|
847
|
+
AssertValidCallouts();
|
848
|
+
return err;
|
849
|
+
}
|
850
|
+
link_tail(&list_, storage);
|
851
|
+
AssertValidCallouts();
|
852
|
+
return GRPC_ERROR_NONE;
|
853
|
+
}
|
854
|
+
|
855
|
+
template <typename... Traits>
|
856
|
+
grpc_error_handle MetadataMap<Traits...>::LinkTail(
|
857
|
+
grpc_linked_mdelem* storage, grpc_metadata_batch_callouts_index idx) {
|
858
|
+
GPR_DEBUG_ASSERT(GRPC_BATCH_INDEX_OF(GRPC_MDKEY(storage->md)) == idx);
|
859
|
+
AssertValidCallouts();
|
860
|
+
grpc_error_handle err = LinkCallout(storage, idx);
|
861
|
+
if (GPR_UNLIKELY(err != GRPC_ERROR_NONE)) {
|
862
|
+
AssertValidCallouts();
|
863
|
+
return err;
|
864
|
+
}
|
865
|
+
link_tail(&list_, storage);
|
866
|
+
AssertValidCallouts();
|
867
|
+
return GRPC_ERROR_NONE;
|
868
|
+
}
|
869
|
+
|
870
|
+
template <typename... Traits>
|
871
|
+
void MetadataMap<Traits...>::Remove(grpc_linked_mdelem* storage) {
|
872
|
+
AssertValidCallouts();
|
873
|
+
MaybeUnlinkCallout(storage);
|
874
|
+
unlink_storage(&list_, storage);
|
875
|
+
GRPC_MDELEM_UNREF(storage->md);
|
876
|
+
AssertValidCallouts();
|
877
|
+
}
|
878
|
+
|
879
|
+
template <typename... Traits>
|
880
|
+
void MetadataMap<Traits...>::Remove(grpc_metadata_batch_callouts_index idx) {
|
881
|
+
AssertValidCallouts();
|
882
|
+
if (idx_.array[idx] == nullptr) return;
|
883
|
+
--list_.default_count;
|
884
|
+
unlink_storage(&list_, idx_.array[idx]);
|
885
|
+
GRPC_MDELEM_UNREF(idx_.array[idx]->md);
|
886
|
+
idx_.array[idx] = nullptr;
|
887
|
+
AssertValidCallouts();
|
888
|
+
}
|
889
|
+
|
890
|
+
template <typename... Traits>
|
891
|
+
absl::optional<absl::string_view> MetadataMap<Traits...>::GetValue(
|
892
|
+
absl::string_view target_key, std::string* concatenated_value) const {
|
893
|
+
// Find all values for the specified key.
|
894
|
+
absl::InlinedVector<absl::string_view, 1> values;
|
895
|
+
for (grpc_linked_mdelem* md = list_.head; md != nullptr; md = md->next) {
|
896
|
+
absl::string_view key = StringViewFromSlice(GRPC_MDKEY(md->md));
|
897
|
+
absl::string_view value = StringViewFromSlice(GRPC_MDVALUE(md->md));
|
898
|
+
if (target_key == key) values.push_back(value);
|
899
|
+
}
|
900
|
+
// If none found, no match.
|
901
|
+
if (values.empty()) return absl::nullopt;
|
902
|
+
// If exactly one found, return it as-is.
|
903
|
+
if (values.size() == 1) return values.front();
|
904
|
+
// If more than one found, concatenate the values, using
|
905
|
+
// *concatenated_values as a temporary holding place for the
|
906
|
+
// concatenated string.
|
907
|
+
*concatenated_value = absl::StrJoin(values, ",");
|
908
|
+
return *concatenated_value;
|
909
|
+
}
|
910
|
+
|
911
|
+
template <typename... Traits>
|
912
|
+
grpc_error_handle MetadataMap<Traits...>::Substitute(
|
913
|
+
grpc_linked_mdelem* storage, grpc_mdelem new_mdelem) {
|
914
|
+
AssertValidCallouts();
|
915
|
+
grpc_error_handle error = GRPC_ERROR_NONE;
|
916
|
+
grpc_mdelem old_mdelem = storage->md;
|
917
|
+
if (!grpc_slice_eq(GRPC_MDKEY(new_mdelem), GRPC_MDKEY(old_mdelem))) {
|
918
|
+
MaybeUnlinkCallout(storage);
|
919
|
+
storage->md = new_mdelem;
|
920
|
+
error = MaybeLinkCallout(storage);
|
921
|
+
if (error != GRPC_ERROR_NONE) {
|
922
|
+
unlink_storage(&list_, storage);
|
923
|
+
GRPC_MDELEM_UNREF(storage->md);
|
924
|
+
}
|
925
|
+
} else {
|
926
|
+
storage->md = new_mdelem;
|
927
|
+
}
|
928
|
+
GRPC_MDELEM_UNREF(old_mdelem);
|
929
|
+
AssertValidCallouts();
|
930
|
+
return error;
|
931
|
+
}
|
932
|
+
|
933
|
+
template <typename... Traits>
|
934
|
+
void MetadataMap<Traits...>::Clear() {
|
935
|
+
// TODO(ctiller): implement this without deconstructing/reconstructing once
|
936
|
+
// linked_mdelem is no longer a thing.
|
937
|
+
auto* arena = elem_storage_.arena();
|
938
|
+
this->~MetadataMap();
|
939
|
+
new (this) MetadataMap(arena);
|
940
|
+
}
|
941
|
+
|
942
|
+
template <typename... Traits>
|
943
|
+
size_t MetadataMap<Traits...>::TransportSize() const {
|
944
|
+
size_t size = 0;
|
945
|
+
for (grpc_linked_mdelem* elem = list_.head; elem != nullptr;
|
946
|
+
elem = elem->next) {
|
947
|
+
size += GRPC_MDELEM_LENGTH(elem->md);
|
948
|
+
}
|
949
|
+
return size;
|
950
|
+
}
|
951
|
+
|
952
|
+
template <typename... Traits>
|
953
|
+
bool MetadataMap<Traits...>::ReplaceIfExists(grpc_slice key, grpc_slice value) {
|
954
|
+
AssertValidCallouts();
|
955
|
+
for (grpc_linked_mdelem* l = list_.head; l != nullptr; l = l->next) {
|
956
|
+
if (grpc_slice_eq(GRPC_MDKEY(l->md), key)) {
|
957
|
+
auto new_mdelem = grpc_mdelem_from_slices(key, value);
|
958
|
+
GRPC_MDELEM_UNREF(l->md);
|
959
|
+
l->md = new_mdelem;
|
960
|
+
AssertValidCallouts();
|
961
|
+
return true;
|
962
|
+
}
|
963
|
+
}
|
964
|
+
AssertValidCallouts();
|
965
|
+
return false;
|
966
|
+
}
|
967
|
+
|
968
|
+
} // namespace grpc_core
|
969
|
+
|
970
|
+
using grpc_metadata_batch = grpc_core::MetadataMap<
|
971
|
+
grpc_core::GrpcTimeoutMetadata, grpc_core::TeMetadata,
|
972
|
+
grpc_core::UserAgentMetadata, grpc_core::GrpcMessageMetadata,
|
973
|
+
grpc_core::HostMetadata, grpc_core::XEndpointLoadMetricsBinMetadata,
|
974
|
+
grpc_core::GrpcServerStatsBinMetadata, grpc_core::GrpcTraceBinMetadata,
|
975
|
+
grpc_core::GrpcTagsBinMetadata>;
|
976
|
+
|
977
|
+
inline void grpc_metadata_batch_clear(grpc_metadata_batch* batch) {
|
978
|
+
batch->Clear();
|
979
|
+
}
|
980
|
+
inline bool grpc_metadata_batch_is_empty(grpc_metadata_batch* batch) {
|
981
|
+
return batch->empty();
|
982
|
+
}
|
66
983
|
|
67
984
|
/* Returns the transport size of the batch. */
|
68
|
-
size_t grpc_metadata_batch_size(grpc_metadata_batch* batch)
|
985
|
+
inline size_t grpc_metadata_batch_size(grpc_metadata_batch* batch) {
|
986
|
+
return batch->TransportSize();
|
987
|
+
}
|
69
988
|
|
70
989
|
/** Remove \a storage from the batch, unreffing the mdelem contained */
|
71
|
-
void grpc_metadata_batch_remove(grpc_metadata_batch* batch,
|
72
|
-
|
73
|
-
|
74
|
-
|
990
|
+
inline void grpc_metadata_batch_remove(grpc_metadata_batch* batch,
|
991
|
+
grpc_linked_mdelem* storage) {
|
992
|
+
batch->Remove(storage);
|
993
|
+
}
|
994
|
+
inline void grpc_metadata_batch_remove(grpc_metadata_batch* batch,
|
995
|
+
grpc_metadata_batch_callouts_index idx) {
|
996
|
+
batch->Remove(idx);
|
997
|
+
}
|
75
998
|
|
76
999
|
/** Substitute a new mdelem for an old value */
|
77
|
-
grpc_error_handle grpc_metadata_batch_substitute(
|
78
|
-
|
79
|
-
|
1000
|
+
inline grpc_error_handle grpc_metadata_batch_substitute(
|
1001
|
+
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
1002
|
+
grpc_mdelem new_mdelem) {
|
1003
|
+
return batch->Substitute(storage, new_mdelem);
|
1004
|
+
}
|
80
1005
|
|
81
1006
|
void grpc_metadata_batch_set_value(grpc_linked_mdelem* storage,
|
82
1007
|
const grpc_slice& value);
|
@@ -88,33 +1013,43 @@ void grpc_metadata_batch_set_value(grpc_linked_mdelem* storage,
|
|
88
1013
|
If the key is present more than once in the batch, constructs a
|
89
1014
|
comma-concatenated string of all values in concatenated_value and returns a
|
90
1015
|
string_view of that string. */
|
91
|
-
absl::optional<absl::string_view> grpc_metadata_batch_get_value(
|
1016
|
+
inline absl::optional<absl::string_view> grpc_metadata_batch_get_value(
|
92
1017
|
grpc_metadata_batch* batch, absl::string_view target_key,
|
93
|
-
std::string* concatenated_value)
|
1018
|
+
std::string* concatenated_value) {
|
1019
|
+
return batch->GetValue(target_key, concatenated_value);
|
1020
|
+
}
|
94
1021
|
|
95
1022
|
/** Add \a storage to the beginning of \a batch. storage->md is
|
96
1023
|
assumed to be valid.
|
97
1024
|
\a storage is owned by the caller and must survive for the
|
98
1025
|
lifetime of batch. This usually means it should be around
|
99
1026
|
for the lifetime of the call. */
|
100
|
-
grpc_error_handle grpc_metadata_batch_link_head(
|
101
|
-
|
102
|
-
|
103
|
-
|
1027
|
+
inline GRPC_MUST_USE_RESULT grpc_error_handle grpc_metadata_batch_link_head(
|
1028
|
+
grpc_metadata_batch* batch, grpc_linked_mdelem* storage) {
|
1029
|
+
return batch->LinkHead(storage);
|
1030
|
+
}
|
1031
|
+
|
1032
|
+
inline GRPC_MUST_USE_RESULT grpc_error_handle grpc_metadata_batch_link_head(
|
104
1033
|
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
105
|
-
grpc_metadata_batch_callouts_index idx)
|
1034
|
+
grpc_metadata_batch_callouts_index idx) {
|
1035
|
+
return batch->LinkHead(storage, idx);
|
1036
|
+
}
|
106
1037
|
|
107
1038
|
/** Add \a storage to the end of \a batch. storage->md is
|
108
1039
|
assumed to be valid.
|
109
1040
|
\a storage is owned by the caller and must survive for the
|
110
1041
|
lifetime of batch. This usually means it should be around
|
111
1042
|
for the lifetime of the call. */
|
112
|
-
grpc_error_handle grpc_metadata_batch_link_tail(
|
113
|
-
|
114
|
-
|
115
|
-
|
1043
|
+
inline GRPC_MUST_USE_RESULT grpc_error_handle grpc_metadata_batch_link_tail(
|
1044
|
+
grpc_metadata_batch* batch, grpc_linked_mdelem* storage) {
|
1045
|
+
return batch->LinkTail(storage);
|
1046
|
+
}
|
1047
|
+
|
1048
|
+
inline GRPC_MUST_USE_RESULT grpc_error_handle grpc_metadata_batch_link_tail(
|
116
1049
|
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
117
|
-
grpc_metadata_batch_callouts_index idx)
|
1050
|
+
grpc_metadata_batch_callouts_index idx) {
|
1051
|
+
return batch->LinkTail(storage, idx);
|
1052
|
+
}
|
118
1053
|
|
119
1054
|
/** Add \a elem_to_add as the first element in \a batch, using
|
120
1055
|
\a storage as backing storage for the linked list element.
|
@@ -122,9 +1057,11 @@ grpc_error_handle grpc_metadata_batch_link_tail(
|
|
122
1057
|
lifetime of batch. This usually means it should be around
|
123
1058
|
for the lifetime of the call.
|
124
1059
|
Takes ownership of \a elem_to_add */
|
125
|
-
grpc_error_handle grpc_metadata_batch_add_head(
|
1060
|
+
inline grpc_error_handle grpc_metadata_batch_add_head(
|
126
1061
|
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
127
|
-
grpc_mdelem elem_to_add)
|
1062
|
+
grpc_mdelem elem_to_add) {
|
1063
|
+
return batch->AddHead(storage, elem_to_add);
|
1064
|
+
}
|
128
1065
|
|
129
1066
|
// TODO(arjunroy, roth): Remove redundant methods.
|
130
1067
|
// add/link_head/tail are almost identical.
|
@@ -148,9 +1085,11 @@ inline grpc_error_handle GRPC_MUST_USE_RESULT grpc_metadata_batch_add_head(
|
|
148
1085
|
lifetime of batch. This usually means it should be around
|
149
1086
|
for the lifetime of the call.
|
150
1087
|
Takes ownership of \a elem_to_add */
|
151
|
-
grpc_error_handle grpc_metadata_batch_add_tail(
|
1088
|
+
inline GRPC_MUST_USE_RESULT grpc_error_handle grpc_metadata_batch_add_tail(
|
152
1089
|
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
153
|
-
grpc_mdelem elem_to_add)
|
1090
|
+
grpc_mdelem elem_to_add) {
|
1091
|
+
return batch->AddTail(storage, elem_to_add);
|
1092
|
+
}
|
154
1093
|
|
155
1094
|
inline grpc_error_handle GRPC_MUST_USE_RESULT grpc_metadata_batch_add_tail(
|
156
1095
|
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
@@ -166,48 +1105,26 @@ inline grpc_error_handle GRPC_MUST_USE_RESULT grpc_metadata_batch_add_tail(
|
|
166
1105
|
return grpc_metadata_batch_add_tail(batch, storage, idx);
|
167
1106
|
}
|
168
1107
|
|
169
|
-
grpc_error_handle grpc_attach_md_to_error(grpc_error_handle src,
|
170
|
-
grpc_mdelem md);
|
171
|
-
|
172
|
-
struct grpc_filtered_mdelem {
|
173
|
-
grpc_error_handle error;
|
174
|
-
grpc_mdelem md;
|
175
|
-
};
|
176
|
-
#define GRPC_FILTERED_ERROR(error) \
|
177
|
-
{ (error), GRPC_MDNULL }
|
178
|
-
#define GRPC_FILTERED_MDELEM(md) \
|
179
|
-
{ GRPC_ERROR_NONE, (md) }
|
180
|
-
#define GRPC_FILTERED_REMOVE() \
|
181
|
-
{ GRPC_ERROR_NONE, GRPC_MDNULL }
|
182
|
-
|
183
1108
|
typedef grpc_filtered_mdelem (*grpc_metadata_batch_filter_func)(
|
184
1109
|
void* user_data, grpc_mdelem elem);
|
185
|
-
grpc_error_handle grpc_metadata_batch_filter(
|
1110
|
+
inline GRPC_MUST_USE_RESULT grpc_error_handle grpc_metadata_batch_filter(
|
186
1111
|
grpc_metadata_batch* batch, grpc_metadata_batch_filter_func func,
|
187
|
-
void* user_data, const char* composite_error_string)
|
1112
|
+
void* user_data, const char* composite_error_string) {
|
1113
|
+
return batch->Filter([=](grpc_mdelem elem) { return func(user_data, elem); },
|
1114
|
+
composite_error_string);
|
1115
|
+
}
|
188
1116
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
#define grpc_metadata_batch_assert_ok(batch) \
|
193
|
-
do { \
|
194
|
-
} while (0)
|
195
|
-
#endif
|
1117
|
+
inline void grpc_metadata_batch_assert_ok(grpc_metadata_batch* batch) {
|
1118
|
+
batch->AssertOk();
|
1119
|
+
}
|
196
1120
|
|
197
|
-
/// Copies \a src to \a dst.
|
198
|
-
/// \a grpc_linked_mdelem structs of at least the same size as \a src.
|
1121
|
+
/// Copies \a src to \a dst.
|
199
1122
|
///
|
200
1123
|
/// For each mdelem in \a src, if the mdelem is of storage types
|
201
1124
|
/// GRPC_MDELEM_STORAGE_INTERNED or GRPC_MDELEM_STORAGE_ALLOCATED,
|
202
1125
|
/// refs the original mdelem for the copy. Otherwise, makes a new
|
203
1126
|
/// mdelem that will hold its own refs to the key and value slices.
|
204
|
-
|
205
|
-
/// Currently used only in the retry code.
|
206
|
-
void grpc_metadata_batch_copy(grpc_metadata_batch* src,
|
207
|
-
grpc_metadata_batch* dst,
|
208
|
-
grpc_linked_mdelem* storage);
|
209
|
-
|
210
|
-
void grpc_metadata_batch_move(grpc_metadata_batch* src,
|
1127
|
+
void grpc_metadata_batch_copy(const grpc_metadata_batch* src,
|
211
1128
|
grpc_metadata_batch* dst);
|
212
1129
|
|
213
1130
|
#endif /* GRPC_CORE_LIB_TRANSPORT_METADATA_BATCH_H */
|