grpc 1.18.0 → 1.22.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 +4731 -7404
- data/etc/roots.pem +146 -0
- data/include/grpc/grpc.h +11 -6
- data/include/grpc/grpc_security.h +297 -4
- data/include/grpc/grpc_security_constants.h +1 -1
- data/include/grpc/impl/codegen/byte_buffer.h +13 -0
- data/include/grpc/impl/codegen/gpr_types.h +1 -1
- data/include/grpc/impl/codegen/grpc_types.h +30 -7
- data/include/grpc/impl/codegen/port_platform.h +88 -7
- data/include/grpc/impl/codegen/slice.h +2 -22
- data/include/grpc/impl/codegen/status.h +2 -1
- data/include/grpc/impl/codegen/sync_posix.h +18 -0
- data/include/grpc/slice.h +3 -3
- data/src/core/ext/filters/client_channel/backup_poller.cc +21 -16
- data/src/core/ext/filters/client_channel/backup_poller.h +8 -2
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +3 -1
- data/src/core/ext/filters/client_channel/client_channel.cc +2435 -1557
- data/src/core/ext/filters/client_channel/client_channel.h +2 -10
- data/src/core/ext/filters/client_channel/client_channel_channelz.cc +6 -89
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +8 -33
- data/src/core/ext/filters/client_channel/client_channel_factory.cc +22 -34
- data/src/core/ext/filters/client_channel/client_channel_factory.h +19 -38
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +9 -11
- data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +179 -0
- data/src/core/ext/filters/client_channel/global_subchannel_pool.h +68 -0
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +59 -55
- data/src/core/ext/filters/client_channel/health/health_check_client.h +20 -9
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +146 -157
- data/src/core/ext/filters/client_channel/http_connect_handshaker.h +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +29 -32
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +844 -859
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +3 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +2 -6
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +6 -2
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +14 -12
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +16 -12
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +185 -312
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +143 -375
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +192 -245
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +1554 -955
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc +0 -43
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc +14 -10
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h +2 -2
- data/src/core/ext/filters/client_channel/lb_policy.cc +115 -22
- data/src/core/ext/filters/client_channel/lb_policy.h +260 -129
- data/src/core/ext/filters/client_channel/lb_policy_factory.h +5 -2
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +107 -4
- data/src/core/ext/filters/client_channel/lb_policy_registry.h +10 -3
- data/src/core/ext/filters/client_channel/local_subchannel_pool.cc +96 -0
- data/src/core/ext/filters/client_channel/local_subchannel_pool.h +56 -0
- data/src/core/ext/filters/client_channel/parse_address.cc +24 -5
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +121 -122
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +84 -2
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +3 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +179 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +24 -10
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +111 -47
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +7 -13
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +2 -2
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc +39 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc +0 -6
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +2 -64
- data/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc +28 -0
- data/src/core/{lib/iomgr/network_status_tracker.cc → ext/filters/client_channel/resolver/dns/dns_resolver_selection.h} +8 -15
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +36 -82
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +111 -72
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +13 -8
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +28 -63
- data/src/core/ext/filters/client_channel/resolver.cc +54 -1
- data/src/core/ext/filters/client_channel/resolver.h +52 -23
- data/src/core/ext/filters/client_channel/resolver_factory.h +3 -1
- data/src/core/ext/filters/client_channel/resolver_registry.cc +5 -2
- data/src/core/ext/filters/client_channel/resolver_registry.h +5 -4
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +368 -241
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +58 -76
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +543 -0
- data/src/core/ext/filters/client_channel/resolving_lb_policy.h +139 -0
- data/src/core/ext/filters/client_channel/server_address.cc +4 -54
- data/src/core/ext/filters/client_channel/server_address.h +1 -13
- data/src/core/ext/filters/client_channel/service_config.cc +329 -0
- data/src/core/ext/filters/client_channel/service_config.h +205 -0
- data/src/core/ext/filters/client_channel/subchannel.cc +803 -838
- data/src/core/ext/filters/client_channel/subchannel.h +295 -128
- data/src/core/ext/filters/client_channel/subchannel_interface.h +113 -0
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.cc +97 -0
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +94 -0
- data/src/core/ext/filters/deadline/deadline_filter.cc +3 -4
- data/src/core/ext/filters/deadline/deadline_filter.h +3 -2
- data/src/core/ext/filters/http/client/http_client_filter.cc +7 -5
- data/src/core/ext/filters/http/client/http_client_filter.h +1 -1
- data/src/core/ext/filters/http/client_authority_filter.cc +6 -3
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +4 -3
- data/src/core/ext/filters/http/server/http_server_filter.cc +18 -12
- data/src/core/ext/filters/max_age/max_age_filter.cc +5 -2
- data/src/core/ext/filters/message_size/message_size_filter.cc +119 -77
- data/src/core/ext/filters/message_size/message_size_filter.h +33 -0
- data/src/core/ext/transport/chttp2/alpn/alpn.h +1 -1
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +13 -12
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +45 -47
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +134 -143
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +68 -21
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +4 -4
- data/src/core/ext/transport/chttp2/transport/bin_decoder.h +4 -4
- data/src/core/ext/transport/chttp2/transport/bin_encoder.cc +7 -6
- data/src/core/ext/transport/chttp2/transport/bin_encoder.h +4 -3
- data/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc +9 -7
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +156 -94
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/flow_control.h +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +33 -37
- data/src/core/ext/transport/chttp2/transport/frame_data.h +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +6 -5
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +3 -2
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +5 -4
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +8 -6
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +2 -1
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +6 -4
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +2 -1
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +7 -6
- data/src/core/ext/transport/chttp2/transport/frame_window_update.h +1 -1
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +74 -55
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +33 -11
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +3 -2
- data/src/core/ext/transport/chttp2/transport/hpack_table.cc +7 -14
- data/src/core/ext/transport/chttp2/transport/hpack_table.h +10 -1
- data/src/core/ext/transport/chttp2/transport/incoming_metadata.cc +9 -5
- data/src/core/ext/transport/chttp2/transport/incoming_metadata.h +9 -3
- data/src/core/ext/transport/chttp2/transport/internal.h +43 -30
- data/src/core/ext/transport/chttp2/transport/parsing.cc +52 -70
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +3 -3
- data/src/core/ext/transport/chttp2/transport/writing.cc +70 -33
- data/src/core/ext/transport/inproc/inproc_transport.cc +26 -18
- data/src/core/lib/channel/channel_args.cc +2 -101
- data/src/core/lib/channel/channel_args.h +3 -37
- data/src/core/lib/channel/channel_stack.h +10 -6
- data/src/core/lib/channel/channel_trace.cc +4 -4
- data/src/core/lib/channel/channel_trace.h +4 -4
- data/src/core/lib/channel/channelz.cc +168 -38
- data/src/core/lib/channel/channelz.h +40 -44
- data/src/core/lib/channel/channelz_registry.cc +75 -107
- data/src/core/lib/channel/channelz_registry.h +10 -28
- data/src/core/lib/channel/connected_channel.cc +2 -2
- data/src/core/lib/channel/context.h +2 -2
- data/src/core/lib/channel/handshaker.cc +151 -218
- data/src/core/lib/channel/handshaker.h +110 -101
- data/src/core/lib/channel/handshaker_factory.h +11 -19
- data/src/core/lib/channel/handshaker_registry.cc +67 -51
- data/src/core/lib/channel/handshaker_registry.h +21 -16
- data/src/core/lib/compression/algorithm_metadata.h +3 -3
- data/src/core/lib/compression/compression.cc +14 -9
- data/src/core/lib/compression/compression_args.cc +127 -0
- data/src/core/lib/compression/compression_args.h +55 -0
- data/src/core/lib/compression/compression_internal.cc +16 -12
- data/src/core/lib/compression/compression_internal.h +1 -1
- data/src/core/lib/compression/stream_compression.cc +3 -2
- data/src/core/lib/compression/stream_compression.h +2 -2
- data/src/core/lib/compression/stream_compression_gzip.cc +9 -9
- data/src/core/lib/debug/trace.cc +13 -7
- data/src/core/lib/debug/trace.h +14 -1
- data/src/core/lib/gpr/arena.h +13 -9
- data/src/core/lib/gpr/cpu_posix.cc +5 -3
- data/src/core/lib/gpr/env.h +3 -6
- data/src/core/lib/gpr/env_linux.cc +6 -1
- data/src/core/lib/gpr/env_posix.cc +5 -0
- data/src/core/lib/gpr/env_windows.cc +7 -5
- data/src/core/lib/gpr/log.cc +9 -13
- data/src/core/lib/gpr/log_posix.cc +2 -1
- data/src/core/lib/gpr/string.cc +20 -7
- data/src/core/lib/gpr/string.h +10 -3
- data/src/core/lib/gpr/sync_posix.cc +65 -4
- data/src/core/lib/gpr/time.cc +8 -0
- data/src/core/lib/gpr/time_posix.cc +21 -2
- data/src/core/lib/gprpp/arena.cc +103 -0
- data/src/core/lib/gprpp/arena.h +121 -0
- data/src/core/lib/gprpp/atomic.h +75 -5
- data/src/core/lib/gprpp/fork.cc +13 -32
- data/src/core/lib/gprpp/fork.h +5 -1
- data/src/core/lib/gprpp/global_config.h +96 -0
- data/src/core/lib/gprpp/global_config_custom.h +29 -0
- data/src/core/lib/gprpp/global_config_env.cc +135 -0
- data/src/core/lib/gprpp/global_config_env.h +131 -0
- data/src/core/lib/gprpp/global_config_generic.h +44 -0
- data/src/core/lib/gprpp/inlined_vector.h +8 -0
- data/src/core/lib/gprpp/map.h +436 -0
- data/src/core/lib/gprpp/memory.h +2 -2
- data/src/core/lib/gprpp/optional.h +48 -0
- data/src/core/lib/gprpp/orphanable.h +6 -5
- data/src/core/lib/gprpp/{mutex_lock.h → pair.h} +15 -19
- data/src/core/lib/gprpp/ref_counted.h +36 -17
- data/src/core/lib/gprpp/sync.h +126 -0
- data/src/core/lib/gprpp/thd.h +42 -7
- data/src/core/lib/gprpp/thd_posix.cc +31 -13
- data/src/core/lib/gprpp/thd_windows.cc +47 -34
- data/src/core/lib/http/httpcli.cc +6 -5
- data/src/core/lib/http/httpcli_security_connector.cc +13 -15
- data/src/core/lib/http/parser.cc +3 -2
- data/src/core/lib/http/parser.h +2 -1
- data/src/core/lib/iomgr/buffer_list.cc +182 -24
- data/src/core/lib/iomgr/buffer_list.h +72 -10
- data/src/core/lib/iomgr/call_combiner.cc +84 -90
- data/src/core/lib/iomgr/call_combiner.h +75 -82
- data/src/core/lib/iomgr/cfstream_handle.cc +203 -0
- data/src/core/lib/iomgr/cfstream_handle.h +86 -0
- data/src/core/lib/iomgr/combiner.cc +11 -3
- data/src/core/lib/iomgr/combiner.h +1 -1
- data/src/core/lib/iomgr/endpoint.cc +2 -2
- data/src/core/lib/iomgr/endpoint.h +3 -2
- data/src/core/lib/iomgr/endpoint_cfstream.cc +375 -0
- data/src/core/lib/iomgr/endpoint_cfstream.h +49 -0
- data/src/core/lib/iomgr/endpoint_pair_windows.cc +2 -2
- data/src/core/lib/iomgr/error.cc +21 -17
- data/src/core/lib/iomgr/error.h +36 -6
- data/src/core/lib/iomgr/error_cfstream.cc +52 -0
- data/src/core/lib/iomgr/error_cfstream.h +31 -0
- data/src/core/lib/iomgr/error_internal.h +1 -1
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +44 -28
- data/src/core/lib/iomgr/ev_epollex_linux.cc +173 -194
- data/src/core/lib/iomgr/ev_poll_posix.cc +16 -487
- data/src/core/lib/iomgr/ev_posix.cc +29 -19
- data/src/core/lib/iomgr/ev_posix.h +19 -3
- data/src/core/lib/iomgr/ev_windows.cc +2 -2
- data/src/core/lib/iomgr/exec_ctx.cc +1 -0
- data/src/core/lib/iomgr/exec_ctx.h +137 -8
- data/src/core/lib/iomgr/executor.cc +147 -95
- data/src/core/lib/iomgr/executor.h +55 -49
- data/src/core/lib/iomgr/fork_posix.cc +6 -5
- data/src/core/lib/{gprpp/atomic_with_std.h → iomgr/grpc_if_nametoindex.h} +8 -13
- data/src/core/lib/iomgr/grpc_if_nametoindex_posix.cc +42 -0
- data/src/core/lib/iomgr/{network_status_tracker.h → grpc_if_nametoindex_unsupported.cc} +15 -9
- data/src/core/lib/iomgr/internal_errqueue.cc +3 -5
- data/src/core/lib/iomgr/internal_errqueue.h +105 -3
- data/src/core/lib/iomgr/iomgr.cc +20 -13
- data/src/core/lib/iomgr/iomgr.h +15 -0
- data/src/core/lib/iomgr/iomgr_custom.cc +17 -3
- data/src/core/lib/iomgr/iomgr_custom.h +2 -0
- data/src/core/lib/iomgr/iomgr_internal.cc +10 -0
- data/src/core/lib/iomgr/iomgr_internal.h +12 -0
- data/src/core/lib/iomgr/iomgr_posix.cc +19 -2
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +93 -0
- data/src/core/lib/iomgr/iomgr_windows.cc +18 -2
- data/src/core/lib/iomgr/lockfree_event.cc +4 -4
- data/src/core/lib/iomgr/port.h +35 -0
- data/src/core/lib/iomgr/resolve_address_posix.cc +4 -3
- data/src/core/lib/iomgr/resolve_address_windows.cc +2 -1
- data/src/core/lib/iomgr/resource_quota.cc +40 -37
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +6 -2
- data/src/core/lib/iomgr/socket_windows.cc +19 -0
- data/src/core/lib/iomgr/socket_windows.h +8 -0
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +216 -0
- data/src/core/lib/iomgr/tcp_client_custom.cc +2 -2
- data/src/core/lib/iomgr/tcp_client_posix.cc +3 -3
- data/src/core/lib/iomgr/tcp_client_windows.cc +7 -5
- data/src/core/lib/iomgr/tcp_custom.cc +10 -14
- data/src/core/lib/iomgr/tcp_posix.cc +256 -140
- data/src/core/lib/iomgr/tcp_server.cc +5 -0
- data/src/core/lib/iomgr/tcp_server.h +24 -0
- data/src/core/lib/iomgr/tcp_server_custom.cc +14 -12
- data/src/core/lib/iomgr/tcp_server_posix.cc +86 -12
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +3 -0
- data/src/core/lib/iomgr/tcp_server_windows.cc +13 -11
- data/src/core/lib/iomgr/tcp_uv.cc +5 -7
- data/src/core/lib/iomgr/tcp_windows.cc +8 -14
- data/src/core/lib/iomgr/timer.h +2 -1
- data/src/core/lib/iomgr/timer_generic.cc +16 -16
- data/src/core/lib/iomgr/timer_manager.cc +20 -11
- data/src/core/lib/iomgr/udp_server.cc +8 -6
- data/src/core/lib/iomgr/wakeup_fd_posix.cc +1 -19
- data/src/core/lib/json/json.cc +1 -4
- data/src/core/lib/profiling/basic_timers.cc +10 -4
- data/src/core/lib/security/context/security_context.cc +6 -7
- data/src/core/lib/security/context/security_context.h +3 -4
- data/src/core/lib/security/credentials/alts/alts_credentials.cc +1 -1
- data/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc +2 -2
- data/src/core/lib/security/credentials/composite/composite_credentials.h +4 -0
- data/src/core/lib/security/credentials/credentials.h +9 -1
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +15 -3
- data/src/core/lib/security/credentials/google_default/google_default_credentials.h +2 -0
- data/src/core/lib/security/credentials/jwt/json_token.cc +1 -1
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +2 -1
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +10 -6
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +2 -1
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +3 -3
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +9 -8
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +20 -2
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +2 -2
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +192 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +210 -0
- data/src/core/lib/security/credentials/tls/spiffe_credentials.cc +129 -0
- data/src/core/lib/security/credentials/tls/spiffe_credentials.h +62 -0
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +10 -8
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +13 -12
- data/src/core/lib/security/security_connector/load_system_roots_linux.cc +7 -5
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +10 -8
- data/src/core/lib/security/security_connector/security_connector.cc +0 -1
- data/src/core/lib/security/security_connector/security_connector.h +3 -3
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +39 -38
- data/src/core/lib/security/security_connector/ssl_utils.cc +164 -26
- data/src/core/lib/security/security_connector/ssl_utils.h +70 -1
- data/src/core/lib/security/security_connector/tls/spiffe_security_connector.cc +426 -0
- data/src/core/lib/security/security_connector/tls/spiffe_security_connector.h +122 -0
- data/src/core/lib/security/transport/auth_filters.h +5 -2
- data/src/core/lib/security/transport/client_auth_filter.cc +55 -50
- data/src/core/lib/security/transport/secure_endpoint.cc +6 -6
- data/src/core/lib/security/transport/security_handshaker.cc +271 -303
- data/src/core/lib/security/transport/security_handshaker.h +11 -2
- data/src/core/lib/security/transport/server_auth_filter.cc +3 -3
- data/src/core/lib/slice/b64.h +2 -2
- data/src/core/lib/slice/percent_encoding.cc +3 -3
- data/src/core/lib/slice/percent_encoding.h +3 -3
- data/src/core/lib/slice/slice.cc +174 -122
- data/src/core/lib/slice/slice_buffer.cc +54 -21
- data/src/core/lib/slice/slice_hash_table.h +4 -4
- data/src/core/lib/slice/slice_intern.cc +49 -107
- data/src/core/lib/slice/slice_internal.h +264 -3
- data/src/core/lib/slice/slice_string_helpers.cc +10 -1
- data/src/core/lib/slice/slice_string_helpers.h +3 -1
- data/src/core/lib/slice/slice_utils.h +50 -0
- data/src/core/lib/slice/slice_weak_hash_table.h +6 -6
- data/src/core/lib/surface/api_trace.h +1 -1
- data/src/core/lib/surface/byte_buffer_reader.cc +17 -0
- data/src/core/lib/surface/call.cc +67 -46
- data/src/core/lib/surface/call.h +7 -2
- data/src/core/lib/surface/call_details.cc +0 -1
- data/src/core/lib/surface/channel.cc +89 -97
- data/src/core/lib/surface/channel.h +60 -6
- data/src/core/lib/surface/channel_init.h +5 -0
- data/src/core/lib/surface/completion_queue.cc +221 -216
- data/src/core/lib/surface/completion_queue.h +2 -1
- data/src/core/lib/surface/init.cc +82 -33
- data/src/core/lib/surface/init.h +1 -0
- data/src/core/lib/surface/init_secure.cc +1 -1
- data/src/core/lib/surface/lame_client.cc +5 -7
- data/src/core/lib/surface/server.cc +42 -47
- data/src/core/lib/surface/validate_metadata.cc +14 -8
- data/src/core/lib/surface/validate_metadata.h +13 -2
- data/src/core/lib/surface/version.cc +1 -1
- data/src/core/lib/transport/bdp_estimator.cc +3 -3
- data/src/core/lib/transport/bdp_estimator.h +2 -2
- data/src/core/lib/transport/connectivity_state.cc +10 -40
- data/src/core/lib/transport/connectivity_state.h +0 -8
- data/src/core/lib/transport/error_utils.cc +12 -0
- data/src/core/lib/transport/metadata.cc +258 -267
- data/src/core/lib/transport/metadata.h +227 -16
- data/src/core/lib/transport/metadata_batch.cc +1 -1
- data/src/core/lib/transport/metadata_batch.h +1 -1
- data/src/core/lib/transport/static_metadata.cc +477 -399
- data/src/core/lib/transport/static_metadata.h +273 -182
- data/src/core/lib/transport/status_metadata.cc +3 -3
- data/src/core/lib/transport/timeout_encoding.cc +1 -1
- data/src/core/lib/transport/timeout_encoding.h +1 -1
- data/src/core/lib/transport/transport.cc +39 -72
- data/src/core/lib/transport/transport.h +59 -24
- data/src/core/lib/transport/transport_impl.h +1 -1
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +3 -3
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +1 -1
- data/src/core/tsi/alts/handshaker/alts_shared_resource.h +1 -1
- data/src/core/tsi/alts/handshaker/transport_security_common_api.cc +4 -3
- data/src/core/tsi/alts/handshaker/transport_security_common_api.h +1 -1
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +1 -1
- data/src/core/tsi/fake_transport_security.cc +4 -4
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +1 -1
- data/src/core/tsi/ssl_transport_security.cc +12 -10
- data/src/core/tsi/ssl_transport_security.h +24 -4
- data/src/ruby/bin/math_pb.rb +18 -16
- data/src/ruby/ext/grpc/extconf.rb +12 -4
- data/src/ruby/ext/grpc/rb_call_credentials.c +8 -5
- data/src/ruby/ext/grpc/rb_channel.c +14 -10
- data/src/ruby/ext/grpc/rb_channel_credentials.c +8 -4
- data/src/ruby/ext/grpc/rb_compression_options.c +9 -7
- data/src/ruby/ext/grpc/rb_event_thread.c +2 -0
- data/src/ruby/ext/grpc/rb_grpc.c +23 -24
- data/src/ruby/ext/grpc/rb_grpc.h +4 -2
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +24 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +36 -0
- data/src/ruby/ext/grpc/rb_server.c +8 -4
- data/src/ruby/lib/grpc/errors.rb +22 -3
- data/src/ruby/lib/grpc/generic/bidi_call.rb +1 -1
- data/src/ruby/lib/grpc/generic/rpc_server.rb +2 -2
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/README.md +1 -1
- data/src/ruby/pb/grpc/health/v1/health_pb.rb +13 -10
- data/src/ruby/pb/grpc/health/v1/health_services_pb.rb +18 -0
- data/src/ruby/pb/src/proto/grpc/testing/empty_pb.rb +3 -1
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +58 -56
- data/src/ruby/pb/src/proto/grpc/testing/test_pb.rb +2 -0
- data/src/ruby/spec/errors_spec.rb +141 -0
- data/third_party/cares/cares/ares.h +12 -0
- data/third_party/cares/cares/ares_create_query.c +5 -1
- data/third_party/cares/cares/ares_data.c +74 -73
- data/third_party/cares/cares/ares_destroy.c +6 -1
- data/third_party/cares/cares/ares_gethostbyaddr.c +5 -5
- data/third_party/cares/cares/ares_gethostbyname.c +15 -4
- data/third_party/cares/cares/ares_getnameinfo.c +11 -0
- data/third_party/cares/cares/ares_init.c +274 -173
- data/third_party/cares/cares/ares_library_init.c +21 -3
- data/third_party/cares/cares/ares_options.c +6 -2
- data/third_party/cares/cares/ares_parse_naptr_reply.c +7 -6
- data/third_party/cares/cares/ares_parse_ptr_reply.c +4 -2
- data/third_party/cares/cares/ares_platform.c +7 -0
- data/third_party/cares/cares/ares_private.h +19 -11
- data/third_party/cares/cares/ares_process.c +27 -2
- data/third_party/cares/cares/ares_rules.h +1 -1
- data/third_party/cares/cares/ares_search.c +7 -0
- data/third_party/cares/cares/ares_send.c +6 -0
- data/third_party/cares/cares/ares_strsplit.c +174 -0
- data/third_party/cares/cares/ares_strsplit.h +43 -0
- data/third_party/cares/cares/ares_version.h +4 -4
- data/third_party/cares/cares/config-win32.h +1 -1
- data/third_party/cares/cares/inet_ntop.c +2 -3
- data/third_party/cares/config_darwin/ares_config.h +3 -0
- data/third_party/cares/config_freebsd/ares_config.h +3 -0
- data/third_party/cares/config_linux/ares_config.h +3 -0
- data/third_party/cares/config_openbsd/ares_config.h +3 -0
- metadata +83 -48
- data/src/core/ext/filters/client_channel/request_routing.cc +0 -936
- data/src/core/ext/filters/client_channel/request_routing.h +0 -177
- data/src/core/ext/filters/client_channel/subchannel_index.cc +0 -248
- data/src/core/ext/filters/client_channel/subchannel_index.h +0 -76
- data/src/core/lib/channel/handshaker_factory.cc +0 -42
- data/src/core/lib/gpr/arena.cc +0 -192
- data/src/core/lib/gprpp/atomic_with_atm.h +0 -57
- data/src/core/lib/iomgr/wakeup_fd_cv.cc +0 -107
- data/src/core/lib/iomgr/wakeup_fd_cv.h +0 -69
- data/src/core/lib/transport/service_config.cc +0 -106
- data/src/core/lib/transport/service_config.h +0 -249
@@ -29,6 +29,8 @@
|
|
29
29
|
|
30
30
|
#include <grpc/support/port_platform.h>
|
31
31
|
|
32
|
+
#include <cstdint>
|
33
|
+
|
32
34
|
#include "src/core/lib/transport/metadata.h"
|
33
35
|
|
34
36
|
#define GRPC_STATIC_MDSTR_COUNT 107
|
@@ -256,279 +258,366 @@ extern const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT];
|
|
256
258
|
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \
|
257
259
|
(grpc_static_slice_table[106])
|
258
260
|
|
259
|
-
extern const grpc_slice_refcount_vtable grpc_static_metadata_vtable;
|
260
261
|
extern grpc_slice_refcount
|
261
262
|
grpc_static_metadata_refcounts[GRPC_STATIC_MDSTR_COUNT];
|
262
263
|
#define GRPC_IS_STATIC_METADATA_STRING(slice) \
|
263
264
|
((slice).refcount != NULL && \
|
264
|
-
(slice).refcount->
|
265
|
+
(slice).refcount->GetType() == grpc_slice_refcount::Type::STATIC)
|
265
266
|
|
266
267
|
#define GRPC_STATIC_METADATA_INDEX(static_slice) \
|
267
|
-
((
|
268
|
+
(static_cast<intptr_t>( \
|
269
|
+
((static_slice).refcount - grpc_static_metadata_refcounts)))
|
268
270
|
|
269
271
|
#define GRPC_STATIC_MDELEM_COUNT 86
|
270
|
-
extern
|
272
|
+
extern grpc_core::StaticMetadata
|
273
|
+
grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];
|
271
274
|
extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];
|
272
275
|
/* ":authority": "" */
|
273
|
-
#define GRPC_MDELEM_AUTHORITY_EMPTY
|
274
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[0],
|
276
|
+
#define GRPC_MDELEM_AUTHORITY_EMPTY \
|
277
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[0].data(), \
|
278
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
275
279
|
/* ":method": "GET" */
|
276
|
-
#define GRPC_MDELEM_METHOD_GET
|
277
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[1],
|
280
|
+
#define GRPC_MDELEM_METHOD_GET \
|
281
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[1].data(), \
|
282
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
278
283
|
/* ":method": "POST" */
|
279
|
-
#define GRPC_MDELEM_METHOD_POST
|
280
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[2],
|
284
|
+
#define GRPC_MDELEM_METHOD_POST \
|
285
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[2].data(), \
|
286
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
281
287
|
/* ":path": "/" */
|
282
|
-
#define GRPC_MDELEM_PATH_SLASH
|
283
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[3],
|
288
|
+
#define GRPC_MDELEM_PATH_SLASH \
|
289
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[3].data(), \
|
290
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
284
291
|
/* ":path": "/index.html" */
|
285
|
-
#define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML
|
286
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[4],
|
292
|
+
#define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML \
|
293
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[4].data(), \
|
294
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
287
295
|
/* ":scheme": "http" */
|
288
|
-
#define GRPC_MDELEM_SCHEME_HTTP
|
289
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[5],
|
296
|
+
#define GRPC_MDELEM_SCHEME_HTTP \
|
297
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[5].data(), \
|
298
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
290
299
|
/* ":scheme": "https" */
|
291
|
-
#define GRPC_MDELEM_SCHEME_HTTPS
|
292
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[6],
|
300
|
+
#define GRPC_MDELEM_SCHEME_HTTPS \
|
301
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[6].data(), \
|
302
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
293
303
|
/* ":status": "200" */
|
294
|
-
#define GRPC_MDELEM_STATUS_200
|
295
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[7],
|
304
|
+
#define GRPC_MDELEM_STATUS_200 \
|
305
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[7].data(), \
|
306
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
296
307
|
/* ":status": "204" */
|
297
|
-
#define GRPC_MDELEM_STATUS_204
|
298
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[8],
|
308
|
+
#define GRPC_MDELEM_STATUS_204 \
|
309
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[8].data(), \
|
310
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
299
311
|
/* ":status": "206" */
|
300
|
-
#define GRPC_MDELEM_STATUS_206
|
301
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[9],
|
312
|
+
#define GRPC_MDELEM_STATUS_206 \
|
313
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[9].data(), \
|
314
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
302
315
|
/* ":status": "304" */
|
303
|
-
#define GRPC_MDELEM_STATUS_304
|
304
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[10],
|
316
|
+
#define GRPC_MDELEM_STATUS_304 \
|
317
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[10].data(), \
|
318
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
305
319
|
/* ":status": "400" */
|
306
|
-
#define GRPC_MDELEM_STATUS_400
|
307
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[11],
|
320
|
+
#define GRPC_MDELEM_STATUS_400 \
|
321
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[11].data(), \
|
322
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
308
323
|
/* ":status": "404" */
|
309
|
-
#define GRPC_MDELEM_STATUS_404
|
310
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[12],
|
324
|
+
#define GRPC_MDELEM_STATUS_404 \
|
325
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[12].data(), \
|
326
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
311
327
|
/* ":status": "500" */
|
312
|
-
#define GRPC_MDELEM_STATUS_500
|
313
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[13],
|
328
|
+
#define GRPC_MDELEM_STATUS_500 \
|
329
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[13].data(), \
|
330
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
314
331
|
/* "accept-charset": "" */
|
315
|
-
#define GRPC_MDELEM_ACCEPT_CHARSET_EMPTY
|
316
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[14],
|
332
|
+
#define GRPC_MDELEM_ACCEPT_CHARSET_EMPTY \
|
333
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[14].data(), \
|
334
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
317
335
|
/* "accept-encoding": "gzip, deflate" */
|
318
|
-
#define GRPC_MDELEM_ACCEPT_ENCODING_GZIP_COMMA_DEFLATE
|
319
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[15],
|
336
|
+
#define GRPC_MDELEM_ACCEPT_ENCODING_GZIP_COMMA_DEFLATE \
|
337
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[15].data(), \
|
338
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
320
339
|
/* "accept-language": "" */
|
321
|
-
#define GRPC_MDELEM_ACCEPT_LANGUAGE_EMPTY
|
322
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[16],
|
340
|
+
#define GRPC_MDELEM_ACCEPT_LANGUAGE_EMPTY \
|
341
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[16].data(), \
|
342
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
323
343
|
/* "accept-ranges": "" */
|
324
|
-
#define GRPC_MDELEM_ACCEPT_RANGES_EMPTY
|
325
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[17],
|
344
|
+
#define GRPC_MDELEM_ACCEPT_RANGES_EMPTY \
|
345
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[17].data(), \
|
346
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
326
347
|
/* "accept": "" */
|
327
|
-
#define GRPC_MDELEM_ACCEPT_EMPTY
|
328
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[18],
|
348
|
+
#define GRPC_MDELEM_ACCEPT_EMPTY \
|
349
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[18].data(), \
|
350
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
329
351
|
/* "access-control-allow-origin": "" */
|
330
|
-
#define GRPC_MDELEM_ACCESS_CONTROL_ALLOW_ORIGIN_EMPTY
|
331
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[19],
|
352
|
+
#define GRPC_MDELEM_ACCESS_CONTROL_ALLOW_ORIGIN_EMPTY \
|
353
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[19].data(), \
|
354
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
332
355
|
/* "age": "" */
|
333
|
-
#define GRPC_MDELEM_AGE_EMPTY
|
334
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[20],
|
356
|
+
#define GRPC_MDELEM_AGE_EMPTY \
|
357
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[20].data(), \
|
358
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
335
359
|
/* "allow": "" */
|
336
|
-
#define GRPC_MDELEM_ALLOW_EMPTY
|
337
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[21],
|
360
|
+
#define GRPC_MDELEM_ALLOW_EMPTY \
|
361
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[21].data(), \
|
362
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
338
363
|
/* "authorization": "" */
|
339
|
-
#define GRPC_MDELEM_AUTHORIZATION_EMPTY
|
340
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[22],
|
364
|
+
#define GRPC_MDELEM_AUTHORIZATION_EMPTY \
|
365
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[22].data(), \
|
366
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
341
367
|
/* "cache-control": "" */
|
342
|
-
#define GRPC_MDELEM_CACHE_CONTROL_EMPTY
|
343
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[23],
|
368
|
+
#define GRPC_MDELEM_CACHE_CONTROL_EMPTY \
|
369
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[23].data(), \
|
370
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
344
371
|
/* "content-disposition": "" */
|
345
|
-
#define GRPC_MDELEM_CONTENT_DISPOSITION_EMPTY
|
346
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[24],
|
372
|
+
#define GRPC_MDELEM_CONTENT_DISPOSITION_EMPTY \
|
373
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[24].data(), \
|
374
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
347
375
|
/* "content-encoding": "" */
|
348
|
-
#define GRPC_MDELEM_CONTENT_ENCODING_EMPTY
|
349
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[25],
|
376
|
+
#define GRPC_MDELEM_CONTENT_ENCODING_EMPTY \
|
377
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[25].data(), \
|
378
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
350
379
|
/* "content-language": "" */
|
351
|
-
#define GRPC_MDELEM_CONTENT_LANGUAGE_EMPTY
|
352
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[26],
|
380
|
+
#define GRPC_MDELEM_CONTENT_LANGUAGE_EMPTY \
|
381
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[26].data(), \
|
382
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
353
383
|
/* "content-length": "" */
|
354
|
-
#define GRPC_MDELEM_CONTENT_LENGTH_EMPTY
|
355
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[27],
|
384
|
+
#define GRPC_MDELEM_CONTENT_LENGTH_EMPTY \
|
385
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[27].data(), \
|
386
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
356
387
|
/* "content-location": "" */
|
357
|
-
#define GRPC_MDELEM_CONTENT_LOCATION_EMPTY
|
358
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[28],
|
388
|
+
#define GRPC_MDELEM_CONTENT_LOCATION_EMPTY \
|
389
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[28].data(), \
|
390
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
359
391
|
/* "content-range": "" */
|
360
|
-
#define GRPC_MDELEM_CONTENT_RANGE_EMPTY
|
361
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[29],
|
392
|
+
#define GRPC_MDELEM_CONTENT_RANGE_EMPTY \
|
393
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[29].data(), \
|
394
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
362
395
|
/* "content-type": "" */
|
363
|
-
#define GRPC_MDELEM_CONTENT_TYPE_EMPTY
|
364
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[30],
|
396
|
+
#define GRPC_MDELEM_CONTENT_TYPE_EMPTY \
|
397
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[30].data(), \
|
398
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
365
399
|
/* "cookie": "" */
|
366
|
-
#define GRPC_MDELEM_COOKIE_EMPTY
|
367
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[31],
|
400
|
+
#define GRPC_MDELEM_COOKIE_EMPTY \
|
401
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[31].data(), \
|
402
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
368
403
|
/* "date": "" */
|
369
|
-
#define GRPC_MDELEM_DATE_EMPTY
|
370
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[32],
|
404
|
+
#define GRPC_MDELEM_DATE_EMPTY \
|
405
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[32].data(), \
|
406
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
371
407
|
/* "etag": "" */
|
372
|
-
#define GRPC_MDELEM_ETAG_EMPTY
|
373
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[33],
|
408
|
+
#define GRPC_MDELEM_ETAG_EMPTY \
|
409
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[33].data(), \
|
410
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
374
411
|
/* "expect": "" */
|
375
|
-
#define GRPC_MDELEM_EXPECT_EMPTY
|
376
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[34],
|
412
|
+
#define GRPC_MDELEM_EXPECT_EMPTY \
|
413
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[34].data(), \
|
414
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
377
415
|
/* "expires": "" */
|
378
|
-
#define GRPC_MDELEM_EXPIRES_EMPTY
|
379
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[35],
|
416
|
+
#define GRPC_MDELEM_EXPIRES_EMPTY \
|
417
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[35].data(), \
|
418
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
380
419
|
/* "from": "" */
|
381
|
-
#define GRPC_MDELEM_FROM_EMPTY
|
382
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[36],
|
420
|
+
#define GRPC_MDELEM_FROM_EMPTY \
|
421
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[36].data(), \
|
422
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
383
423
|
/* "host": "" */
|
384
|
-
#define GRPC_MDELEM_HOST_EMPTY
|
385
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[37],
|
424
|
+
#define GRPC_MDELEM_HOST_EMPTY \
|
425
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[37].data(), \
|
426
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
386
427
|
/* "if-match": "" */
|
387
|
-
#define GRPC_MDELEM_IF_MATCH_EMPTY
|
388
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[38],
|
428
|
+
#define GRPC_MDELEM_IF_MATCH_EMPTY \
|
429
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[38].data(), \
|
430
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
389
431
|
/* "if-modified-since": "" */
|
390
|
-
#define GRPC_MDELEM_IF_MODIFIED_SINCE_EMPTY
|
391
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[39],
|
432
|
+
#define GRPC_MDELEM_IF_MODIFIED_SINCE_EMPTY \
|
433
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[39].data(), \
|
434
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
392
435
|
/* "if-none-match": "" */
|
393
|
-
#define GRPC_MDELEM_IF_NONE_MATCH_EMPTY
|
394
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[40],
|
436
|
+
#define GRPC_MDELEM_IF_NONE_MATCH_EMPTY \
|
437
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[40].data(), \
|
438
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
395
439
|
/* "if-range": "" */
|
396
|
-
#define GRPC_MDELEM_IF_RANGE_EMPTY
|
397
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[41],
|
440
|
+
#define GRPC_MDELEM_IF_RANGE_EMPTY \
|
441
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[41].data(), \
|
442
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
398
443
|
/* "if-unmodified-since": "" */
|
399
|
-
#define GRPC_MDELEM_IF_UNMODIFIED_SINCE_EMPTY
|
400
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[42],
|
444
|
+
#define GRPC_MDELEM_IF_UNMODIFIED_SINCE_EMPTY \
|
445
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[42].data(), \
|
446
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
401
447
|
/* "last-modified": "" */
|
402
|
-
#define GRPC_MDELEM_LAST_MODIFIED_EMPTY
|
403
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[43],
|
448
|
+
#define GRPC_MDELEM_LAST_MODIFIED_EMPTY \
|
449
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[43].data(), \
|
450
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
404
451
|
/* "link": "" */
|
405
|
-
#define GRPC_MDELEM_LINK_EMPTY
|
406
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[44],
|
452
|
+
#define GRPC_MDELEM_LINK_EMPTY \
|
453
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[44].data(), \
|
454
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
407
455
|
/* "location": "" */
|
408
|
-
#define GRPC_MDELEM_LOCATION_EMPTY
|
409
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[45],
|
456
|
+
#define GRPC_MDELEM_LOCATION_EMPTY \
|
457
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[45].data(), \
|
458
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
410
459
|
/* "max-forwards": "" */
|
411
|
-
#define GRPC_MDELEM_MAX_FORWARDS_EMPTY
|
412
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[46],
|
460
|
+
#define GRPC_MDELEM_MAX_FORWARDS_EMPTY \
|
461
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[46].data(), \
|
462
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
413
463
|
/* "proxy-authenticate": "" */
|
414
|
-
#define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY
|
415
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[47],
|
464
|
+
#define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY \
|
465
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[47].data(), \
|
466
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
416
467
|
/* "proxy-authorization": "" */
|
417
|
-
#define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY
|
418
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[48],
|
468
|
+
#define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY \
|
469
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[48].data(), \
|
470
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
419
471
|
/* "range": "" */
|
420
|
-
#define GRPC_MDELEM_RANGE_EMPTY
|
421
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[49],
|
472
|
+
#define GRPC_MDELEM_RANGE_EMPTY \
|
473
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[49].data(), \
|
474
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
422
475
|
/* "referer": "" */
|
423
|
-
#define GRPC_MDELEM_REFERER_EMPTY
|
424
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[50],
|
476
|
+
#define GRPC_MDELEM_REFERER_EMPTY \
|
477
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[50].data(), \
|
478
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
425
479
|
/* "refresh": "" */
|
426
|
-
#define GRPC_MDELEM_REFRESH_EMPTY
|
427
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[51],
|
480
|
+
#define GRPC_MDELEM_REFRESH_EMPTY \
|
481
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[51].data(), \
|
482
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
428
483
|
/* "retry-after": "" */
|
429
|
-
#define GRPC_MDELEM_RETRY_AFTER_EMPTY
|
430
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[52],
|
484
|
+
#define GRPC_MDELEM_RETRY_AFTER_EMPTY \
|
485
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[52].data(), \
|
486
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
431
487
|
/* "server": "" */
|
432
|
-
#define GRPC_MDELEM_SERVER_EMPTY
|
433
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[53],
|
488
|
+
#define GRPC_MDELEM_SERVER_EMPTY \
|
489
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[53].data(), \
|
490
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
434
491
|
/* "set-cookie": "" */
|
435
|
-
#define GRPC_MDELEM_SET_COOKIE_EMPTY
|
436
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[54],
|
492
|
+
#define GRPC_MDELEM_SET_COOKIE_EMPTY \
|
493
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[54].data(), \
|
494
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
437
495
|
/* "strict-transport-security": "" */
|
438
|
-
#define GRPC_MDELEM_STRICT_TRANSPORT_SECURITY_EMPTY
|
439
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[55],
|
496
|
+
#define GRPC_MDELEM_STRICT_TRANSPORT_SECURITY_EMPTY \
|
497
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[55].data(), \
|
498
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
440
499
|
/* "transfer-encoding": "" */
|
441
|
-
#define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY
|
442
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[56],
|
500
|
+
#define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY \
|
501
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[56].data(), \
|
502
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
443
503
|
/* "user-agent": "" */
|
444
|
-
#define GRPC_MDELEM_USER_AGENT_EMPTY
|
445
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[57],
|
504
|
+
#define GRPC_MDELEM_USER_AGENT_EMPTY \
|
505
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[57].data(), \
|
506
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
446
507
|
/* "vary": "" */
|
447
|
-
#define GRPC_MDELEM_VARY_EMPTY
|
448
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[58],
|
508
|
+
#define GRPC_MDELEM_VARY_EMPTY \
|
509
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[58].data(), \
|
510
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
449
511
|
/* "via": "" */
|
450
|
-
#define GRPC_MDELEM_VIA_EMPTY
|
451
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[59],
|
512
|
+
#define GRPC_MDELEM_VIA_EMPTY \
|
513
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[59].data(), \
|
514
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
452
515
|
/* "www-authenticate": "" */
|
453
|
-
#define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY
|
454
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[60],
|
516
|
+
#define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY \
|
517
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[60].data(), \
|
518
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
455
519
|
/* "grpc-status": "0" */
|
456
|
-
#define GRPC_MDELEM_GRPC_STATUS_0
|
457
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[61],
|
520
|
+
#define GRPC_MDELEM_GRPC_STATUS_0 \
|
521
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[61].data(), \
|
522
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
458
523
|
/* "grpc-status": "1" */
|
459
|
-
#define GRPC_MDELEM_GRPC_STATUS_1
|
460
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[62],
|
524
|
+
#define GRPC_MDELEM_GRPC_STATUS_1 \
|
525
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[62].data(), \
|
526
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
461
527
|
/* "grpc-status": "2" */
|
462
|
-
#define GRPC_MDELEM_GRPC_STATUS_2
|
463
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[63],
|
528
|
+
#define GRPC_MDELEM_GRPC_STATUS_2 \
|
529
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[63].data(), \
|
530
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
464
531
|
/* "grpc-encoding": "identity" */
|
465
|
-
#define GRPC_MDELEM_GRPC_ENCODING_IDENTITY
|
466
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[64],
|
532
|
+
#define GRPC_MDELEM_GRPC_ENCODING_IDENTITY \
|
533
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[64].data(), \
|
534
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
467
535
|
/* "grpc-encoding": "gzip" */
|
468
|
-
#define GRPC_MDELEM_GRPC_ENCODING_GZIP
|
469
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[65],
|
536
|
+
#define GRPC_MDELEM_GRPC_ENCODING_GZIP \
|
537
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[65].data(), \
|
538
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
470
539
|
/* "grpc-encoding": "deflate" */
|
471
|
-
#define GRPC_MDELEM_GRPC_ENCODING_DEFLATE
|
472
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[66],
|
540
|
+
#define GRPC_MDELEM_GRPC_ENCODING_DEFLATE \
|
541
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[66].data(), \
|
542
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
473
543
|
/* "te": "trailers" */
|
474
|
-
#define GRPC_MDELEM_TE_TRAILERS
|
475
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[67],
|
544
|
+
#define GRPC_MDELEM_TE_TRAILERS \
|
545
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[67].data(), \
|
546
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
476
547
|
/* "content-type": "application/grpc" */
|
477
|
-
#define GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC
|
478
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[68],
|
548
|
+
#define GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC \
|
549
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[68].data(), \
|
550
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
479
551
|
/* ":scheme": "grpc" */
|
480
|
-
#define GRPC_MDELEM_SCHEME_GRPC
|
481
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[69],
|
552
|
+
#define GRPC_MDELEM_SCHEME_GRPC \
|
553
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[69].data(), \
|
554
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
482
555
|
/* ":method": "PUT" */
|
483
|
-
#define GRPC_MDELEM_METHOD_PUT
|
484
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[70],
|
556
|
+
#define GRPC_MDELEM_METHOD_PUT \
|
557
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[70].data(), \
|
558
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
485
559
|
/* "accept-encoding": "" */
|
486
|
-
#define GRPC_MDELEM_ACCEPT_ENCODING_EMPTY
|
487
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[71],
|
560
|
+
#define GRPC_MDELEM_ACCEPT_ENCODING_EMPTY \
|
561
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[71].data(), \
|
562
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
488
563
|
/* "content-encoding": "identity" */
|
489
|
-
#define GRPC_MDELEM_CONTENT_ENCODING_IDENTITY
|
490
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[72],
|
564
|
+
#define GRPC_MDELEM_CONTENT_ENCODING_IDENTITY \
|
565
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[72].data(), \
|
566
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
491
567
|
/* "content-encoding": "gzip" */
|
492
|
-
#define GRPC_MDELEM_CONTENT_ENCODING_GZIP
|
493
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[73],
|
568
|
+
#define GRPC_MDELEM_CONTENT_ENCODING_GZIP \
|
569
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[73].data(), \
|
570
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
494
571
|
/* "lb-token": "" */
|
495
|
-
#define GRPC_MDELEM_LB_TOKEN_EMPTY
|
496
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[74],
|
572
|
+
#define GRPC_MDELEM_LB_TOKEN_EMPTY \
|
573
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[74].data(), \
|
574
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
497
575
|
/* "lb-cost-bin": "" */
|
498
|
-
#define GRPC_MDELEM_LB_COST_BIN_EMPTY
|
499
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[75],
|
576
|
+
#define GRPC_MDELEM_LB_COST_BIN_EMPTY \
|
577
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[75].data(), \
|
578
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
500
579
|
/* "grpc-accept-encoding": "identity" */
|
501
|
-
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY
|
502
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[76],
|
580
|
+
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY \
|
581
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[76].data(), \
|
582
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
503
583
|
/* "grpc-accept-encoding": "deflate" */
|
504
|
-
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE
|
505
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[77],
|
584
|
+
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE \
|
585
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[77].data(), \
|
586
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
506
587
|
/* "grpc-accept-encoding": "identity,deflate" */
|
507
588
|
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE \
|
508
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[78],
|
589
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[78].data(), \
|
590
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
509
591
|
/* "grpc-accept-encoding": "gzip" */
|
510
|
-
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_GZIP
|
511
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[79],
|
592
|
+
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_GZIP \
|
593
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[79].data(), \
|
594
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
512
595
|
/* "grpc-accept-encoding": "identity,gzip" */
|
513
596
|
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP \
|
514
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[80],
|
597
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[80].data(), \
|
598
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
515
599
|
/* "grpc-accept-encoding": "deflate,gzip" */
|
516
600
|
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE_COMMA_GZIP \
|
517
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[81],
|
601
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[81].data(), \
|
602
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
518
603
|
/* "grpc-accept-encoding": "identity,deflate,gzip" */
|
519
604
|
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \
|
520
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[82],
|
605
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[82].data(), \
|
606
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
521
607
|
/* "accept-encoding": "identity" */
|
522
|
-
#define GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY
|
523
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[83],
|
608
|
+
#define GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY \
|
609
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[83].data(), \
|
610
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
524
611
|
/* "accept-encoding": "gzip" */
|
525
|
-
#define GRPC_MDELEM_ACCEPT_ENCODING_GZIP
|
526
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[84],
|
612
|
+
#define GRPC_MDELEM_ACCEPT_ENCODING_GZIP \
|
613
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[84].data(), \
|
614
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
527
615
|
/* "accept-encoding": "identity,gzip" */
|
528
|
-
#define GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP
|
529
|
-
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[85],
|
616
|
+
#define GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP \
|
617
|
+
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[85].data(), \
|
618
|
+
GRPC_MDELEM_STORAGE_STATIC))
|
530
619
|
|
531
|
-
grpc_mdelem grpc_static_mdelem_for_static_strings(
|
620
|
+
grpc_mdelem grpc_static_mdelem_for_static_strings(intptr_t a, intptr_t b);
|
532
621
|
typedef enum {
|
533
622
|
GRPC_BATCH_PATH,
|
534
623
|
GRPC_BATCH_METHOD,
|
@@ -587,22 +676,24 @@ typedef union {
|
|
587
676
|
} named;
|
588
677
|
} grpc_metadata_batch_callouts;
|
589
678
|
|
590
|
-
#define GRPC_BATCH_INDEX_OF(slice)
|
591
|
-
(GRPC_IS_STATIC_METADATA_STRING((slice))
|
592
|
-
?
|
593
|
-
GRPC_STATIC_METADATA_INDEX((slice)), 0,
|
594
|
-
|
679
|
+
#define GRPC_BATCH_INDEX_OF(slice) \
|
680
|
+
(GRPC_IS_STATIC_METADATA_STRING((slice)) \
|
681
|
+
? static_cast<grpc_metadata_batch_callouts_index>( \
|
682
|
+
GPR_CLAMP(GRPC_STATIC_METADATA_INDEX((slice)), 0, \
|
683
|
+
static_cast<intptr_t>(GRPC_BATCH_CALLOUTS_COUNT))) \
|
595
684
|
: GRPC_BATCH_CALLOUTS_COUNT)
|
596
685
|
|
597
686
|
extern const uint8_t grpc_static_accept_encoding_metadata[8];
|
598
|
-
#define GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(algs)
|
599
|
-
(GRPC_MAKE_MDELEM(
|
600
|
-
&grpc_static_mdelem_table[grpc_static_accept_encoding_metadata[(algs)]]
|
687
|
+
#define GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(algs) \
|
688
|
+
(GRPC_MAKE_MDELEM( \
|
689
|
+
&grpc_static_mdelem_table[grpc_static_accept_encoding_metadata[(algs)]] \
|
690
|
+
.data(), \
|
601
691
|
GRPC_MDELEM_STORAGE_STATIC))
|
602
692
|
|
603
693
|
extern const uint8_t grpc_static_accept_stream_encoding_metadata[4];
|
604
694
|
#define GRPC_MDELEM_ACCEPT_STREAM_ENCODING_FOR_ALGORITHMS(algs) \
|
605
695
|
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table \
|
606
|
-
|
696
|
+
[grpc_static_accept_stream_encoding_metadata[(algs)]] \
|
697
|
+
.data(), \
|
607
698
|
GRPC_MDELEM_STORAGE_STATIC))
|
608
699
|
#endif /* GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H */
|
@@ -31,13 +31,13 @@
|
|
31
31
|
static void destroy_status(void* ignored) {}
|
32
32
|
|
33
33
|
grpc_status_code grpc_get_status_code_from_metadata(grpc_mdelem md) {
|
34
|
-
if (
|
34
|
+
if (grpc_mdelem_static_value_eq(md, GRPC_MDELEM_GRPC_STATUS_0)) {
|
35
35
|
return GRPC_STATUS_OK;
|
36
36
|
}
|
37
|
-
if (
|
37
|
+
if (grpc_mdelem_static_value_eq(md, GRPC_MDELEM_GRPC_STATUS_1)) {
|
38
38
|
return GRPC_STATUS_CANCELLED;
|
39
39
|
}
|
40
|
-
if (
|
40
|
+
if (grpc_mdelem_static_value_eq(md, GRPC_MDELEM_GRPC_STATUS_2)) {
|
41
41
|
return GRPC_STATUS_UNKNOWN;
|
42
42
|
}
|
43
43
|
void* user_data = grpc_mdelem_get_user_data(md, destroy_status);
|
@@ -89,7 +89,7 @@ static int is_all_whitespace(const char* p, const char* end) {
|
|
89
89
|
return p == end;
|
90
90
|
}
|
91
91
|
|
92
|
-
int grpc_http2_decode_timeout(grpc_slice text, grpc_millis* timeout) {
|
92
|
+
int grpc_http2_decode_timeout(const grpc_slice& text, grpc_millis* timeout) {
|
93
93
|
grpc_millis x = 0;
|
94
94
|
const uint8_t* p = GRPC_SLICE_START_PTR(text);
|
95
95
|
const uint8_t* end = GRPC_SLICE_END_PTR(text);
|
@@ -32,6 +32,6 @@
|
|
32
32
|
/* Encode/decode timeouts to the GRPC over HTTP/2 format;
|
33
33
|
encoding may round up arbitrarily */
|
34
34
|
void grpc_http2_encode_timeout(grpc_millis timeout, char* buffer);
|
35
|
-
int grpc_http2_decode_timeout(grpc_slice text, grpc_millis* timeout);
|
35
|
+
int grpc_http2_decode_timeout(const grpc_slice& text, grpc_millis* timeout);
|
36
36
|
|
37
37
|
#endif /* GRPC_CORE_LIB_TRANSPORT_TIMEOUT_ENCODING_H */
|