grpc 1.2.5 → 1.3.4
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 +1434 -399
- data/etc/roots.pem +34 -150
- data/include/grpc/grpc.h +71 -0
- data/include/grpc/impl/codegen/atm.h +5 -0
- data/include/grpc/impl/codegen/atm_gcc_atomic.h +6 -0
- data/include/grpc/impl/codegen/atm_gcc_sync.h +2 -0
- data/include/grpc/impl/codegen/atm_windows.h +11 -0
- data/include/grpc/impl/codegen/grpc_types.h +54 -13
- data/include/grpc/impl/codegen/port_platform.h +15 -1
- data/include/grpc/support/alloc.h +2 -1
- data/include/grpc/support/sync.h +4 -0
- data/include/grpc/support/tls.h +1 -1
- data/src/core/ext/census/gen/trace_context.pb.h +1 -1
- data/src/core/ext/census/grpc_filter.c +14 -10
- data/src/core/ext/census/grpc_plugin.c +3 -1
- data/src/core/ext/census/trace_label.h +1 -1
- data/src/core/ext/census/trace_propagation.h +1 -1
- data/src/core/ext/census/trace_status.h +1 -1
- data/src/core/ext/census/trace_string.h +1 -1
- data/src/core/ext/census/tracing.h +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/channel_connectivity.c +56 -27
- data/src/core/ext/{client_channel → filters/client_channel}/client_channel.c +407 -202
- data/src/core/ext/{client_channel → filters/client_channel}/client_channel.h +10 -6
- data/src/core/ext/{client_channel → filters/client_channel}/client_channel_factory.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/client_channel_factory.h +4 -4
- data/src/core/ext/{client_channel → filters/client_channel}/client_channel_plugin.c +12 -7
- data/src/core/ext/{client_channel → filters/client_channel}/connector.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/connector.h +3 -5
- data/src/core/ext/{client_channel → filters/client_channel}/http_connect_handshaker.c +6 -6
- data/src/core/ext/{client_channel → filters/client_channel}/http_connect_handshaker.h +3 -3
- data/src/core/ext/{client_channel → filters/client_channel}/http_proxy.c +4 -4
- data/src/core/ext/{client_channel → filters/client_channel}/http_proxy.h +3 -3
- data/src/core/ext/{client_channel → filters/client_channel}/lb_policy.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/lb_policy.h +4 -4
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/grpclb.c +22 -20
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/grpclb.h +4 -4
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/grpclb_channel.h +5 -4
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/grpclb_channel_secure.c +2 -2
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/load_balancer_api.c +1 -1
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/load_balancer_api.h +6 -5
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/proto/grpc/lb/v1/load_balancer.pb.c +1 -1
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +0 -0
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/pick_first/pick_first.c +20 -15
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/round_robin/round_robin.c +21 -16
- data/src/core/ext/{client_channel → filters/client_channel}/lb_policy_factory.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/lb_policy_factory.h +5 -5
- data/src/core/ext/{client_channel → filters/client_channel}/lb_policy_registry.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/lb_policy_registry.h +4 -4
- data/src/core/ext/{client_channel → filters/client_channel}/parse_address.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/parse_address.h +4 -4
- data/src/core/ext/{client_channel → filters/client_channel}/proxy_mapper.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/proxy_mapper.h +3 -3
- data/src/core/ext/{client_channel → filters/client_channel}/proxy_mapper_registry.c +10 -4
- data/src/core/ext/{client_channel → filters/client_channel}/proxy_mapper_registry.h +4 -4
- data/src/core/ext/{client_channel → filters/client_channel}/resolver.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/resolver.h +4 -4
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c +350 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +66 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c +319 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c +289 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +64 -0
- data/src/core/ext/{resolver → filters/client_channel/resolver}/dns/native/dns_resolver.c +21 -5
- data/src/core/ext/{resolver → filters/client_channel/resolver}/sockaddr/sockaddr_resolver.c +3 -3
- data/src/core/ext/{client_channel → filters/client_channel}/resolver_factory.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/resolver_factory.h +6 -6
- data/src/core/ext/{client_channel → filters/client_channel}/resolver_registry.c +1 -2
- data/src/core/ext/{client_channel → filters/client_channel}/resolver_registry.h +4 -4
- data/src/core/ext/filters/client_channel/retry_throttle.c +210 -0
- data/src/core/ext/filters/client_channel/retry_throttle.h +65 -0
- data/src/core/ext/{client_channel → filters/client_channel}/subchannel.c +49 -43
- data/src/core/ext/{client_channel → filters/client_channel}/subchannel.h +21 -7
- data/src/core/ext/{client_channel → filters/client_channel}/subchannel_index.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/subchannel_index.h +5 -5
- data/src/core/ext/{client_channel → filters/client_channel}/uri_parser.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/uri_parser.h +3 -3
- data/src/core/ext/{load_reporting → filters/load_reporting}/load_reporting.c +4 -2
- data/src/core/ext/{load_reporting → filters/load_reporting}/load_reporting.h +3 -3
- data/src/core/ext/{load_reporting → filters/load_reporting}/load_reporting_filter.c +17 -14
- data/src/core/ext/{load_reporting → filters/load_reporting}/load_reporting_filter.h +4 -4
- data/src/core/ext/filters/max_age/max_age_filter.c +439 -0
- data/src/core/ext/filters/max_age/max_age_filter.h +39 -0
- data/src/core/ext/transport/chttp2/client/chttp2_connector.c +6 -41
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +1 -1
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.c +2 -2
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +3 -3
- data/src/core/ext/transport/chttp2/server/chttp2_server.c +2 -2
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +2 -5
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +2 -2
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.c +449 -204
- data/src/core/ext/transport/chttp2/transport/frame_data.c +10 -7
- data/src/core/ext/transport/chttp2/transport/frame_goaway.c +3 -2
- data/src/core/ext/transport/chttp2/transport/frame_ping.c +37 -7
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +3 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +4 -3
- data/src/core/ext/transport/chttp2/transport/frame_settings.c +18 -38
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +1 -29
- data/src/core/ext/transport/chttp2/transport/frame_window_update.c +2 -2
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.c +64 -37
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +11 -4
- data/src/core/ext/transport/chttp2/transport/hpack_parser.c +60 -39
- data/src/core/ext/transport/chttp2/transport/hpack_table.c +2 -2
- data/src/core/ext/transport/chttp2/transport/http2_settings.c +75 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +74 -0
- data/src/core/ext/transport/chttp2/transport/incoming_metadata.c +22 -43
- data/src/core/ext/transport/chttp2/transport/incoming_metadata.h +8 -10
- data/src/core/ext/transport/chttp2/transport/internal.h +24 -2
- data/src/core/ext/transport/chttp2/transport/parsing.c +33 -15
- data/src/core/ext/transport/chttp2/transport/writing.c +56 -10
- data/src/core/lib/channel/channel_args.c +7 -0
- data/src/core/lib/channel/channel_args.h +2 -0
- data/src/core/lib/channel/channel_stack.c +20 -27
- data/src/core/lib/channel/channel_stack.h +18 -16
- data/src/core/lib/channel/compress_filter.c +20 -18
- data/src/core/lib/channel/connected_channel.c +9 -8
- data/src/core/lib/channel/deadline_filter.c +28 -24
- data/src/core/lib/channel/deadline_filter.h +3 -3
- data/src/core/lib/channel/handshaker.c +3 -2
- data/src/core/lib/channel/http_client_filter.c +119 -61
- data/src/core/lib/channel/http_server_filter.c +124 -69
- data/src/core/lib/channel/message_size_filter.c +23 -19
- data/src/core/lib/http/httpcli.c +8 -6
- data/src/core/lib/http/httpcli_security_connector.c +5 -5
- data/src/core/lib/http/parser.c +57 -31
- data/src/core/lib/iomgr/closure.c +15 -0
- data/src/core/lib/iomgr/closure.h +4 -0
- data/src/core/lib/iomgr/combiner.c +8 -0
- data/src/core/lib/iomgr/endpoint_pair.h +2 -3
- data/src/core/lib/iomgr/endpoint_pair_posix.c +10 -7
- data/src/core/lib/iomgr/endpoint_pair_uv.c +2 -3
- data/src/core/lib/iomgr/endpoint_pair_windows.c +9 -6
- data/src/core/lib/iomgr/error.c +360 -177
- data/src/core/lib/iomgr/error.h +31 -33
- data/src/core/lib/iomgr/error_internal.h +30 -9
- data/src/core/lib/iomgr/ev_epoll_linux.c +25 -239
- data/src/core/lib/iomgr/ev_poll_posix.c +11 -7
- data/src/core/lib/iomgr/ev_posix.c +6 -0
- data/src/core/lib/iomgr/ev_posix.h +3 -0
- data/src/core/lib/iomgr/exec_ctx.c +6 -0
- data/src/core/lib/iomgr/executor.c +8 -2
- data/src/core/lib/iomgr/load_file.c +6 -3
- data/src/core/lib/iomgr/lockfree_event.c +238 -0
- data/src/core/{ext/client_channel/initial_connect_string.h → lib/iomgr/lockfree_event.h} +17 -13
- data/src/core/lib/iomgr/pollset.h +4 -0
- data/src/core/lib/iomgr/pollset_windows.c +2 -2
- data/src/core/lib/iomgr/port.h +9 -0
- data/src/core/lib/iomgr/resolve_address_posix.c +15 -9
- data/src/core/lib/iomgr/resolve_address_uv.c +8 -6
- data/src/core/lib/iomgr/resolve_address_windows.c +2 -2
- data/src/core/lib/iomgr/resource_quota.c +19 -4
- data/src/core/lib/iomgr/resource_quota.h +2 -0
- data/src/core/lib/iomgr/sockaddr_utils.c +3 -1
- data/src/core/lib/iomgr/socket_factory_posix.c +110 -0
- data/src/core/lib/iomgr/socket_factory_posix.h +90 -0
- data/src/core/lib/iomgr/socket_utils_common_posix.c +25 -9
- data/src/core/lib/iomgr/socket_utils_posix.h +7 -0
- data/src/core/lib/iomgr/tcp_client.h +0 -4
- data/src/core/lib/iomgr/tcp_client_posix.c +15 -31
- data/src/core/lib/iomgr/tcp_client_uv.c +10 -6
- data/src/core/lib/iomgr/tcp_client_windows.c +9 -19
- data/src/core/lib/iomgr/tcp_posix.c +111 -22
- data/src/core/lib/iomgr/tcp_posix.h +3 -4
- data/src/core/lib/iomgr/tcp_server_posix.c +39 -417
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +135 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.c +221 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c +196 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c +49 -0
- data/src/core/lib/iomgr/tcp_server_uv.c +43 -16
- data/src/core/lib/iomgr/tcp_server_windows.c +10 -22
- data/src/core/lib/iomgr/tcp_uv.c +16 -13
- data/src/core/lib/iomgr/tcp_windows.c +24 -12
- data/src/core/lib/iomgr/tcp_windows.h +2 -2
- data/src/core/lib/iomgr/timer.h +3 -0
- data/src/core/lib/iomgr/timer_generic.c +257 -72
- data/src/core/lib/iomgr/timer_generic.h +1 -1
- data/src/core/lib/iomgr/timer_heap.c +8 -8
- data/src/core/lib/iomgr/udp_server.c +54 -24
- data/src/core/lib/iomgr/udp_server.h +7 -7
- data/src/core/lib/iomgr/unix_sockets_posix.c +1 -1
- data/src/core/lib/iomgr/unix_sockets_posix_noop.c +2 -1
- data/src/core/lib/iomgr/wakeup_fd_posix.h +1 -1
- data/src/core/lib/profiling/basic_timers.c +1 -1
- data/src/core/lib/security/credentials/credentials.h +1 -1
- data/src/core/lib/security/credentials/google_default/google_default_credentials.c +10 -9
- data/src/core/lib/security/credentials/jwt/json_token.c +1 -1
- data/src/core/lib/security/credentials/jwt/jwt_verifier.c +2 -2
- data/src/core/lib/security/transport/client_auth_filter.c +33 -26
- data/src/core/lib/security/transport/secure_endpoint.c +8 -5
- data/src/core/lib/security/transport/security_connector.c +37 -37
- data/src/core/lib/security/transport/security_connector.h +1 -1
- data/src/core/lib/security/transport/security_handshaker.c +15 -12
- data/src/core/lib/security/transport/server_auth_filter.c +20 -18
- data/src/core/lib/security/transport/tsi_error.c +5 -3
- data/src/core/lib/security/transport/tsi_error.h +1 -1
- data/src/core/lib/{security/util → slice}/b64.c +21 -6
- data/src/core/lib/{security/util → slice}/b64.h +16 -4
- data/src/core/lib/slice/slice.c +4 -2
- data/src/core/lib/slice/slice_buffer.c +16 -14
- data/src/core/lib/support/arena.c +98 -0
- data/src/core/{ext/client_channel/initial_connect_string.c → lib/support/arena.h} +17 -15
- data/src/core/{ext/client_channel/default_initial_connect_string.c → lib/support/atm.c} +14 -5
- data/src/core/lib/support/cpu_linux.c +5 -0
- data/src/core/lib/support/sync.c +4 -0
- data/src/core/lib/support/time.c +4 -10
- data/src/core/lib/support/wrap_memcpy.c +3 -1
- data/src/core/lib/surface/call.c +252 -221
- data/src/core/lib/surface/channel.c +72 -21
- data/src/core/lib/surface/channel.h +8 -0
- data/src/core/lib/surface/completion_queue.c +2 -3
- data/src/core/lib/surface/completion_queue_factory.c +77 -0
- data/src/core/lib/surface/completion_queue_factory.h +51 -0
- data/src/core/lib/surface/init_secure.c +3 -1
- data/src/core/lib/surface/lame_client.c +18 -14
- data/src/core/lib/surface/server.c +43 -41
- data/src/core/lib/surface/validate_metadata.c +8 -4
- data/src/core/lib/surface/version.c +2 -2
- data/src/core/lib/transport/bdp_estimator.h +1 -1
- data/src/core/lib/transport/connectivity_state.c +2 -1
- data/src/core/lib/transport/error_utils.c +17 -17
- data/src/core/lib/transport/error_utils.h +1 -1
- data/src/core/lib/transport/metadata_batch.c +6 -7
- data/src/core/lib/transport/pid_controller.c +1 -0
- data/src/core/lib/transport/service_config.c +12 -0
- data/src/core/lib/transport/service_config.h +6 -0
- data/src/core/lib/transport/transport.c +29 -17
- data/src/core/lib/transport/transport.h +85 -42
- data/src/core/lib/transport/transport_impl.h +5 -3
- data/src/core/lib/transport/transport_op_string.c +20 -14
- data/src/core/plugin_registry/grpc_plugin_registry.c +8 -0
- data/src/core/{lib/tsi → tsi}/fake_transport_security.c +2 -2
- data/src/core/{lib/tsi → tsi}/fake_transport_security.h +4 -4
- data/src/core/{lib/tsi → tsi}/ssl_transport_security.c +40 -79
- data/src/core/{lib/tsi → tsi}/ssl_transport_security.h +44 -21
- data/src/core/{lib/tsi → tsi}/ssl_types.h +3 -3
- data/src/core/{lib/tsi → tsi}/transport_security.c +2 -2
- data/src/core/{lib/tsi → tsi}/transport_security.h +4 -4
- data/src/core/{lib/tsi → tsi}/transport_security_interface.h +3 -3
- data/src/ruby/ext/grpc/extconf.rb +1 -0
- data/src/ruby/ext/grpc/rb_call_credentials.c +2 -2
- data/src/ruby/ext/grpc/rb_channel.c +520 -93
- data/src/ruby/ext/grpc/rb_channel.h +2 -0
- data/src/ruby/ext/grpc/rb_channel_credentials.c +3 -0
- data/src/ruby/ext/grpc/rb_compression_options.c +5 -2
- data/src/ruby/ext/grpc/rb_event_thread.c +6 -6
- data/src/ruby/ext/grpc/rb_grpc.c +29 -7
- data/src/ruby/ext/grpc/rb_grpc.h +2 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +10 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +15 -0
- data/src/ruby/ext/grpc/rb_server.c +5 -3
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/channel_connection_spec.rb +173 -0
- data/src/ruby/spec/channel_spec.rb +29 -0
- data/src/ruby/spec/generic/rpc_server_pool_spec.rb +27 -17
- data/third_party/cares/ares_build.h +264 -0
- data/third_party/cares/cares/ares.h +636 -0
- data/third_party/cares/cares/ares__close_sockets.c +61 -0
- data/third_party/cares/cares/ares__get_hostent.c +261 -0
- data/third_party/cares/cares/ares__read_line.c +73 -0
- data/third_party/cares/cares/ares__timeval.c +111 -0
- data/third_party/cares/cares/ares_cancel.c +63 -0
- data/third_party/cares/cares/ares_create_query.c +202 -0
- data/third_party/cares/cares/ares_data.c +221 -0
- data/third_party/cares/cares/ares_data.h +72 -0
- data/third_party/cares/cares/ares_destroy.c +108 -0
- data/third_party/cares/cares/ares_dns.h +103 -0
- data/third_party/cares/cares/ares_expand_name.c +205 -0
- data/third_party/cares/cares/ares_expand_string.c +70 -0
- data/third_party/cares/cares/ares_fds.c +59 -0
- data/third_party/cares/cares/ares_free_hostent.c +41 -0
- data/third_party/cares/cares/ares_free_string.c +25 -0
- data/third_party/cares/cares/ares_getenv.c +30 -0
- data/third_party/cares/cares/ares_getenv.h +26 -0
- data/third_party/cares/cares/ares_gethostbyaddr.c +294 -0
- data/third_party/cares/cares/ares_gethostbyname.c +518 -0
- data/third_party/cares/cares/ares_getnameinfo.c +422 -0
- data/third_party/cares/cares/ares_getopt.c +122 -0
- data/third_party/cares/cares/ares_getopt.h +53 -0
- data/third_party/cares/cares/ares_getsock.c +66 -0
- data/third_party/cares/cares/ares_inet_net_pton.h +25 -0
- data/third_party/cares/cares/ares_init.c +2146 -0
- data/third_party/cares/cares/ares_iphlpapi.h +221 -0
- data/third_party/cares/cares/ares_ipv6.h +78 -0
- data/third_party/cares/cares/ares_library_init.c +167 -0
- data/third_party/cares/cares/ares_library_init.h +42 -0
- data/third_party/cares/cares/ares_llist.c +63 -0
- data/third_party/cares/cares/ares_llist.h +39 -0
- data/third_party/cares/cares/ares_mkquery.c +24 -0
- data/third_party/cares/cares/ares_nowarn.c +260 -0
- data/third_party/cares/cares/ares_nowarn.h +61 -0
- data/third_party/cares/cares/ares_options.c +402 -0
- data/third_party/cares/cares/ares_parse_a_reply.c +264 -0
- data/third_party/cares/cares/ares_parse_aaaa_reply.c +264 -0
- data/third_party/cares/cares/ares_parse_mx_reply.c +170 -0
- data/third_party/cares/cares/ares_parse_naptr_reply.c +188 -0
- data/third_party/cares/cares/ares_parse_ns_reply.c +183 -0
- data/third_party/cares/cares/ares_parse_ptr_reply.c +219 -0
- data/third_party/cares/cares/ares_parse_soa_reply.c +133 -0
- data/third_party/cares/cares/ares_parse_srv_reply.c +179 -0
- data/third_party/cares/cares/ares_parse_txt_reply.c +220 -0
- data/third_party/cares/cares/ares_platform.c +11035 -0
- data/third_party/cares/cares/ares_platform.h +43 -0
- data/third_party/cares/cares/ares_private.h +363 -0
- data/third_party/cares/cares/ares_process.c +1359 -0
- data/third_party/cares/cares/ares_query.c +186 -0
- data/third_party/cares/cares/ares_rules.h +125 -0
- data/third_party/cares/cares/ares_search.c +316 -0
- data/third_party/cares/cares/ares_send.c +131 -0
- data/third_party/cares/cares/ares_setup.h +217 -0
- data/third_party/cares/cares/ares_strcasecmp.c +66 -0
- data/third_party/cares/cares/ares_strcasecmp.h +30 -0
- data/third_party/cares/cares/ares_strdup.c +49 -0
- data/third_party/cares/cares/ares_strdup.h +24 -0
- data/third_party/cares/cares/ares_strerror.c +56 -0
- data/third_party/cares/cares/ares_timeout.c +88 -0
- data/third_party/cares/cares/ares_version.c +11 -0
- data/third_party/cares/cares/ares_version.h +24 -0
- data/third_party/cares/cares/ares_writev.c +79 -0
- data/third_party/cares/cares/bitncmp.c +59 -0
- data/third_party/cares/cares/bitncmp.h +26 -0
- data/third_party/cares/cares/config-win32.h +377 -0
- data/third_party/cares/cares/inet_net_pton.c +450 -0
- data/third_party/cares/cares/inet_ntop.c +208 -0
- data/third_party/cares/cares/setup_once.h +554 -0
- data/third_party/cares/cares/windows_port.c +22 -0
- data/third_party/cares/config_darwin/ares_config.h +523 -0
- data/third_party/cares/config_linux/ares_config.h +524 -0
- metadata +164 -68
@@ -39,6 +39,7 @@
|
|
39
39
|
#include <grpc/support/port_platform.h>
|
40
40
|
|
41
41
|
#include "src/core/lib/iomgr/error.h"
|
42
|
+
#include "src/core/lib/slice/slice_internal.h"
|
42
43
|
#include "src/core/lib/slice/slice_string_helpers.h"
|
43
44
|
|
44
45
|
static grpc_error *conforms_to(grpc_slice slice, const uint8_t *legal_bits,
|
@@ -52,9 +53,10 @@ static grpc_error *conforms_to(grpc_slice slice, const uint8_t *legal_bits,
|
|
52
53
|
if ((legal_bits[byte] & (1 << bit)) == 0) {
|
53
54
|
char *dump = grpc_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII);
|
54
55
|
grpc_error *error = grpc_error_set_str(
|
55
|
-
grpc_error_set_int(
|
56
|
+
grpc_error_set_int(GRPC_ERROR_CREATE_FROM_COPIED_STRING(err_desc),
|
57
|
+
GRPC_ERROR_INT_OFFSET,
|
56
58
|
p - GRPC_SLICE_START_PTR(slice)),
|
57
|
-
GRPC_ERROR_STR_RAW_BYTES, dump);
|
59
|
+
GRPC_ERROR_STR_RAW_BYTES, grpc_slice_from_copied_string(dump));
|
58
60
|
gpr_free(dump);
|
59
61
|
return error;
|
60
62
|
}
|
@@ -74,10 +76,12 @@ grpc_error *grpc_validate_header_key_is_legal(grpc_slice slice) {
|
|
74
76
|
0x80, 0xfe, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
75
77
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
76
78
|
if (GRPC_SLICE_LENGTH(slice) == 0) {
|
77
|
-
return
|
79
|
+
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
80
|
+
"Metadata keys cannot be zero length");
|
78
81
|
}
|
79
82
|
if (GRPC_SLICE_START_PTR(slice)[0] == ':') {
|
80
|
-
return
|
83
|
+
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
84
|
+
"Metadata keys cannot start with :");
|
81
85
|
}
|
82
86
|
return conforms_to(slice, legal_header_bits, "Illegal header key");
|
83
87
|
}
|
@@ -36,6 +36,6 @@
|
|
36
36
|
|
37
37
|
#include <grpc/grpc.h>
|
38
38
|
|
39
|
-
const char *grpc_version_string(void) { return "3.0.0
|
39
|
+
const char *grpc_version_string(void) { return "3.0.0"; }
|
40
40
|
|
41
|
-
const char *grpc_g_stands_for(void) { return "
|
41
|
+
const char *grpc_g_stands_for(void) { return "gentle"; }
|
@@ -79,7 +79,8 @@ void grpc_connectivity_state_destroy(grpc_exec_ctx *exec_ctx,
|
|
79
79
|
*w->current = GRPC_CHANNEL_SHUTDOWN;
|
80
80
|
error = GRPC_ERROR_NONE;
|
81
81
|
} else {
|
82
|
-
error =
|
82
|
+
error =
|
83
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Shutdown connectivity owner");
|
83
84
|
}
|
84
85
|
grpc_closure_sched(exec_ctx, w->notify, error);
|
85
86
|
gpr_free(w);
|
@@ -44,18 +44,18 @@ static grpc_error *recursively_find_error_with_field(grpc_error *error,
|
|
44
44
|
}
|
45
45
|
if (grpc_error_is_special(error)) return NULL;
|
46
46
|
// Otherwise, search through its children.
|
47
|
-
|
48
|
-
while (
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
uint8_t slot = error->first_err;
|
48
|
+
while (slot != UINT8_MAX) {
|
49
|
+
grpc_linked_error *lerr = (grpc_linked_error *)(error->arena + slot);
|
50
|
+
grpc_error *result = recursively_find_error_with_field(lerr->err, which);
|
51
|
+
if (result) return result;
|
52
|
+
slot = lerr->next;
|
53
53
|
}
|
54
54
|
return NULL;
|
55
55
|
}
|
56
56
|
|
57
57
|
void grpc_error_get_status(grpc_error *error, gpr_timespec deadline,
|
58
|
-
grpc_status_code *code,
|
58
|
+
grpc_status_code *code, grpc_slice *slice,
|
59
59
|
grpc_http2_error_code *http_error) {
|
60
60
|
// Start with the parent error and recurse through the tree of children
|
61
61
|
// until we find the first one that has a status code.
|
@@ -97,11 +97,11 @@ void grpc_error_get_status(grpc_error *error, gpr_timespec deadline,
|
|
97
97
|
|
98
98
|
// If the error has a status message, use it. Otherwise, fall back to
|
99
99
|
// the error description.
|
100
|
-
if (
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
100
|
+
if (slice != NULL) {
|
101
|
+
if (!grpc_error_get_str(found_error, GRPC_ERROR_STR_GRPC_MESSAGE, slice)) {
|
102
|
+
if (!grpc_error_get_str(found_error, GRPC_ERROR_STR_DESCRIPTION, slice)) {
|
103
|
+
*slice = grpc_slice_from_static_string("unknown error");
|
104
|
+
}
|
105
105
|
}
|
106
106
|
}
|
107
107
|
|
@@ -112,13 +112,13 @@ bool grpc_error_has_clear_grpc_status(grpc_error *error) {
|
|
112
112
|
if (grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, NULL)) {
|
113
113
|
return true;
|
114
114
|
}
|
115
|
-
|
116
|
-
while (
|
117
|
-
|
118
|
-
if (
|
119
|
-
if (grpc_error_has_clear_grpc_status(child_error)) {
|
115
|
+
uint8_t slot = error->first_err;
|
116
|
+
while (slot != UINT8_MAX) {
|
117
|
+
grpc_linked_error *lerr = (grpc_linked_error *)(error->arena + slot);
|
118
|
+
if (grpc_error_has_clear_grpc_status(lerr->err)) {
|
120
119
|
return true;
|
121
120
|
}
|
121
|
+
slot = lerr->next;
|
122
122
|
}
|
123
123
|
return false;
|
124
124
|
}
|
@@ -44,7 +44,7 @@
|
|
44
44
|
/// attributes (code, msg, http_status) are unneeded, they can be passed as
|
45
45
|
/// NULL.
|
46
46
|
void grpc_error_get_status(grpc_error *error, gpr_timespec deadline,
|
47
|
-
grpc_status_code *code,
|
47
|
+
grpc_status_code *code, grpc_slice *slice,
|
48
48
|
grpc_http2_error_code *http_status);
|
49
49
|
|
50
50
|
/// A utility function to check whether there is a clear status code that
|
@@ -101,12 +101,10 @@ void grpc_metadata_batch_destroy(grpc_exec_ctx *exec_ctx,
|
|
101
101
|
}
|
102
102
|
|
103
103
|
grpc_error *grpc_attach_md_to_error(grpc_error *src, grpc_mdelem md) {
|
104
|
-
char *k = grpc_slice_to_c_string(GRPC_MDKEY(md));
|
105
|
-
char *v = grpc_slice_to_c_string(GRPC_MDVALUE(md));
|
106
104
|
grpc_error *out = grpc_error_set_str(
|
107
|
-
grpc_error_set_str(src, GRPC_ERROR_STR_KEY,
|
108
|
-
|
109
|
-
|
105
|
+
grpc_error_set_str(src, GRPC_ERROR_STR_KEY,
|
106
|
+
grpc_slice_ref_internal(GRPC_MDKEY(md))),
|
107
|
+
GRPC_ERROR_STR_VALUE, grpc_slice_ref_internal(GRPC_MDVALUE(md)));
|
110
108
|
return out;
|
111
109
|
}
|
112
110
|
|
@@ -126,7 +124,8 @@ static grpc_error *maybe_link_callout(grpc_metadata_batch *batch,
|
|
126
124
|
return GRPC_ERROR_NONE;
|
127
125
|
}
|
128
126
|
return grpc_attach_md_to_error(
|
129
|
-
|
127
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Unallowed duplicate metadata"),
|
128
|
+
storage->md);
|
130
129
|
}
|
131
130
|
|
132
131
|
static void maybe_unlink_callout(grpc_metadata_batch *batch,
|
@@ -302,7 +301,7 @@ static void add_error(grpc_error **composite, grpc_error *error,
|
|
302
301
|
const char *composite_error_string) {
|
303
302
|
if (error == GRPC_ERROR_NONE) return;
|
304
303
|
if (*composite == GRPC_ERROR_NONE) {
|
305
|
-
*composite =
|
304
|
+
*composite = GRPC_ERROR_CREATE_FROM_COPIED_STRING(composite_error_string);
|
306
305
|
}
|
307
306
|
*composite = grpc_error_add_child(*composite, error);
|
308
307
|
}
|
@@ -49,6 +49,7 @@ void grpc_pid_controller_reset(grpc_pid_controller *pid_controller) {
|
|
49
49
|
|
50
50
|
double grpc_pid_controller_update(grpc_pid_controller *pid_controller,
|
51
51
|
double error, double dt) {
|
52
|
+
if (dt == 0) return pid_controller->last_control_value;
|
52
53
|
/* integrate error using the trapezoid rule */
|
53
54
|
pid_controller->error_integral +=
|
54
55
|
dt * (pid_controller->last_error + error) * 0.5;
|
@@ -93,6 +93,18 @@ void grpc_service_config_destroy(grpc_service_config* service_config) {
|
|
93
93
|
gpr_free(service_config);
|
94
94
|
}
|
95
95
|
|
96
|
+
void grpc_service_config_parse_global_params(
|
97
|
+
const grpc_service_config* service_config,
|
98
|
+
void (*process_json)(const grpc_json* json, void* arg), void* arg) {
|
99
|
+
const grpc_json* json = service_config->json_tree;
|
100
|
+
if (json->type != GRPC_JSON_OBJECT || json->key != NULL) return;
|
101
|
+
for (grpc_json* field = json->child; field != NULL; field = field->next) {
|
102
|
+
if (field->key == NULL) return;
|
103
|
+
if (strcmp(field->key, "methodConfig") == 0) continue;
|
104
|
+
process_json(field, arg);
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
96
108
|
const char* grpc_service_config_get_lb_policy_name(
|
97
109
|
const grpc_service_config* service_config) {
|
98
110
|
const grpc_json* json = service_config->json_tree;
|
@@ -42,6 +42,12 @@ typedef struct grpc_service_config grpc_service_config;
|
|
42
42
|
grpc_service_config* grpc_service_config_create(const char* json_string);
|
43
43
|
void grpc_service_config_destroy(grpc_service_config* service_config);
|
44
44
|
|
45
|
+
/// Invokes \a process_json() for each global parameter in the service
|
46
|
+
/// config. \a arg is passed as the second argument to \a process_json().
|
47
|
+
void grpc_service_config_parse_global_params(
|
48
|
+
const grpc_service_config* service_config,
|
49
|
+
void (*process_json)(const grpc_json* json, void* arg), void* arg);
|
50
|
+
|
45
51
|
/// Gets the LB policy name from \a service_config.
|
46
52
|
/// Returns NULL if no LB policy name was specified.
|
47
53
|
/// Caller does NOT take ownership.
|
@@ -162,15 +162,15 @@ void grpc_transport_destroy(grpc_exec_ctx *exec_ctx,
|
|
162
162
|
int grpc_transport_init_stream(grpc_exec_ctx *exec_ctx,
|
163
163
|
grpc_transport *transport, grpc_stream *stream,
|
164
164
|
grpc_stream_refcount *refcount,
|
165
|
-
const void *server_data) {
|
165
|
+
const void *server_data, gpr_arena *arena) {
|
166
166
|
return transport->vtable->init_stream(exec_ctx, transport, stream, refcount,
|
167
|
-
server_data);
|
167
|
+
server_data, arena);
|
168
168
|
}
|
169
169
|
|
170
170
|
void grpc_transport_perform_stream_op(grpc_exec_ctx *exec_ctx,
|
171
171
|
grpc_transport *transport,
|
172
172
|
grpc_stream *stream,
|
173
|
-
|
173
|
+
grpc_transport_stream_op_batch *op) {
|
174
174
|
transport->vtable->perform_stream_op(exec_ctx, transport, stream, op);
|
175
175
|
}
|
176
176
|
|
@@ -197,9 +197,10 @@ void grpc_transport_set_pops(grpc_exec_ctx *exec_ctx, grpc_transport *transport,
|
|
197
197
|
|
198
198
|
void grpc_transport_destroy_stream(grpc_exec_ctx *exec_ctx,
|
199
199
|
grpc_transport *transport,
|
200
|
-
grpc_stream *stream,
|
200
|
+
grpc_stream *stream,
|
201
|
+
grpc_closure *then_schedule_closure) {
|
201
202
|
transport->vtable->destroy_stream(exec_ctx, transport, stream,
|
202
|
-
|
203
|
+
then_schedule_closure);
|
203
204
|
}
|
204
205
|
|
205
206
|
char *grpc_transport_get_peer(grpc_exec_ctx *exec_ctx,
|
@@ -212,14 +213,23 @@ grpc_endpoint *grpc_transport_get_endpoint(grpc_exec_ctx *exec_ctx,
|
|
212
213
|
return transport->vtable->get_endpoint(exec_ctx, transport);
|
213
214
|
}
|
214
215
|
|
215
|
-
void
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
216
|
+
void grpc_transport_stream_op_batch_finish_with_failure(
|
217
|
+
grpc_exec_ctx *exec_ctx, grpc_transport_stream_op_batch *op,
|
218
|
+
grpc_error *error) {
|
219
|
+
if (op->recv_message) {
|
220
|
+
grpc_closure_sched(exec_ctx, op->payload->recv_message.recv_message_ready,
|
221
|
+
GRPC_ERROR_REF(error));
|
222
|
+
}
|
223
|
+
if (op->recv_initial_metadata) {
|
224
|
+
grpc_closure_sched(
|
225
|
+
exec_ctx,
|
226
|
+
op->payload->recv_initial_metadata.recv_initial_metadata_ready,
|
227
|
+
GRPC_ERROR_REF(error));
|
228
|
+
}
|
221
229
|
grpc_closure_sched(exec_ctx, op->on_complete, error);
|
222
|
-
|
230
|
+
if (op->cancel_stream) {
|
231
|
+
GRPC_ERROR_UNREF(op->payload->cancel_stream.cancel_error);
|
232
|
+
}
|
223
233
|
}
|
224
234
|
|
225
235
|
typedef struct {
|
@@ -248,23 +258,25 @@ grpc_transport_op *grpc_make_transport_op(grpc_closure *on_complete) {
|
|
248
258
|
typedef struct {
|
249
259
|
grpc_closure outer_on_complete;
|
250
260
|
grpc_closure *inner_on_complete;
|
251
|
-
|
261
|
+
grpc_transport_stream_op_batch op;
|
262
|
+
grpc_transport_stream_op_batch_payload payload;
|
252
263
|
} made_transport_stream_op;
|
253
264
|
|
254
265
|
static void destroy_made_transport_stream_op(grpc_exec_ctx *exec_ctx, void *arg,
|
255
266
|
grpc_error *error) {
|
256
267
|
made_transport_stream_op *op = arg;
|
257
|
-
|
268
|
+
grpc_closure *c = op->inner_on_complete;
|
258
269
|
gpr_free(op);
|
270
|
+
grpc_closure_run(exec_ctx, c, GRPC_ERROR_REF(error));
|
259
271
|
}
|
260
272
|
|
261
|
-
|
273
|
+
grpc_transport_stream_op_batch *grpc_make_transport_stream_op(
|
262
274
|
grpc_closure *on_complete) {
|
263
|
-
made_transport_stream_op *op =
|
275
|
+
made_transport_stream_op *op = gpr_zalloc(sizeof(*op));
|
276
|
+
op->op.payload = &op->payload;
|
264
277
|
grpc_closure_init(&op->outer_on_complete, destroy_made_transport_stream_op,
|
265
278
|
op, grpc_schedule_on_exec_ctx);
|
266
279
|
op->inner_on_complete = on_complete;
|
267
|
-
memset(&op->op, 0, sizeof(op->op));
|
268
280
|
op->op.on_complete = &op->outer_on_complete;
|
269
281
|
return &op->op;
|
270
282
|
}
|
@@ -41,6 +41,7 @@
|
|
41
41
|
#include "src/core/lib/iomgr/polling_entity.h"
|
42
42
|
#include "src/core/lib/iomgr/pollset.h"
|
43
43
|
#include "src/core/lib/iomgr/pollset_set.h"
|
44
|
+
#include "src/core/lib/support/arena.h"
|
44
45
|
#include "src/core/lib/transport/byte_stream.h"
|
45
46
|
#include "src/core/lib/transport/metadata_batch.h"
|
46
47
|
|
@@ -108,55 +109,98 @@ void grpc_transport_move_stats(grpc_transport_stream_stats *from,
|
|
108
109
|
grpc_transport_stream_stats *to);
|
109
110
|
|
110
111
|
typedef struct {
|
112
|
+
void *extra_arg;
|
111
113
|
grpc_closure closure;
|
112
|
-
|
113
|
-
|
114
|
+
} grpc_handler_private_op_data;
|
115
|
+
|
116
|
+
typedef struct grpc_transport_stream_op_batch_payload
|
117
|
+
grpc_transport_stream_op_batch_payload;
|
114
118
|
|
115
119
|
/* Transport stream op: a set of operations to perform on a transport
|
116
120
|
against a single stream */
|
117
|
-
typedef struct
|
121
|
+
typedef struct grpc_transport_stream_op_batch {
|
118
122
|
/** Should be enqueued when all requested operations (excluding recv_message
|
119
123
|
and recv_initial_metadata which have their own closures) in a given batch
|
120
124
|
have been completed. */
|
121
125
|
grpc_closure *on_complete;
|
122
126
|
|
127
|
+
/** Values for the stream op (fields set are determined by flags above) */
|
128
|
+
grpc_transport_stream_op_batch_payload *payload;
|
129
|
+
|
123
130
|
/** Is the completion of this op covered by a poller (if false: the op should
|
124
131
|
complete independently of some pollset being polled) */
|
125
|
-
bool covered_by_poller;
|
132
|
+
bool covered_by_poller : 1;
|
126
133
|
|
127
|
-
/** Send initial metadata to the peer, from the provided metadata batch.
|
128
|
-
|
129
|
-
grpc_metadata_batch *send_initial_metadata;
|
130
|
-
/** Iff send_initial_metadata != NULL, flags associated with
|
131
|
-
send_initial_metadata: a bitfield of GRPC_INITIAL_METADATA_xxx */
|
132
|
-
uint32_t send_initial_metadata_flags;
|
134
|
+
/** Send initial metadata to the peer, from the provided metadata batch. */
|
135
|
+
bool send_initial_metadata : 1;
|
133
136
|
|
134
137
|
/** Send trailing metadata to the peer, from the provided metadata batch. */
|
135
|
-
|
138
|
+
bool send_trailing_metadata : 1;
|
136
139
|
|
137
140
|
/** Send message data to the peer, from the provided byte stream. */
|
138
|
-
|
141
|
+
bool send_message : 1;
|
139
142
|
|
140
143
|
/** Receive initial metadata from the stream, into provided metadata batch. */
|
141
|
-
|
142
|
-
bool *recv_idempotent_request;
|
143
|
-
bool *recv_cacheable_request;
|
144
|
-
/** Should be enqueued when initial metadata is ready to be processed. */
|
145
|
-
grpc_closure *recv_initial_metadata_ready;
|
144
|
+
bool recv_initial_metadata : 1;
|
146
145
|
|
147
146
|
/** Receive message data from the stream, into provided byte stream. */
|
148
|
-
|
149
|
-
/** Should be enqueued when one message is ready to be processed. */
|
150
|
-
grpc_closure *recv_message_ready;
|
147
|
+
bool recv_message : 1;
|
151
148
|
|
152
149
|
/** Receive trailing metadata from the stream, into provided metadata batch.
|
153
150
|
*/
|
154
|
-
|
151
|
+
bool recv_trailing_metadata : 1;
|
155
152
|
|
156
153
|
/** Collect any stats into provided buffer, zero internal stat counters */
|
157
|
-
|
154
|
+
bool collect_stats : 1;
|
155
|
+
|
156
|
+
/** Cancel this stream with the provided error */
|
157
|
+
bool cancel_stream : 1;
|
158
|
+
|
159
|
+
/***************************************************************************
|
160
|
+
* remaining fields are initialized and used at the discretion of the
|
161
|
+
* current handler of the op */
|
158
162
|
|
159
|
-
|
163
|
+
grpc_handler_private_op_data handler_private;
|
164
|
+
} grpc_transport_stream_op_batch;
|
165
|
+
|
166
|
+
struct grpc_transport_stream_op_batch_payload {
|
167
|
+
struct {
|
168
|
+
grpc_metadata_batch *send_initial_metadata;
|
169
|
+
/** Iff send_initial_metadata != NULL, flags associated with
|
170
|
+
send_initial_metadata: a bitfield of GRPC_INITIAL_METADATA_xxx */
|
171
|
+
uint32_t send_initial_metadata_flags;
|
172
|
+
} send_initial_metadata;
|
173
|
+
|
174
|
+
struct {
|
175
|
+
grpc_metadata_batch *send_trailing_metadata;
|
176
|
+
} send_trailing_metadata;
|
177
|
+
|
178
|
+
struct {
|
179
|
+
grpc_byte_stream *send_message;
|
180
|
+
} send_message;
|
181
|
+
|
182
|
+
struct {
|
183
|
+
grpc_metadata_batch *recv_initial_metadata;
|
184
|
+
uint32_t *recv_flags;
|
185
|
+
/** Should be enqueued when initial metadata is ready to be processed. */
|
186
|
+
grpc_closure *recv_initial_metadata_ready;
|
187
|
+
} recv_initial_metadata;
|
188
|
+
|
189
|
+
struct {
|
190
|
+
grpc_byte_stream **recv_message;
|
191
|
+
/** Should be enqueued when one message is ready to be processed. */
|
192
|
+
grpc_closure *recv_message_ready;
|
193
|
+
} recv_message;
|
194
|
+
|
195
|
+
struct {
|
196
|
+
grpc_metadata_batch *recv_trailing_metadata;
|
197
|
+
} recv_trailing_metadata;
|
198
|
+
|
199
|
+
struct {
|
200
|
+
grpc_transport_stream_stats *collect_stats;
|
201
|
+
} collect_stats;
|
202
|
+
|
203
|
+
/** Forcefully close this stream.
|
160
204
|
The HTTP2 semantics should be:
|
161
205
|
- server side: if cancel_error has GRPC_ERROR_INT_GRPC_STATUS, and
|
162
206
|
trailing metadata has not been sent, send trailing metadata with status
|
@@ -166,17 +210,13 @@ typedef struct grpc_transport_stream_op {
|
|
166
210
|
convert to a HTTP2 error code using
|
167
211
|
grpc_chttp2_grpc_status_to_http2_error. Send a RST_STREAM with this
|
168
212
|
error. */
|
169
|
-
|
213
|
+
struct {
|
214
|
+
grpc_error *cancel_error;
|
215
|
+
} cancel_stream;
|
170
216
|
|
171
217
|
/* Indexes correspond to grpc_context_index enum values */
|
172
218
|
grpc_call_context_element *context;
|
173
|
-
|
174
|
-
/***************************************************************************
|
175
|
-
* remaining fields are initialized and used at the discretion of the
|
176
|
-
* current handler of the op */
|
177
|
-
|
178
|
-
grpc_transport_private_op_data handler_private;
|
179
|
-
} grpc_transport_stream_op;
|
219
|
+
};
|
180
220
|
|
181
221
|
/** Transport op: a set of operations to perform on a transport as a whole */
|
182
222
|
typedef struct grpc_transport_op {
|
@@ -209,7 +249,7 @@ typedef struct grpc_transport_op {
|
|
209
249
|
* remaining fields are initialized and used at the discretion of the
|
210
250
|
* transport implementation */
|
211
251
|
|
212
|
-
|
252
|
+
grpc_handler_private_op_data handler_private;
|
213
253
|
} grpc_transport_op;
|
214
254
|
|
215
255
|
/* Returns the amount of memory required to store a grpc_stream for this
|
@@ -229,7 +269,7 @@ size_t grpc_transport_stream_size(grpc_transport *transport);
|
|
229
269
|
int grpc_transport_init_stream(grpc_exec_ctx *exec_ctx,
|
230
270
|
grpc_transport *transport, grpc_stream *stream,
|
231
271
|
grpc_stream_refcount *refcount,
|
232
|
-
const void *server_data);
|
272
|
+
const void *server_data, gpr_arena *arena);
|
233
273
|
|
234
274
|
void grpc_transport_set_pops(grpc_exec_ctx *exec_ctx, grpc_transport *transport,
|
235
275
|
grpc_stream *stream, grpc_polling_entity *pollent);
|
@@ -246,13 +286,14 @@ void grpc_transport_set_pops(grpc_exec_ctx *exec_ctx, grpc_transport *transport,
|
|
246
286
|
caller, but any child memory must be cleaned up) */
|
247
287
|
void grpc_transport_destroy_stream(grpc_exec_ctx *exec_ctx,
|
248
288
|
grpc_transport *transport,
|
249
|
-
grpc_stream *stream,
|
289
|
+
grpc_stream *stream,
|
290
|
+
grpc_closure *then_schedule_closure);
|
250
291
|
|
251
|
-
void
|
252
|
-
|
253
|
-
|
292
|
+
void grpc_transport_stream_op_batch_finish_with_failure(
|
293
|
+
grpc_exec_ctx *exec_ctx, grpc_transport_stream_op_batch *op,
|
294
|
+
grpc_error *error);
|
254
295
|
|
255
|
-
char *
|
296
|
+
char *grpc_transport_stream_op_batch_string(grpc_transport_stream_op_batch *op);
|
256
297
|
char *grpc_transport_op_string(grpc_transport_op *op);
|
257
298
|
|
258
299
|
/* Send a batch of operations on a transport
|
@@ -263,11 +304,12 @@ char *grpc_transport_op_string(grpc_transport_op *op);
|
|
263
304
|
transport - the transport on which to initiate the stream
|
264
305
|
stream - the stream on which to send the operations. This must be
|
265
306
|
non-NULL and previously initialized by the same transport.
|
266
|
-
op - a
|
307
|
+
op - a grpc_transport_stream_op_batch specifying the op to perform
|
308
|
+
*/
|
267
309
|
void grpc_transport_perform_stream_op(grpc_exec_ctx *exec_ctx,
|
268
310
|
grpc_transport *transport,
|
269
311
|
grpc_stream *stream,
|
270
|
-
|
312
|
+
grpc_transport_stream_op_batch *op);
|
271
313
|
|
272
314
|
void grpc_transport_perform_op(grpc_exec_ctx *exec_ctx,
|
273
315
|
grpc_transport *transport,
|
@@ -299,9 +341,10 @@ grpc_endpoint *grpc_transport_get_endpoint(grpc_exec_ctx *exec_ctx,
|
|
299
341
|
/* Allocate a grpc_transport_op, and preconfigure the on_consumed closure to
|
300
342
|
\a on_consumed and then delete the returned transport op */
|
301
343
|
grpc_transport_op *grpc_make_transport_op(grpc_closure *on_consumed);
|
302
|
-
/* Allocate a
|
344
|
+
/* Allocate a grpc_transport_stream_op_batch, and preconfigure the on_consumed
|
345
|
+
closure
|
303
346
|
to \a on_consumed and then delete the returned transport op */
|
304
|
-
|
347
|
+
grpc_transport_stream_op_batch *grpc_make_transport_stream_op(
|
305
348
|
grpc_closure *on_consumed);
|
306
349
|
|
307
350
|
#ifdef __cplusplus
|