grpc 1.43.1 → 1.48.0
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 +488 -338
- data/include/grpc/compression.h +1 -1
- data/include/grpc/event_engine/event_engine.h +64 -20
- data/include/grpc/event_engine/memory_allocator.h +0 -15
- data/include/grpc/event_engine/port.h +1 -1
- data/include/grpc/event_engine/slice.h +286 -0
- data/include/grpc/event_engine/slice_buffer.h +118 -0
- data/include/grpc/grpc.h +43 -17
- data/include/grpc/grpc_posix.h +20 -19
- data/include/grpc/grpc_security.h +47 -50
- data/include/grpc/impl/codegen/compression_types.h +2 -3
- data/include/grpc/impl/codegen/connectivity_state.h +2 -1
- data/include/grpc/impl/codegen/gpr_types.h +2 -1
- data/include/grpc/impl/codegen/grpc_types.h +26 -22
- data/include/grpc/impl/codegen/port_platform.h +107 -40
- data/include/grpc/impl/codegen/slice.h +5 -2
- data/include/grpc/slice.h +0 -11
- data/src/core/ext/filters/census/grpc_context.cc +3 -0
- data/src/core/ext/filters/channel_idle/channel_idle_filter.cc +309 -0
- data/src/core/ext/filters/channel_idle/channel_idle_filter.h +141 -0
- data/src/core/ext/filters/{client_idle → channel_idle}/idle_filter_state.cc +1 -1
- data/src/core/ext/filters/{client_idle → channel_idle}/idle_filter_state.h +7 -5
- data/src/core/ext/filters/client_channel/backend_metric.cc +20 -15
- data/src/core/ext/filters/client_channel/backend_metric.h +19 -9
- data/src/core/ext/filters/client_channel/backup_poller.cc +20 -14
- data/src/core/ext/filters/client_channel/backup_poller.h +2 -4
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +48 -26
- data/src/core/ext/filters/client_channel/client_channel.cc +413 -301
- data/src/core/ext/filters/client_channel/client_channel.h +83 -45
- data/src/core/ext/filters/client_channel/client_channel_channelz.cc +3 -5
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +12 -2
- data/src/core/ext/filters/client_channel/client_channel_factory.cc +5 -0
- data/src/core/ext/filters/client_channel/client_channel_factory.h +8 -0
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +8 -23
- data/src/core/ext/filters/client_channel/config_selector.cc +1 -0
- data/src/core/ext/filters/client_channel/config_selector.h +12 -10
- data/src/core/ext/filters/client_channel/connector.h +10 -4
- data/src/core/ext/filters/client_channel/dynamic_filters.cc +20 -8
- data/src/core/ext/filters/client_channel/dynamic_filters.h +14 -4
- data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +4 -22
- data/src/core/ext/filters/client_channel/global_subchannel_pool.h +6 -15
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +140 -583
- data/src/core/ext/filters/client_channel/health/health_check_client.h +26 -160
- data/src/core/ext/filters/client_channel/http_proxy.cc +98 -112
- data/src/core/ext/filters/client_channel/http_proxy.h +20 -0
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.cc +10 -5
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +7 -5
- data/src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h +49 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +12 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +5 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +15 -12
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h +1 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +227 -137
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +0 -7
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc +4 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +6 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +25 -16
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +10 -7
- data/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc +407 -0
- data/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h +57 -0
- data/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc +1036 -0
- data/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h +54 -0
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +196 -176
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +364 -224
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +381 -233
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h +6 -1
- data/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +253 -175
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +261 -234
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +133 -120
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +155 -105
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +172 -84
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.h +7 -1
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +99 -46
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +55 -30
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +355 -394
- data/src/core/ext/filters/client_channel/lb_policy.cc +19 -16
- data/src/core/ext/filters/client_channel/lb_policy.h +37 -34
- data/src/core/ext/filters/client_channel/lb_policy_factory.h +2 -0
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +11 -6
- data/src/core/ext/filters/client_channel/lb_policy_registry.h +6 -1
- data/src/core/ext/filters/client_channel/local_subchannel_pool.cc +4 -0
- data/src/core/ext/filters/client_channel/local_subchannel_pool.h +1 -0
- data/src/core/ext/filters/client_channel/proxy_mapper.h +1 -1
- data/src/core/ext/filters/client_channel/proxy_mapper_registry.cc +1 -0
- data/src/core/ext/filters/client_channel/proxy_mapper_registry.h +5 -0
- data/src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc +36 -22
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +383 -318
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +30 -13
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +29 -23
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +29 -44
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +172 -240
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +38 -36
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +3 -2
- data/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc +2 -0
- data/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h +2 -1
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +123 -254
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +37 -37
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +7 -3
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +144 -77
- data/src/core/ext/filters/client_channel/resolver/polling_resolver.cc +213 -0
- data/src/core/ext/filters/client_channel/resolver/polling_resolver.h +113 -0
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +56 -50
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +368 -167
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h +3 -1
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +19 -28
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +22 -10
- data/src/core/ext/filters/client_channel/retry_filter.cc +322 -201
- data/src/core/ext/filters/client_channel/retry_filter.h +1 -0
- data/src/core/ext/filters/client_channel/retry_service_config.cc +27 -30
- data/src/core/ext/filters/client_channel/retry_service_config.h +28 -13
- data/src/core/ext/filters/client_channel/retry_throttle.cc +10 -31
- data/src/core/ext/filters/client_channel/retry_throttle.h +18 -6
- data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +30 -11
- data/src/core/ext/filters/client_channel/subchannel.cc +227 -235
- data/src/core/ext/filters/client_channel/subchannel.h +84 -40
- data/src/core/ext/filters/client_channel/subchannel_interface.h +51 -41
- data/src/core/ext/filters/client_channel/subchannel_interface_internal.h +38 -0
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.cc +12 -2
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +6 -3
- data/src/core/ext/filters/client_channel/subchannel_stream_client.cc +473 -0
- data/src/core/ext/filters/client_channel/subchannel_stream_client.h +222 -0
- data/src/core/ext/filters/deadline/deadline_filter.cc +31 -21
- data/src/core/ext/filters/deadline/deadline_filter.h +11 -3
- data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +173 -402
- data/src/core/ext/filters/fault_injection/fault_injection_filter.h +31 -3
- data/src/core/ext/filters/fault_injection/service_config_parser.cc +18 -17
- data/src/core/ext/filters/fault_injection/service_config_parser.h +27 -7
- data/src/core/ext/filters/http/client/http_client_filter.cc +108 -535
- data/src/core/ext/filters/http/client/http_client_filter.h +35 -5
- data/src/core/ext/filters/http/client_authority_filter.cc +44 -112
- data/src/core/ext/filters/http/client_authority_filter.h +28 -6
- data/src/core/ext/filters/http/http_filters_plugin.cc +33 -24
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +101 -320
- data/src/core/ext/filters/http/message_compress/message_compress_filter.h +1 -2
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +59 -133
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.h +1 -0
- data/src/core/ext/filters/http/server/http_server_filter.cc +100 -458
- data/src/core/ext/filters/http/server/http_server_filter.h +37 -3
- data/src/core/ext/filters/message_size/message_size_filter.cc +66 -70
- data/src/core/ext/filters/message_size/message_size_filter.h +25 -5
- data/src/core/ext/filters/rbac/rbac_filter.cc +174 -0
- data/src/core/ext/filters/rbac/rbac_filter.h +84 -0
- data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +617 -0
- data/src/core/ext/filters/rbac/rbac_service_config_parser.h +87 -0
- data/src/core/ext/filters/server_config_selector/server_config_selector.cc +3 -8
- data/src/core/ext/filters/server_config_selector/server_config_selector.h +14 -4
- data/src/core/ext/filters/server_config_selector/server_config_selector_filter.cc +97 -199
- data/src/core/ext/filters/server_config_selector/server_config_selector_filter.h +1 -0
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +278 -77
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +9 -7
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +288 -56
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +2 -0
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +3 -3
- 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 +512 -710
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +14 -3
- data/src/core/ext/transport/chttp2/transport/context_list.cc +4 -0
- data/src/core/ext/transport/chttp2/transport/context_list.h +4 -1
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +147 -263
- data/src/core/ext/transport/chttp2/transport/flow_control.h +180 -289
- data/src/core/ext/transport/chttp2/transport/frame.h +0 -4
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +59 -212
- data/src/core/ext/transport/chttp2/transport/frame_data.h +13 -36
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +3 -0
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +3 -1
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +9 -4
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +3 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +11 -2
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +3 -0
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +12 -42
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +4 -0
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +10 -12
- data/src/core/ext/transport/chttp2/transport/frame_window_update.h +3 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +349 -290
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +85 -162
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc +4 -1
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.h +5 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +61 -91
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +8 -2
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +146 -37
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +41 -46
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +0 -1
- data/src/core/ext/transport/chttp2/transport/internal.h +41 -153
- data/src/core/ext/transport/chttp2/transport/parsing.cc +87 -51
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +11 -11
- data/src/core/ext/transport/chttp2/transport/stream_map.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/stream_map.h +1 -0
- data/src/core/ext/transport/chttp2/transport/varint.h +2 -0
- data/src/core/ext/transport/chttp2/transport/writing.cc +135 -157
- data/src/core/ext/transport/inproc/inproc_plugin.cc +0 -5
- data/src/core/ext/transport/inproc/inproc_transport.cc +117 -158
- data/src/core/ext/transport/inproc/inproc_transport.h +3 -4
- data/src/core/ext/upb-generated/envoy/admin/v3/certs.upb.c +117 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/certs.upb.h +482 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.c +121 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.h +553 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c +182 -176
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h +1248 -685
- data/src/core/ext/upb-generated/envoy/admin/v3/init_dump.upb.c +56 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/init_dump.upb.h +151 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/listeners.upb.c +62 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/listeners.upb.h +160 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/memory.upb.c +46 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/memory.upb.h +124 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/metrics.upb.c +43 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/metrics.upb.h +102 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/mutex_stats.upb.c +43 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/mutex_stats.upb.h +97 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/server_info.upb.c +106 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/server_info.upb.h +605 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/tap.upb.c +48 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/tap.upb.h +103 -0
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c +14 -12
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +49 -16
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +13 -11
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +49 -23
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +98 -96
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +669 -386
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c +185 -173
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h +1269 -664
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c +34 -26
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h +200 -91
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +252 -238
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +1670 -827
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c +10 -8
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h +42 -24
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c +49 -27
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h +272 -99
- data/src/core/ext/upb-generated/envoy/config/common/matcher/v3/matcher.upb.c +299 -0
- data/src/core/ext/upb-generated/envoy/config/common/matcher/v3/matcher.upb.h +1381 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +54 -50
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +354 -190
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c +11 -8
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h +45 -25
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +157 -154
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +1068 -582
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +87 -42
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +525 -167
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c +9 -7
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h +38 -24
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c +11 -29
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h +41 -101
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_method_list.upb.c +58 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_method_list.upb.h +151 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +108 -104
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +768 -410
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +115 -84
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +736 -349
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c +11 -9
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h +57 -31
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +162 -108
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +992 -397
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c +8 -6
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h +28 -17
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.c +15 -13
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.h +83 -49
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c +13 -11
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +75 -34
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +15 -13
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h +93 -49
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.c +11 -9
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.h +46 -26
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c +34 -32
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h +194 -109
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +51 -48
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +349 -190
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c +49 -47
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h +357 -188
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c +9 -7
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h +34 -21
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +72 -61
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +504 -260
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +77 -69
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +560 -301
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.c +19 -15
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.h +104 -49
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +12 -10
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +66 -41
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/metrics_service.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/metrics_service.upb.h +136 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c +58 -55
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h +413 -235
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c +62 -60
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h +406 -237
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +82 -76
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +562 -294
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +37 -31
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +271 -142
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +503 -475
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +3642 -1901
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +25 -19
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +148 -72
- data/src/core/ext/upb-generated/envoy/config/tap/v3/common.upb.c +222 -0
- data/src/core/ext/upb-generated/envoy/config/tap/v3/common.upb.h +1052 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.c +44 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.h +88 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/dynamic_ot.upb.c +49 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/dynamic_ot.upb.h +103 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c +15 -13
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h +77 -46
- data/src/core/ext/upb-generated/envoy/config/trace/v3/lightstep.upb.c +52 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/lightstep.upb.h +134 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opencensus.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opencensus.upb.h +250 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/service.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/service.upb.h +94 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/skywalking.upb.c +69 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/skywalking.upb.h +213 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/trace.upb.c +32 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/trace.upb.h +42 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/xray.upb.c +71 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/xray.upb.h +218 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.c +54 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.h +146 -0
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c +8 -6
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h +34 -24
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c +29 -27
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h +188 -113
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c +36 -34
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h +260 -132
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/rbac/v3/rbac.upb.c +64 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/rbac/v3/rbac.upb.h +183 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c +16 -14
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h +86 -43
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +229 -198
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +1553 -734
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.c +52 -0
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.h +164 -0
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.upb.c +46 -0
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.upb.h +94 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c +3 -1
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +2 -1
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +87 -58
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +554 -235
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +26 -24
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +156 -87
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +98 -71
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +622 -263
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.c +62 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.h +160 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c +6 -4
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h +22 -16
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +67 -65
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +474 -256
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c +18 -16
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h +107 -62
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c +51 -49
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h +347 -186
- data/src/core/ext/upb-generated/envoy/type/http/v3/cookie.upb.c +48 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/cookie.upb.h +112 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.c +20 -18
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.h +124 -82
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/http_inputs.upb.c +74 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/http_inputs.upb.h +214 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +16 -14
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +99 -57
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c +10 -8
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h +50 -31
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c +10 -8
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h +48 -27
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c +9 -7
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h +38 -24
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +21 -19
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +117 -69
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +19 -17
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +123 -65
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c +14 -12
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h +85 -53
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c +23 -21
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h +150 -83
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c +32 -30
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h +230 -146
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c +36 -34
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h +235 -131
- data/src/core/ext/upb-generated/envoy/type/v3/hash_policy.upb.c +66 -0
- data/src/core/ext/upb-generated/envoy/type/v3/hash_policy.upb.h +201 -0
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.c +3 -1
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.h +2 -1
- data/src/core/ext/upb-generated/envoy/type/v3/http_status.upb.c +42 -0
- data/src/core/ext/upb-generated/envoy/type/v3/http_status.upb.h +139 -0
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c +13 -11
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h +62 -36
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.c +19 -17
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.h +98 -52
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_unit.upb.c +26 -0
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_unit.upb.h +41 -0
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c +10 -8
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h +40 -19
- data/src/core/ext/upb-generated/envoy/type/v3/token_bucket.upb.c +51 -0
- data/src/core/ext/upb-generated/envoy/type/v3/token_bucket.upb.h +127 -0
- data/src/core/ext/upb-generated/google/api/annotations.upb.c +8 -6
- data/src/core/ext/upb-generated/google/api/annotations.upb.h +22 -6
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c +109 -103
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h +720 -382
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +120 -112
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +795 -402
- data/src/core/ext/upb-generated/google/api/http.upb.c +29 -27
- data/src/core/ext/upb-generated/google/api/http.upb.h +216 -115
- data/src/core/ext/upb-generated/google/api/httpbody.upb.c +46 -0
- data/src/core/ext/upb-generated/google/api/httpbody.upb.h +111 -0
- data/src/core/ext/upb-generated/google/protobuf/any.upb.c +9 -7
- data/src/core/ext/upb-generated/google/protobuf/any.upb.h +38 -22
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +291 -237
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +2076 -1030
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +9 -7
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +36 -20
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +6 -4
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +22 -16
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +31 -29
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +177 -93
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +9 -7
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +36 -20
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +40 -38
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +240 -149
- data/src/core/ext/upb-generated/google/rpc/status.upb.c +11 -9
- data/src/core/ext/upb-generated/google/rpc/status.upb.h +52 -30
- data/src/core/ext/upb-generated/opencensus/proto/trace/v1/trace_config.upb.c +84 -0
- data/src/core/ext/upb-generated/opencensus/proto/trace/v1/trace_config.upb.h +319 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +21 -19
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +103 -48
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +102 -96
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +685 -359
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +16 -13
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +76 -41
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +12 -10
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +56 -35
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +57 -55
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +383 -219
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c +22 -20
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h +115 -63
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c +175 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h +764 -0
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +36 -34
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +189 -78
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.c +14 -12
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.h +53 -22
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c +7 -5
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +15 -6
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.c +14 -12
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.h +55 -24
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c +13 -11
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h +49 -23
- data/src/core/ext/upb-generated/validate/validate.upb.c +339 -312
- data/src/core/ext/upb-generated/validate/validate.upb.h +2726 -1180
- data/src/core/ext/upb-generated/xds/annotations/v3/migrate.upb.c +110 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/migrate.upb.h +278 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/security.upb.c +55 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/security.upb.h +108 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/sensitive.upb.c +38 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/sensitive.upb.h +46 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.c +34 -32
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.h +171 -80
- data/src/core/ext/upb-generated/xds/annotations/v3/versioning.upb.c +53 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/versioning.upb.h +99 -0
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.c +8 -6
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.h +30 -19
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c +18 -16
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h +98 -55
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c +14 -12
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h +53 -30
- data/src/core/ext/upb-generated/xds/core/v3/extension.upb.c +46 -0
- data/src/core/ext/upb-generated/xds/core/v3/extension.upb.h +103 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.c +12 -10
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.h +55 -30
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c +20 -18
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h +130 -70
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c +12 -10
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h +58 -30
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.c +23 -21
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.h +101 -46
- data/src/core/ext/upb-generated/xds/service/orca/v3/orca.upb.c +47 -0
- data/src/core/ext/upb-generated/xds/service/orca/v3/orca.upb.h +109 -0
- data/src/core/ext/upb-generated/xds/type/matcher/v3/matcher.upb.c +207 -0
- data/src/core/ext/upb-generated/xds/type/matcher/v3/matcher.upb.h +878 -0
- data/src/core/ext/upb-generated/xds/type/matcher/v3/regex.upb.c +52 -0
- data/src/core/ext/upb-generated/xds/type/matcher/v3/regex.upb.h +143 -0
- data/src/core/ext/upb-generated/xds/type/matcher/v3/string.upb.c +65 -0
- data/src/core/ext/upb-generated/xds/type/matcher/v3/string.upb.h +218 -0
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.c +10 -8
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.h +42 -24
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/certs.upbdefs.c +84 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/certs.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/clusters.upbdefs.c +127 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/clusters.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c +14 -12
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.h +67 -67
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/init_dump.upbdefs.c +43 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/init_dump.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/listeners.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/listeners.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/memory.upbdefs.c +49 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/memory.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/metrics.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/metrics.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/mutex_stats.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/mutex_stats.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/server_info.upbdefs.c +142 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/server_info.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/tap.upbdefs.c +51 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/tap.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c +8 -6
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h +1 -1
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c +8 -6
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c +20 -17
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h +46 -46
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +248 -240
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h +55 -55
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +58 -51
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h +10 -10
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +385 -371
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +76 -76
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c +14 -11
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c +23 -16
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/config/common/matcher/v3/matcher.upbdefs.c +206 -0
- data/src/core/ext/upbdefs-generated/envoy/config/common/matcher/v3/matcher.upbdefs.h +105 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c +15 -13
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h +22 -22
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c +15 -12
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +85 -80
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h +73 -73
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c +138 -101
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h +26 -16
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c +14 -12
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c +22 -34
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h +4 -9
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_method_list.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_method_list.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c +21 -18
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h +43 -43
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c +177 -166
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h +30 -25
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c +14 -12
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +250 -221
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h +53 -43
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c +12 -9
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.c +14 -11
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.h +7 -7
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c +14 -11
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c +18 -15
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.c +13 -11
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c +18 -15
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h +13 -13
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +19 -16
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h +19 -19
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c +18 -15
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h +16 -16
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c +14 -11
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +52 -45
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h +19 -19
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c +153 -147
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h +22 -22
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.c +19 -16
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c +15 -12
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h +7 -7
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/metrics_service.upbdefs.c +69 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/metrics_service.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c +17 -14
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.h +25 -25
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c +17 -14
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h +28 -28
- data/src/core/ext/upbdefs-generated/envoy/config/rbac/v3/rbac.upbdefs.c +190 -0
- data/src/core/ext/upbdefs-generated/envoy/config/rbac/v3/rbac.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +36 -27
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +10 -10
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +826 -803
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +160 -160
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c +52 -37
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h +10 -10
- data/src/core/ext/upbdefs-generated/envoy/config/tap/v3/common.upbdefs.c +188 -0
- data/src/core/ext/upbdefs-generated/envoy/config/tap/v3/common.upbdefs.h +85 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/datadog.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/datadog.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/dynamic_ot.upbdefs.c +57 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/dynamic_ot.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c +15 -12
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h +7 -7
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/lightstep.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/lightstep.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/opencensus.upbdefs.c +99 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/opencensus.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/service.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/service.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/skywalking.upbdefs.c +71 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/skywalking.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/trace.upbdefs.c +57 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/trace.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/xray.upbdefs.c +75 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/xray.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/zipkin.upbdefs.c +77 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/zipkin.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c +15 -11
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c +17 -14
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.h +16 -16
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c +18 -15
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.h +10 -10
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/rbac/v3/rbac.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/rbac/v3/rbac.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c +17 -13
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +197 -172
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +63 -58
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c +15 -11
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h +1 -1
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +169 -140
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h +24 -19
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c +19 -16
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h +10 -10
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +217 -199
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h +24 -19
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.c +58 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c +14 -11
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c +17 -14
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h +22 -22
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c +16 -13
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h +7 -7
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c +20 -17
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h +16 -16
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/cookie.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/cookie.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.c +13 -10
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.h +13 -13
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/http_inputs.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/http_inputs.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c +15 -12
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h +7 -7
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c +15 -12
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c +15 -12
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c +15 -12
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +15 -12
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h +10 -10
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c +15 -12
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h +7 -7
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c +14 -12
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.h +7 -7
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c +16 -13
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h +10 -10
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c +13 -10
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h +22 -22
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c +14 -11
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h +16 -16
- data/src/core/ext/upbdefs-generated/envoy/type/v3/hash_policy.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/hash_policy.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c +10 -8
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.h +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http_status.upbdefs.c +94 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http_status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c +12 -10
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h +7 -7
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c +11 -8
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h +10 -10
- data/src/core/ext/upbdefs-generated/envoy/type/v3/ratelimit_unit.upbdefs.c +38 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/ratelimit_unit.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c +11 -9
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/envoy/type/v3/token_bucket.upbdefs.c +57 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/token_bucket.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c +5 -5
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h +1 -1
- data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/checked.upbdefs.c +154 -0
- data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/checked.upbdefs.h +95 -0
- data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/syntax.upbdefs.c +153 -0
- data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/syntax.upbdefs.h +100 -0
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c +3 -3
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h +10 -10
- data/src/core/ext/upbdefs-generated/google/api/httpbody.upbdefs.c +39 -0
- data/src/core/ext/upbdefs-generated/google/api/httpbody.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c +3 -3
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c +3 -3
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h +82 -82
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c +3 -3
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c +3 -3
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c +3 -3
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h +13 -13
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c +3 -3
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c +3 -3
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h +28 -28
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c +4 -4
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c +67 -0
- data/src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c +99 -0
- data/src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h +75 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c +4 -4
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h +10 -10
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c +5 -5
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c +4 -4
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h +1 -1
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c +4 -4
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c +4 -4
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c +6 -6
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h +70 -70
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/migrate.upbdefs.c +63 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/migrate.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/security.upbdefs.c +47 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/security.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/sensitive.upbdefs.c +35 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/sensitive.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.c +4 -4
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.h +13 -13
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/versioning.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/versioning.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c +5 -5
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c +7 -7
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.h +7 -7
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c +4 -4
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.h +7 -7
- data/src/core/ext/upbdefs-generated/xds/core/v3/extension.upbdefs.c +41 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/extension.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c +6 -6
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c +6 -6
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.h +7 -7
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c +6 -6
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.h +4 -4
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/matcher.upbdefs.c +126 -0
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/matcher.upbdefs.h +80 -0
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/regex.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/regex.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/string.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/string.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.c +5 -5
- data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.h +4 -4
- data/src/core/ext/xds/certificate_provider_factory.h +6 -1
- data/src/core/ext/xds/certificate_provider_registry.cc +8 -8
- data/src/core/ext/xds/certificate_provider_registry.h +3 -1
- data/src/core/ext/xds/certificate_provider_store.cc +12 -0
- data/src/core/ext/xds/certificate_provider_store.h +18 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +13 -4
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.h +10 -2
- data/src/core/ext/xds/upb_utils.h +66 -0
- data/src/core/ext/xds/xds_api.cc +376 -3718
- data/src/core/ext/xds/xds_api.h +71 -619
- data/src/core/ext/xds/xds_bootstrap.cc +250 -141
- data/src/core/ext/xds/xds_bootstrap.h +39 -23
- data/src/core/ext/xds/xds_certificate_provider.cc +17 -3
- data/src/core/ext/xds/xds_certificate_provider.h +25 -1
- data/src/core/ext/xds/xds_channel_stack_modifier.cc +24 -18
- data/src/core/ext/xds/xds_channel_stack_modifier.h +9 -4
- data/src/core/ext/xds/xds_client.cc +850 -1160
- data/src/core/ext/xds/xds_client.h +129 -156
- data/src/core/ext/xds/xds_client_stats.cc +18 -19
- data/src/core/ext/xds/xds_client_stats.h +9 -7
- data/src/core/ext/xds/xds_cluster.cc +554 -0
- data/src/core/ext/xds/xds_cluster.h +119 -0
- data/src/core/ext/xds/xds_cluster_specifier_plugin.cc +151 -0
- data/src/core/ext/xds/xds_cluster_specifier_plugin.h +72 -0
- data/src/core/ext/xds/xds_common_types.cc +402 -0
- data/src/core/ext/xds/xds_common_types.h +103 -0
- data/src/core/ext/xds/xds_endpoint.cc +381 -0
- data/src/core/ext/xds/xds_endpoint.h +143 -0
- data/src/core/ext/xds/xds_http_fault_filter.cc +17 -15
- data/src/core/ext/xds/xds_http_fault_filter.h +6 -4
- data/src/core/ext/xds/xds_http_filters.cc +18 -5
- data/src/core/ext/xds/xds_http_filters.h +7 -7
- data/src/core/ext/xds/xds_http_rbac_filter.cc +579 -0
- data/src/core/ext/xds/xds_http_rbac_filter.h +61 -0
- data/src/core/ext/xds/xds_lb_policy_registry.cc +291 -0
- data/src/core/ext/xds/xds_lb_policy_registry.h +72 -0
- data/src/core/ext/xds/xds_listener.cc +1067 -0
- data/src/core/ext/xds/xds_listener.h +229 -0
- data/src/core/ext/{transport/chttp2/transport/hpack_utils.h → xds/xds_resource_type.cc} +12 -9
- data/src/core/ext/xds/xds_resource_type.h +98 -0
- data/src/core/ext/xds/xds_resource_type_impl.h +91 -0
- data/src/core/ext/xds/xds_route_config.cc +1150 -0
- data/src/core/ext/xds/xds_route_config.h +227 -0
- data/src/core/ext/xds/xds_routing.cc +28 -9
- data/src/core/ext/xds/xds_routing.h +15 -7
- data/src/core/ext/xds/xds_server_config_fetcher.cc +234 -129
- data/src/core/lib/address_utils/parse_address.cc +25 -8
- data/src/core/lib/address_utils/parse_address.h +8 -2
- data/src/core/lib/address_utils/sockaddr_utils.cc +82 -51
- data/src/core/lib/address_utils/sockaddr_utils.h +9 -19
- data/src/core/lib/avl/avl.h +71 -6
- data/src/core/lib/backoff/backoff.cc +9 -38
- data/src/core/lib/backoff/backoff.h +12 -12
- data/src/core/lib/channel/call_finalization.h +90 -0
- data/src/core/lib/channel/call_tracer.h +15 -6
- data/src/core/lib/channel/channel_args.cc +202 -45
- data/src/core/lib/channel/channel_args.h +243 -9
- data/src/core/lib/channel/channel_args_preconditioning.cc +6 -10
- data/src/core/lib/channel/channel_args_preconditioning.h +4 -4
- data/src/core/lib/channel/channel_fwd.h +26 -0
- data/src/core/lib/channel/channel_stack.cc +55 -10
- data/src/core/lib/channel/channel_stack.h +83 -14
- data/src/core/lib/channel/channel_stack_builder.cc +19 -276
- data/src/core/lib/channel/channel_stack_builder.h +104 -150
- data/src/core/lib/channel/channel_stack_builder_impl.cc +97 -0
- data/src/core/lib/channel/channel_stack_builder_impl.h +46 -0
- data/src/core/lib/channel/channel_trace.cc +11 -19
- data/src/core/lib/channel/channel_trace.h +6 -3
- data/src/core/lib/channel/channelz.cc +11 -14
- data/src/core/lib/channel/channelz.h +15 -7
- data/src/core/lib/channel/channelz_registry.cc +11 -19
- data/src/core/lib/channel/channelz_registry.h +10 -9
- data/src/core/lib/channel/connected_channel.cc +26 -30
- data/src/core/lib/channel/connected_channel.h +4 -1
- data/src/core/lib/channel/context.h +11 -0
- data/src/core/lib/channel/promise_based_filter.cc +1263 -0
- data/src/core/lib/channel/promise_based_filter.h +572 -0
- data/src/core/lib/channel/status_util.cc +2 -0
- data/src/core/lib/channel/status_util.h +0 -3
- data/src/core/lib/compression/compression.cc +26 -113
- data/src/core/lib/compression/compression_internal.cc +170 -204
- data/src/core/lib/compression/compression_internal.h +68 -72
- data/src/core/lib/compression/message_compress.cc +14 -12
- data/src/core/lib/compression/message_compress.h +4 -5
- data/src/core/lib/config/core_configuration.cc +11 -2
- data/src/core/lib/config/core_configuration.h +41 -1
- data/src/core/lib/debug/stats.cc +9 -9
- data/src/core/lib/debug/stats.h +2 -1
- data/src/core/lib/debug/stats_data.cc +4 -7
- data/src/core/lib/debug/stats_data.h +18 -25
- data/src/core/lib/debug/trace.h +13 -12
- data/src/core/lib/event_engine/channel_args_endpoint_config.cc +4 -2
- data/src/core/lib/event_engine/channel_args_endpoint_config.h +3 -2
- data/src/core/lib/{iomgr/event_engine/resolved_address_internal.h → event_engine/default_event_engine_factory.cc} +10 -12
- data/src/core/lib/event_engine/event_engine.cc +40 -10
- data/src/core/lib/event_engine/event_engine_factory.h +8 -0
- data/src/core/lib/event_engine/handle_containers.h +67 -0
- data/src/core/lib/event_engine/iomgr_engine/iomgr_engine.cc +159 -0
- data/src/core/lib/event_engine/iomgr_engine/iomgr_engine.h +122 -0
- data/src/core/lib/event_engine/iomgr_engine/thread_pool.cc +123 -0
- data/src/core/lib/event_engine/iomgr_engine/thread_pool.h +70 -0
- data/src/core/lib/event_engine/iomgr_engine/time_averaged_stats.cc +62 -0
- data/src/core/lib/event_engine/iomgr_engine/time_averaged_stats.h +81 -0
- data/src/core/lib/event_engine/iomgr_engine/timer.cc +312 -0
- data/src/core/lib/event_engine/iomgr_engine/timer.h +193 -0
- data/src/core/lib/event_engine/iomgr_engine/timer_heap.cc +107 -0
- data/src/core/lib/event_engine/iomgr_engine/timer_heap.h +56 -0
- data/src/core/lib/event_engine/iomgr_engine/timer_manager.cc +254 -0
- data/src/core/lib/event_engine/iomgr_engine/timer_manager.h +111 -0
- data/src/core/lib/event_engine/memory_allocator.cc +20 -16
- data/src/core/lib/{iomgr/event_engine → event_engine}/promise.h +27 -9
- data/src/core/lib/{iomgr/event_engine/resolved_address_internal.cc → event_engine/resolved_address.cc} +13 -13
- data/src/core/lib/event_engine/slice.cc +102 -0
- data/src/core/lib/event_engine/slice_buffer.cc +50 -0
- data/src/core/{ext/filters/max_age/max_age_filter.h → lib/event_engine/trace.cc} +3 -11
- data/src/core/lib/{iomgr/endpoint_pair_event_engine.cc → event_engine/trace.h} +12 -14
- data/src/core/lib/gpr/log.cc +5 -0
- data/src/core/lib/gpr/sync_posix.cc +1 -0
- data/src/core/lib/gpr/time.cc +2 -1
- data/src/core/lib/gpr/time_posix.cc +6 -9
- data/src/core/lib/gpr/time_windows.cc +10 -7
- data/src/core/lib/gpr/tls.h +4 -5
- data/src/core/lib/gpr/useful.h +18 -0
- data/src/core/lib/gprpp/bitset.h +24 -1
- data/src/core/lib/gprpp/chunked_vector.h +49 -3
- data/src/core/lib/gprpp/construct_destruct.h +1 -0
- data/src/core/lib/gprpp/cpp_impl_of.h +4 -0
- data/src/core/lib/gprpp/debug_location.h +2 -0
- data/src/core/lib/gprpp/dual_ref_counted.h +1 -4
- data/src/core/lib/gprpp/examine_stack.h +0 -1
- data/src/core/lib/gprpp/fork.cc +3 -6
- data/src/core/lib/gprpp/global_config.h +2 -4
- data/src/core/lib/gprpp/global_config_env.cc +3 -2
- data/src/core/lib/gprpp/global_config_env.h +3 -1
- data/src/core/lib/gprpp/global_config_generic.h +0 -4
- data/src/core/lib/gprpp/host_port.cc +2 -0
- data/src/core/lib/gprpp/manual_constructor.h +0 -68
- data/src/core/lib/gprpp/match.h +75 -0
- data/src/core/lib/gprpp/memory.h +1 -5
- data/src/core/lib/gprpp/orphanable.h +1 -4
- data/src/core/lib/gprpp/overload.h +59 -0
- data/src/core/lib/gprpp/ref_counted.h +3 -3
- data/src/core/lib/gprpp/ref_counted_ptr.h +1 -1
- data/src/core/lib/gprpp/single_set_ptr.h +87 -0
- data/src/core/lib/gprpp/stat.h +0 -2
- data/src/core/lib/gprpp/stat_posix.cc +7 -2
- data/src/core/lib/gprpp/status_helper.cc +74 -48
- data/src/core/lib/gprpp/status_helper.h +10 -19
- data/src/core/lib/gprpp/sync.h +3 -1
- data/src/core/lib/gprpp/table.h +21 -0
- data/src/core/lib/gprpp/thd.h +2 -5
- data/src/core/lib/gprpp/thd_posix.cc +4 -2
- data/src/core/lib/gprpp/thd_windows.cc +2 -0
- data/src/core/lib/gprpp/time.cc +214 -0
- data/src/core/lib/gprpp/time.h +301 -0
- data/src/core/lib/gprpp/time_util.cc +4 -0
- data/src/core/lib/gprpp/time_util.h +1 -1
- data/src/core/lib/gprpp/unique_type_name.h +104 -0
- data/src/core/lib/http/format_request.cc +62 -29
- data/src/core/lib/http/format_request.h +10 -7
- data/src/core/lib/http/httpcli.cc +325 -244
- data/src/core/lib/http/httpcli.h +232 -91
- data/src/core/lib/http/httpcli_security_connector.cc +79 -79
- data/src/core/lib/http/httpcli_ssl_credentials.h +39 -0
- data/src/core/lib/http/parser.cc +85 -15
- data/src/core/lib/http/parser.h +18 -2
- data/src/core/lib/iomgr/buffer_list.h +5 -5
- data/src/core/lib/iomgr/call_combiner.cc +17 -6
- data/src/core/lib/iomgr/closure.h +29 -9
- data/src/core/lib/iomgr/combiner.cc +25 -3
- data/src/core/lib/iomgr/endpoint.cc +4 -4
- data/src/core/lib/iomgr/endpoint.h +7 -5
- data/src/core/lib/iomgr/endpoint_cfstream.cc +9 -6
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +2 -1
- data/src/core/lib/iomgr/error.cc +24 -19
- data/src/core/lib/iomgr/error.h +9 -7
- data/src/core/lib/iomgr/ev_apple.cc +6 -5
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +65 -25
- data/src/core/lib/iomgr/ev_epoll1_linux.h +1 -1
- data/src/core/lib/iomgr/ev_poll_posix.cc +84 -59
- data/src/core/lib/iomgr/ev_poll_posix.h +2 -2
- data/src/core/lib/iomgr/ev_posix.cc +58 -100
- data/src/core/lib/iomgr/ev_posix.h +6 -4
- data/src/core/lib/iomgr/exec_ctx.cc +25 -97
- data/src/core/lib/iomgr/exec_ctx.h +8 -25
- data/src/core/lib/iomgr/executor.cc +10 -1
- data/src/core/lib/iomgr/fork_posix.cc +1 -0
- data/src/core/lib/iomgr/internal_errqueue.cc +38 -47
- data/src/core/lib/iomgr/internal_errqueue.h +1 -6
- data/src/core/lib/iomgr/iocp_windows.cc +9 -9
- data/src/core/lib/iomgr/iocp_windows.h +1 -1
- data/src/core/lib/iomgr/iomgr.cc +7 -1
- data/src/core/lib/iomgr/{event_engine/pollset.h → iomgr_fwd.h} +9 -9
- data/src/core/lib/iomgr/iomgr_posix.cc +3 -2
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +3 -2
- data/src/core/lib/iomgr/iomgr_windows.cc +2 -2
- data/src/core/lib/iomgr/load_file.cc +1 -1
- data/src/core/lib/iomgr/polling_entity.h +6 -0
- data/src/core/lib/iomgr/pollset.cc +1 -1
- data/src/core/lib/iomgr/pollset.h +4 -4
- data/src/core/lib/iomgr/pollset_set.h +1 -2
- data/src/core/lib/iomgr/pollset_windows.cc +2 -2
- data/src/core/lib/iomgr/port.h +26 -12
- data/src/core/lib/iomgr/resolve_address.cc +12 -23
- data/src/core/lib/iomgr/resolve_address.h +56 -46
- data/src/core/lib/iomgr/resolve_address_impl.h +58 -0
- data/src/core/lib/iomgr/resolve_address_posix.cc +76 -66
- data/src/core/lib/iomgr/resolve_address_posix.h +50 -0
- data/src/core/lib/iomgr/resolve_address_windows.cc +87 -75
- data/src/core/lib/iomgr/resolve_address_windows.h +50 -0
- data/src/core/{ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc → lib/iomgr/resolved_address.h} +21 -10
- data/src/core/lib/iomgr/sockaddr.h +2 -3
- data/src/core/lib/iomgr/sockaddr_posix.h +2 -0
- data/src/core/lib/iomgr/sockaddr_utils_posix.cc +62 -0
- data/src/core/lib/iomgr/sockaddr_windows.h +2 -0
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +3 -19
- data/src/core/lib/iomgr/tcp_client.cc +12 -7
- data/src/core/lib/iomgr/tcp_client.h +24 -12
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +24 -10
- data/src/core/lib/iomgr/tcp_client_posix.cc +157 -32
- data/src/core/lib/iomgr/tcp_client_posix.h +2 -2
- data/src/core/lib/iomgr/tcp_client_windows.cc +27 -16
- data/src/core/lib/iomgr/tcp_posix.cc +167 -64
- data/src/core/lib/iomgr/tcp_server_posix.cc +57 -34
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +42 -38
- data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +10 -6
- data/src/core/lib/iomgr/tcp_server_windows.cc +20 -12
- data/src/core/lib/iomgr/tcp_windows.cc +29 -19
- data/src/core/lib/iomgr/timer.cc +2 -2
- data/src/core/lib/iomgr/timer.h +11 -6
- data/src/core/lib/iomgr/timer_generic.cc +96 -77
- data/src/core/lib/iomgr/timer_manager.cc +15 -14
- data/src/core/lib/iomgr/unix_sockets_posix.cc +22 -34
- data/src/core/lib/iomgr/unix_sockets_posix.h +4 -7
- data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +6 -15
- data/src/core/lib/iomgr/wakeup_fd_pipe.cc +2 -2
- data/src/core/lib/iomgr/wakeup_fd_posix.cc +15 -12
- data/src/core/lib/iomgr/wakeup_fd_posix.h +0 -2
- data/src/core/lib/iomgr/work_serializer.cc +15 -10
- data/src/core/lib/iomgr/work_serializer.h +2 -3
- data/src/core/lib/json/json.h +1 -2
- data/src/core/lib/json/json_reader.cc +9 -1
- data/src/core/lib/json/json_util.cc +11 -4
- data/src/core/lib/json/json_util.h +15 -6
- data/src/core/lib/json/json_writer.cc +6 -1
- data/src/core/lib/matchers/matchers.cc +7 -4
- data/src/core/lib/matchers/matchers.h +2 -0
- data/src/core/lib/promise/activity.cc +15 -10
- data/src/core/lib/promise/activity.h +192 -157
- data/src/core/lib/promise/arena_promise.h +198 -0
- data/src/core/lib/promise/call_push_pull.h +148 -0
- data/src/core/lib/promise/context.h +1 -1
- data/src/core/lib/promise/detail/basic_seq.h +94 -5
- data/src/core/lib/promise/detail/promise_factory.h +1 -2
- data/src/core/lib/promise/detail/status.h +6 -0
- data/src/core/lib/promise/intra_activity_waiter.h +49 -0
- data/src/core/lib/promise/latch.h +103 -0
- data/src/core/lib/promise/loop.h +36 -8
- data/src/core/lib/promise/poll.h +6 -0
- data/src/core/lib/promise/promise.h +96 -0
- data/src/core/lib/promise/race.h +0 -1
- data/src/core/lib/promise/seq.h +19 -3
- data/src/core/lib/promise/sleep.cc +81 -0
- data/src/core/lib/promise/sleep.h +76 -0
- data/src/core/lib/promise/try_seq.h +157 -0
- data/src/core/{ext/filters/client_channel → lib/resolver}/resolver.cc +22 -25
- data/src/core/{ext/filters/client_channel → lib/resolver}/resolver.h +46 -44
- data/src/core/{ext/filters/client_channel → lib/resolver}/resolver_factory.h +36 -33
- data/src/core/lib/resolver/resolver_registry.cc +149 -0
- data/src/core/lib/resolver/resolver_registry.h +124 -0
- data/src/core/{ext/filters/client_channel → lib/resolver}/server_address.cc +18 -4
- data/src/core/{ext/filters/client_channel → lib/resolver}/server_address.h +17 -10
- data/src/core/lib/resource_quota/api.cc +19 -31
- data/src/core/lib/resource_quota/api.h +5 -3
- data/src/core/lib/{gprpp → resource_quota}/arena.cc +16 -19
- data/src/core/lib/{gprpp → resource_quota}/arena.h +25 -15
- data/src/core/lib/resource_quota/memory_quota.cc +170 -146
- data/src/core/lib/resource_quota/memory_quota.h +131 -90
- data/src/core/lib/resource_quota/resource_quota.h +16 -0
- data/src/core/lib/resource_quota/thread_quota.cc +2 -0
- data/src/core/lib/resource_quota/thread_quota.h +4 -0
- data/src/core/lib/security/authorization/authorization_policy_provider.h +14 -0
- data/src/core/lib/security/authorization/authorization_policy_provider_vtable.cc +4 -0
- data/src/core/lib/security/authorization/evaluate_args.cc +34 -23
- data/src/core/lib/security/authorization/evaluate_args.h +7 -4
- data/src/core/lib/security/authorization/grpc_authorization_engine.cc +66 -0
- data/src/core/lib/security/authorization/grpc_authorization_engine.h +69 -0
- data/src/core/lib/security/authorization/grpc_server_authz_filter.cc +121 -0
- data/src/core/lib/security/authorization/grpc_server_authz_filter.h +61 -0
- data/src/core/lib/security/authorization/matchers.cc +235 -0
- data/src/core/lib/security/authorization/matchers.h +218 -0
- data/src/core/lib/security/authorization/rbac_policy.cc +447 -0
- data/src/core/lib/security/authorization/rbac_policy.h +178 -0
- data/src/core/lib/security/context/security_context.cc +9 -4
- data/src/core/lib/security/context/security_context.h +23 -4
- data/src/core/lib/security/credentials/alts/alts_credentials.cc +16 -7
- data/src/core/lib/security/credentials/alts/alts_credentials.h +16 -1
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc +1 -3
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc +1 -4
- data/src/core/lib/security/credentials/call_creds_util.cc +97 -0
- data/src/core/lib/security/credentials/call_creds_util.h +43 -0
- data/src/core/lib/security/credentials/channel_creds_registry.h +103 -0
- data/src/core/lib/security/credentials/channel_creds_registry_init.cc +80 -0
- data/src/core/lib/security/credentials/composite/composite_credentials.cc +31 -86
- data/src/core/lib/security/credentials/composite/composite_credentials.h +41 -13
- data/src/core/lib/security/credentials/credentials.cc +6 -11
- data/src/core/lib/security/credentials/credentials.h +90 -87
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +154 -39
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.h +19 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.cc +9 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +78 -42
- data/src/core/lib/security/credentials/external/external_account_credentials.h +16 -9
- data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +12 -5
- data/src/core/lib/security/credentials/external/file_external_account_credentials.h +6 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +55 -17
- data/src/core/lib/security/credentials/external/url_external_account_credentials.h +11 -0
- data/src/core/lib/security/credentials/fake/fake_credentials.cc +40 -32
- data/src/core/lib/security/credentials/fake/fake_credentials.h +35 -22
- data/src/core/lib/security/credentials/google_default/credentials_generic.cc +1 -0
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +69 -35
- data/src/core/lib/security/credentials/google_default/google_default_credentials.h +20 -5
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +32 -30
- data/src/core/lib/security/credentials/iam/iam_credentials.h +25 -9
- data/src/core/lib/security/credentials/insecure/insecure_credentials.cc +35 -26
- data/src/core/lib/security/credentials/insecure/insecure_credentials.h +62 -0
- data/src/core/lib/security/credentials/jwt/json_token.cc +9 -8
- data/src/core/lib/security/credentials/jwt/json_token.h +2 -2
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +44 -49
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +30 -12
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +81 -43
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +5 -3
- data/src/core/lib/security/credentials/local/local_credentials.cc +16 -9
- data/src/core/lib/security/credentials/local/local_credentials.h +17 -0
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +175 -171
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +81 -34
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +104 -156
- data/src/core/lib/security/credentials/plugin/plugin_credentials.h +80 -27
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +18 -14
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +27 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +6 -6
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +9 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +39 -10
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +56 -4
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc +43 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h +72 -10
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +29 -5
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +67 -80
- data/src/core/lib/security/credentials/tls/tls_credentials.cc +26 -8
- data/src/core/lib/security/credentials/tls/tls_credentials.h +11 -1
- data/src/core/lib/security/credentials/tls/tls_utils.cc +2 -0
- data/src/core/lib/security/credentials/tls/tls_utils.h +1 -1
- data/src/core/lib/security/credentials/xds/xds_credentials.cc +65 -51
- data/src/core/lib/security/credentials/xds/xds_credentials.h +51 -6
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +30 -16
- data/src/core/lib/security/security_connector/alts/alts_security_connector.h +7 -4
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +22 -14
- data/src/core/lib/security/security_connector/fake/fake_security_connector.h +2 -4
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc +15 -16
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +21 -11
- data/src/core/lib/security/security_connector/load_system_roots_fallback.cc +5 -3
- data/src/core/lib/security/security_connector/{load_system_roots_linux.cc → load_system_roots_supported.cc} +27 -19
- data/src/core/lib/security/security_connector/{load_system_roots_linux.h → load_system_roots_supported.h} +5 -5
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +32 -21
- data/src/core/lib/security/security_connector/local/local_security_connector.h +6 -2
- data/src/core/lib/security/security_connector/security_connector.cc +22 -32
- data/src/core/lib/security/security_connector/security_connector.h +44 -28
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +29 -20
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +4 -2
- data/src/core/lib/security/security_connector/ssl_utils.cc +41 -33
- data/src/core/lib/security/security_connector/ssl_utils.h +23 -24
- data/src/core/lib/security/security_connector/ssl_utils_config.h +1 -1
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +46 -28
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +29 -9
- data/src/core/lib/security/transport/auth_filters.h +45 -5
- data/src/core/lib/security/transport/client_auth_filter.cc +112 -368
- data/src/core/lib/security/transport/secure_endpoint.cc +267 -137
- data/src/core/lib/security/transport/secure_endpoint.h +5 -4
- data/src/core/lib/security/transport/security_handshaker.cc +69 -26
- data/src/core/lib/security/transport/security_handshaker.h +5 -1
- data/src/core/lib/security/transport/server_auth_filter.cc +70 -41
- data/src/core/lib/security/util/json_util.cc +3 -2
- data/src/core/lib/security/util/json_util.h +0 -2
- data/src/core/lib/service_config/service_config.h +78 -0
- data/src/core/{ext → lib}/service_config/service_config_call_data.h +11 -7
- data/src/core/{ext/service_config/service_config.cc → lib/service_config/service_config_impl.cc} +33 -23
- data/src/core/{ext/service_config/service_config.h → lib/service_config/service_config_impl.h} +24 -21
- data/src/core/{ext → lib}/service_config/service_config_parser.cc +39 -29
- data/src/core/{ext → lib}/service_config/service_config_parser.h +45 -29
- data/src/core/lib/slice/b64.cc +1 -1
- data/src/core/lib/slice/b64.h +2 -0
- data/src/core/lib/slice/percent_encoding.cc +4 -1
- data/src/core/lib/slice/percent_encoding.h +0 -6
- data/src/core/lib/slice/slice.cc +78 -180
- data/src/core/lib/slice/slice.h +77 -29
- data/src/core/lib/slice/slice_api.cc +1 -1
- data/src/core/lib/slice/slice_buffer.cc +79 -23
- data/src/core/lib/slice/slice_buffer.h +137 -0
- data/src/core/lib/{iomgr/is_epollexclusive_available.h → slice/slice_buffer_api.cc} +11 -12
- data/src/core/lib/slice/slice_internal.h +16 -34
- data/src/core/lib/slice/slice_refcount.cc +18 -0
- data/src/core/lib/slice/slice_refcount.h +6 -86
- data/src/core/lib/slice/slice_refcount_base.h +18 -139
- data/src/core/lib/slice/slice_string_helpers.cc +0 -16
- data/src/core/lib/slice/slice_string_helpers.h +1 -8
- data/src/core/lib/surface/builtins.cc +11 -6
- data/src/core/lib/surface/byte_buffer.cc +7 -1
- data/src/core/lib/surface/byte_buffer_reader.cc +4 -4
- data/src/core/lib/surface/call.cc +1113 -1275
- data/src/core/lib/surface/call.h +26 -22
- data/src/core/lib/surface/call_details.cc +4 -4
- data/src/core/lib/surface/call_log_batch.cc +7 -1
- data/src/core/lib/surface/call_test_only.h +4 -1
- data/src/core/lib/surface/channel.cc +220 -289
- data/src/core/lib/surface/channel.h +100 -62
- data/src/core/lib/surface/channel_init.cc +2 -3
- data/src/core/lib/surface/channel_init.h +4 -6
- data/src/core/lib/surface/channel_ping.cc +8 -2
- data/src/core/lib/surface/channel_stack_type.cc +0 -2
- data/src/core/lib/surface/channel_stack_type.h +0 -2
- data/src/core/lib/surface/completion_queue.cc +39 -29
- data/src/core/lib/surface/completion_queue.h +7 -2
- data/src/core/lib/surface/completion_queue_factory.cc +1 -0
- data/src/core/lib/surface/completion_queue_factory.h +1 -3
- data/src/core/lib/surface/event_string.cc +1 -7
- data/src/core/lib/surface/event_string.h +1 -1
- data/src/core/lib/surface/init.cc +66 -26
- data/src/core/lib/surface/init.h +0 -10
- data/src/core/lib/surface/lame_client.cc +63 -109
- data/src/core/lib/surface/lame_client.h +41 -3
- data/src/core/lib/surface/metadata_array.cc +2 -0
- data/src/core/lib/surface/server.cc +106 -126
- data/src/core/lib/surface/server.h +48 -16
- data/src/core/lib/surface/validate_metadata.cc +3 -6
- data/src/core/lib/surface/validate_metadata.h +3 -0
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/bdp_estimator.cc +12 -11
- data/src/core/lib/transport/bdp_estimator.h +4 -5
- data/src/core/lib/transport/connectivity_state.cc +6 -4
- data/src/core/lib/transport/connectivity_state.h +2 -3
- data/src/core/lib/transport/error_utils.cc +21 -11
- data/src/core/lib/transport/error_utils.h +7 -2
- data/src/core/lib/{channel → transport}/handshaker.cc +13 -8
- data/src/core/lib/{channel → transport}/handshaker.h +14 -7
- data/src/core/lib/{channel → transport}/handshaker_factory.h +9 -10
- data/src/core/lib/{channel → transport}/handshaker_registry.cc +5 -1
- data/src/core/lib/{channel → transport}/handshaker_registry.h +5 -4
- data/src/core/{ext/filters/client_channel → lib/transport}/http_connect_handshaker.cc +37 -26
- data/src/core/{ext/filters/client_channel → lib/transport}/http_connect_handshaker.h +3 -3
- data/src/core/lib/transport/metadata_batch.cc +260 -72
- data/src/core/lib/transport/metadata_batch.h +932 -799
- data/src/core/lib/transport/parsed_metadata.cc +4 -0
- data/src/core/lib/transport/parsed_metadata.h +124 -98
- data/src/core/lib/transport/status_conversion.cc +4 -2
- data/src/core/lib/transport/status_conversion.h +3 -3
- data/src/core/lib/transport/tcp_connect_handshaker.cc +253 -0
- data/src/core/lib/transport/tcp_connect_handshaker.h +39 -0
- data/src/core/lib/transport/timeout_encoding.cc +203 -70
- data/src/core/lib/transport/timeout_encoding.h +44 -10
- data/src/core/lib/transport/transport.cc +21 -21
- data/src/core/lib/transport/transport.h +151 -19
- data/src/core/lib/transport/transport_fwd.h +20 -0
- data/src/core/lib/transport/transport_impl.h +25 -0
- data/src/core/lib/transport/transport_op_string.cc +21 -64
- data/src/core/lib/uri/uri_parser.cc +238 -56
- data/src/core/lib/uri/uri_parser.h +37 -25
- data/src/core/plugin_registry/grpc_plugin_registry.cc +32 -91
- data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +85 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +27 -22
- data/src/core/tsi/alts/handshaker/alts_shared_resource.cc +9 -1
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +22 -14
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.cc +2 -2
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.h +1 -1
- data/src/core/tsi/alts/handshaker/transport_security_common_api.cc +2 -2
- data/src/core/tsi/alts/handshaker/transport_security_common_api.h +2 -2
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +9 -1
- data/src/core/tsi/fake_transport_security.cc +13 -1
- data/src/core/tsi/fake_transport_security.h +6 -0
- data/src/core/tsi/local_transport_security.cc +3 -11
- data/src/core/tsi/local_transport_security.h +1 -4
- data/src/core/tsi/ssl/key_logging/ssl_key_logging.cc +141 -0
- data/src/core/tsi/ssl/key_logging/ssl_key_logging.h +81 -0
- data/src/core/tsi/ssl/session_cache/ssl_session.h +3 -3
- data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +2 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +3 -5
- data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +2 -0
- data/src/core/tsi/ssl_transport_security.cc +180 -52
- data/src/core/tsi/ssl_transport_security.h +46 -8
- data/src/core/tsi/transport_security_grpc.cc +3 -2
- data/src/core/tsi/transport_security_grpc.h +5 -2
- data/src/core/tsi/transport_security_interface.h +2 -0
- data/src/ruby/ext/grpc/ext-export-truffleruby.clang +2 -0
- data/src/ruby/ext/grpc/ext-export-truffleruby.gcc +7 -0
- data/src/ruby/ext/grpc/ext-export.clang +1 -0
- data/src/ruby/ext/grpc/ext-export.gcc +1 -0
- data/src/ruby/ext/grpc/extconf.rb +59 -21
- data/src/ruby/ext/grpc/rb_channel.c +5 -2
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +20 -24
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +31 -37
- data/src/ruby/ext/grpc/rb_server.c +7 -4
- data/src/ruby/lib/grpc/errors.rb +1 -1
- data/src/ruby/lib/grpc/generic/active_call.rb +7 -1
- data/src/ruby/lib/grpc/grpc.rb +1 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/generate_proto_ruby.sh +1 -0
- data/src/ruby/pb/src/proto/grpc/testing/test_pb.rb +2 -1
- data/src/ruby/pb/test/client.rb +769 -0
- data/src/ruby/pb/test/server.rb +252 -0
- data/src/ruby/pb/test/xds_client.rb +415 -0
- data/src/ruby/spec/generic/client_stub_spec.rb +23 -23
- data/third_party/abseil-cpp/absl/algorithm/container.h +1 -1
- data/third_party/abseil-cpp/absl/base/attributes.h +49 -22
- data/third_party/abseil-cpp/absl/base/casts.h +61 -68
- data/third_party/abseil-cpp/absl/base/config.h +182 -41
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.cc +12 -42
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.h +67 -2
- data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +3 -3
- data/third_party/abseil-cpp/absl/base/internal/endian.h +17 -62
- data/third_party/abseil-cpp/absl/base/internal/fast_type_id.h +50 -0
- data/third_party/abseil-cpp/absl/base/internal/invoke.h +54 -0
- data/third_party/abseil-cpp/absl/base/internal/prefetch.h +138 -0
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +29 -22
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +13 -12
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +3 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +8 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +2 -5
- data/third_party/abseil-cpp/absl/base/internal/strerror.cc +88 -0
- data/third_party/abseil-cpp/absl/base/internal/strerror.h +39 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +0 -1
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.cc +2 -1
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +6 -7
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +12 -3
- data/third_party/abseil-cpp/absl/base/log_severity.cc +28 -0
- data/third_party/abseil-cpp/absl/base/log_severity.h +51 -0
- data/third_party/abseil-cpp/absl/base/optimization.h +19 -11
- data/third_party/abseil-cpp/absl/base/options.h +1 -1
- data/third_party/abseil-cpp/absl/base/thread_annotations.h +2 -2
- data/third_party/abseil-cpp/absl/container/fixed_array.h +2 -0
- data/third_party/abseil-cpp/absl/container/flat_hash_map.h +11 -4
- data/third_party/abseil-cpp/absl/container/flat_hash_set.h +510 -0
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +20 -9
- data/third_party/abseil-cpp/absl/container/internal/common.h +6 -5
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +10 -28
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +68 -20
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +29 -11
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +59 -38
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +4 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +515 -184
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +45 -88
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +4 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +3 -2
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +8 -3
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +8 -3
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +2 -1
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +8 -3
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +20 -18
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +8 -3
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +15 -2
- data/third_party/abseil-cpp/absl/debugging/symbolize.cc +6 -1
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +46 -7
- data/third_party/abseil-cpp/absl/functional/bind_front.h +10 -1
- data/third_party/abseil-cpp/absl/functional/function_ref.h +2 -1
- data/third_party/abseil-cpp/absl/hash/hash.h +82 -8
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +218 -23
- data/third_party/abseil-cpp/absl/numeric/bits.h +2 -1
- data/third_party/abseil-cpp/absl/numeric/int128.cc +4 -2
- data/third_party/abseil-cpp/absl/numeric/int128.h +2 -2
- data/third_party/abseil-cpp/absl/profiling/internal/sample_recorder.h +21 -6
- data/third_party/abseil-cpp/absl/random/bernoulli_distribution.h +200 -0
- data/third_party/abseil-cpp/absl/random/beta_distribution.h +427 -0
- data/third_party/abseil-cpp/absl/random/discrete_distribution.cc +98 -0
- data/third_party/abseil-cpp/absl/random/discrete_distribution.h +247 -0
- data/third_party/abseil-cpp/absl/random/distributions.h +452 -0
- data/third_party/abseil-cpp/absl/random/exponential_distribution.h +165 -0
- data/third_party/abseil-cpp/absl/random/gaussian_distribution.cc +104 -0
- data/third_party/abseil-cpp/absl/random/gaussian_distribution.h +275 -0
- data/third_party/abseil-cpp/absl/random/internal/distribution_caller.h +95 -0
- data/third_party/abseil-cpp/absl/random/internal/fast_uniform_bits.h +269 -0
- data/third_party/abseil-cpp/absl/random/internal/fastmath.h +57 -0
- data/third_party/abseil-cpp/absl/random/internal/generate_real.h +144 -0
- data/third_party/abseil-cpp/absl/random/internal/iostream_state_saver.h +245 -0
- data/third_party/abseil-cpp/absl/random/internal/nonsecure_base.h +161 -0
- data/third_party/abseil-cpp/absl/random/internal/pcg_engine.h +308 -0
- data/third_party/abseil-cpp/absl/random/internal/platform.h +171 -0
- data/third_party/abseil-cpp/absl/random/internal/pool_urbg.cc +253 -0
- data/third_party/abseil-cpp/absl/random/internal/pool_urbg.h +131 -0
- data/third_party/abseil-cpp/absl/random/internal/randen.cc +91 -0
- data/third_party/abseil-cpp/absl/random/internal/randen.h +96 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_detect.cc +225 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_detect.h +33 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_engine.h +264 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_hwaes.cc +526 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_hwaes.h +50 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_round_keys.cc +462 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_slow.cc +471 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_slow.h +40 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_traits.h +88 -0
- data/third_party/abseil-cpp/absl/random/internal/salted_seed_seq.h +165 -0
- data/third_party/abseil-cpp/absl/random/internal/seed_material.cc +267 -0
- data/third_party/abseil-cpp/absl/random/internal/seed_material.h +104 -0
- data/third_party/abseil-cpp/absl/random/internal/traits.h +149 -0
- data/third_party/abseil-cpp/absl/random/internal/uniform_helper.h +244 -0
- data/third_party/abseil-cpp/absl/random/internal/wide_multiply.h +96 -0
- data/third_party/abseil-cpp/absl/random/log_uniform_int_distribution.h +256 -0
- data/third_party/abseil-cpp/absl/random/poisson_distribution.h +261 -0
- data/third_party/abseil-cpp/absl/random/random.h +189 -0
- data/third_party/abseil-cpp/absl/random/seed_gen_exception.cc +46 -0
- data/third_party/abseil-cpp/absl/random/seed_gen_exception.h +55 -0
- data/third_party/abseil-cpp/absl/random/seed_sequences.cc +29 -0
- data/third_party/abseil-cpp/absl/random/seed_sequences.h +111 -0
- data/third_party/abseil-cpp/absl/random/uniform_int_distribution.h +275 -0
- data/third_party/abseil-cpp/absl/random/uniform_real_distribution.h +202 -0
- data/third_party/abseil-cpp/absl/random/zipf_distribution.h +272 -0
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +17 -0
- data/third_party/abseil-cpp/absl/status/status.cc +174 -2
- data/third_party/abseil-cpp/absl/status/status.h +22 -12
- data/third_party/abseil-cpp/absl/status/statusor.h +9 -3
- data/third_party/abseil-cpp/absl/strings/ascii.h +4 -4
- data/third_party/abseil-cpp/absl/strings/cord.cc +194 -913
- data/third_party/abseil-cpp/absl/strings/cord.h +202 -81
- data/third_party/abseil-cpp/absl/strings/cord_analysis.cc +188 -0
- data/third_party/abseil-cpp/absl/strings/cord_analysis.h +44 -0
- data/third_party/abseil-cpp/absl/strings/cord_buffer.cc +30 -0
- data/third_party/abseil-cpp/absl/strings/cord_buffer.h +572 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_data_edge.h +63 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.cc +20 -32
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +123 -88
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.cc +149 -49
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.h +44 -59
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.cc +3 -1
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.h +4 -2
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.cc +3 -2
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.h +5 -4
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_consume.cc +7 -74
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.cc +54 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.h +102 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h +58 -17
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.cc +13 -11
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.cc +11 -38
- data/third_party/abseil-cpp/absl/strings/internal/cordz_statistics.h +1 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h +4 -2
- data/third_party/abseil-cpp/absl/strings/internal/escaping.cc +6 -5
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +38 -7
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +7 -2
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +4 -5
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +5 -2
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +2 -1
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +4 -2
- data/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +9 -6
- data/third_party/abseil-cpp/absl/strings/internal/string_constant.h +10 -2
- data/third_party/abseil-cpp/absl/strings/internal/utf8.cc +9 -9
- data/third_party/abseil-cpp/absl/strings/numbers.cc +8 -8
- data/third_party/abseil-cpp/absl/strings/numbers.h +26 -23
- data/third_party/abseil-cpp/absl/strings/str_cat.h +20 -13
- data/third_party/abseil-cpp/absl/strings/str_join.h +9 -15
- data/third_party/abseil-cpp/absl/strings/str_split.h +1 -2
- data/third_party/abseil-cpp/absl/strings/string_view.cc +2 -13
- data/third_party/abseil-cpp/absl/strings/string_view.h +3 -2
- data/third_party/abseil-cpp/absl/strings/strip.h +8 -6
- data/third_party/abseil-cpp/absl/strings/substitute.h +10 -2
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +9 -6
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.h +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +1 -6
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc +0 -25
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +10 -4
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +75 -40
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +17 -9
- data/third_party/abseil-cpp/absl/synchronization/notification.h +3 -2
- data/third_party/abseil-cpp/absl/time/duration.cc +5 -4
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h +11 -7
- data/third_party/abseil-cpp/absl/time/time.h +16 -12
- data/third_party/abseil-cpp/absl/types/internal/optional.h +8 -0
- data/third_party/abseil-cpp/absl/types/internal/variant.h +3 -3
- data/third_party/abseil-cpp/absl/types/optional.h +17 -14
- data/third_party/abseil-cpp/absl/types/span.h +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/base64/base64.c +13 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c +21 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/cipher.c +12 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa.c +1 -2
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/mem.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7.c +29 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/internal.h +0 -1
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/base64.h +8 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +13 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/dsa.h +10 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hpke.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs7.h +9 -4
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs8.h +6 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +23 -2
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +4 -0
- data/third_party/cares/cares/{ares.h → include/ares.h} +73 -1
- data/third_party/cares/cares/{ares_dns.h → include/ares_dns.h} +9 -0
- data/third_party/cares/cares/{ares_version.h → include/ares_version.h} +3 -3
- data/third_party/cares/cares/{ares__close_sockets.c → src/lib/ares__close_sockets.c} +2 -2
- data/third_party/cares/cares/{ares__get_hostent.c → src/lib/ares__get_hostent.c} +1 -2
- data/third_party/cares/cares/src/lib/ares__parse_into_addrinfo.c +260 -0
- data/third_party/cares/cares/src/lib/ares__readaddrinfo.c +264 -0
- data/third_party/cares/cares/src/lib/ares__sortaddrinfo.c +499 -0
- data/third_party/cares/cares/src/lib/ares_android.c +444 -0
- data/third_party/cares/cares/src/lib/ares_android.h +27 -0
- data/third_party/cares/cares/{ares_create_query.c → src/lib/ares_create_query.c} +8 -17
- data/third_party/cares/cares/{ares_data.c → src/lib/ares_data.c} +18 -0
- data/third_party/cares/cares/{ares_data.h → src/lib/ares_data.h} +2 -0
- data/third_party/cares/cares/{ares_expand_name.c → src/lib/ares_expand_name.c} +114 -23
- data/third_party/cares/cares/{ares_expand_string.c → src/lib/ares_expand_string.c} +2 -5
- data/third_party/cares/cares/{ares_free_hostent.c → src/lib/ares_free_hostent.c} +6 -4
- data/third_party/cares/cares/src/lib/ares_freeaddrinfo.c +59 -0
- data/third_party/cares/cares/src/lib/ares_getaddrinfo.c +772 -0
- data/third_party/cares/cares/{ares_getenv.c → src/lib/ares_getenv.c} +0 -2
- data/third_party/cares/cares/{ares_gethostbyaddr.c → src/lib/ares_gethostbyaddr.c} +2 -9
- data/third_party/cares/cares/{ares_gethostbyname.c → src/lib/ares_gethostbyname.c} +25 -20
- data/third_party/cares/cares/{ares_getnameinfo.c → src/lib/ares_getnameinfo.c} +4 -10
- data/third_party/cares/cares/{ares_init.c → src/lib/ares_init.c} +79 -40
- data/third_party/cares/cares/{ares_ipv6.h → src/lib/ares_ipv6.h} +7 -0
- data/third_party/cares/cares/{ares_library_init.c → src/lib/ares_library_init.c} +7 -2
- data/third_party/cares/cares/{ares_library_init.h → src/lib/ares_library_init.h} +1 -1
- data/third_party/cares/cares/src/lib/ares_nameser.h +482 -0
- data/third_party/cares/cares/src/lib/ares_parse_a_reply.c +209 -0
- data/third_party/cares/cares/src/lib/ares_parse_aaaa_reply.c +212 -0
- data/third_party/cares/cares/src/lib/ares_parse_caa_reply.c +199 -0
- data/third_party/cares/cares/{ares_parse_mx_reply.c → src/lib/ares_parse_mx_reply.c} +2 -8
- data/third_party/cares/cares/{ares_parse_naptr_reply.c → src/lib/ares_parse_naptr_reply.c} +2 -13
- data/third_party/cares/cares/{ares_parse_ns_reply.c → src/lib/ares_parse_ns_reply.c} +5 -11
- data/third_party/cares/cares/{ares_parse_ptr_reply.c → src/lib/ares_parse_ptr_reply.c} +53 -46
- data/third_party/cares/cares/src/lib/ares_parse_soa_reply.c +179 -0
- data/third_party/cares/cares/{ares_parse_srv_reply.c → src/lib/ares_parse_srv_reply.c} +2 -13
- data/third_party/cares/cares/{ares_parse_txt_reply.c → src/lib/ares_parse_txt_reply.c} +3 -9
- data/third_party/cares/cares/{ares_private.h → src/lib/ares_private.h} +52 -11
- data/third_party/cares/cares/{ares_process.c → src/lib/ares_process.c} +127 -52
- data/third_party/cares/cares/{ares_query.c → src/lib/ares_query.c} +3 -9
- data/third_party/cares/cares/{ares_search.c → src/lib/ares_search.c} +5 -7
- data/third_party/cares/cares/{ares_send.c → src/lib/ares_send.c} +2 -8
- data/third_party/cares/cares/{ares_setup.h → src/lib/ares_setup.h} +4 -1
- data/third_party/cares/cares/{ares_strsplit.c → src/lib/ares_strsplit.c} +4 -0
- data/third_party/cares/cares/src/lib/ares_writev.h +36 -0
- data/third_party/cares/cares/src/lib/config-dos.h +115 -0
- data/third_party/cares/cares/{inet_net_pton.c → src/lib/inet_net_pton.c} +2 -8
- data/third_party/cares/cares/{inet_ntop.c → src/lib/inet_ntop.c} +2 -8
- data/third_party/upb/third_party/utf8_range/naive.c +92 -0
- data/third_party/upb/third_party/utf8_range/range2-neon.c +157 -0
- data/third_party/upb/third_party/utf8_range/range2-sse.c +170 -0
- data/third_party/upb/third_party/utf8_range/utf8_range.h +9 -0
- data/third_party/upb/upb/decode.c +542 -319
- data/third_party/upb/upb/decode.h +43 -17
- data/third_party/upb/upb/decode_fast.c +303 -301
- data/third_party/upb/upb/decode_fast.h +18 -18
- data/third_party/upb/upb/decode_internal.h +73 -56
- data/third_party/upb/upb/def.c +1926 -1078
- data/third_party/upb/upb/def.h +329 -288
- data/third_party/upb/upb/def.hpp +129 -172
- data/third_party/upb/upb/encode.c +208 -175
- data/third_party/upb/upb/encode.h +15 -17
- data/third_party/upb/upb/json_encode.c +776 -0
- data/third_party/upb/upb/json_encode.h +62 -0
- data/third_party/upb/upb/msg.c +142 -124
- data/third_party/upb/upb/msg.h +39 -33
- data/third_party/upb/upb/msg_internal.h +342 -280
- data/third_party/upb/upb/port_def.inc +8 -0
- data/third_party/upb/upb/port_undef.inc +1 -0
- data/third_party/upb/upb/reflection.c +239 -199
- data/third_party/upb/upb/reflection.h +87 -67
- data/third_party/upb/upb/reflection.hpp +6 -6
- data/third_party/upb/upb/table.c +231 -147
- data/third_party/upb/upb/table_internal.h +129 -95
- data/third_party/upb/upb/text_encode.c +113 -90
- data/third_party/upb/upb/text_encode.h +10 -10
- data/third_party/upb/upb/upb.c +111 -72
- data/third_party/upb/upb/upb.h +157 -151
- data/third_party/upb/upb/upb.hpp +31 -28
- data/third_party/upb/upb/upb_internal.h +21 -11
- data/third_party/xxhash/xxhash.h +607 -352
- data/third_party/zlib/crc32.c +966 -292
- data/third_party/zlib/crc32.h +9441 -436
- data/third_party/zlib/deflate.c +78 -30
- data/third_party/zlib/deflate.h +12 -15
- data/third_party/zlib/gzguts.h +3 -2
- data/third_party/zlib/gzlib.c +5 -3
- data/third_party/zlib/gzread.c +5 -7
- data/third_party/zlib/gzwrite.c +25 -13
- data/third_party/zlib/infback.c +2 -1
- data/third_party/zlib/inffast.c +14 -14
- data/third_party/zlib/inflate.c +39 -8
- data/third_party/zlib/inflate.h +3 -2
- data/third_party/zlib/inftrees.c +3 -3
- data/third_party/zlib/trees.c +27 -48
- data/third_party/zlib/zlib.h +123 -100
- data/third_party/zlib/zutil.c +2 -2
- data/third_party/zlib/zutil.h +12 -9
- metadata +502 -247
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +0 -44
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +0 -83
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc +0 -31
- data/src/core/ext/filters/client_channel/resolver_registry.cc +0 -194
- data/src/core/ext/filters/client_channel/resolver_registry.h +0 -88
- data/src/core/ext/filters/client_idle/client_idle_filter.cc +0 -264
- data/src/core/ext/filters/max_age/max_age_filter.cc +0 -560
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +0 -122
- data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +0 -92
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +0 -192
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +0 -52
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +0 -79
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +0 -125
- data/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc +0 -37
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_index.h +0 -107
- data/src/core/ext/transport/chttp2/transport/hpack_utils.cc +0 -46
- data/src/core/ext/transport/chttp2/transport/popularity_count.h +0 -60
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.c +0 -38
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h +0 -64
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.c +0 -38
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h +0 -64
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.c +0 -38
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h +0 -64
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.c +0 -38
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h +0 -64
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.c +0 -38
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h +0 -64
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/eval.upb.c +0 -102
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/eval.upb.h +0 -306
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/explain.upb.c +0 -56
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/explain.upb.h +0 -135
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/value.upb.c +0 -115
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/value.upb.h +0 -371
- data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c +0 -67
- data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.h +0 -35
- data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c +0 -68
- data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.h +0 -35
- data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c +0 -67
- data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.h +0 -35
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c +0 -75
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.h +0 -35
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c +0 -69
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.h +0 -35
- data/src/core/lib/compression/algorithm_metadata.h +0 -62
- data/src/core/lib/compression/compression_args.cc +0 -140
- data/src/core/lib/compression/compression_args.h +0 -58
- data/src/core/lib/compression/stream_compression.cc +0 -81
- data/src/core/lib/compression/stream_compression.h +0 -117
- data/src/core/lib/compression/stream_compression_gzip.cc +0 -231
- data/src/core/lib/compression/stream_compression_gzip.h +0 -28
- data/src/core/lib/compression/stream_compression_identity.cc +0 -91
- data/src/core/lib/compression/stream_compression_identity.h +0 -29
- data/src/core/lib/event_engine/event_engine_factory.cc +0 -49
- data/src/core/lib/event_engine/sockaddr.cc +0 -40
- data/src/core/lib/event_engine/sockaddr.h +0 -44
- data/src/core/lib/iomgr/ev_epollex_linux.cc +0 -1654
- data/src/core/lib/iomgr/ev_epollex_linux.h +0 -30
- data/src/core/lib/iomgr/event_engine/closure.cc +0 -77
- data/src/core/lib/iomgr/event_engine/closure.h +0 -42
- data/src/core/lib/iomgr/event_engine/endpoint.cc +0 -172
- data/src/core/lib/iomgr/event_engine/endpoint.h +0 -52
- data/src/core/lib/iomgr/event_engine/iomgr.cc +0 -84
- data/src/core/lib/iomgr/event_engine/pollset.cc +0 -88
- data/src/core/lib/iomgr/event_engine/resolver.cc +0 -115
- data/src/core/lib/iomgr/event_engine/tcp.cc +0 -295
- data/src/core/lib/iomgr/event_engine/timer.cc +0 -63
- data/src/core/lib/iomgr/iomgr_custom.cc +0 -79
- data/src/core/lib/iomgr/iomgr_custom.h +0 -49
- data/src/core/lib/iomgr/is_epollexclusive_available.cc +0 -119
- data/src/core/lib/iomgr/pollset_custom.cc +0 -105
- data/src/core/lib/iomgr/pollset_custom.h +0 -37
- data/src/core/lib/iomgr/pollset_set_custom.cc +0 -47
- data/src/core/lib/iomgr/pollset_set_custom.h +0 -26
- data/src/core/lib/iomgr/resolve_address_custom.cc +0 -169
- data/src/core/lib/iomgr/resolve_address_custom.h +0 -44
- data/src/core/lib/iomgr/sys_epoll_wrapper.h +0 -30
- data/src/core/lib/iomgr/tcp_client_custom.cc +0 -146
- data/src/core/lib/iomgr/tcp_custom.cc +0 -350
- data/src/core/lib/iomgr/tcp_custom.h +0 -85
- data/src/core/lib/iomgr/tcp_server_custom.cc +0 -457
- data/src/core/lib/iomgr/timer_custom.cc +0 -96
- data/src/core/lib/iomgr/timer_custom.h +0 -43
- data/src/core/lib/security/authorization/sdk_server_authz_filter.cc +0 -173
- data/src/core/lib/security/authorization/sdk_server_authz_filter.h +0 -67
- data/src/core/lib/security/credentials/credentials_metadata.cc +0 -61
- data/src/core/lib/slice/slice_intern.cc +0 -367
- data/src/core/lib/slice/slice_split.cc +0 -100
- data/src/core/lib/slice/slice_split.h +0 -40
- data/src/core/lib/slice/slice_utils.h +0 -200
- data/src/core/lib/slice/static_slice.cc +0 -377
- data/src/core/lib/slice/static_slice.h +0 -300
- data/src/core/lib/surface/init_secure.cc +0 -103
- data/src/core/lib/transport/byte_stream.cc +0 -162
- data/src/core/lib/transport/byte_stream.h +0 -166
- data/src/core/lib/transport/metadata.cc +0 -714
- data/src/core/lib/transport/metadata.h +0 -449
- data/src/core/lib/transport/static_metadata.cc +0 -1032
- data/src/core/lib/transport/static_metadata.h +0 -322
- data/src/core/lib/transport/status_metadata.cc +0 -63
- data/src/core/lib/transport/status_metadata.h +0 -48
- data/third_party/abseil-cpp/absl/container/internal/have_sse.h +0 -50
- data/third_party/cares/cares/ares_getopt.c +0 -122
- data/third_party/cares/cares/ares_getopt.h +0 -53
- data/third_party/cares/cares/ares_parse_a_reply.c +0 -264
- data/third_party/cares/cares/ares_parse_aaaa_reply.c +0 -264
- data/third_party/cares/cares/ares_parse_soa_reply.c +0 -133
- /data/third_party/cares/cares/{ares_rules.h → include/ares_rules.h} +0 -0
- /data/third_party/cares/cares/{ares__read_line.c → src/lib/ares__read_line.c} +0 -0
- /data/third_party/cares/cares/{ares__timeval.c → src/lib/ares__timeval.c} +0 -0
- /data/third_party/cares/cares/{ares_cancel.c → src/lib/ares_cancel.c} +0 -0
- /data/third_party/cares/cares/{ares_destroy.c → src/lib/ares_destroy.c} +0 -0
- /data/third_party/cares/cares/{ares_fds.c → src/lib/ares_fds.c} +0 -0
- /data/third_party/cares/cares/{ares_free_string.c → src/lib/ares_free_string.c} +0 -0
- /data/third_party/cares/cares/{ares_getenv.h → src/lib/ares_getenv.h} +0 -0
- /data/third_party/cares/cares/{ares_getsock.c → src/lib/ares_getsock.c} +0 -0
- /data/third_party/cares/cares/{ares_inet_net_pton.h → src/lib/ares_inet_net_pton.h} +0 -0
- /data/third_party/cares/cares/{ares_iphlpapi.h → src/lib/ares_iphlpapi.h} +0 -0
- /data/third_party/cares/cares/{ares_llist.c → src/lib/ares_llist.c} +0 -0
- /data/third_party/cares/cares/{ares_llist.h → src/lib/ares_llist.h} +0 -0
- /data/third_party/cares/cares/{ares_mkquery.c → src/lib/ares_mkquery.c} +0 -0
- /data/third_party/cares/cares/{ares_nowarn.c → src/lib/ares_nowarn.c} +0 -0
- /data/third_party/cares/cares/{ares_nowarn.h → src/lib/ares_nowarn.h} +0 -0
- /data/third_party/cares/cares/{ares_options.c → src/lib/ares_options.c} +0 -0
- /data/third_party/cares/cares/{ares_platform.c → src/lib/ares_platform.c} +0 -0
- /data/third_party/cares/cares/{ares_platform.h → src/lib/ares_platform.h} +0 -0
- /data/third_party/cares/cares/{ares_strcasecmp.c → src/lib/ares_strcasecmp.c} +0 -0
- /data/third_party/cares/cares/{ares_strcasecmp.h → src/lib/ares_strcasecmp.h} +0 -0
- /data/third_party/cares/cares/{ares_strdup.c → src/lib/ares_strdup.c} +0 -0
- /data/third_party/cares/cares/{ares_strdup.h → src/lib/ares_strdup.h} +0 -0
- /data/third_party/cares/cares/{ares_strerror.c → src/lib/ares_strerror.c} +0 -0
- /data/third_party/cares/cares/{ares_strsplit.h → src/lib/ares_strsplit.h} +0 -0
- /data/third_party/cares/cares/{ares_timeout.c → src/lib/ares_timeout.c} +0 -0
- /data/third_party/cares/cares/{ares_version.c → src/lib/ares_version.c} +0 -0
- /data/third_party/cares/cares/{ares_writev.c → src/lib/ares_writev.c} +0 -0
- /data/third_party/cares/cares/{bitncmp.c → src/lib/bitncmp.c} +0 -0
- /data/third_party/cares/cares/{bitncmp.h → src/lib/bitncmp.h} +0 -0
- /data/third_party/cares/cares/{config-win32.h → src/lib/config-win32.h} +0 -0
- /data/third_party/cares/cares/{setup_once.h → src/lib/setup_once.h} +0 -0
- /data/third_party/cares/cares/{windows_port.c → src/lib/windows_port.c} +0 -0
@@ -21,92 +21,55 @@
|
|
21
21
|
|
22
22
|
#include <grpc/support/port_platform.h>
|
23
23
|
|
24
|
-
#include <
|
25
|
-
|
26
|
-
#include
|
27
|
-
#include
|
24
|
+
#include <stdlib.h>
|
25
|
+
|
26
|
+
#include <cstdint>
|
27
|
+
#include <string>
|
28
|
+
#include <type_traits>
|
29
|
+
#include <utility>
|
30
|
+
|
31
|
+
#include "absl/container/inlined_vector.h"
|
32
|
+
#include "absl/functional/function_ref.h"
|
33
|
+
#include "absl/meta/type_traits.h"
|
34
|
+
#include "absl/strings/numbers.h"
|
35
|
+
#include "absl/strings/string_view.h"
|
28
36
|
#include "absl/types/optional.h"
|
29
37
|
|
30
|
-
#include <grpc/
|
31
|
-
#include <grpc/
|
32
|
-
#include <grpc/support/
|
38
|
+
#include <grpc/impl/codegen/compression_types.h>
|
39
|
+
#include <grpc/status.h>
|
40
|
+
#include <grpc/support/log.h>
|
33
41
|
|
42
|
+
#include "src/core/lib/compression/compression_internal.h"
|
34
43
|
#include "src/core/lib/gprpp/chunked_vector.h"
|
35
44
|
#include "src/core/lib/gprpp/table.h"
|
36
|
-
#include "src/core/lib/
|
45
|
+
#include "src/core/lib/gprpp/time.h"
|
46
|
+
#include "src/core/lib/resource_quota/arena.h"
|
37
47
|
#include "src/core/lib/slice/slice.h"
|
38
|
-
#include "src/core/lib/surface/validate_metadata.h"
|
39
|
-
#include "src/core/lib/transport/metadata.h"
|
40
48
|
#include "src/core/lib/transport/parsed_metadata.h"
|
41
|
-
#include "src/core/lib/transport/static_metadata.h"
|
42
|
-
#include "src/core/lib/transport/timeout_encoding.h"
|
43
|
-
|
44
|
-
typedef struct grpc_linked_mdelem {
|
45
|
-
grpc_linked_mdelem() {}
|
46
|
-
|
47
|
-
grpc_mdelem md;
|
48
|
-
struct grpc_linked_mdelem* next = nullptr;
|
49
|
-
struct grpc_linked_mdelem* prev = nullptr;
|
50
|
-
void* reserved;
|
51
|
-
} grpc_linked_mdelem;
|
52
|
-
|
53
|
-
typedef struct grpc_mdelem_list {
|
54
|
-
size_t count;
|
55
|
-
size_t default_count; // Number of default keys.
|
56
|
-
grpc_linked_mdelem* head;
|
57
|
-
grpc_linked_mdelem* tail;
|
58
|
-
} grpc_mdelem_list;
|
59
|
-
|
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
49
|
|
74
50
|
namespace grpc_core {
|
75
51
|
|
76
52
|
// grpc-timeout metadata trait.
|
77
|
-
// ValueType is defined as
|
53
|
+
// ValueType is defined as Timestamp - an absolute timestamp (i.e. a
|
78
54
|
// deadline!), that is converted to a duration by transports before being
|
79
55
|
// sent.
|
80
56
|
// TODO(ctiller): Move this elsewhere. During the transition we need to be able
|
81
57
|
// to name this in MetadataMap, but ultimately once the transition is done we
|
82
58
|
// should not need to.
|
83
59
|
struct GrpcTimeoutMetadata {
|
84
|
-
|
85
|
-
using
|
60
|
+
static constexpr bool kRepeatable = false;
|
61
|
+
using ValueType = Timestamp;
|
62
|
+
using MementoType = Duration;
|
86
63
|
static absl::string_view key() { return "grpc-timeout"; }
|
87
|
-
static MementoType ParseMemento(Slice value)
|
88
|
-
|
89
|
-
|
90
|
-
|
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; }
|
64
|
+
static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error);
|
65
|
+
static ValueType MementoToValue(MementoType timeout);
|
66
|
+
static Slice Encode(ValueType x);
|
67
|
+
static std::string DisplayValue(MementoType x) { return x.ToString(); }
|
106
68
|
};
|
107
69
|
|
108
70
|
// TE metadata trait.
|
109
71
|
struct TeMetadata {
|
72
|
+
static constexpr bool kRepeatable = false;
|
110
73
|
// HTTP2 says that TE can either be empty or "trailers".
|
111
74
|
// Empty means this trait is not included, "trailers" means kTrailers, and
|
112
75
|
// kInvalid is used to remember an invalid value.
|
@@ -116,32 +79,130 @@ struct TeMetadata {
|
|
116
79
|
};
|
117
80
|
using MementoType = ValueType;
|
118
81
|
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
|
-
}
|
82
|
+
static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error);
|
126
83
|
static ValueType MementoToValue(MementoType te) { return te; }
|
127
84
|
static StaticSlice Encode(ValueType x) {
|
128
85
|
GPR_ASSERT(x == kTrailers);
|
129
|
-
return StaticSlice(
|
130
|
-
}
|
131
|
-
static const char* DisplayValue(MementoType te)
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
86
|
+
return StaticSlice::FromStaticString("trailers");
|
87
|
+
}
|
88
|
+
static const char* DisplayValue(MementoType te);
|
89
|
+
};
|
90
|
+
|
91
|
+
// content-type metadata trait.
|
92
|
+
struct ContentTypeMetadata {
|
93
|
+
static constexpr bool kRepeatable = false;
|
94
|
+
// gRPC says that content-type can be application/grpc[;something]
|
95
|
+
// Core has only ever verified the prefix.
|
96
|
+
// IF we want to start verifying more, we can expand this type.
|
97
|
+
enum ValueType {
|
98
|
+
kApplicationGrpc,
|
99
|
+
kEmpty,
|
100
|
+
kInvalid,
|
101
|
+
};
|
102
|
+
using MementoType = ValueType;
|
103
|
+
static absl::string_view key() { return "content-type"; }
|
104
|
+
static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error);
|
105
|
+
static ValueType MementoToValue(MementoType content_type) {
|
106
|
+
return content_type;
|
107
|
+
}
|
108
|
+
|
109
|
+
static StaticSlice Encode(ValueType x);
|
110
|
+
static const char* DisplayValue(MementoType content_type);
|
111
|
+
};
|
112
|
+
|
113
|
+
// scheme metadata trait.
|
114
|
+
struct HttpSchemeMetadata {
|
115
|
+
static constexpr bool kRepeatable = false;
|
116
|
+
enum ValueType {
|
117
|
+
kHttp,
|
118
|
+
kHttps,
|
119
|
+
kInvalid,
|
120
|
+
};
|
121
|
+
using MementoType = ValueType;
|
122
|
+
static absl::string_view key() { return ":scheme"; }
|
123
|
+
static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error) {
|
124
|
+
return Parse(value.as_string_view(), on_error);
|
125
|
+
}
|
126
|
+
static ValueType Parse(absl::string_view value,
|
127
|
+
MetadataParseErrorFn on_error);
|
128
|
+
static ValueType MementoToValue(MementoType content_type) {
|
129
|
+
return content_type;
|
130
|
+
}
|
131
|
+
static StaticSlice Encode(ValueType x);
|
132
|
+
static const char* DisplayValue(MementoType content_type);
|
133
|
+
};
|
134
|
+
|
135
|
+
// method metadata trait.
|
136
|
+
struct HttpMethodMetadata {
|
137
|
+
static constexpr bool kRepeatable = false;
|
138
|
+
enum ValueType {
|
139
|
+
kPost,
|
140
|
+
kGet,
|
141
|
+
kPut,
|
142
|
+
kInvalid,
|
143
|
+
};
|
144
|
+
using MementoType = ValueType;
|
145
|
+
static absl::string_view key() { return ":method"; }
|
146
|
+
static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error);
|
147
|
+
static ValueType MementoToValue(MementoType content_type) {
|
148
|
+
return content_type;
|
149
|
+
}
|
150
|
+
static StaticSlice Encode(ValueType x);
|
151
|
+
static const char* DisplayValue(MementoType content_type);
|
152
|
+
};
|
153
|
+
|
154
|
+
// Base type for metadata pertaining to a single compression algorithm
|
155
|
+
// (e.g., "grpc-encoding").
|
156
|
+
struct CompressionAlgorithmBasedMetadata {
|
157
|
+
using ValueType = grpc_compression_algorithm;
|
158
|
+
using MementoType = ValueType;
|
159
|
+
static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error);
|
160
|
+
static ValueType MementoToValue(MementoType x) { return x; }
|
161
|
+
static Slice Encode(ValueType x) {
|
162
|
+
GPR_ASSERT(x != GRPC_COMPRESS_ALGORITHMS_COUNT);
|
163
|
+
return Slice::FromStaticString(CompressionAlgorithmAsString(x));
|
164
|
+
}
|
165
|
+
static const char* DisplayValue(MementoType x) {
|
166
|
+
if (const char* p = CompressionAlgorithmAsString(x)) {
|
167
|
+
return p;
|
168
|
+
} else {
|
169
|
+
return "<discarded-invalid-value>";
|
137
170
|
}
|
138
171
|
}
|
139
172
|
};
|
140
173
|
|
174
|
+
// grpc-encoding metadata trait.
|
175
|
+
struct GrpcEncodingMetadata : public CompressionAlgorithmBasedMetadata {
|
176
|
+
static constexpr bool kRepeatable = false;
|
177
|
+
static absl::string_view key() { return "grpc-encoding"; }
|
178
|
+
};
|
179
|
+
|
180
|
+
// grpc-internal-encoding-request metadata trait.
|
181
|
+
struct GrpcInternalEncodingRequest : public CompressionAlgorithmBasedMetadata {
|
182
|
+
static constexpr bool kRepeatable = false;
|
183
|
+
static absl::string_view key() { return "grpc-internal-encoding-request"; }
|
184
|
+
};
|
185
|
+
|
186
|
+
// grpc-accept-encoding metadata trait.
|
187
|
+
struct GrpcAcceptEncodingMetadata {
|
188
|
+
static constexpr bool kRepeatable = false;
|
189
|
+
static absl::string_view key() { return "grpc-accept-encoding"; }
|
190
|
+
using ValueType = CompressionAlgorithmSet;
|
191
|
+
using MementoType = ValueType;
|
192
|
+
static MementoType ParseMemento(Slice value, MetadataParseErrorFn) {
|
193
|
+
return CompressionAlgorithmSet::FromString(value.as_string_view());
|
194
|
+
}
|
195
|
+
static ValueType MementoToValue(MementoType x) { return x; }
|
196
|
+
static Slice Encode(ValueType x) { return x.ToSlice(); }
|
197
|
+
static absl::string_view DisplayValue(MementoType x) { return x.ToString(); }
|
198
|
+
};
|
199
|
+
|
141
200
|
struct SimpleSliceBasedMetadata {
|
142
201
|
using ValueType = Slice;
|
143
202
|
using MementoType = Slice;
|
144
|
-
static MementoType ParseMemento(Slice value) {
|
203
|
+
static MementoType ParseMemento(Slice value, MetadataParseErrorFn) {
|
204
|
+
return value.TakeOwned();
|
205
|
+
}
|
145
206
|
static ValueType MementoToValue(MementoType value) { return value; }
|
146
207
|
static Slice Encode(const ValueType& x) { return x.Ref(); }
|
147
208
|
static absl::string_view DisplayValue(const MementoType& value) {
|
@@ -151,61 +212,245 @@ struct SimpleSliceBasedMetadata {
|
|
151
212
|
|
152
213
|
// user-agent metadata trait.
|
153
214
|
struct UserAgentMetadata : public SimpleSliceBasedMetadata {
|
215
|
+
static constexpr bool kRepeatable = false;
|
154
216
|
static absl::string_view key() { return "user-agent"; }
|
155
217
|
};
|
156
218
|
|
157
219
|
// grpc-message metadata trait.
|
158
220
|
struct GrpcMessageMetadata : public SimpleSliceBasedMetadata {
|
221
|
+
static constexpr bool kRepeatable = false;
|
159
222
|
static absl::string_view key() { return "grpc-message"; }
|
160
223
|
};
|
161
224
|
|
162
225
|
// host metadata trait.
|
163
226
|
struct HostMetadata : public SimpleSliceBasedMetadata {
|
227
|
+
static constexpr bool kRepeatable = false;
|
164
228
|
static absl::string_view key() { return "host"; }
|
165
229
|
};
|
166
230
|
|
167
|
-
//
|
168
|
-
struct
|
169
|
-
static
|
231
|
+
// endpoint-load-metrics-bin metadata trait.
|
232
|
+
struct EndpointLoadMetricsBinMetadata : public SimpleSliceBasedMetadata {
|
233
|
+
static constexpr bool kRepeatable = false;
|
234
|
+
static absl::string_view key() { return "endpoint-load-metrics-bin"; }
|
170
235
|
};
|
171
236
|
|
172
237
|
// grpc-server-stats-bin metadata trait.
|
173
238
|
struct GrpcServerStatsBinMetadata : public SimpleSliceBasedMetadata {
|
239
|
+
static constexpr bool kRepeatable = false;
|
174
240
|
static absl::string_view key() { return "grpc-server-stats-bin"; }
|
175
241
|
};
|
176
242
|
|
177
243
|
// grpc-trace-bin metadata trait.
|
178
244
|
struct GrpcTraceBinMetadata : public SimpleSliceBasedMetadata {
|
245
|
+
static constexpr bool kRepeatable = false;
|
179
246
|
static absl::string_view key() { return "grpc-trace-bin"; }
|
180
247
|
};
|
181
248
|
|
182
249
|
// grpc-tags-bin metadata trait.
|
183
250
|
struct GrpcTagsBinMetadata : public SimpleSliceBasedMetadata {
|
251
|
+
static constexpr bool kRepeatable = false;
|
184
252
|
static absl::string_view key() { return "grpc-tags-bin"; }
|
185
253
|
};
|
186
254
|
|
255
|
+
// :authority metadata trait.
|
256
|
+
struct HttpAuthorityMetadata : public SimpleSliceBasedMetadata {
|
257
|
+
static constexpr bool kRepeatable = false;
|
258
|
+
static absl::string_view key() { return ":authority"; }
|
259
|
+
};
|
260
|
+
|
261
|
+
// :path metadata trait.
|
262
|
+
struct HttpPathMetadata : public SimpleSliceBasedMetadata {
|
263
|
+
static constexpr bool kRepeatable = false;
|
264
|
+
static absl::string_view key() { return ":path"; }
|
265
|
+
};
|
266
|
+
|
267
|
+
// We separate SimpleIntBasedMetadata into two pieces: one that does not
|
268
|
+
// depend on the invalid value, and one that does. This allows the compiler to
|
269
|
+
// easily see the functions that are shared, and helps reduce code bloat here.
|
270
|
+
template <typename Int>
|
271
|
+
struct SimpleIntBasedMetadataBase {
|
272
|
+
using ValueType = Int;
|
273
|
+
using MementoType = Int;
|
274
|
+
static ValueType MementoToValue(MementoType value) { return value; }
|
275
|
+
static Slice Encode(ValueType x) { return Slice::FromInt64(x); }
|
276
|
+
static Int DisplayValue(MementoType x) { return x; }
|
277
|
+
};
|
278
|
+
|
279
|
+
template <typename Int, Int kInvalidValue>
|
280
|
+
struct SimpleIntBasedMetadata : public SimpleIntBasedMetadataBase<Int> {
|
281
|
+
static constexpr Int invalid_value() { return kInvalidValue; }
|
282
|
+
static Int ParseMemento(Slice value, MetadataParseErrorFn on_error) {
|
283
|
+
Int out;
|
284
|
+
if (!absl::SimpleAtoi(value.as_string_view(), &out)) {
|
285
|
+
on_error("not an integer", value);
|
286
|
+
out = kInvalidValue;
|
287
|
+
}
|
288
|
+
return out;
|
289
|
+
}
|
290
|
+
};
|
291
|
+
|
292
|
+
// grpc-status metadata trait.
|
293
|
+
struct GrpcStatusMetadata
|
294
|
+
: public SimpleIntBasedMetadata<grpc_status_code, GRPC_STATUS_UNKNOWN> {
|
295
|
+
static constexpr bool kRepeatable = false;
|
296
|
+
static absl::string_view key() { return "grpc-status"; }
|
297
|
+
};
|
298
|
+
|
299
|
+
// grpc-previous-rpc-attempts metadata trait.
|
300
|
+
struct GrpcPreviousRpcAttemptsMetadata
|
301
|
+
: public SimpleIntBasedMetadata<uint32_t, 0> {
|
302
|
+
static constexpr bool kRepeatable = false;
|
303
|
+
static absl::string_view key() { return "grpc-previous-rpc-attempts"; }
|
304
|
+
};
|
305
|
+
|
306
|
+
// grpc-retry-pushback-ms metadata trait.
|
307
|
+
struct GrpcRetryPushbackMsMetadata {
|
308
|
+
static constexpr bool kRepeatable = false;
|
309
|
+
static absl::string_view key() { return "grpc-retry-pushback-ms"; }
|
310
|
+
using ValueType = Duration;
|
311
|
+
using MementoType = Duration;
|
312
|
+
static ValueType MementoToValue(MementoType x) { return x; }
|
313
|
+
static Slice Encode(Duration x) { return Slice::FromInt64(x.millis()); }
|
314
|
+
static int64_t DisplayValue(Duration x) { return x.millis(); }
|
315
|
+
static Duration ParseMemento(Slice value, MetadataParseErrorFn on_error);
|
316
|
+
};
|
317
|
+
|
318
|
+
// :status metadata trait.
|
319
|
+
// TODO(ctiller): consider moving to uint16_t
|
320
|
+
struct HttpStatusMetadata : public SimpleIntBasedMetadata<uint32_t, 0> {
|
321
|
+
static constexpr bool kRepeatable = false;
|
322
|
+
static absl::string_view key() { return ":status"; }
|
323
|
+
};
|
324
|
+
|
325
|
+
// "secret" metadata trait used to pass load balancing token between filters.
|
326
|
+
// This should not be exposed outside of gRPC core.
|
327
|
+
class GrpcLbClientStats;
|
328
|
+
|
329
|
+
struct GrpcLbClientStatsMetadata {
|
330
|
+
static constexpr bool kRepeatable = false;
|
331
|
+
static absl::string_view key() { return "grpclb_client_stats"; }
|
332
|
+
using ValueType = GrpcLbClientStats*;
|
333
|
+
using MementoType = ValueType;
|
334
|
+
static ValueType MementoToValue(MementoType value) { return value; }
|
335
|
+
static Slice Encode(ValueType) { abort(); }
|
336
|
+
static const char* DisplayValue(MementoType) { return "<internal-lb-stats>"; }
|
337
|
+
static MementoType ParseMemento(Slice, MetadataParseErrorFn) {
|
338
|
+
return nullptr;
|
339
|
+
}
|
340
|
+
};
|
341
|
+
|
342
|
+
// lb-token metadata
|
343
|
+
struct LbTokenMetadata : public SimpleSliceBasedMetadata {
|
344
|
+
static constexpr bool kRepeatable = false;
|
345
|
+
static absl::string_view key() { return "lb-token"; }
|
346
|
+
};
|
347
|
+
|
348
|
+
// lb-cost-bin metadata
|
349
|
+
struct LbCostBinMetadata {
|
350
|
+
static constexpr bool kRepeatable = true;
|
351
|
+
static absl::string_view key() { return "lb-cost-bin"; }
|
352
|
+
struct ValueType {
|
353
|
+
double cost;
|
354
|
+
std::string name;
|
355
|
+
};
|
356
|
+
using MementoType = ValueType;
|
357
|
+
static ValueType MementoToValue(MementoType value) { return value; }
|
358
|
+
static Slice Encode(const ValueType& x);
|
359
|
+
static std::string DisplayValue(MementoType x);
|
360
|
+
static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error);
|
361
|
+
};
|
362
|
+
|
363
|
+
// Annotation added by a transport to note whether a failed request was never
|
364
|
+
// placed on the wire, or never seen by a server.
|
365
|
+
struct GrpcStreamNetworkState {
|
366
|
+
static absl::string_view DebugKey() { return "GrpcStreamNetworkState"; }
|
367
|
+
static constexpr bool kRepeatable = false;
|
368
|
+
enum ValueType : uint8_t {
|
369
|
+
kNotSentOnWire,
|
370
|
+
kNotSeenByServer,
|
371
|
+
};
|
372
|
+
static std::string DisplayValue(ValueType x);
|
373
|
+
};
|
374
|
+
|
375
|
+
// Annotation added by a server transport to note the peer making a request.
|
376
|
+
struct PeerString {
|
377
|
+
static absl::string_view DebugKey() { return "PeerString"; }
|
378
|
+
static constexpr bool kRepeatable = false;
|
379
|
+
using ValueType = absl::string_view;
|
380
|
+
static std::string DisplayValue(ValueType x);
|
381
|
+
};
|
382
|
+
|
383
|
+
// Annotation added by various systems to describe the reason for a failure.
|
384
|
+
struct GrpcStatusContext {
|
385
|
+
static absl::string_view DebugKey() { return "GrpcStatusContext"; }
|
386
|
+
static constexpr bool kRepeatable = true;
|
387
|
+
using ValueType = std::string;
|
388
|
+
static const std::string& DisplayValue(const std::string& x);
|
389
|
+
};
|
390
|
+
|
187
391
|
namespace metadata_detail {
|
188
392
|
|
393
|
+
// Build a key/value formatted debug string.
|
394
|
+
// Output looks like 'key1: value1, key2: value2'
|
395
|
+
// The string is expected to be readable, but not necessarily parsable.
|
396
|
+
class DebugStringBuilder {
|
397
|
+
public:
|
398
|
+
// Add one key/value pair to the output.
|
399
|
+
void Add(absl::string_view key, absl::string_view value);
|
400
|
+
|
401
|
+
// Finalize the output and return the string.
|
402
|
+
// Subsequent Add calls are UB.
|
403
|
+
std::string TakeOutput() { return std::move(out_); }
|
404
|
+
|
405
|
+
private:
|
406
|
+
std::string out_;
|
407
|
+
};
|
408
|
+
|
409
|
+
// IsEncodable: Given a trait, determine if that trait is encodable, or is
|
410
|
+
// just a value attached to a MetadataMap. We use the presence of the key()
|
411
|
+
// static method to determine if a trait is encodable or not - encodable
|
412
|
+
// traits have string names, and non-encodable traits do not.
|
413
|
+
template <typename Trait, typename Ignored = void>
|
414
|
+
struct IsEncodableTrait {
|
415
|
+
static const bool value = false;
|
416
|
+
};
|
417
|
+
|
418
|
+
template <typename Trait>
|
419
|
+
struct IsEncodableTrait<Trait, absl::void_t<decltype(Trait::key())>> {
|
420
|
+
static const bool value = true;
|
421
|
+
};
|
422
|
+
|
189
423
|
// Helper type - maps a string name to a trait.
|
190
|
-
template <typename... Traits>
|
424
|
+
template <typename MustBeVoid, typename... Traits>
|
191
425
|
struct NameLookup;
|
192
426
|
|
193
427
|
template <typename Trait, typename... Traits>
|
194
|
-
struct NameLookup<Trait,
|
428
|
+
struct NameLookup<absl::enable_if_t<IsEncodableTrait<Trait>::value, void>,
|
429
|
+
Trait, Traits...> {
|
195
430
|
// Call op->Found(Trait()) if op->name == Trait::key() for some Trait in
|
196
|
-
// Traits. If not found, call op->
|
431
|
+
// Traits. If not found, call op->NotFound().
|
197
432
|
template <typename Op>
|
198
433
|
static auto Lookup(absl::string_view key, Op* op)
|
199
434
|
-> decltype(op->Found(Trait())) {
|
200
435
|
if (key == Trait::key()) {
|
201
436
|
return op->Found(Trait());
|
202
437
|
}
|
203
|
-
return NameLookup<Traits...>::Lookup(key, op);
|
438
|
+
return NameLookup<void, Traits...>::Lookup(key, op);
|
439
|
+
}
|
440
|
+
};
|
441
|
+
|
442
|
+
template <typename Trait, typename... Traits>
|
443
|
+
struct NameLookup<absl::enable_if_t<!IsEncodableTrait<Trait>::value, void>,
|
444
|
+
Trait, Traits...> {
|
445
|
+
template <typename Op>
|
446
|
+
static auto Lookup(absl::string_view key, Op* op)
|
447
|
+
-> decltype(NameLookup<void, Traits...>::Lookup(key, op)) {
|
448
|
+
return NameLookup<void, Traits...>::Lookup(key, op);
|
204
449
|
}
|
205
450
|
};
|
206
451
|
|
207
452
|
template <>
|
208
|
-
struct NameLookup
|
453
|
+
struct NameLookup<void> {
|
209
454
|
template <typename Op>
|
210
455
|
static auto Lookup(absl::string_view key, Op* op)
|
211
456
|
-> decltype(op->NotFound(key)) {
|
@@ -214,14 +459,16 @@ struct NameLookup<> {
|
|
214
459
|
};
|
215
460
|
|
216
461
|
// 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
|
218
|
-
// value) types, rather than as the number of traits.
|
462
|
+
// By splitting this part out we can scale code size as the number of
|
463
|
+
// (memento, value) types, rather than as the number of traits.
|
219
464
|
template <typename ParseMementoFn, typename MementoToValueFn>
|
220
465
|
struct ParseValue {
|
221
466
|
template <ParseMementoFn parse_memento, MementoToValueFn memento_to_value>
|
222
|
-
static GPR_ATTRIBUTE_NOINLINE auto Parse(Slice* value
|
223
|
-
|
224
|
-
|
467
|
+
static GPR_ATTRIBUTE_NOINLINE auto Parse(Slice* value,
|
468
|
+
MetadataParseErrorFn on_error)
|
469
|
+
-> decltype(memento_to_value(parse_memento(std::move(*value),
|
470
|
+
on_error))) {
|
471
|
+
return memento_to_value(parse_memento(std::move(*value), on_error));
|
225
472
|
}
|
226
473
|
};
|
227
474
|
|
@@ -231,36 +478,44 @@ struct ParseValue {
|
|
231
478
|
template <typename Container>
|
232
479
|
class ParseHelper {
|
233
480
|
public:
|
234
|
-
ParseHelper(Slice value, size_t transport_size)
|
235
|
-
: value_(std::move(value)),
|
481
|
+
ParseHelper(Slice value, MetadataParseErrorFn on_error, size_t transport_size)
|
482
|
+
: value_(std::move(value)),
|
483
|
+
on_error_(on_error),
|
484
|
+
transport_size_(transport_size) {}
|
236
485
|
|
237
486
|
template <typename Trait>
|
238
|
-
ParsedMetadata<Container> Found(Trait trait) {
|
487
|
+
GPR_ATTRIBUTE_NOINLINE ParsedMetadata<Container> Found(Trait trait) {
|
239
488
|
return ParsedMetadata<Container>(
|
240
|
-
trait,
|
489
|
+
trait,
|
490
|
+
ParseValueToMemento<typename Trait::MementoType, Trait::ParseMemento>(),
|
491
|
+
transport_size_);
|
241
492
|
}
|
242
493
|
|
243
494
|
GPR_ATTRIBUTE_NOINLINE ParsedMetadata<Container> NotFound(
|
244
495
|
absl::string_view key) {
|
245
|
-
return ParsedMetadata<Container>(
|
246
|
-
|
247
|
-
key.data(), key.size())),
|
248
|
-
value_.TakeCSlice()));
|
496
|
+
return ParsedMetadata<Container>(Slice::FromCopiedString(key),
|
497
|
+
std::move(value_));
|
249
498
|
}
|
250
499
|
|
251
500
|
private:
|
501
|
+
template <typename T, T (*parse_memento)(Slice, MetadataParseErrorFn)>
|
502
|
+
GPR_ATTRIBUTE_NOINLINE T ParseValueToMemento() {
|
503
|
+
return parse_memento(std::move(value_), on_error_);
|
504
|
+
}
|
505
|
+
|
252
506
|
Slice value_;
|
507
|
+
MetadataParseErrorFn on_error_;
|
253
508
|
const size_t transport_size_;
|
254
509
|
};
|
255
510
|
|
256
511
|
// This is an "Op" type for NameLookup.
|
257
|
-
// Used for MetadataMap::
|
258
|
-
// value and add it to a container.
|
512
|
+
// Used for MetadataMap::Append, its Found/NotFound methods turn a slice into
|
513
|
+
// a value and add it to a container.
|
259
514
|
template <typename Container>
|
260
515
|
class AppendHelper {
|
261
516
|
public:
|
262
|
-
AppendHelper(Container* container, Slice value)
|
263
|
-
: container_(container), value_(std::move(value)) {}
|
517
|
+
AppendHelper(Container* container, Slice value, MetadataParseErrorFn on_error)
|
518
|
+
: container_(container), value_(std::move(value)), on_error_(on_error) {}
|
264
519
|
|
265
520
|
template <typename Trait>
|
266
521
|
GPR_ATTRIBUTE_NOINLINE void Found(Trait trait) {
|
@@ -268,41 +523,403 @@ class AppendHelper {
|
|
268
523
|
trait, ParseValue<decltype(Trait::ParseMemento),
|
269
524
|
decltype(Trait::MementoToValue)>::
|
270
525
|
template Parse<Trait::ParseMemento, Trait::MementoToValue>(
|
271
|
-
&value_));
|
526
|
+
&value_, on_error_));
|
272
527
|
}
|
273
528
|
|
274
|
-
void NotFound(absl::string_view key) {
|
275
|
-
|
276
|
-
container_->Append(grpc_mdelem_from_slices(
|
277
|
-
grpc_slice_intern(
|
278
|
-
grpc_slice_from_static_buffer(key.data(), key.length())),
|
279
|
-
value_.TakeCSlice())));
|
529
|
+
GPR_ATTRIBUTE_NOINLINE void NotFound(absl::string_view key) {
|
530
|
+
container_->unknown_.Append(key, std::move(value_));
|
280
531
|
}
|
281
532
|
|
282
533
|
private:
|
283
534
|
Container* const container_;
|
284
535
|
Slice value_;
|
536
|
+
MetadataParseErrorFn on_error_;
|
537
|
+
};
|
538
|
+
|
539
|
+
// This is an "Op" type for NameLookup.
|
540
|
+
// Used for MetadataMap::Remove, its Found/NotFound methods remove a key from
|
541
|
+
// the container.
|
542
|
+
template <typename Container>
|
543
|
+
class RemoveHelper {
|
544
|
+
public:
|
545
|
+
explicit RemoveHelper(Container* container) : container_(container) {}
|
546
|
+
|
547
|
+
template <typename Trait>
|
548
|
+
GPR_ATTRIBUTE_NOINLINE void Found(Trait trait) {
|
549
|
+
container_->Remove(trait);
|
550
|
+
}
|
551
|
+
|
552
|
+
GPR_ATTRIBUTE_NOINLINE void NotFound(absl::string_view key) {
|
553
|
+
container_->unknown_.Remove(key);
|
554
|
+
}
|
555
|
+
|
556
|
+
private:
|
557
|
+
Container* const container_;
|
558
|
+
};
|
559
|
+
|
560
|
+
// This is an "Op" type for NameLookup.
|
561
|
+
// Used for MetadataMap::GetStringValue, its Found/NotFound methods generated
|
562
|
+
// a string value from the container.
|
563
|
+
template <typename Container>
|
564
|
+
class GetStringValueHelper {
|
565
|
+
public:
|
566
|
+
explicit GetStringValueHelper(const Container* container,
|
567
|
+
std::string* backing)
|
568
|
+
: container_(container), backing_(backing) {}
|
569
|
+
|
570
|
+
template <typename Trait>
|
571
|
+
GPR_ATTRIBUTE_NOINLINE absl::enable_if_t<
|
572
|
+
Trait::kRepeatable == false &&
|
573
|
+
std::is_same<Slice, typename Trait::ValueType>::value,
|
574
|
+
absl::optional<absl::string_view>>
|
575
|
+
Found(Trait) {
|
576
|
+
const auto* value = container_->get_pointer(Trait());
|
577
|
+
if (value == nullptr) return absl::nullopt;
|
578
|
+
return value->as_string_view();
|
579
|
+
}
|
580
|
+
|
581
|
+
template <typename Trait>
|
582
|
+
GPR_ATTRIBUTE_NOINLINE absl::enable_if_t<
|
583
|
+
Trait::kRepeatable == true &&
|
584
|
+
!std::is_same<Slice, typename Trait::ValueType>::value,
|
585
|
+
absl::optional<absl::string_view>>
|
586
|
+
Found(Trait) {
|
587
|
+
const auto* value = container_->get_pointer(Trait());
|
588
|
+
if (value == nullptr) return absl::nullopt;
|
589
|
+
backing_->clear();
|
590
|
+
for (const auto& v : *value) {
|
591
|
+
if (!backing_->empty()) backing_->push_back(',');
|
592
|
+
auto new_segment = Trait::Encode(v);
|
593
|
+
backing_->append(new_segment.begin(), new_segment.end());
|
594
|
+
}
|
595
|
+
return *backing_;
|
596
|
+
}
|
597
|
+
|
598
|
+
template <typename Trait>
|
599
|
+
GPR_ATTRIBUTE_NOINLINE absl::enable_if_t<
|
600
|
+
Trait::kRepeatable == false &&
|
601
|
+
!std::is_same<Slice, typename Trait::ValueType>::value,
|
602
|
+
absl::optional<absl::string_view>>
|
603
|
+
Found(Trait) {
|
604
|
+
const auto* value = container_->get_pointer(Trait());
|
605
|
+
if (value == nullptr) return absl::nullopt;
|
606
|
+
*backing_ = std::string(Trait::Encode(*value).as_string_view());
|
607
|
+
return *backing_;
|
608
|
+
}
|
609
|
+
|
610
|
+
GPR_ATTRIBUTE_NOINLINE absl::optional<absl::string_view> NotFound(
|
611
|
+
absl::string_view key) {
|
612
|
+
return container_->unknown_.GetStringValue(key, backing_);
|
613
|
+
}
|
614
|
+
|
615
|
+
private:
|
616
|
+
const Container* const container_;
|
617
|
+
std::string* backing_;
|
618
|
+
};
|
619
|
+
|
620
|
+
// Sink for key value logs
|
621
|
+
using LogFn = absl::FunctionRef<void(absl::string_view, absl::string_view)>;
|
622
|
+
|
623
|
+
template <typename T>
|
624
|
+
struct AdaptDisplayValueToLog {
|
625
|
+
static std::string ToString(const T& value) { return std::to_string(value); }
|
626
|
+
};
|
627
|
+
|
628
|
+
template <>
|
629
|
+
struct AdaptDisplayValueToLog<std::string> {
|
630
|
+
static std::string ToString(const std::string& value) { return value; }
|
631
|
+
};
|
632
|
+
|
633
|
+
template <>
|
634
|
+
struct AdaptDisplayValueToLog<const std::string&> {
|
635
|
+
static std::string ToString(const std::string& value) { return value; }
|
636
|
+
};
|
637
|
+
|
638
|
+
template <>
|
639
|
+
struct AdaptDisplayValueToLog<Slice> {
|
640
|
+
static std::string ToString(Slice value) {
|
641
|
+
return std::string(value.as_string_view());
|
642
|
+
}
|
643
|
+
};
|
644
|
+
|
645
|
+
template <>
|
646
|
+
struct AdaptDisplayValueToLog<StaticSlice> {
|
647
|
+
static absl::string_view ToString(StaticSlice value) {
|
648
|
+
return value.as_string_view();
|
649
|
+
}
|
650
|
+
};
|
651
|
+
|
652
|
+
template <typename T, typename U, typename V>
|
653
|
+
GPR_ATTRIBUTE_NOINLINE void LogKeyValueTo(absl::string_view key, const T& value,
|
654
|
+
V (*display_value)(U), LogFn log_fn) {
|
655
|
+
log_fn(key, AdaptDisplayValueToLog<V>::ToString(display_value(value)));
|
656
|
+
}
|
657
|
+
|
658
|
+
// Generate a strong type for metadata values per trait.
|
659
|
+
template <typename Which, typename Ignored = void>
|
660
|
+
struct Value;
|
661
|
+
|
662
|
+
template <typename Which>
|
663
|
+
struct Value<Which, absl::enable_if_t<Which::kRepeatable == false &&
|
664
|
+
IsEncodableTrait<Which>::value,
|
665
|
+
void>> {
|
666
|
+
Value() = default;
|
667
|
+
explicit Value(const typename Which::ValueType& value) : value(value) {}
|
668
|
+
explicit Value(typename Which::ValueType&& value)
|
669
|
+
: value(std::forward<typename Which::ValueType>(value)) {}
|
670
|
+
Value(const Value&) = delete;
|
671
|
+
Value& operator=(const Value&) = delete;
|
672
|
+
Value(Value&&) noexcept = default;
|
673
|
+
Value& operator=(Value&& other) noexcept {
|
674
|
+
value = std::move(other.value);
|
675
|
+
return *this;
|
676
|
+
}
|
677
|
+
template <typename Encoder>
|
678
|
+
void EncodeTo(Encoder* encoder) const {
|
679
|
+
encoder->Encode(Which(), value);
|
680
|
+
}
|
681
|
+
void LogTo(LogFn log_fn) const {
|
682
|
+
LogKeyValueTo(Which::key(), value, Which::Encode, log_fn);
|
683
|
+
}
|
684
|
+
using StorageType = typename Which::ValueType;
|
685
|
+
GPR_NO_UNIQUE_ADDRESS StorageType value;
|
686
|
+
};
|
687
|
+
|
688
|
+
template <typename Which>
|
689
|
+
struct Value<Which, absl::enable_if_t<Which::kRepeatable == false &&
|
690
|
+
!IsEncodableTrait<Which>::value,
|
691
|
+
void>> {
|
692
|
+
Value() = default;
|
693
|
+
explicit Value(const typename Which::ValueType& value) : value(value) {}
|
694
|
+
explicit Value(typename Which::ValueType&& value)
|
695
|
+
: value(std::forward<typename Which::ValueType>(value)) {}
|
696
|
+
Value(const Value&) = delete;
|
697
|
+
Value& operator=(const Value&) = delete;
|
698
|
+
Value(Value&&) noexcept = default;
|
699
|
+
Value& operator=(Value&& other) noexcept {
|
700
|
+
value = std::move(other.value);
|
701
|
+
return *this;
|
702
|
+
}
|
703
|
+
template <typename Encoder>
|
704
|
+
void EncodeTo(Encoder*) const {}
|
705
|
+
void LogTo(LogFn log_fn) const {
|
706
|
+
LogKeyValueTo(Which::DebugKey(), value, Which::DisplayValue, log_fn);
|
707
|
+
}
|
708
|
+
using StorageType = typename Which::ValueType;
|
709
|
+
GPR_NO_UNIQUE_ADDRESS StorageType value;
|
710
|
+
};
|
711
|
+
|
712
|
+
template <typename Which>
|
713
|
+
struct Value<Which, absl::enable_if_t<Which::kRepeatable == true &&
|
714
|
+
IsEncodableTrait<Which>::value,
|
715
|
+
void>> {
|
716
|
+
Value() = default;
|
717
|
+
explicit Value(const typename Which::ValueType& value) {
|
718
|
+
this->value.push_back(value);
|
719
|
+
}
|
720
|
+
explicit Value(typename Which::ValueType&& value) {
|
721
|
+
this->value.emplace_back(std::forward<typename Which::ValueType>(value));
|
722
|
+
}
|
723
|
+
Value(const Value&) = delete;
|
724
|
+
Value& operator=(const Value&) = delete;
|
725
|
+
Value(Value&& other) noexcept : value(std::move(other.value)) {}
|
726
|
+
Value& operator=(Value&& other) noexcept {
|
727
|
+
value = std::move(other.value);
|
728
|
+
return *this;
|
729
|
+
}
|
730
|
+
template <typename Encoder>
|
731
|
+
void EncodeTo(Encoder* encoder) const {
|
732
|
+
for (const auto& v : value) {
|
733
|
+
encoder->Encode(Which(), v);
|
734
|
+
}
|
735
|
+
}
|
736
|
+
void LogTo(LogFn log_fn) const {
|
737
|
+
for (const auto& v : value) {
|
738
|
+
LogKeyValueTo(Which::key(), v, Which::Encode, log_fn);
|
739
|
+
}
|
740
|
+
}
|
741
|
+
using StorageType = absl::InlinedVector<typename Which::ValueType, 1>;
|
742
|
+
StorageType value;
|
743
|
+
};
|
744
|
+
|
745
|
+
template <typename Which>
|
746
|
+
struct Value<Which, absl::enable_if_t<Which::kRepeatable == true &&
|
747
|
+
!IsEncodableTrait<Which>::value,
|
748
|
+
void>> {
|
749
|
+
Value() = default;
|
750
|
+
explicit Value(const typename Which::ValueType& value) {
|
751
|
+
this->value.push_back(value);
|
752
|
+
}
|
753
|
+
explicit Value(typename Which::ValueType&& value) {
|
754
|
+
this->value.emplace_back(std::forward<typename Which::ValueType>(value));
|
755
|
+
}
|
756
|
+
Value(const Value&) = delete;
|
757
|
+
Value& operator=(const Value&) = delete;
|
758
|
+
Value(Value&& other) noexcept : value(std::move(other.value)) {}
|
759
|
+
Value& operator=(Value&& other) noexcept {
|
760
|
+
value = std::move(other.value);
|
761
|
+
return *this;
|
762
|
+
}
|
763
|
+
template <typename Encoder>
|
764
|
+
void EncodeTo(Encoder*) const {}
|
765
|
+
void LogTo(LogFn log_fn) const {
|
766
|
+
for (const auto& v : value) {
|
767
|
+
LogKeyValueTo(Which::DebugKey(), v, Which::DisplayValue, log_fn);
|
768
|
+
}
|
769
|
+
}
|
770
|
+
using StorageType = absl::InlinedVector<typename Which::ValueType, 1>;
|
771
|
+
StorageType value;
|
772
|
+
};
|
773
|
+
|
774
|
+
// Encoder to copy some metadata
|
775
|
+
template <typename Output>
|
776
|
+
class CopySink {
|
777
|
+
public:
|
778
|
+
explicit CopySink(Output* dst) : dst_(dst) {}
|
779
|
+
|
780
|
+
template <class T, class V>
|
781
|
+
void Encode(T trait, V value) {
|
782
|
+
dst_->Set(trait, value);
|
783
|
+
}
|
784
|
+
|
785
|
+
template <class T>
|
786
|
+
void Encode(T trait, const Slice& value) {
|
787
|
+
dst_->Set(trait, std::move(value.AsOwned()));
|
788
|
+
}
|
789
|
+
|
790
|
+
void Encode(const Slice& key, const Slice& value) {
|
791
|
+
dst_->unknown_.Append(key.as_string_view(), value.Ref());
|
792
|
+
}
|
793
|
+
|
794
|
+
private:
|
795
|
+
Output* dst_;
|
796
|
+
};
|
797
|
+
|
798
|
+
// Callable for the ForEach in Encode() -- for each value, call the
|
799
|
+
// appropriate encoder method.
|
800
|
+
template <typename Encoder>
|
801
|
+
struct EncodeWrapper {
|
802
|
+
Encoder* encoder;
|
803
|
+
template <typename Which>
|
804
|
+
void operator()(const Value<Which>& which) {
|
805
|
+
which.EncodeTo(encoder);
|
806
|
+
}
|
807
|
+
};
|
808
|
+
|
809
|
+
// Callable for the ForEach in Log()
|
810
|
+
struct LogWrapper {
|
811
|
+
LogFn log_fn;
|
812
|
+
template <typename Which>
|
813
|
+
void operator()(const Value<Which>& which) {
|
814
|
+
which.LogTo(log_fn);
|
815
|
+
}
|
816
|
+
};
|
817
|
+
|
818
|
+
// Encoder to compute TransportSize
|
819
|
+
class TransportSizeEncoder {
|
820
|
+
public:
|
821
|
+
void Encode(const Slice& key, const Slice& value) {
|
822
|
+
size_ += key.length() + value.length() + 32;
|
823
|
+
}
|
824
|
+
|
825
|
+
template <typename Which>
|
826
|
+
void Encode(Which, const typename Which::ValueType& value) {
|
827
|
+
Add(Which(), value);
|
828
|
+
}
|
829
|
+
|
830
|
+
void Encode(ContentTypeMetadata,
|
831
|
+
const typename ContentTypeMetadata::ValueType& value) {
|
832
|
+
if (value == ContentTypeMetadata::kInvalid) return;
|
833
|
+
Add(ContentTypeMetadata(), value);
|
834
|
+
}
|
835
|
+
|
836
|
+
size_t size() const { return size_; }
|
837
|
+
|
838
|
+
private:
|
839
|
+
template <typename Which>
|
840
|
+
void Add(Which, const typename Which::ValueType& value) {
|
841
|
+
size_ += Which::key().length() + Which::Encode(value).length() + 32;
|
842
|
+
}
|
843
|
+
|
844
|
+
uint32_t size_ = 0;
|
845
|
+
};
|
846
|
+
|
847
|
+
// Handle unknown (non-trait-based) fields in the metadata map.
|
848
|
+
class UnknownMap {
|
849
|
+
public:
|
850
|
+
explicit UnknownMap(Arena* arena) : unknown_(arena) {}
|
851
|
+
|
852
|
+
using BackingType = ChunkedVector<std::pair<Slice, Slice>, 10>;
|
853
|
+
|
854
|
+
void Append(absl::string_view key, Slice value);
|
855
|
+
void Remove(absl::string_view key);
|
856
|
+
absl::optional<absl::string_view> GetStringValue(absl::string_view key,
|
857
|
+
std::string* backing) const;
|
858
|
+
|
859
|
+
BackingType::ConstForwardIterator begin() const { return unknown_.cbegin(); }
|
860
|
+
BackingType::ConstForwardIterator end() const { return unknown_.cend(); }
|
861
|
+
|
862
|
+
bool empty() const { return unknown_.empty(); }
|
863
|
+
size_t size() const { return unknown_.size(); }
|
864
|
+
void Clear() { unknown_.Clear(); }
|
865
|
+
Arena* arena() const { return unknown_.arena(); }
|
866
|
+
|
867
|
+
private:
|
868
|
+
// Backing store for added metadata.
|
869
|
+
ChunkedVector<std::pair<Slice, Slice>, 10> unknown_;
|
285
870
|
};
|
286
871
|
|
287
872
|
} // namespace metadata_detail
|
288
873
|
|
874
|
+
// Helper function for encoders
|
875
|
+
// Given a metadata trait, convert the value to a slice.
|
876
|
+
template <typename Which>
|
877
|
+
absl::enable_if_t<std::is_same<typename Which::ValueType, Slice>::value,
|
878
|
+
const Slice&>
|
879
|
+
MetadataValueAsSlice(const Slice& slice) {
|
880
|
+
return slice;
|
881
|
+
}
|
882
|
+
|
883
|
+
template <typename Which>
|
884
|
+
absl::enable_if_t<!std::is_same<typename Which::ValueType, Slice>::value, Slice>
|
885
|
+
MetadataValueAsSlice(typename Which::ValueType value) {
|
886
|
+
return Slice(Which::Encode(value));
|
887
|
+
}
|
888
|
+
|
289
889
|
// 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
890
|
//
|
299
|
-
// MetadataMap takes a list of traits. Each of these trait
|
300
|
-
// one metadata field that is used by core, and so should have
|
301
|
-
// handling than just using the generic APIs.
|
891
|
+
// MetadataMap takes a derived class and list of traits. Each of these trait
|
892
|
+
// objects defines one metadata field that is used by core, and so should have
|
893
|
+
// more specialized handling than just using the generic APIs.
|
894
|
+
//
|
895
|
+
// MetadataMap is the backing type for some derived type via the curiously
|
896
|
+
// recursive template pattern. This is because many types consumed by
|
897
|
+
// MetadataMap require the container type to operate on, and many of those
|
898
|
+
// types are instantiated one per trait. A naive implementation without the
|
899
|
+
// Derived type would, for traits A,B,C, then instantiate for some
|
900
|
+
// T<Container, Trait>:
|
901
|
+
// - T<MetadataMap<A,B,C>, A>,
|
902
|
+
// - T<MetadataMap<A,B,C>, B>,
|
903
|
+
// - T<MetadataMap<A,B,C>, C>.
|
904
|
+
// Since these types ultimately need to be recorded in the .dynstr segment
|
905
|
+
// for dynamic linkers (if gRPC is linked as a static library) this would
|
906
|
+
// create O(N^2) bytes of symbols even in stripped libraries. To avoid this
|
907
|
+
// we use the derived type (e.g. grpc_metadata_batch right now) to capture
|
908
|
+
// the container type, and we would write T<grpc_metadata_batch, A>, etc...
|
909
|
+
// Note that now the container type uses a number of bytes that is independent
|
910
|
+
// of the number of traits, and so we return to a linear symbol table growth
|
911
|
+
// function.
|
302
912
|
//
|
303
|
-
// Each trait object has
|
304
|
-
//
|
913
|
+
// Each trait object has one of two possible signatures, depending on whether
|
914
|
+
// that traits field is encodable or not.
|
915
|
+
// Non-encodable traits are carried in a MetadataMap, but are never passed to
|
916
|
+
// the application nor serialized to wire.
|
917
|
+
//
|
918
|
+
// Encodable traits have the following signature:
|
919
|
+
// // Traits for the "grpc-xyz" metadata field:
|
305
920
|
// struct GrpcXyzMetadata {
|
921
|
+
// // Can this metadata field be repeated?
|
922
|
+
// static constexpr bool kRepeatable = ...;
|
306
923
|
// // The type that's stored on MetadataBatch
|
307
924
|
// using ValueType = ...;
|
308
925
|
// // The type that's stored in compression/decompression tables
|
@@ -311,17 +928,39 @@ class AppendHelper {
|
|
311
928
|
// static absl::string_view key() { return "grpc-xyz"; }
|
312
929
|
// // Parse a memento from a slice
|
313
930
|
// // Takes ownership of value
|
314
|
-
//
|
931
|
+
// // Calls fn in the case of an error that should be reported to the user
|
932
|
+
// static MementoType ParseMemento(Slice value, MementoParseErrorFn fn) {
|
933
|
+
// ...
|
934
|
+
// }
|
315
935
|
// // Convert a memento to a value
|
316
936
|
// static ValueType MementoToValue(MementoType memento) { ... }
|
317
937
|
// // Convert a value to its canonical text wire format (the format that
|
318
938
|
// // ParseMemento will accept!)
|
319
939
|
// static Slice Encode(const ValueType& value);
|
320
|
-
// // Convert a value to something that can be passed to StrCat and
|
940
|
+
// // Convert a value to something that can be passed to StrCat and
|
941
|
+
// displayed
|
321
942
|
// // for debugging
|
322
943
|
// static SomeStrCatableType DisplayValue(MementoType value) { ... }
|
323
944
|
// };
|
324
945
|
//
|
946
|
+
// Non-encodable traits are determined by missing the key() method, and have
|
947
|
+
// the following signature (and by convention omit the Metadata part of the
|
948
|
+
// type name):
|
949
|
+
// // Traits for the GrpcXyz field:
|
950
|
+
// struct GrpcXyz {
|
951
|
+
// // The string key that should be used for debug dumps - should not be a
|
952
|
+
// // valid http2 key (ie all lower case)
|
953
|
+
// static absl::string_view DebugKey() { return "GRPC_XYZ"; }
|
954
|
+
// // Can this metadata field be repeated?
|
955
|
+
// static constexpr bool kRepeatable = ...;
|
956
|
+
// // The type that's stored on MetadataBatch
|
957
|
+
// using ValueType = ...;
|
958
|
+
// // Convert a value to something that can be passed to StrCat and
|
959
|
+
// displayed
|
960
|
+
// // for debugging
|
961
|
+
// static SomeStrCatableType DisplayValue(ValueType value) { ... }
|
962
|
+
// };
|
963
|
+
//
|
325
964
|
// About parsing and mementos:
|
326
965
|
//
|
327
966
|
// Many gRPC transports exchange metadata as key/value strings, but also allow
|
@@ -330,10 +969,10 @@ class AppendHelper {
|
|
330
969
|
// in the compression table. This is what mementos are used for.
|
331
970
|
//
|
332
971
|
// 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()
|
334
|
-
// that returns a ParsedMetadata object. That ParsedMetadata object
|
335
|
-
// be used to set the same value on many different MetadataMaps
|
336
|
-
// to reparse.
|
972
|
+
// ParseMemento. This is exposed to users of MetadataMap via the Parse()
|
973
|
+
// method, that returns a ParsedMetadata object. That ParsedMetadata object
|
974
|
+
// can in turn be used to set the same value on many different MetadataMaps
|
975
|
+
// without having to reparse.
|
337
976
|
//
|
338
977
|
// Implementation wise, ParsedMetadata is a type erased wrapper around
|
339
978
|
// MementoType. When we set a value on MetadataMap, we first turn that memento
|
@@ -341,7 +980,7 @@ class AppendHelper {
|
|
341
980
|
// for grpc-timeout we make the memento the timeout expressed on the wire, but
|
342
981
|
// we make the value the timestamp of when the timeout will expire (i.e. the
|
343
982
|
// deadline).
|
344
|
-
template <typename... Traits>
|
983
|
+
template <class Derived, typename... Traits>
|
345
984
|
class MetadataMap {
|
346
985
|
public:
|
347
986
|
explicit MetadataMap(Arena* arena);
|
@@ -350,7 +989,10 @@ class MetadataMap {
|
|
350
989
|
MetadataMap(const MetadataMap&) = delete;
|
351
990
|
MetadataMap& operator=(const MetadataMap&) = delete;
|
352
991
|
MetadataMap(MetadataMap&&) noexcept;
|
353
|
-
|
992
|
+
// We never create MetadataMap directly, instead we create Derived, but we
|
993
|
+
// want to be able to move it without redeclaring this.
|
994
|
+
// NOLINTNEXTLINE(misc-unconventional-assign-operator)
|
995
|
+
Derived& operator=(MetadataMap&&) noexcept;
|
354
996
|
|
355
997
|
// Encode this metadata map into some encoder.
|
356
998
|
// For each field that is set in the MetadataMap, call
|
@@ -367,17 +1009,35 @@ class MetadataMap {
|
|
367
1009
|
// transitions.
|
368
1010
|
template <typename Encoder>
|
369
1011
|
void Encode(Encoder* encoder) const {
|
370
|
-
|
371
|
-
|
1012
|
+
table_.ForEach(metadata_detail::EncodeWrapper<Encoder>{encoder});
|
1013
|
+
for (const auto& unk : unknown_) {
|
1014
|
+
encoder->Encode(unk.first, unk.second);
|
372
1015
|
}
|
373
|
-
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
// Similar to Encode, but targeted at logging: for each metadatum,
|
1019
|
+
// call f(key, value) as absl::string_views.
|
1020
|
+
void Log(metadata_detail::LogFn log_fn) const {
|
1021
|
+
table_.ForEach(metadata_detail::LogWrapper{log_fn});
|
1022
|
+
for (const auto& unk : unknown_) {
|
1023
|
+
log_fn(unk.first.as_string_view(), unk.second.as_string_view());
|
1024
|
+
}
|
1025
|
+
}
|
1026
|
+
|
1027
|
+
std::string DebugString() const {
|
1028
|
+
metadata_detail::DebugStringBuilder builder;
|
1029
|
+
Log([&builder](absl::string_view key, absl::string_view value) {
|
1030
|
+
builder.Add(key, value);
|
1031
|
+
});
|
1032
|
+
return builder.TakeOutput();
|
374
1033
|
}
|
375
1034
|
|
376
1035
|
// Get the pointer to the value of some known metadata.
|
377
1036
|
// Returns nullptr if the metadata is not present.
|
378
1037
|
// Causes a compilation error if Which is not an element of Traits.
|
379
1038
|
template <typename Which>
|
380
|
-
const typename Which
|
1039
|
+
const typename metadata_detail::Value<Which>::StorageType* get_pointer(
|
1040
|
+
Which) const {
|
381
1041
|
if (auto* p = table_.template get<Value<Which>>()) return &p->value;
|
382
1042
|
return nullptr;
|
383
1043
|
}
|
@@ -386,11 +1046,20 @@ class MetadataMap {
|
|
386
1046
|
// Returns nullptr if the metadata is not present.
|
387
1047
|
// Causes a compilation error if Which is not an element of Traits.
|
388
1048
|
template <typename Which>
|
389
|
-
typename Which
|
1049
|
+
typename metadata_detail::Value<Which>::StorageType* get_pointer(Which) {
|
390
1050
|
if (auto* p = table_.template get<Value<Which>>()) return &p->value;
|
391
1051
|
return nullptr;
|
392
1052
|
}
|
393
1053
|
|
1054
|
+
// Get the pointer to the value of some known metadata.
|
1055
|
+
// Adds the default value for the metadata is not present.
|
1056
|
+
// Causes a compilation error if Which is not an element of Traits.
|
1057
|
+
template <typename Which>
|
1058
|
+
typename metadata_detail::Value<Which>::StorageType* GetOrCreatePointer(
|
1059
|
+
Which) {
|
1060
|
+
return &table_.template get_or_create<Value<Which>>()->value;
|
1061
|
+
}
|
1062
|
+
|
394
1063
|
// Get the value of some known metadata.
|
395
1064
|
// Returns nullopt if the metadata is not present.
|
396
1065
|
// Causes a compilation error if Which is not an element of Traits.
|
@@ -403,9 +1072,14 @@ class MetadataMap {
|
|
403
1072
|
// Set the value of some known metadata.
|
404
1073
|
// Returns a pointer to the new value.
|
405
1074
|
template <typename Which, typename... Args>
|
406
|
-
|
407
|
-
|
408
|
-
|
1075
|
+
absl::enable_if_t<Which::kRepeatable == false, void> Set(Which,
|
1076
|
+
Args&&... args) {
|
1077
|
+
table_.template set<Value<Which>>(std::forward<Args>(args)...);
|
1078
|
+
}
|
1079
|
+
template <typename Which, typename... Args>
|
1080
|
+
absl::enable_if_t<Which::kRepeatable == true, void> Set(Which,
|
1081
|
+
Args&&... args) {
|
1082
|
+
GetOrCreatePointer(Which())->emplace_back(std::forward<Args>(args)...);
|
409
1083
|
}
|
410
1084
|
|
411
1085
|
// Remove a specific piece of known metadata.
|
@@ -414,13 +1088,31 @@ class MetadataMap {
|
|
414
1088
|
table_.template clear<Value<Which>>();
|
415
1089
|
}
|
416
1090
|
|
1091
|
+
// Remove some metadata by name
|
1092
|
+
void Remove(absl::string_view key) {
|
1093
|
+
metadata_detail::RemoveHelper<Derived> helper(static_cast<Derived*>(this));
|
1094
|
+
metadata_detail::NameLookup<void, Traits...>::Lookup(key, &helper);
|
1095
|
+
}
|
1096
|
+
|
1097
|
+
void Remove(const char* key) { Remove(absl::string_view(key)); }
|
1098
|
+
|
1099
|
+
// Retrieve some metadata by name
|
1100
|
+
absl::optional<absl::string_view> GetStringValue(absl::string_view name,
|
1101
|
+
std::string* buffer) const {
|
1102
|
+
metadata_detail::GetStringValueHelper<Derived> helper(
|
1103
|
+
static_cast<const Derived*>(this), buffer);
|
1104
|
+
return metadata_detail::NameLookup<void, Traits...>::Lookup(name, &helper);
|
1105
|
+
}
|
1106
|
+
|
417
1107
|
// Extract a piece of known metadata.
|
418
1108
|
// Returns nullopt if the metadata was not present, or the value if it was.
|
419
1109
|
// The same as:
|
420
1110
|
// auto value = m.get(T());
|
421
1111
|
// m.Remove(T());
|
422
1112
|
template <typename Which>
|
423
|
-
absl::
|
1113
|
+
absl::enable_if_t<Which::kRepeatable == false,
|
1114
|
+
absl::optional<typename Which::ValueType>>
|
1115
|
+
Take(Which which) {
|
424
1116
|
if (auto* p = get_pointer(which)) {
|
425
1117
|
absl::optional<typename Which::ValueType> value(std::move(*p));
|
426
1118
|
Remove(which);
|
@@ -429,702 +1121,143 @@ class MetadataMap {
|
|
429
1121
|
return {};
|
430
1122
|
}
|
431
1123
|
|
1124
|
+
// Extract repeated known metadata.
|
1125
|
+
// Returns an empty vector if the metadata was not present.
|
1126
|
+
template <typename Which>
|
1127
|
+
absl::enable_if_t<Which::kRepeatable == true,
|
1128
|
+
typename metadata_detail::Value<Which>::StorageType>
|
1129
|
+
Take(Which which) {
|
1130
|
+
if (auto* p = get_pointer(which)) {
|
1131
|
+
typename Value<Which>::StorageType value = std::move(*p);
|
1132
|
+
Remove(which);
|
1133
|
+
return value;
|
1134
|
+
}
|
1135
|
+
return {};
|
1136
|
+
}
|
1137
|
+
|
432
1138
|
// Parse metadata from a key/value pair, and return an object representing
|
433
1139
|
// that result.
|
434
1140
|
// TODO(ctiller): key should probably be an absl::string_view.
|
435
1141
|
// Once we don't care about interning anymore, make that change!
|
436
|
-
static ParsedMetadata<
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
1142
|
+
static ParsedMetadata<Derived> Parse(absl::string_view key, Slice value,
|
1143
|
+
uint32_t transport_size,
|
1144
|
+
MetadataParseErrorFn on_error) {
|
1145
|
+
metadata_detail::ParseHelper<Derived> helper(value.TakeOwned(), on_error,
|
1146
|
+
transport_size);
|
1147
|
+
return metadata_detail::NameLookup<void, Traits...>::Lookup(key, &helper);
|
441
1148
|
}
|
442
1149
|
|
443
1150
|
// Set a value from a parsed metadata object.
|
444
|
-
|
445
|
-
|
446
|
-
return m.SetOnContainer(this);
|
1151
|
+
void Set(const ParsedMetadata<Derived>& m) {
|
1152
|
+
m.SetOnContainer(static_cast<Derived*>(this));
|
447
1153
|
}
|
448
1154
|
|
449
1155
|
// Append a key/value pair - takes ownership of value
|
450
|
-
void Append(absl::string_view key, Slice value
|
451
|
-
|
452
|
-
metadata_detail::
|
1156
|
+
void Append(absl::string_view key, Slice value,
|
1157
|
+
MetadataParseErrorFn on_error) {
|
1158
|
+
metadata_detail::AppendHelper<Derived> helper(static_cast<Derived*>(this),
|
1159
|
+
value.TakeOwned(), on_error);
|
1160
|
+
metadata_detail::NameLookup<void, Traits...>::Lookup(key, &helper);
|
453
1161
|
}
|
454
1162
|
|
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
1163
|
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
1164
|
size_t TransportSize() const;
|
515
|
-
|
516
|
-
|
517
|
-
|
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_; }
|
1165
|
+
Derived Copy() const;
|
1166
|
+
bool empty() const { return table_.empty() && unknown_.empty(); }
|
1167
|
+
size_t count() const { return table_.count() + unknown_.size(); }
|
558
1168
|
|
559
1169
|
private:
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
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
|
-
};
|
1170
|
+
friend class metadata_detail::AppendHelper<Derived>;
|
1171
|
+
friend class metadata_detail::GetStringValueHelper<Derived>;
|
1172
|
+
friend class metadata_detail::RemoveHelper<Derived>;
|
1173
|
+
friend class metadata_detail::CopySink<Derived>;
|
1174
|
+
friend class ParsedMetadata<Derived>;
|
586
1175
|
|
587
|
-
|
588
|
-
|
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
|
-
}
|
1176
|
+
template <typename Which>
|
1177
|
+
using Value = metadata_detail::Value<Which>;
|
676
1178
|
|
677
1179
|
// Table of known metadata types.
|
678
1180
|
Table<Value<Traits>...> table_;
|
679
|
-
|
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_;
|
1181
|
+
metadata_detail::UnknownMap unknown_;
|
684
1182
|
};
|
685
1183
|
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
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_);
|
1184
|
+
// Ok/not-ok check for metadata maps that contain GrpcStatusMetadata, so that
|
1185
|
+
// they can be used as result types for TrySeq.
|
1186
|
+
template <typename Derived, typename... Args>
|
1187
|
+
inline bool IsStatusOk(const MetadataMap<Derived, Args...>& m) {
|
1188
|
+
return m.get(GrpcStatusMetadata()).value_or(GRPC_STATUS_UNKNOWN) ==
|
1189
|
+
GRPC_STATUS_OK;
|
705
1190
|
}
|
706
|
-
#endif /* NDEBUG */
|
707
1191
|
|
708
|
-
template <typename... Traits>
|
709
|
-
MetadataMap<Traits...>::MetadataMap(Arena* arena) :
|
710
|
-
memset(&list_, 0, sizeof(list_));
|
711
|
-
memset(&idx_, 0, sizeof(idx_));
|
712
|
-
}
|
1192
|
+
template <typename Derived, typename... Traits>
|
1193
|
+
MetadataMap<Derived, Traits...>::MetadataMap(Arena* arena) : unknown_(arena) {}
|
713
1194
|
|
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
|
-
}
|
1195
|
+
template <typename Derived, typename... Traits>
|
1196
|
+
MetadataMap<Derived, Traits...>::MetadataMap(MetadataMap&& other) noexcept
|
1197
|
+
: table_(std::move(other.table_)), unknown_(std::move(other.unknown_)) {}
|
722
1198
|
|
723
|
-
|
724
|
-
|
1199
|
+
// We never create MetadataMap directly, instead we create Derived, but we
|
1200
|
+
// want to be able to move it without redeclaring this.
|
1201
|
+
// NOLINTNEXTLINE(misc-unconventional-assign-operator)
|
1202
|
+
template <typename Derived, typename... Traits>
|
1203
|
+
Derived& MetadataMap<Derived, Traits...>::operator=(
|
725
1204
|
MetadataMap&& other) noexcept {
|
726
|
-
Clear();
|
727
1205
|
table_ = std::move(other.table_);
|
728
|
-
|
729
|
-
|
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();
|
1206
|
+
unknown_ = std::move(other.unknown_);
|
1207
|
+
return static_cast<Derived&>(*this);
|
877
1208
|
}
|
878
1209
|
|
879
|
-
template <typename... Traits>
|
880
|
-
|
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
|
-
}
|
1210
|
+
template <typename Derived, typename... Traits>
|
1211
|
+
MetadataMap<Derived, Traits...>::~MetadataMap() = default;
|
889
1212
|
|
890
|
-
template <typename... Traits>
|
891
|
-
|
892
|
-
|
893
|
-
|
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;
|
1213
|
+
template <typename Derived, typename... Traits>
|
1214
|
+
void MetadataMap<Derived, Traits...>::Clear() {
|
1215
|
+
table_.ClearAll();
|
1216
|
+
unknown_.Clear();
|
909
1217
|
}
|
910
1218
|
|
911
|
-
template <typename... Traits>
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
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;
|
1219
|
+
template <typename Derived, typename... Traits>
|
1220
|
+
size_t MetadataMap<Derived, Traits...>::TransportSize() const {
|
1221
|
+
metadata_detail::TransportSizeEncoder enc;
|
1222
|
+
Encode(&enc);
|
1223
|
+
return enc.size();
|
931
1224
|
}
|
932
1225
|
|
933
|
-
template <typename... Traits>
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
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;
|
1226
|
+
template <typename Derived, typename... Traits>
|
1227
|
+
Derived MetadataMap<Derived, Traits...>::Copy() const {
|
1228
|
+
Derived out(unknown_.arena());
|
1229
|
+
metadata_detail::CopySink<Derived> sink(&out);
|
1230
|
+
Encode(&sink);
|
1231
|
+
return out;
|
966
1232
|
}
|
967
1233
|
|
968
1234
|
} // namespace grpc_core
|
969
1235
|
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
1236
|
+
struct grpc_metadata_batch;
|
1237
|
+
|
1238
|
+
using grpc_metadata_batch_base = grpc_core::MetadataMap<
|
1239
|
+
grpc_metadata_batch,
|
1240
|
+
// Colon prefixed headers first
|
1241
|
+
grpc_core::HttpPathMetadata, grpc_core::HttpAuthorityMetadata,
|
1242
|
+
grpc_core::HttpMethodMetadata, grpc_core::HttpStatusMetadata,
|
1243
|
+
grpc_core::HttpSchemeMetadata,
|
1244
|
+
// Non-colon prefixed headers begin here
|
1245
|
+
grpc_core::ContentTypeMetadata, grpc_core::TeMetadata,
|
1246
|
+
grpc_core::GrpcEncodingMetadata, grpc_core::GrpcInternalEncodingRequest,
|
1247
|
+
grpc_core::GrpcAcceptEncodingMetadata, grpc_core::GrpcStatusMetadata,
|
1248
|
+
grpc_core::GrpcTimeoutMetadata, grpc_core::GrpcPreviousRpcAttemptsMetadata,
|
1249
|
+
grpc_core::GrpcRetryPushbackMsMetadata, grpc_core::UserAgentMetadata,
|
1250
|
+
grpc_core::GrpcMessageMetadata, grpc_core::HostMetadata,
|
1251
|
+
grpc_core::EndpointLoadMetricsBinMetadata,
|
974
1252
|
grpc_core::GrpcServerStatsBinMetadata, grpc_core::GrpcTraceBinMetadata,
|
975
|
-
grpc_core::GrpcTagsBinMetadata
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
/* Returns the transport size of the batch. */
|
985
|
-
inline size_t grpc_metadata_batch_size(grpc_metadata_batch* batch) {
|
986
|
-
return batch->TransportSize();
|
987
|
-
}
|
988
|
-
|
989
|
-
/** Remove \a storage from the batch, unreffing the mdelem contained */
|
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
|
-
}
|
998
|
-
|
999
|
-
/** Substitute a new mdelem for an old value */
|
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
|
-
}
|
1005
|
-
|
1006
|
-
void grpc_metadata_batch_set_value(grpc_linked_mdelem* storage,
|
1007
|
-
const grpc_slice& value);
|
1008
|
-
|
1009
|
-
/** Returns metadata value(s) for the specified key.
|
1010
|
-
If the key is not present in the batch, returns absl::nullopt.
|
1011
|
-
If the key is present exactly once in the batch, returns a string_view of
|
1012
|
-
that value.
|
1013
|
-
If the key is present more than once in the batch, constructs a
|
1014
|
-
comma-concatenated string of all values in concatenated_value and returns a
|
1015
|
-
string_view of that string. */
|
1016
|
-
inline absl::optional<absl::string_view> grpc_metadata_batch_get_value(
|
1017
|
-
grpc_metadata_batch* batch, absl::string_view target_key,
|
1018
|
-
std::string* concatenated_value) {
|
1019
|
-
return batch->GetValue(target_key, concatenated_value);
|
1020
|
-
}
|
1021
|
-
|
1022
|
-
/** Add \a storage to the beginning of \a batch. storage->md is
|
1023
|
-
assumed to be valid.
|
1024
|
-
\a storage is owned by the caller and must survive for the
|
1025
|
-
lifetime of batch. This usually means it should be around
|
1026
|
-
for the lifetime of the call. */
|
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(
|
1033
|
-
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
1034
|
-
grpc_metadata_batch_callouts_index idx) {
|
1035
|
-
return batch->LinkHead(storage, idx);
|
1036
|
-
}
|
1037
|
-
|
1038
|
-
/** Add \a storage to the end of \a batch. storage->md is
|
1039
|
-
assumed to be valid.
|
1040
|
-
\a storage is owned by the caller and must survive for the
|
1041
|
-
lifetime of batch. This usually means it should be around
|
1042
|
-
for the lifetime of the call. */
|
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(
|
1049
|
-
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
1050
|
-
grpc_metadata_batch_callouts_index idx) {
|
1051
|
-
return batch->LinkTail(storage, idx);
|
1052
|
-
}
|
1053
|
-
|
1054
|
-
/** Add \a elem_to_add as the first element in \a batch, using
|
1055
|
-
\a storage as backing storage for the linked list element.
|
1056
|
-
\a storage is owned by the caller and must survive for the
|
1057
|
-
lifetime of batch. This usually means it should be around
|
1058
|
-
for the lifetime of the call.
|
1059
|
-
Takes ownership of \a elem_to_add */
|
1060
|
-
inline grpc_error_handle grpc_metadata_batch_add_head(
|
1061
|
-
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
1062
|
-
grpc_mdelem elem_to_add) {
|
1063
|
-
return batch->AddHead(storage, elem_to_add);
|
1064
|
-
}
|
1065
|
-
|
1066
|
-
// TODO(arjunroy, roth): Remove redundant methods.
|
1067
|
-
// add/link_head/tail are almost identical.
|
1068
|
-
inline grpc_error_handle GRPC_MUST_USE_RESULT grpc_metadata_batch_add_head(
|
1069
|
-
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
1070
|
-
grpc_metadata_batch_callouts_index idx) {
|
1071
|
-
return grpc_metadata_batch_link_head(batch, storage, idx);
|
1072
|
-
}
|
1073
|
-
|
1074
|
-
inline grpc_error_handle GRPC_MUST_USE_RESULT grpc_metadata_batch_add_head(
|
1075
|
-
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
1076
|
-
grpc_mdelem elem_to_add, grpc_metadata_batch_callouts_index idx) {
|
1077
|
-
GPR_DEBUG_ASSERT(!GRPC_MDISNULL(elem_to_add));
|
1078
|
-
storage->md = elem_to_add;
|
1079
|
-
return grpc_metadata_batch_add_head(batch, storage, idx);
|
1080
|
-
}
|
1081
|
-
|
1082
|
-
/** Add \a elem_to_add as the last element in \a batch, using
|
1083
|
-
\a storage as backing storage for the linked list element.
|
1084
|
-
\a storage is owned by the caller and must survive for the
|
1085
|
-
lifetime of batch. This usually means it should be around
|
1086
|
-
for the lifetime of the call.
|
1087
|
-
Takes ownership of \a elem_to_add */
|
1088
|
-
inline GRPC_MUST_USE_RESULT grpc_error_handle grpc_metadata_batch_add_tail(
|
1089
|
-
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
1090
|
-
grpc_mdelem elem_to_add) {
|
1091
|
-
return batch->AddTail(storage, elem_to_add);
|
1092
|
-
}
|
1093
|
-
|
1094
|
-
inline grpc_error_handle GRPC_MUST_USE_RESULT grpc_metadata_batch_add_tail(
|
1095
|
-
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
1096
|
-
grpc_metadata_batch_callouts_index idx) {
|
1097
|
-
return grpc_metadata_batch_link_tail(batch, storage, idx);
|
1098
|
-
}
|
1099
|
-
|
1100
|
-
inline grpc_error_handle GRPC_MUST_USE_RESULT grpc_metadata_batch_add_tail(
|
1101
|
-
grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
|
1102
|
-
grpc_mdelem elem_to_add, grpc_metadata_batch_callouts_index idx) {
|
1103
|
-
GPR_DEBUG_ASSERT(!GRPC_MDISNULL(elem_to_add));
|
1104
|
-
storage->md = elem_to_add;
|
1105
|
-
return grpc_metadata_batch_add_tail(batch, storage, idx);
|
1106
|
-
}
|
1107
|
-
|
1108
|
-
typedef grpc_filtered_mdelem (*grpc_metadata_batch_filter_func)(
|
1109
|
-
void* user_data, grpc_mdelem elem);
|
1110
|
-
inline GRPC_MUST_USE_RESULT grpc_error_handle grpc_metadata_batch_filter(
|
1111
|
-
grpc_metadata_batch* batch, grpc_metadata_batch_filter_func func,
|
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
|
-
}
|
1116
|
-
|
1117
|
-
inline void grpc_metadata_batch_assert_ok(grpc_metadata_batch* batch) {
|
1118
|
-
batch->AssertOk();
|
1119
|
-
}
|
1120
|
-
|
1121
|
-
/// Copies \a src to \a dst.
|
1122
|
-
///
|
1123
|
-
/// For each mdelem in \a src, if the mdelem is of storage types
|
1124
|
-
/// GRPC_MDELEM_STORAGE_INTERNED or GRPC_MDELEM_STORAGE_ALLOCATED,
|
1125
|
-
/// refs the original mdelem for the copy. Otherwise, makes a new
|
1126
|
-
/// mdelem that will hold its own refs to the key and value slices.
|
1127
|
-
void grpc_metadata_batch_copy(const grpc_metadata_batch* src,
|
1128
|
-
grpc_metadata_batch* dst);
|
1253
|
+
grpc_core::GrpcTagsBinMetadata, grpc_core::GrpcLbClientStatsMetadata,
|
1254
|
+
grpc_core::LbCostBinMetadata, grpc_core::LbTokenMetadata,
|
1255
|
+
// Non-encodable things
|
1256
|
+
grpc_core::GrpcStreamNetworkState, grpc_core::PeerString,
|
1257
|
+
grpc_core::GrpcStatusContext>;
|
1258
|
+
|
1259
|
+
struct grpc_metadata_batch : public grpc_metadata_batch_base {
|
1260
|
+
using grpc_metadata_batch_base::grpc_metadata_batch_base;
|
1261
|
+
};
|
1129
1262
|
|
1130
1263
|
#endif /* GRPC_CORE_LIB_TRANSPORT_METADATA_BATCH_H */
|