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
data/etc/roots.pem
CHANGED
@@ -4552,3 +4552,149 @@ Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayh
|
|
4552
4552
|
jWZSaX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw
|
4553
4553
|
3kAP+HwV96LOPNdeE4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0=
|
4554
4554
|
-----END CERTIFICATE-----
|
4555
|
+
|
4556
|
+
# Issuer: CN=emSign Root CA - G1 O=eMudhra Technologies Limited OU=emSign PKI
|
4557
|
+
# Subject: CN=emSign Root CA - G1 O=eMudhra Technologies Limited OU=emSign PKI
|
4558
|
+
# Label: "emSign Root CA - G1"
|
4559
|
+
# Serial: 235931866688319308814040
|
4560
|
+
# MD5 Fingerprint: 9c:42:84:57:dd:cb:0b:a7:2e:95:ad:b6:f3:da:bc:ac
|
4561
|
+
# SHA1 Fingerprint: 8a:c7:ad:8f:73:ac:4e:c1:b5:75:4d:a5:40:f4:fc:cf:7c:b5:8e:8c
|
4562
|
+
# SHA256 Fingerprint: 40:f6:af:03:46:a9:9a:a1:cd:1d:55:5a:4e:9c:ce:62:c7:f9:63:46:03:ee:40:66:15:83:3d:c8:c8:d0:03:67
|
4563
|
+
-----BEGIN CERTIFICATE-----
|
4564
|
+
MIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYD
|
4565
|
+
VQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBU
|
4566
|
+
ZWNobm9sb2dpZXMgTGltaXRlZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLS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ZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeihU80Bv2noWgby
|
4582
|
+
RQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx
|
4583
|
+
iN66zB+Afko=
|
4584
|
+
-----END CERTIFICATE-----
|
4585
|
+
|
4586
|
+
# Issuer: CN=emSign ECC Root CA - G3 O=eMudhra Technologies Limited OU=emSign PKI
|
4587
|
+
# Subject: CN=emSign ECC Root CA - G3 O=eMudhra Technologies Limited OU=emSign PKI
|
4588
|
+
# Label: "emSign ECC Root CA - G3"
|
4589
|
+
# Serial: 287880440101571086945156
|
4590
|
+
# MD5 Fingerprint: ce:0b:72:d1:9f:88:8e:d0:50:03:e8:e3:b8:8b:67:40
|
4591
|
+
# SHA1 Fingerprint: 30:43:fa:4f:f2:57:dc:a0:c3:80:ee:2e:58:ea:78:b2:3f:e6:bb:c1
|
4592
|
+
# SHA256 Fingerprint: 86:a1:ec:ba:08:9c:4a:8d:3b:be:27:34:c6:12:ba:34:1d:81:3e:04:3c:f9:e8:a8:62:cd:5c:57:a3:6b:be:6b
|
4593
|
+
-----BEGIN CERTIFICATE-----
|
4594
|
+
MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQG
|
4595
|
+
EwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNo
|
4596
|
+
bm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g
|
4597
|
+
RzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4MTgzMDAwWjBrMQswCQYDVQQGEwJJ
|
4598
|
+
TjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9s
|
4599
|
+
b2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMw
|
4600
|
+
djAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0
|
4601
|
+
WXTsuwYc58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xyS
|
4602
|
+
fvalY8L1X44uT6EYGQIrMgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuB
|
4603
|
+
zhccLikenEhjQjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggq
|
4604
|
+
hkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+DCBeQyh+KTOgNG3qxrdWB
|
4605
|
+
CUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7jHvrZQnD
|
4606
|
+
+JbNR6iC8hZVdyR+EhCVBCyj
|
4607
|
+
-----END CERTIFICATE-----
|
4608
|
+
|
4609
|
+
# Issuer: CN=emSign Root CA - C1 O=eMudhra Inc OU=emSign PKI
|
4610
|
+
# Subject: CN=emSign Root CA - C1 O=eMudhra Inc OU=emSign PKI
|
4611
|
+
# Label: "emSign Root CA - C1"
|
4612
|
+
# Serial: 825510296613316004955058
|
4613
|
+
# MD5 Fingerprint: d8:e3:5d:01:21:fa:78:5a:b0:df:ba:d2:ee:2a:5f:68
|
4614
|
+
# SHA1 Fingerprint: e7:2e:f1:df:fc:b2:09:28:cf:5d:d4:d5:67:37:b1:51:cb:86:4f:01
|
4615
|
+
# SHA256 Fingerprint: 12:56:09:aa:30:1d:a0:a2:49:b9:7a:82:39:cb:6a:34:21:6f:44:dc:ac:9f:39:54:b1:42:92:f2:e8:c8:60:8f
|
4616
|
+
-----BEGIN CERTIFICATE-----
|
4617
|
+
MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkG
|
4618
|
+
A1UEBhMCVVMxEzARBgNVB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E6TyrLshDCUrG
|
4633
|
+
YQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9wC68AivTxEDkigcxHpvOJpkT
|
4634
|
+
+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQBmIMMMAVSKeo
|
4635
|
+
WXzhriKi4gp6D/piq1JM4fHfyr6DDUI=
|
4636
|
+
-----END CERTIFICATE-----
|
4637
|
+
|
4638
|
+
# Issuer: CN=emSign ECC Root CA - C3 O=eMudhra Inc OU=emSign PKI
|
4639
|
+
# Subject: CN=emSign ECC Root CA - C3 O=eMudhra Inc OU=emSign PKI
|
4640
|
+
# Label: "emSign ECC Root CA - C3"
|
4641
|
+
# Serial: 582948710642506000014504
|
4642
|
+
# MD5 Fingerprint: 3e:53:b3:a3:81:ee:d7:10:f8:d3:b0:1d:17:92:f5:d5
|
4643
|
+
# SHA1 Fingerprint: b6:af:43:c2:9b:81:53:7d:f6:ef:6b:c3:1f:1f:60:15:0c:ee:48:66
|
4644
|
+
# SHA256 Fingerprint: bc:4d:80:9b:15:18:9d:78:db:3e:1d:8c:f4:f9:72:6a:79:5d:a1:64:3c:a5:f1:35:8e:1d:db:0e:dc:0d:7e:b3
|
4645
|
+
-----BEGIN CERTIFICATE-----
|
4646
|
+
MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQG
|
4647
|
+
EwJVUzETMBEGA1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMx
|
4648
|
+
IDAeBgNVBAMTF2VtU2lnbiBFQ0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAw
|
4649
|
+
MFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UEBhMCVVMxEzARBgNVBAsTCmVtU2ln
|
4650
|
+
biBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQDExdlbVNpZ24gRUND
|
4651
|
+
IFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd6bci
|
4652
|
+
MK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4Ojavti
|
4653
|
+
sIGJAnB9SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0O
|
4654
|
+
BBYEFPtaSNCAIEDyqOkAB2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
|
4655
|
+
Af8EBTADAQH/MAoGCCqGSM49BAMDA2gAMGUCMQC02C8Cif22TGK6Q04ThHK1rt0c
|
4656
|
+
3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwUZOR8loMRnLDRWmFLpg9J
|
4657
|
+
0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ==
|
4658
|
+
-----END CERTIFICATE-----
|
4659
|
+
|
4660
|
+
# Issuer: CN=Hongkong Post Root CA 3 O=Hongkong Post
|
4661
|
+
# Subject: CN=Hongkong Post Root CA 3 O=Hongkong Post
|
4662
|
+
# Label: "Hongkong Post Root CA 3"
|
4663
|
+
# Serial: 46170865288971385588281144162979347873371282084
|
4664
|
+
# MD5 Fingerprint: 11:fc:9f:bd:73:30:02:8a:fd:3f:f3:58:b9:cb:20:f0
|
4665
|
+
# SHA1 Fingerprint: 58:a2:d0:ec:20:52:81:5b:c1:f3:f8:64:02:24:4e:c2:8e:02:4b:02
|
4666
|
+
# SHA256 Fingerprint: 5a:2f:c0:3f:0c:83:b0:90:bb:fa:40:60:4b:09:88:44:6c:76:36:18:3d:f9:84:6e:17:10:1a:44:7f:b8:ef:d6
|
4667
|
+
-----BEGIN CERTIFICATE-----
|
4668
|
+
MIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQEL
|
4669
|
+
BQAwbzELMAkGA1UEBhMCSEsxEjAQBgNVBAgTCUh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KDYmlkDJGcn5fqdBb9HxEG
|
4699
|
+
mpv0
|
4700
|
+
-----END CERTIFICATE-----
|
data/include/grpc/grpc.h
CHANGED
@@ -73,10 +73,11 @@ GRPCAPI void grpc_init(void);
|
|
73
73
|
Before it's called, there should haven been a matching invocation to
|
74
74
|
grpc_init().
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
76
|
+
The last call to grpc_shutdown will initiate cleaning up of grpc library
|
77
|
+
internals, which can happen in another thread. Once the clean-up is done,
|
78
|
+
no memory is used by grpc, nor are any instructions executing within the
|
79
|
+
grpc library. Prior to calling, all application owned grpc objects must
|
80
|
+
have been destroyed. */
|
80
81
|
GRPCAPI void grpc_shutdown(void);
|
81
82
|
|
82
83
|
/** EXPERIMENTAL. Returns 1 if the grpc library has been initialized.
|
@@ -85,6 +86,10 @@ GRPCAPI void grpc_shutdown(void);
|
|
85
86
|
https://github.com/grpc/grpc/issues/15334 */
|
86
87
|
GRPCAPI int grpc_is_initialized(void);
|
87
88
|
|
89
|
+
/** EXPERIMENTAL. Blocking shut down grpc library.
|
90
|
+
This is only for wrapped language to use now. */
|
91
|
+
GRPCAPI void grpc_shutdown_blocking(void);
|
92
|
+
|
88
93
|
/** Return a string representing the current version of grpc */
|
89
94
|
GRPCAPI const char* grpc_version_string(void);
|
90
95
|
|
@@ -318,14 +323,14 @@ GRPCAPI void grpc_channel_destroy(grpc_channel* channel);
|
|
318
323
|
If a grpc_call fails, it's guaranteed that no change to the call state
|
319
324
|
has been made. */
|
320
325
|
|
321
|
-
/**
|
326
|
+
/** Cancel an RPC.
|
322
327
|
Can be called multiple times, from any thread.
|
323
328
|
THREAD-SAFETY grpc_call_cancel and grpc_call_cancel_with_status
|
324
329
|
are thread-safe, and can be called at any point before grpc_call_unref
|
325
330
|
is called.*/
|
326
331
|
GRPCAPI grpc_call_error grpc_call_cancel(grpc_call* call, void* reserved);
|
327
332
|
|
328
|
-
/**
|
333
|
+
/** Cancel an RPC.
|
329
334
|
Can be called multiple times, from any thread.
|
330
335
|
If a status has not been received for the call, set it to the status code
|
331
336
|
and description passed in.
|
@@ -163,6 +163,28 @@ typedef struct {
|
|
163
163
|
const char* cert_chain;
|
164
164
|
} grpc_ssl_pem_key_cert_pair;
|
165
165
|
|
166
|
+
/** Deprecated in favor of grpc_ssl_verify_peer_options. It will be removed
|
167
|
+
after all of its call sites are migrated to grpc_ssl_verify_peer_options.
|
168
|
+
Object that holds additional peer-verification options on a secure
|
169
|
+
channel. */
|
170
|
+
typedef struct {
|
171
|
+
/** If non-NULL this callback will be invoked with the expected
|
172
|
+
target_name, the peer's certificate (in PEM format), and whatever
|
173
|
+
userdata pointer is set below. If a non-zero value is returned by this
|
174
|
+
callback then it is treated as a verification failure. Invocation of
|
175
|
+
the callback is blocking, so any implementation should be light-weight.
|
176
|
+
*/
|
177
|
+
int (*verify_peer_callback)(const char* target_name, const char* peer_pem,
|
178
|
+
void* userdata);
|
179
|
+
/** Arbitrary userdata that will be passed as the last argument to
|
180
|
+
verify_peer_callback. */
|
181
|
+
void* verify_peer_callback_userdata;
|
182
|
+
/** A destruct callback that will be invoked when the channel is being
|
183
|
+
cleaned up. The userdata argument will be passed to it. The intent is
|
184
|
+
to perform any cleanup associated with that userdata. */
|
185
|
+
void (*verify_peer_destruct)(void* userdata);
|
186
|
+
} verify_peer_options;
|
187
|
+
|
166
188
|
/** Object that holds additional peer-verification options on a secure
|
167
189
|
channel. */
|
168
190
|
typedef struct {
|
@@ -181,9 +203,11 @@ typedef struct {
|
|
181
203
|
cleaned up. The userdata argument will be passed to it. The intent is
|
182
204
|
to perform any cleanup associated with that userdata. */
|
183
205
|
void (*verify_peer_destruct)(void* userdata);
|
184
|
-
}
|
206
|
+
} grpc_ssl_verify_peer_options;
|
185
207
|
|
186
|
-
/**
|
208
|
+
/** Deprecated in favor of grpc_ssl_server_credentials_create_ex. It will be
|
209
|
+
removed after all of its call sites are migrated to
|
210
|
+
grpc_ssl_server_credentials_create_ex. Creates an SSL credentials object.
|
187
211
|
- pem_root_certs is the NULL-terminated string containing the PEM encoding
|
188
212
|
of the server root certificates. If this parameter is NULL, the
|
189
213
|
implementation will first try to dereference the file pointed by the
|
@@ -191,6 +215,15 @@ typedef struct {
|
|
191
215
|
try to get the roots set by grpc_override_ssl_default_roots. Eventually,
|
192
216
|
if all these fail, it will try to get the roots from a well-known place on
|
193
217
|
disk (in the grpc install directory).
|
218
|
+
|
219
|
+
gRPC has implemented root cache if the underlying OpenSSL library supports
|
220
|
+
it. The gRPC root certificates cache is only applicable on the default
|
221
|
+
root certificates, which is used when this parameter is nullptr. If user
|
222
|
+
provides their own pem_root_certs, when creating an SSL credential object,
|
223
|
+
gRPC would not be able to cache it, and each subchannel will generate a
|
224
|
+
copy of the root store. So it is recommended to avoid providing large room
|
225
|
+
pem with pem_root_certs parameter to avoid excessive memory consumption,
|
226
|
+
particularly on mobile platforms such as iOS.
|
194
227
|
- pem_key_cert_pair is a pointer on the object containing client's private
|
195
228
|
key and certificate chain. This parameter can be NULL if the client does
|
196
229
|
not have such a key/cert pair.
|
@@ -205,6 +238,37 @@ GRPCAPI grpc_channel_credentials* grpc_ssl_credentials_create(
|
|
205
238
|
const char* pem_root_certs, grpc_ssl_pem_key_cert_pair* pem_key_cert_pair,
|
206
239
|
const verify_peer_options* verify_options, void* reserved);
|
207
240
|
|
241
|
+
/* Creates an SSL credentials object.
|
242
|
+
- pem_root_certs is the NULL-terminated string containing the PEM encoding
|
243
|
+
of the server root certificates. If this parameter is NULL, the
|
244
|
+
implementation will first try to dereference the file pointed by the
|
245
|
+
GRPC_DEFAULT_SSL_ROOTS_FILE_PATH environment variable, and if that fails,
|
246
|
+
try to get the roots set by grpc_override_ssl_default_roots. Eventually,
|
247
|
+
if all these fail, it will try to get the roots from a well-known place on
|
248
|
+
disk (in the grpc install directory).
|
249
|
+
|
250
|
+
gRPC has implemented root cache if the underlying OpenSSL library supports
|
251
|
+
it. The gRPC root certificates cache is only applicable on the default
|
252
|
+
root certificates, which is used when this parameter is nullptr. If user
|
253
|
+
provides their own pem_root_certs, when creating an SSL credential object,
|
254
|
+
gRPC would not be able to cache it, and each subchannel will generate a
|
255
|
+
copy of the root store. So it is recommended to avoid providing large room
|
256
|
+
pem with pem_root_certs parameter to avoid excessive memory consumption,
|
257
|
+
particularly on mobile platforms such as iOS.
|
258
|
+
- pem_key_cert_pair is a pointer on the object containing client's private
|
259
|
+
key and certificate chain. This parameter can be NULL if the client does
|
260
|
+
not have such a key/cert pair.
|
261
|
+
- verify_options is an optional verify_peer_options object which holds
|
262
|
+
additional options controlling how peer certificates are verified. For
|
263
|
+
example, you can supply a callback which receives the peer's certificate
|
264
|
+
with which you can do additional verification. Can be NULL, in which
|
265
|
+
case verification will retain default behavior. Any settings in
|
266
|
+
verify_options are copied during this call, so the verify_options
|
267
|
+
object can be released afterwards. */
|
268
|
+
GRPCAPI grpc_channel_credentials* grpc_ssl_credentials_create_ex(
|
269
|
+
const char* pem_root_certs, grpc_ssl_pem_key_cert_pair* pem_key_cert_pair,
|
270
|
+
const grpc_ssl_verify_peer_options* verify_options, void* reserved);
|
271
|
+
|
208
272
|
/** --- grpc_call_credentials object.
|
209
273
|
|
210
274
|
A call credentials object represents a way to authenticate on a particular
|
@@ -255,7 +319,7 @@ GRPCAPI grpc_call_credentials* grpc_google_refresh_token_credentials_create(
|
|
255
319
|
const char* json_refresh_token, void* reserved);
|
256
320
|
|
257
321
|
/** Creates an Oauth2 Access Token credentials with an access token that was
|
258
|
-
|
322
|
+
acquired by an out of band mechanism. */
|
259
323
|
GRPCAPI grpc_call_credentials* grpc_access_token_credentials_create(
|
260
324
|
const char* access_token, void* reserved);
|
261
325
|
|
@@ -426,7 +490,7 @@ GRPCAPI grpc_server_credentials* grpc_ssl_server_credentials_create(
|
|
426
490
|
/** Deprecated in favor of grpc_ssl_server_credentials_create_with_options.
|
427
491
|
Same as grpc_ssl_server_credentials_create method except uses
|
428
492
|
grpc_ssl_client_certificate_request_type enum to support more ways to
|
429
|
-
authenticate client
|
493
|
+
authenticate client certificates.*/
|
430
494
|
GRPCAPI grpc_server_credentials* grpc_ssl_server_credentials_create_ex(
|
431
495
|
const char* pem_root_certs, grpc_ssl_pem_key_cert_pair* pem_key_cert_pairs,
|
432
496
|
size_t num_key_cert_pairs,
|
@@ -609,6 +673,235 @@ GRPCAPI grpc_channel_credentials* grpc_local_credentials_create(
|
|
609
673
|
GRPCAPI grpc_server_credentials* grpc_local_server_credentials_create(
|
610
674
|
grpc_local_connect_type type);
|
611
675
|
|
676
|
+
/** --- SPIFFE and HTTPS-based TLS channel/server credentials ---
|
677
|
+
* It is used for experimental purpose for now and subject to change. */
|
678
|
+
|
679
|
+
/** Config for TLS key materials. It is used for
|
680
|
+
* experimental purpose for now and subject to change. */
|
681
|
+
typedef struct grpc_tls_key_materials_config grpc_tls_key_materials_config;
|
682
|
+
|
683
|
+
/** Config for TLS credential reload. It is used for
|
684
|
+
* experimental purpose for now and subject to change. */
|
685
|
+
typedef struct grpc_tls_credential_reload_config
|
686
|
+
grpc_tls_credential_reload_config;
|
687
|
+
|
688
|
+
/** Config for TLS server authorization check. It is used for
|
689
|
+
* experimental purpose for now and subject to change. */
|
690
|
+
typedef struct grpc_tls_server_authorization_check_config
|
691
|
+
grpc_tls_server_authorization_check_config;
|
692
|
+
|
693
|
+
/** TLS credentials options. It is used for
|
694
|
+
* experimental purpose for now and subject to change. */
|
695
|
+
typedef struct grpc_tls_credentials_options grpc_tls_credentials_options;
|
696
|
+
|
697
|
+
/** Create an empty TLS credentials options. It is used for
|
698
|
+
* experimental purpose for now and subject to change. */
|
699
|
+
GRPCAPI grpc_tls_credentials_options* grpc_tls_credentials_options_create(void);
|
700
|
+
|
701
|
+
/** Set grpc_ssl_client_certificate_request_type field in credentials options
|
702
|
+
with the provided type. options should not be NULL.
|
703
|
+
It returns 1 on success and 0 on failure. It is used for
|
704
|
+
experimental purpose for now and subject to change. */
|
705
|
+
GRPCAPI int grpc_tls_credentials_options_set_cert_request_type(
|
706
|
+
grpc_tls_credentials_options* options,
|
707
|
+
grpc_ssl_client_certificate_request_type type);
|
708
|
+
|
709
|
+
/** Set grpc_tls_key_materials_config field in credentials options
|
710
|
+
with the provided config struct whose ownership is transferred.
|
711
|
+
Both parameters should not be NULL.
|
712
|
+
It returns 1 on success and 0 on failure. It is used for
|
713
|
+
experimental purpose for now and subject to change. */
|
714
|
+
GRPCAPI int grpc_tls_credentials_options_set_key_materials_config(
|
715
|
+
grpc_tls_credentials_options* options,
|
716
|
+
grpc_tls_key_materials_config* config);
|
717
|
+
|
718
|
+
/** Set grpc_tls_credential_reload_config field in credentials options
|
719
|
+
with the provided config struct whose ownership is transferred.
|
720
|
+
Both parameters should not be NULL.
|
721
|
+
It returns 1 on success and 0 on failure. It is used for
|
722
|
+
experimental purpose for now and subject to change. */
|
723
|
+
GRPCAPI int grpc_tls_credentials_options_set_credential_reload_config(
|
724
|
+
grpc_tls_credentials_options* options,
|
725
|
+
grpc_tls_credential_reload_config* config);
|
726
|
+
|
727
|
+
/** Set grpc_tls_server_authorization_check_config field in credentials options
|
728
|
+
with the provided config struct whose ownership is transferred.
|
729
|
+
Both parameters should not be NULL.
|
730
|
+
It returns 1 on success and 0 on failure. It is used for
|
731
|
+
experimental purpose for now and subject to change. */
|
732
|
+
GRPCAPI int grpc_tls_credentials_options_set_server_authorization_check_config(
|
733
|
+
grpc_tls_credentials_options* options,
|
734
|
+
grpc_tls_server_authorization_check_config* config);
|
735
|
+
|
736
|
+
/** --- TLS key materials config. ---
|
737
|
+
It is used for experimental purpose for now and subject to change. */
|
738
|
+
|
739
|
+
/** Create an empty grpc_tls_key_materials_config instance.
|
740
|
+
* It is used for experimental purpose for now and subject to change. */
|
741
|
+
GRPCAPI grpc_tls_key_materials_config* grpc_tls_key_materials_config_create(
|
742
|
+
void);
|
743
|
+
|
744
|
+
/** Set grpc_tls_key_materials_config instance with provided a TLS certificate.
|
745
|
+
config will take the ownership of pem_root_certs and pem_key_cert_pairs.
|
746
|
+
It's valid for the caller to provide nullptr pem_root_certs, in which case
|
747
|
+
the gRPC-provided root cert will be used. pem_key_cert_pairs should not be
|
748
|
+
NULL. It returns 1 on success and 0 on failure. It is used for
|
749
|
+
experimental purpose for now and subject to change.
|
750
|
+
*/
|
751
|
+
GRPCAPI int grpc_tls_key_materials_config_set_key_materials(
|
752
|
+
grpc_tls_key_materials_config* config, const char* pem_root_certs,
|
753
|
+
const grpc_ssl_pem_key_cert_pair** pem_key_cert_pairs,
|
754
|
+
size_t num_key_cert_pairs);
|
755
|
+
|
756
|
+
/** --- TLS credential reload config. ---
|
757
|
+
It is used for experimental purpose for now and subject to change.*/
|
758
|
+
|
759
|
+
typedef struct grpc_tls_credential_reload_arg grpc_tls_credential_reload_arg;
|
760
|
+
|
761
|
+
/** A callback function provided by gRPC to handle the result of credential
|
762
|
+
reload. It is used when schedule API is implemented asynchronously and
|
763
|
+
serves to bring the control back to grpc C core. It is used for
|
764
|
+
experimental purpose for now and subject to change. */
|
765
|
+
typedef void (*grpc_tls_on_credential_reload_done_cb)(
|
766
|
+
grpc_tls_credential_reload_arg* arg);
|
767
|
+
|
768
|
+
/** A struct containing all information necessary to schedule/cancel
|
769
|
+
a credential reload request. cb and cb_user_data represent a gRPC-provided
|
770
|
+
callback and an argument passed to it. key_materials is an in/output
|
771
|
+
parameter containing currently used/newly reloaded credentials. status and
|
772
|
+
error_details are used to hold information about errors occurred when a
|
773
|
+
credential reload request is scheduled/cancelled. It is used for
|
774
|
+
experimental purpose for now and subject to change. */
|
775
|
+
struct grpc_tls_credential_reload_arg {
|
776
|
+
grpc_tls_on_credential_reload_done_cb cb;
|
777
|
+
void* cb_user_data;
|
778
|
+
grpc_tls_key_materials_config* key_materials_config;
|
779
|
+
grpc_ssl_certificate_config_reload_status status;
|
780
|
+
const char* error_details;
|
781
|
+
};
|
782
|
+
|
783
|
+
/** Create a grpc_tls_credential_reload_config instance.
|
784
|
+
- config_user_data is config-specific, read-only user data
|
785
|
+
that works for all channels created with a credential using the config.
|
786
|
+
- schedule is a pointer to an application-provided callback used to invoke
|
787
|
+
credential reload API. The implementation of this method has to be
|
788
|
+
non-blocking, but can be performed synchronously or asynchronously.
|
789
|
+
1) If processing occurs synchronously, it populates arg->key_materials,
|
790
|
+
arg->status, and arg->error_details and returns zero.
|
791
|
+
2) If processing occurs asynchronously, it returns a non-zero value.
|
792
|
+
The application then invokes arg->cb when processing is completed. Note
|
793
|
+
that arg->cb cannot be invoked before schedule API returns.
|
794
|
+
- cancel is a pointer to an application-provided callback used to cancel
|
795
|
+
a credential reload request scheduled via an asynchronous schedule API.
|
796
|
+
arg is used to pinpoint an exact reloading request to be cancelled.
|
797
|
+
The operation may not have any effect if the request has already been
|
798
|
+
processed.
|
799
|
+
- destruct is a pointer to an application-provided callback used to clean up
|
800
|
+
any data associated with the config.
|
801
|
+
It is used for experimental purpose for now and subject to change.
|
802
|
+
*/
|
803
|
+
GRPCAPI grpc_tls_credential_reload_config*
|
804
|
+
grpc_tls_credential_reload_config_create(
|
805
|
+
const void* config_user_data,
|
806
|
+
int (*schedule)(void* config_user_data,
|
807
|
+
grpc_tls_credential_reload_arg* arg),
|
808
|
+
void (*cancel)(void* config_user_data, grpc_tls_credential_reload_arg* arg),
|
809
|
+
void (*destruct)(void* config_user_data));
|
810
|
+
|
811
|
+
/** --- TLS server authorization check config. ---
|
812
|
+
* It is used for experimental purpose for now and subject to change. */
|
813
|
+
|
814
|
+
typedef struct grpc_tls_server_authorization_check_arg
|
815
|
+
grpc_tls_server_authorization_check_arg;
|
816
|
+
|
817
|
+
/** callback function provided by gRPC used to handle the result of server
|
818
|
+
authorization check. It is used when schedule API is implemented
|
819
|
+
asynchronously, and serves to bring the control back to gRPC C core. It is
|
820
|
+
used for experimental purpose for now and subject to change. */
|
821
|
+
typedef void (*grpc_tls_on_server_authorization_check_done_cb)(
|
822
|
+
grpc_tls_server_authorization_check_arg* arg);
|
823
|
+
|
824
|
+
/** A struct containing all information necessary to schedule/cancel a server
|
825
|
+
authorization check request. cb and cb_user_data represent a gRPC-provided
|
826
|
+
callback and an argument passed to it. success will store the result of
|
827
|
+
server authorization check. That is, if success returns a non-zero value, it
|
828
|
+
means the authorization check passes and if returning zero, it means the
|
829
|
+
check fails. target_name is the name of an endpoint the channel is connecting
|
830
|
+
to and certificate represents a complete certificate chain including both
|
831
|
+
signing and leaf certificates. status and error_details contain information
|
832
|
+
about errors occurred when a server authorization check request is
|
833
|
+
scheduled/cancelled. It is used for experimental purpose for now and subject
|
834
|
+
to change.*/
|
835
|
+
struct grpc_tls_server_authorization_check_arg {
|
836
|
+
grpc_tls_on_server_authorization_check_done_cb cb;
|
837
|
+
void* cb_user_data;
|
838
|
+
int success;
|
839
|
+
const char* target_name;
|
840
|
+
const char* peer_cert;
|
841
|
+
grpc_status_code status;
|
842
|
+
const char* error_details;
|
843
|
+
};
|
844
|
+
|
845
|
+
/** Create a grpc_tls_server_authorization_check_config instance.
|
846
|
+
- config_user_data is config-specific, read-only user data
|
847
|
+
that works for all channels created with a credential using the config.
|
848
|
+
- schedule is a pointer to an application-provided callback used to invoke
|
849
|
+
server authorization check API. The implementation of this method has to
|
850
|
+
be non-blocking, but can be performed synchronously or asynchronously.
|
851
|
+
1)If processing occurs synchronously, it populates arg->result,
|
852
|
+
arg->status, and arg->error_details and returns zero.
|
853
|
+
2) If processing occurs asynchronously, it returns a non-zero value. The
|
854
|
+
application then invokes arg->cb when processing is completed. Note that
|
855
|
+
arg->cb cannot be invoked before schedule API returns.
|
856
|
+
- cancel is a pointer to an application-provided callback used to cancel a
|
857
|
+
server authorization check request scheduled via an asynchronous schedule
|
858
|
+
API. arg is used to pinpoint an exact check request to be cancelled. The
|
859
|
+
operation may not have any effect if the request has already been
|
860
|
+
processed.
|
861
|
+
- destruct is a pointer to an application-provided callback used to clean up
|
862
|
+
any data associated with the config.
|
863
|
+
It is used for experimental purpose for now and subject to change.
|
864
|
+
*/
|
865
|
+
GRPCAPI grpc_tls_server_authorization_check_config*
|
866
|
+
grpc_tls_server_authorization_check_config_create(
|
867
|
+
const void* config_user_data,
|
868
|
+
int (*schedule)(void* config_user_data,
|
869
|
+
grpc_tls_server_authorization_check_arg* arg),
|
870
|
+
void (*cancel)(void* config_user_data,
|
871
|
+
grpc_tls_server_authorization_check_arg* arg),
|
872
|
+
void (*destruct)(void* config_user_data));
|
873
|
+
|
874
|
+
/** --- SPIFFE channel/server credentials --- **/
|
875
|
+
|
876
|
+
/**
|
877
|
+
* This method creates a TLS SPIFFE channel credential object.
|
878
|
+
* It takes ownership of the options parameter.
|
879
|
+
*
|
880
|
+
* - options: grpc TLS credentials options instance.
|
881
|
+
*
|
882
|
+
* It returns the created credential object.
|
883
|
+
*
|
884
|
+
* It is used for experimental purpose for now and subject
|
885
|
+
* to change.
|
886
|
+
*/
|
887
|
+
|
888
|
+
grpc_channel_credentials* grpc_tls_spiffe_credentials_create(
|
889
|
+
grpc_tls_credentials_options* options);
|
890
|
+
|
891
|
+
/**
|
892
|
+
* This method creates a TLS server credential object.
|
893
|
+
* It takes ownership of the options parameter.
|
894
|
+
*
|
895
|
+
* - options: grpc TLS credentials options instance.
|
896
|
+
*
|
897
|
+
* It returns the created credential object.
|
898
|
+
*
|
899
|
+
* It is used for experimental purpose for now and subject
|
900
|
+
* to change.
|
901
|
+
*/
|
902
|
+
grpc_server_credentials* grpc_tls_spiffe_server_credentials_create(
|
903
|
+
grpc_tls_credentials_options* options);
|
904
|
+
|
612
905
|
#ifdef __cplusplus
|
613
906
|
}
|
614
907
|
#endif
|
@@ -96,7 +96,7 @@ typedef enum {
|
|
96
96
|
/** Server requests client certificate and enforces that the client presents a
|
97
97
|
certificate.
|
98
98
|
|
99
|
-
The
|
99
|
+
The certificate presented by the client is verified by the gRPC framework.
|
100
100
|
(For a successful connection the client needs to present a certificate that
|
101
101
|
can be verified against the root certificate configured by the server)
|
102
102
|
|
@@ -73,6 +73,19 @@ GRPCAPI void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader* reader);
|
|
73
73
|
GRPCAPI int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader,
|
74
74
|
grpc_slice* slice);
|
75
75
|
|
76
|
+
/** EXPERIMENTAL API - This function may be removed and changed, in the future.
|
77
|
+
*
|
78
|
+
* Updates \a slice with the next piece of data from from \a reader and returns
|
79
|
+
* 1. Returns 0 at the end of the stream. Caller is responsible for making sure
|
80
|
+
* the slice pointer remains valid when accessed.
|
81
|
+
*
|
82
|
+
* NOTE: Do not use this function unless the caller can guarantee that the
|
83
|
+
* underlying grpc_byte_buffer outlasts the use of the slice. This is only
|
84
|
+
* safe when the underlying grpc_byte_buffer remains immutable while slice
|
85
|
+
* is being accessed. */
|
86
|
+
GRPCAPI int grpc_byte_buffer_reader_peek(grpc_byte_buffer_reader* reader,
|
87
|
+
grpc_slice** slice);
|
88
|
+
|
76
89
|
/** Merge all data from \a reader into single slice */
|
77
90
|
GRPCAPI grpc_slice
|
78
91
|
grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader* reader);
|
@@ -48,7 +48,7 @@ typedef struct gpr_timespec {
|
|
48
48
|
int64_t tv_sec;
|
49
49
|
int32_t tv_nsec;
|
50
50
|
/** Against which clock was this time measured? (or GPR_TIMESPAN if
|
51
|
-
this is a relative time
|
51
|
+
this is a relative time measure) */
|
52
52
|
gpr_clock_type clock_type;
|
53
53
|
} gpr_timespec;
|
54
54
|
|
@@ -163,7 +163,7 @@ typedef struct {
|
|
163
163
|
/** Maximum time that a channel may exist. Int valued, milliseconds.
|
164
164
|
* INT_MAX means unlimited. */
|
165
165
|
#define GRPC_ARG_MAX_CONNECTION_AGE_MS "grpc.max_connection_age_ms"
|
166
|
-
/** Grace period after the
|
166
|
+
/** Grace period after the channel reaches its max age. Int valued,
|
167
167
|
milliseconds. INT_MAX means unlimited. */
|
168
168
|
#define GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS "grpc.max_connection_age_grace_ms"
|
169
169
|
/** Enable/disable support for per-message compression. Defaults to 1, unless
|
@@ -315,8 +315,12 @@ typedef struct {
|
|
315
315
|
#define GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS "grpc.grpclb_call_timeout_ms"
|
316
316
|
/* Timeout in milliseconds to wait for the serverlist from the grpclb load
|
317
317
|
balancer before using fallback backend addresses from the resolver.
|
318
|
-
If 0, fallback
|
318
|
+
If 0, enter fallback mode immediately. Default value is 10000. */
|
319
319
|
#define GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS "grpc.grpclb_fallback_timeout_ms"
|
320
|
+
/* Timeout in milliseconds to wait for the serverlist from the xDS load
|
321
|
+
balancer before using fallback backend addresses from the resolver.
|
322
|
+
If 0, enter fallback mode immediately. Default value is 10000. */
|
323
|
+
#define GRPC_ARG_XDS_FALLBACK_TIMEOUT_MS "grpc.xds_fallback_timeout_ms"
|
320
324
|
/** If non-zero, grpc server's cronet compression workaround will be enabled */
|
321
325
|
#define GRPC_ARG_WORKAROUND_CRONET_COMPRESSION \
|
322
326
|
"grpc.workaround.cronet_compression"
|
@@ -350,11 +354,25 @@ typedef struct {
|
|
350
354
|
/** If set, inhibits health checking (which may be enabled via the
|
351
355
|
* service config.) */
|
352
356
|
#define GRPC_ARG_INHIBIT_HEALTH_CHECKING "grpc.inhibit_health_checking"
|
353
|
-
/** If set,
|
354
|
-
*
|
355
|
-
*
|
356
|
-
*
|
357
|
+
/** If set, the channel's resolver is allowed to query for SRV records.
|
358
|
+
* For example, this is useful as a way to enable the "grpclb"
|
359
|
+
* load balancing policy. Note that this only works with the "ares"
|
360
|
+
* DNS resolver, and isn't supported by the "native" DNS resolver. */
|
361
|
+
#define GRPC_ARG_DNS_ENABLE_SRV_QUERIES "grpc.dns_enable_srv_queries"
|
362
|
+
/** If set, determines an upper bound on the number of milliseconds that the
|
363
|
+
* c-ares based DNS resolver will wait on queries before cancelling them.
|
364
|
+
* The default value is 120,000. Setting this to "0" will disable the
|
365
|
+
* overall timeout entirely. Note that this doesn't include internal c-ares
|
366
|
+
* timeouts/backoff/retry logic, and so the actual DNS resolution may time out
|
367
|
+
* sooner than the value specified here. */
|
357
368
|
#define GRPC_ARG_DNS_ARES_QUERY_TIMEOUT_MS "grpc.dns_ares_query_timeout"
|
369
|
+
/** If set, uses a local subchannel pool within the channel. Otherwise, uses the
|
370
|
+
* global subchannel pool. */
|
371
|
+
#define GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL "grpc.use_local_subchannel_pool"
|
372
|
+
/** gRPC Objective-C channel pooling domain string. */
|
373
|
+
#define GRPC_ARG_CHANNEL_POOL_DOMAIN "grpc.channel_pooling_domain"
|
374
|
+
/** gRPC Objective-C channel pooling id. */
|
375
|
+
#define GRPC_ARG_CHANNEL_ID "grpc.channel_id"
|
358
376
|
/** \} */
|
359
377
|
|
360
378
|
/** Result of a grpc call. If the caller satisfies the prerequisites of a
|
@@ -478,7 +496,8 @@ typedef struct grpc_event {
|
|
478
496
|
field is guaranteed to be 0 */
|
479
497
|
int success;
|
480
498
|
/** The tag passed to grpc_call_start_batch etc to start this operation.
|
481
|
-
Only GRPC_OP_COMPLETE has a tag.
|
499
|
+
*Only* GRPC_OP_COMPLETE has a tag. For all other grpc_completion_type
|
500
|
+
values, tag is uninitialized. */
|
482
501
|
void* tag;
|
483
502
|
} grpc_event;
|
484
503
|
|
@@ -681,6 +700,10 @@ typedef struct grpc_experimental_completion_queue_functor {
|
|
681
700
|
pointer to this functor and a boolean that indicates whether the
|
682
701
|
operation succeeded (non-zero) or failed (zero) */
|
683
702
|
void (*functor_run)(struct grpc_experimental_completion_queue_functor*, int);
|
703
|
+
|
704
|
+
/** The following fields are not API. They are meant for internal use. */
|
705
|
+
int internal_success;
|
706
|
+
struct grpc_experimental_completion_queue_functor* internal_next;
|
684
707
|
} grpc_experimental_completion_queue_functor;
|
685
708
|
|
686
709
|
/* The upgrade to version 2 is currently experimental. */
|