diff --git a/BUILD b/BUILD index 0e4556bebd0..4f0fd82555a 100644 --- a/BUILD +++ b/BUILD @@ -293,23 +293,23 @@ cc_library( "src/core/lib/tsi/ssl_types.h", "src/core/lib/tsi/transport_security.h", "src/core/lib/tsi/transport_security_interface.h", - "src/core/ext/client_config/client_channel.h", - "src/core/ext/client_config/client_channel_factory.h", - "src/core/ext/client_config/connector.h", - "src/core/ext/client_config/http_connect_handshaker.h", - "src/core/ext/client_config/initial_connect_string.h", - "src/core/ext/client_config/lb_policy.h", - "src/core/ext/client_config/lb_policy_factory.h", - "src/core/ext/client_config/lb_policy_registry.h", - "src/core/ext/client_config/method_config.h", - "src/core/ext/client_config/parse_address.h", - "src/core/ext/client_config/resolver.h", - "src/core/ext/client_config/resolver_factory.h", - "src/core/ext/client_config/resolver_registry.h", - "src/core/ext/client_config/resolver_result.h", - "src/core/ext/client_config/subchannel.h", - "src/core/ext/client_config/subchannel_index.h", - "src/core/ext/client_config/uri_parser.h", + "src/core/ext/client_channel/client_channel.h", + "src/core/ext/client_channel/client_channel_factory.h", + "src/core/ext/client_channel/connector.h", + "src/core/ext/client_channel/http_connect_handshaker.h", + "src/core/ext/client_channel/initial_connect_string.h", + "src/core/ext/client_channel/lb_policy.h", + "src/core/ext/client_channel/lb_policy_factory.h", + "src/core/ext/client_channel/lb_policy_registry.h", + "src/core/ext/client_channel/method_config.h", + "src/core/ext/client_channel/parse_address.h", + "src/core/ext/client_channel/resolver.h", + "src/core/ext/client_channel/resolver_factory.h", + "src/core/ext/client_channel/resolver_registry.h", + "src/core/ext/client_channel/resolver_result.h", + "src/core/ext/client_channel/subchannel.h", + "src/core/ext/client_channel/subchannel_index.h", + "src/core/ext/client_channel/uri_parser.h", "src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", @@ -473,26 +473,26 @@ cc_library( "src/core/lib/tsi/ssl_transport_security.c", "src/core/lib/tsi/transport_security.c", "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", - "src/core/ext/client_config/channel_connectivity.c", - "src/core/ext/client_config/client_channel.c", - "src/core/ext/client_config/client_channel_factory.c", - "src/core/ext/client_config/client_config_plugin.c", - "src/core/ext/client_config/connector.c", - "src/core/ext/client_config/default_initial_connect_string.c", - "src/core/ext/client_config/http_connect_handshaker.c", - "src/core/ext/client_config/initial_connect_string.c", - "src/core/ext/client_config/lb_policy.c", - "src/core/ext/client_config/lb_policy_factory.c", - "src/core/ext/client_config/lb_policy_registry.c", - "src/core/ext/client_config/method_config.c", - "src/core/ext/client_config/parse_address.c", - "src/core/ext/client_config/resolver.c", - "src/core/ext/client_config/resolver_factory.c", - "src/core/ext/client_config/resolver_registry.c", - "src/core/ext/client_config/resolver_result.c", - "src/core/ext/client_config/subchannel.c", - "src/core/ext/client_config/subchannel_index.c", - "src/core/ext/client_config/uri_parser.c", + "src/core/ext/client_channel/channel_connectivity.c", + "src/core/ext/client_channel/client_channel.c", + "src/core/ext/client_channel/client_channel_factory.c", + "src/core/ext/client_channel/client_channel_plugin.c", + "src/core/ext/client_channel/connector.c", + "src/core/ext/client_channel/default_initial_connect_string.c", + "src/core/ext/client_channel/http_connect_handshaker.c", + "src/core/ext/client_channel/initial_connect_string.c", + "src/core/ext/client_channel/lb_policy.c", + "src/core/ext/client_channel/lb_policy_factory.c", + "src/core/ext/client_channel/lb_policy_registry.c", + "src/core/ext/client_channel/method_config.c", + "src/core/ext/client_channel/parse_address.c", + "src/core/ext/client_channel/resolver.c", + "src/core/ext/client_channel/resolver_factory.c", + "src/core/ext/client_channel/resolver_registry.c", + "src/core/ext/client_channel/resolver_result.c", + "src/core/ext/client_channel/subchannel.c", + "src/core/ext/client_channel/subchannel_index.c", + "src/core/ext/client_channel/uri_parser.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", @@ -678,23 +678,23 @@ cc_library( "src/core/ext/transport/chttp2/transport/stream_map.h", "src/core/ext/transport/chttp2/transport/varint.h", "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/ext/client_config/client_channel.h", - "src/core/ext/client_config/client_channel_factory.h", - "src/core/ext/client_config/connector.h", - "src/core/ext/client_config/http_connect_handshaker.h", - "src/core/ext/client_config/initial_connect_string.h", - "src/core/ext/client_config/lb_policy.h", - "src/core/ext/client_config/lb_policy_factory.h", - "src/core/ext/client_config/lb_policy_registry.h", - "src/core/ext/client_config/method_config.h", - "src/core/ext/client_config/parse_address.h", - "src/core/ext/client_config/resolver.h", - "src/core/ext/client_config/resolver_factory.h", - "src/core/ext/client_config/resolver_registry.h", - "src/core/ext/client_config/resolver_result.h", - "src/core/ext/client_config/subchannel.h", - "src/core/ext/client_config/subchannel_index.h", - "src/core/ext/client_config/uri_parser.h", + "src/core/ext/client_channel/client_channel.h", + "src/core/ext/client_channel/client_channel_factory.h", + "src/core/ext/client_channel/connector.h", + "src/core/ext/client_channel/http_connect_handshaker.h", + "src/core/ext/client_channel/initial_connect_string.h", + "src/core/ext/client_channel/lb_policy.h", + "src/core/ext/client_channel/lb_policy_factory.h", + "src/core/ext/client_channel/lb_policy_registry.h", + "src/core/ext/client_channel/method_config.h", + "src/core/ext/client_channel/parse_address.h", + "src/core/ext/client_channel/resolver.h", + "src/core/ext/client_channel/resolver_factory.h", + "src/core/ext/client_channel/resolver_registry.h", + "src/core/ext/client_channel/resolver_result.h", + "src/core/ext/client_channel/subchannel.h", + "src/core/ext/client_channel/subchannel_index.h", + "src/core/ext/client_channel/uri_parser.h", "src/core/lib/security/context/security_context.h", "src/core/lib/security/credentials/composite/composite_credentials.h", "src/core/lib/security/credentials/credentials.h", @@ -840,26 +840,26 @@ cc_library( "src/core/ext/transport/chttp2/transport/varint.c", "src/core/ext/transport/chttp2/transport/writing.c", "src/core/ext/transport/chttp2/alpn/alpn.c", - "src/core/ext/client_config/channel_connectivity.c", - "src/core/ext/client_config/client_channel.c", - "src/core/ext/client_config/client_channel_factory.c", - "src/core/ext/client_config/client_config_plugin.c", - "src/core/ext/client_config/connector.c", - "src/core/ext/client_config/default_initial_connect_string.c", - "src/core/ext/client_config/http_connect_handshaker.c", - "src/core/ext/client_config/initial_connect_string.c", - "src/core/ext/client_config/lb_policy.c", - "src/core/ext/client_config/lb_policy_factory.c", - "src/core/ext/client_config/lb_policy_registry.c", - "src/core/ext/client_config/method_config.c", - "src/core/ext/client_config/parse_address.c", - "src/core/ext/client_config/resolver.c", - "src/core/ext/client_config/resolver_factory.c", - "src/core/ext/client_config/resolver_registry.c", - "src/core/ext/client_config/resolver_result.c", - "src/core/ext/client_config/subchannel.c", - "src/core/ext/client_config/subchannel_index.c", - "src/core/ext/client_config/uri_parser.c", + "src/core/ext/client_channel/channel_connectivity.c", + "src/core/ext/client_channel/client_channel.c", + "src/core/ext/client_channel/client_channel_factory.c", + "src/core/ext/client_channel/client_channel_plugin.c", + "src/core/ext/client_channel/connector.c", + "src/core/ext/client_channel/default_initial_connect_string.c", + "src/core/ext/client_channel/http_connect_handshaker.c", + "src/core/ext/client_channel/initial_connect_string.c", + "src/core/ext/client_channel/lb_policy.c", + "src/core/ext/client_channel/lb_policy_factory.c", + "src/core/ext/client_channel/lb_policy_registry.c", + "src/core/ext/client_channel/method_config.c", + "src/core/ext/client_channel/parse_address.c", + "src/core/ext/client_channel/resolver.c", + "src/core/ext/client_channel/resolver_factory.c", + "src/core/ext/client_channel/resolver_registry.c", + "src/core/ext/client_channel/resolver_result.c", + "src/core/ext/client_channel/subchannel.c", + "src/core/ext/client_channel/subchannel_index.c", + "src/core/ext/client_channel/uri_parser.c", "src/core/lib/http/httpcli_security_connector.c", "src/core/lib/security/context/security_context.c", "src/core/lib/security/credentials/composite/composite_credentials.c", @@ -1040,23 +1040,23 @@ cc_library( "src/core/ext/transport/chttp2/transport/stream_map.h", "src/core/ext/transport/chttp2/transport/varint.h", "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/ext/client_config/client_channel.h", - "src/core/ext/client_config/client_channel_factory.h", - "src/core/ext/client_config/connector.h", - "src/core/ext/client_config/http_connect_handshaker.h", - "src/core/ext/client_config/initial_connect_string.h", - "src/core/ext/client_config/lb_policy.h", - "src/core/ext/client_config/lb_policy_factory.h", - "src/core/ext/client_config/lb_policy_registry.h", - "src/core/ext/client_config/method_config.h", - "src/core/ext/client_config/parse_address.h", - "src/core/ext/client_config/resolver.h", - "src/core/ext/client_config/resolver_factory.h", - "src/core/ext/client_config/resolver_registry.h", - "src/core/ext/client_config/resolver_result.h", - "src/core/ext/client_config/subchannel.h", - "src/core/ext/client_config/subchannel_index.h", - "src/core/ext/client_config/uri_parser.h", + "src/core/ext/client_channel/client_channel.h", + "src/core/ext/client_channel/client_channel_factory.h", + "src/core/ext/client_channel/connector.h", + "src/core/ext/client_channel/http_connect_handshaker.h", + "src/core/ext/client_channel/initial_connect_string.h", + "src/core/ext/client_channel/lb_policy.h", + "src/core/ext/client_channel/lb_policy_factory.h", + "src/core/ext/client_channel/lb_policy_registry.h", + "src/core/ext/client_channel/method_config.h", + "src/core/ext/client_channel/parse_address.h", + "src/core/ext/client_channel/resolver.h", + "src/core/ext/client_channel/resolver_factory.h", + "src/core/ext/client_channel/resolver_registry.h", + "src/core/ext/client_channel/resolver_result.h", + "src/core/ext/client_channel/subchannel.h", + "src/core/ext/client_channel/subchannel_index.h", + "src/core/ext/client_channel/uri_parser.h", "src/core/ext/load_reporting/load_reporting.h", "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/lb_policy/grpclb/grpclb.h", @@ -1195,26 +1195,26 @@ cc_library( "src/core/ext/transport/chttp2/alpn/alpn.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", - "src/core/ext/client_config/channel_connectivity.c", - "src/core/ext/client_config/client_channel.c", - "src/core/ext/client_config/client_channel_factory.c", - "src/core/ext/client_config/client_config_plugin.c", - "src/core/ext/client_config/connector.c", - "src/core/ext/client_config/default_initial_connect_string.c", - "src/core/ext/client_config/http_connect_handshaker.c", - "src/core/ext/client_config/initial_connect_string.c", - "src/core/ext/client_config/lb_policy.c", - "src/core/ext/client_config/lb_policy_factory.c", - "src/core/ext/client_config/lb_policy_registry.c", - "src/core/ext/client_config/method_config.c", - "src/core/ext/client_config/parse_address.c", - "src/core/ext/client_config/resolver.c", - "src/core/ext/client_config/resolver_factory.c", - "src/core/ext/client_config/resolver_registry.c", - "src/core/ext/client_config/resolver_result.c", - "src/core/ext/client_config/subchannel.c", - "src/core/ext/client_config/subchannel_index.c", - "src/core/ext/client_config/uri_parser.c", + "src/core/ext/client_channel/channel_connectivity.c", + "src/core/ext/client_channel/client_channel.c", + "src/core/ext/client_channel/client_channel_factory.c", + "src/core/ext/client_channel/client_channel_plugin.c", + "src/core/ext/client_channel/connector.c", + "src/core/ext/client_channel/default_initial_connect_string.c", + "src/core/ext/client_channel/http_connect_handshaker.c", + "src/core/ext/client_channel/initial_connect_string.c", + "src/core/ext/client_channel/lb_policy.c", + "src/core/ext/client_channel/lb_policy_factory.c", + "src/core/ext/client_channel/lb_policy_registry.c", + "src/core/ext/client_channel/method_config.c", + "src/core/ext/client_channel/parse_address.c", + "src/core/ext/client_channel/resolver.c", + "src/core/ext/client_channel/resolver_factory.c", + "src/core/ext/client_channel/resolver_registry.c", + "src/core/ext/client_channel/resolver_result.c", + "src/core/ext/client_channel/subchannel.c", + "src/core/ext/client_channel/subchannel_index.c", + "src/core/ext/client_channel/uri_parser.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/load_reporting/load_reporting.c", @@ -1991,26 +1991,26 @@ objc_library( "src/core/lib/tsi/ssl_transport_security.c", "src/core/lib/tsi/transport_security.c", "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", - "src/core/ext/client_config/channel_connectivity.c", - "src/core/ext/client_config/client_channel.c", - "src/core/ext/client_config/client_channel_factory.c", - "src/core/ext/client_config/client_config_plugin.c", - "src/core/ext/client_config/connector.c", - "src/core/ext/client_config/default_initial_connect_string.c", - "src/core/ext/client_config/http_connect_handshaker.c", - "src/core/ext/client_config/initial_connect_string.c", - "src/core/ext/client_config/lb_policy.c", - "src/core/ext/client_config/lb_policy_factory.c", - "src/core/ext/client_config/lb_policy_registry.c", - "src/core/ext/client_config/method_config.c", - "src/core/ext/client_config/parse_address.c", - "src/core/ext/client_config/resolver.c", - "src/core/ext/client_config/resolver_factory.c", - "src/core/ext/client_config/resolver_registry.c", - "src/core/ext/client_config/resolver_result.c", - "src/core/ext/client_config/subchannel.c", - "src/core/ext/client_config/subchannel_index.c", - "src/core/ext/client_config/uri_parser.c", + "src/core/ext/client_channel/channel_connectivity.c", + "src/core/ext/client_channel/client_channel.c", + "src/core/ext/client_channel/client_channel_factory.c", + "src/core/ext/client_channel/client_channel_plugin.c", + "src/core/ext/client_channel/connector.c", + "src/core/ext/client_channel/default_initial_connect_string.c", + "src/core/ext/client_channel/http_connect_handshaker.c", + "src/core/ext/client_channel/initial_connect_string.c", + "src/core/ext/client_channel/lb_policy.c", + "src/core/ext/client_channel/lb_policy_factory.c", + "src/core/ext/client_channel/lb_policy_registry.c", + "src/core/ext/client_channel/method_config.c", + "src/core/ext/client_channel/parse_address.c", + "src/core/ext/client_channel/resolver.c", + "src/core/ext/client_channel/resolver_factory.c", + "src/core/ext/client_channel/resolver_registry.c", + "src/core/ext/client_channel/resolver_result.c", + "src/core/ext/client_channel/subchannel.c", + "src/core/ext/client_channel/subchannel_index.c", + "src/core/ext/client_channel/uri_parser.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", @@ -2198,23 +2198,23 @@ objc_library( "src/core/lib/tsi/ssl_types.h", "src/core/lib/tsi/transport_security.h", "src/core/lib/tsi/transport_security_interface.h", - "src/core/ext/client_config/client_channel.h", - "src/core/ext/client_config/client_channel_factory.h", - "src/core/ext/client_config/connector.h", - "src/core/ext/client_config/http_connect_handshaker.h", - "src/core/ext/client_config/initial_connect_string.h", - "src/core/ext/client_config/lb_policy.h", - "src/core/ext/client_config/lb_policy_factory.h", - "src/core/ext/client_config/lb_policy_registry.h", - "src/core/ext/client_config/method_config.h", - "src/core/ext/client_config/parse_address.h", - "src/core/ext/client_config/resolver.h", - "src/core/ext/client_config/resolver_factory.h", - "src/core/ext/client_config/resolver_registry.h", - "src/core/ext/client_config/resolver_result.h", - "src/core/ext/client_config/subchannel.h", - "src/core/ext/client_config/subchannel_index.h", - "src/core/ext/client_config/uri_parser.h", + "src/core/ext/client_channel/client_channel.h", + "src/core/ext/client_channel/client_channel_factory.h", + "src/core/ext/client_channel/connector.h", + "src/core/ext/client_channel/http_connect_handshaker.h", + "src/core/ext/client_channel/initial_connect_string.h", + "src/core/ext/client_channel/lb_policy.h", + "src/core/ext/client_channel/lb_policy_factory.h", + "src/core/ext/client_channel/lb_policy_registry.h", + "src/core/ext/client_channel/method_config.h", + "src/core/ext/client_channel/parse_address.h", + "src/core/ext/client_channel/resolver.h", + "src/core/ext/client_channel/resolver_factory.h", + "src/core/ext/client_channel/resolver_registry.h", + "src/core/ext/client_channel/resolver_result.h", + "src/core/ext/client_channel/subchannel.h", + "src/core/ext/client_channel/subchannel_index.h", + "src/core/ext/client_channel/uri_parser.h", "src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 027cd6cdbeb..01aea718d54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -436,26 +436,26 @@ add_library(grpc src/core/lib/tsi/ssl_transport_security.c src/core/lib/tsi/transport_security.c src/core/ext/transport/chttp2/client/secure/secure_channel_create.c - src/core/ext/client_config/channel_connectivity.c - src/core/ext/client_config/client_channel.c - src/core/ext/client_config/client_channel_factory.c - src/core/ext/client_config/client_config_plugin.c - src/core/ext/client_config/connector.c - src/core/ext/client_config/default_initial_connect_string.c - src/core/ext/client_config/http_connect_handshaker.c - src/core/ext/client_config/initial_connect_string.c - src/core/ext/client_config/lb_policy.c - src/core/ext/client_config/lb_policy_factory.c - src/core/ext/client_config/lb_policy_registry.c - src/core/ext/client_config/method_config.c - src/core/ext/client_config/parse_address.c - src/core/ext/client_config/resolver.c - src/core/ext/client_config/resolver_factory.c - src/core/ext/client_config/resolver_registry.c - src/core/ext/client_config/resolver_result.c - src/core/ext/client_config/subchannel.c - src/core/ext/client_config/subchannel_index.c - src/core/ext/client_config/uri_parser.c + src/core/ext/client_channel/channel_connectivity.c + src/core/ext/client_channel/client_channel.c + src/core/ext/client_channel/client_channel_factory.c + src/core/ext/client_channel/client_channel_plugin.c + src/core/ext/client_channel/connector.c + src/core/ext/client_channel/default_initial_connect_string.c + src/core/ext/client_channel/http_connect_handshaker.c + src/core/ext/client_channel/initial_connect_string.c + src/core/ext/client_channel/lb_policy.c + src/core/ext/client_channel/lb_policy_factory.c + src/core/ext/client_channel/lb_policy_registry.c + src/core/ext/client_channel/method_config.c + src/core/ext/client_channel/parse_address.c + src/core/ext/client_channel/resolver.c + src/core/ext/client_channel/resolver_factory.c + src/core/ext/client_channel/resolver_registry.c + src/core/ext/client_channel/resolver_result.c + src/core/ext/client_channel/subchannel.c + src/core/ext/client_channel/subchannel_index.c + src/core/ext/client_channel/uri_parser.c src/core/ext/transport/chttp2/server/insecure/server_chttp2.c src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -672,26 +672,26 @@ add_library(grpc_cronet src/core/ext/transport/chttp2/transport/varint.c src/core/ext/transport/chttp2/transport/writing.c src/core/ext/transport/chttp2/alpn/alpn.c - src/core/ext/client_config/channel_connectivity.c - src/core/ext/client_config/client_channel.c - src/core/ext/client_config/client_channel_factory.c - src/core/ext/client_config/client_config_plugin.c - src/core/ext/client_config/connector.c - src/core/ext/client_config/default_initial_connect_string.c - src/core/ext/client_config/http_connect_handshaker.c - src/core/ext/client_config/initial_connect_string.c - src/core/ext/client_config/lb_policy.c - src/core/ext/client_config/lb_policy_factory.c - src/core/ext/client_config/lb_policy_registry.c - src/core/ext/client_config/method_config.c - src/core/ext/client_config/parse_address.c - src/core/ext/client_config/resolver.c - src/core/ext/client_config/resolver_factory.c - src/core/ext/client_config/resolver_registry.c - src/core/ext/client_config/resolver_result.c - src/core/ext/client_config/subchannel.c - src/core/ext/client_config/subchannel_index.c - src/core/ext/client_config/uri_parser.c + src/core/ext/client_channel/channel_connectivity.c + src/core/ext/client_channel/client_channel.c + src/core/ext/client_channel/client_channel_factory.c + src/core/ext/client_channel/client_channel_plugin.c + src/core/ext/client_channel/connector.c + src/core/ext/client_channel/default_initial_connect_string.c + src/core/ext/client_channel/http_connect_handshaker.c + src/core/ext/client_channel/initial_connect_string.c + src/core/ext/client_channel/lb_policy.c + src/core/ext/client_channel/lb_policy_factory.c + src/core/ext/client_channel/lb_policy_registry.c + src/core/ext/client_channel/method_config.c + src/core/ext/client_channel/parse_address.c + src/core/ext/client_channel/resolver.c + src/core/ext/client_channel/resolver_factory.c + src/core/ext/client_channel/resolver_registry.c + src/core/ext/client_channel/resolver_result.c + src/core/ext/client_channel/subchannel.c + src/core/ext/client_channel/subchannel_index.c + src/core/ext/client_channel/uri_parser.c src/core/lib/http/httpcli_security_connector.c src/core/lib/security/context/security_context.c src/core/lib/security/credentials/composite/composite_credentials.c @@ -906,26 +906,26 @@ add_library(grpc_unsecure src/core/ext/transport/chttp2/alpn/alpn.c src/core/ext/transport/chttp2/client/insecure/channel_create.c src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c - src/core/ext/client_config/channel_connectivity.c - src/core/ext/client_config/client_channel.c - src/core/ext/client_config/client_channel_factory.c - src/core/ext/client_config/client_config_plugin.c - src/core/ext/client_config/connector.c - src/core/ext/client_config/default_initial_connect_string.c - src/core/ext/client_config/http_connect_handshaker.c - src/core/ext/client_config/initial_connect_string.c - src/core/ext/client_config/lb_policy.c - src/core/ext/client_config/lb_policy_factory.c - src/core/ext/client_config/lb_policy_registry.c - src/core/ext/client_config/method_config.c - src/core/ext/client_config/parse_address.c - src/core/ext/client_config/resolver.c - src/core/ext/client_config/resolver_factory.c - src/core/ext/client_config/resolver_registry.c - src/core/ext/client_config/resolver_result.c - src/core/ext/client_config/subchannel.c - src/core/ext/client_config/subchannel_index.c - src/core/ext/client_config/uri_parser.c + src/core/ext/client_channel/channel_connectivity.c + src/core/ext/client_channel/client_channel.c + src/core/ext/client_channel/client_channel_factory.c + src/core/ext/client_channel/client_channel_plugin.c + src/core/ext/client_channel/connector.c + src/core/ext/client_channel/default_initial_connect_string.c + src/core/ext/client_channel/http_connect_handshaker.c + src/core/ext/client_channel/initial_connect_string.c + src/core/ext/client_channel/lb_policy.c + src/core/ext/client_channel/lb_policy_factory.c + src/core/ext/client_channel/lb_policy_registry.c + src/core/ext/client_channel/method_config.c + src/core/ext/client_channel/parse_address.c + src/core/ext/client_channel/resolver.c + src/core/ext/client_channel/resolver_factory.c + src/core/ext/client_channel/resolver_registry.c + src/core/ext/client_channel/resolver_result.c + src/core/ext/client_channel/subchannel.c + src/core/ext/client_channel/subchannel_index.c + src/core/ext/client_channel/uri_parser.c src/core/ext/resolver/dns/native/dns_resolver.c src/core/ext/resolver/sockaddr/sockaddr_resolver.c src/core/ext/load_reporting/load_reporting.c diff --git a/Makefile b/Makefile index 9658e101411..19032419a6c 100644 --- a/Makefile +++ b/Makefile @@ -1229,9 +1229,9 @@ pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc ifeq ($(EMBED_OPENSSL),true) -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a else -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a endif @@ -2697,26 +2697,26 @@ LIBGRPC_SRC = \ src/core/lib/tsi/ssl_transport_security.c \ src/core/lib/tsi/transport_security.c \ src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \ - src/core/ext/client_config/channel_connectivity.c \ - src/core/ext/client_config/client_channel.c \ - src/core/ext/client_config/client_channel_factory.c \ - src/core/ext/client_config/client_config_plugin.c \ - src/core/ext/client_config/connector.c \ - src/core/ext/client_config/default_initial_connect_string.c \ - src/core/ext/client_config/http_connect_handshaker.c \ - src/core/ext/client_config/initial_connect_string.c \ - src/core/ext/client_config/lb_policy.c \ - src/core/ext/client_config/lb_policy_factory.c \ - src/core/ext/client_config/lb_policy_registry.c \ - src/core/ext/client_config/method_config.c \ - src/core/ext/client_config/parse_address.c \ - src/core/ext/client_config/resolver.c \ - src/core/ext/client_config/resolver_factory.c \ - src/core/ext/client_config/resolver_registry.c \ - src/core/ext/client_config/resolver_result.c \ - src/core/ext/client_config/subchannel.c \ - src/core/ext/client_config/subchannel_index.c \ - src/core/ext/client_config/uri_parser.c \ + src/core/ext/client_channel/channel_connectivity.c \ + src/core/ext/client_channel/client_channel.c \ + src/core/ext/client_channel/client_channel_factory.c \ + src/core/ext/client_channel/client_channel_plugin.c \ + src/core/ext/client_channel/connector.c \ + src/core/ext/client_channel/default_initial_connect_string.c \ + src/core/ext/client_channel/http_connect_handshaker.c \ + src/core/ext/client_channel/initial_connect_string.c \ + src/core/ext/client_channel/lb_policy.c \ + src/core/ext/client_channel/lb_policy_factory.c \ + src/core/ext/client_channel/lb_policy_registry.c \ + src/core/ext/client_channel/method_config.c \ + src/core/ext/client_channel/parse_address.c \ + src/core/ext/client_channel/resolver.c \ + src/core/ext/client_channel/resolver_factory.c \ + src/core/ext/client_channel/resolver_registry.c \ + src/core/ext/client_channel/resolver_result.c \ + src/core/ext/client_channel/subchannel.c \ + src/core/ext/client_channel/subchannel_index.c \ + src/core/ext/client_channel/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ @@ -2951,26 +2951,26 @@ LIBGRPC_CRONET_SRC = \ src/core/ext/transport/chttp2/transport/varint.c \ src/core/ext/transport/chttp2/transport/writing.c \ src/core/ext/transport/chttp2/alpn/alpn.c \ - src/core/ext/client_config/channel_connectivity.c \ - src/core/ext/client_config/client_channel.c \ - src/core/ext/client_config/client_channel_factory.c \ - src/core/ext/client_config/client_config_plugin.c \ - src/core/ext/client_config/connector.c \ - src/core/ext/client_config/default_initial_connect_string.c \ - src/core/ext/client_config/http_connect_handshaker.c \ - src/core/ext/client_config/initial_connect_string.c \ - src/core/ext/client_config/lb_policy.c \ - src/core/ext/client_config/lb_policy_factory.c \ - src/core/ext/client_config/lb_policy_registry.c \ - src/core/ext/client_config/method_config.c \ - src/core/ext/client_config/parse_address.c \ - src/core/ext/client_config/resolver.c \ - src/core/ext/client_config/resolver_factory.c \ - src/core/ext/client_config/resolver_registry.c \ - src/core/ext/client_config/resolver_result.c \ - src/core/ext/client_config/subchannel.c \ - src/core/ext/client_config/subchannel_index.c \ - src/core/ext/client_config/uri_parser.c \ + src/core/ext/client_channel/channel_connectivity.c \ + src/core/ext/client_channel/client_channel.c \ + src/core/ext/client_channel/client_channel_factory.c \ + src/core/ext/client_channel/client_channel_plugin.c \ + src/core/ext/client_channel/connector.c \ + src/core/ext/client_channel/default_initial_connect_string.c \ + src/core/ext/client_channel/http_connect_handshaker.c \ + src/core/ext/client_channel/initial_connect_string.c \ + src/core/ext/client_channel/lb_policy.c \ + src/core/ext/client_channel/lb_policy_factory.c \ + src/core/ext/client_channel/lb_policy_registry.c \ + src/core/ext/client_channel/method_config.c \ + src/core/ext/client_channel/parse_address.c \ + src/core/ext/client_channel/resolver.c \ + src/core/ext/client_channel/resolver_factory.c \ + src/core/ext/client_channel/resolver_registry.c \ + src/core/ext/client_channel/resolver_result.c \ + src/core/ext/client_channel/subchannel.c \ + src/core/ext/client_channel/subchannel_index.c \ + src/core/ext/client_channel/uri_parser.c \ src/core/lib/http/httpcli_security_connector.c \ src/core/lib/security/context/security_context.c \ src/core/lib/security/credentials/composite/composite_credentials.c \ @@ -3417,26 +3417,26 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/transport/chttp2/alpn/alpn.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ - src/core/ext/client_config/channel_connectivity.c \ - src/core/ext/client_config/client_channel.c \ - src/core/ext/client_config/client_channel_factory.c \ - src/core/ext/client_config/client_config_plugin.c \ - src/core/ext/client_config/connector.c \ - src/core/ext/client_config/default_initial_connect_string.c \ - src/core/ext/client_config/http_connect_handshaker.c \ - src/core/ext/client_config/initial_connect_string.c \ - src/core/ext/client_config/lb_policy.c \ - src/core/ext/client_config/lb_policy_factory.c \ - src/core/ext/client_config/lb_policy_registry.c \ - src/core/ext/client_config/method_config.c \ - src/core/ext/client_config/parse_address.c \ - src/core/ext/client_config/resolver.c \ - src/core/ext/client_config/resolver_factory.c \ - src/core/ext/client_config/resolver_registry.c \ - src/core/ext/client_config/resolver_result.c \ - src/core/ext/client_config/subchannel.c \ - src/core/ext/client_config/subchannel_index.c \ - src/core/ext/client_config/uri_parser.c \ + src/core/ext/client_channel/channel_connectivity.c \ + src/core/ext/client_channel/client_channel.c \ + src/core/ext/client_channel/client_channel_factory.c \ + src/core/ext/client_channel/client_channel_plugin.c \ + src/core/ext/client_channel/connector.c \ + src/core/ext/client_channel/default_initial_connect_string.c \ + src/core/ext/client_channel/http_connect_handshaker.c \ + src/core/ext/client_channel/initial_connect_string.c \ + src/core/ext/client_channel/lb_policy.c \ + src/core/ext/client_channel/lb_policy_factory.c \ + src/core/ext/client_channel/lb_policy_registry.c \ + src/core/ext/client_channel/method_config.c \ + src/core/ext/client_channel/parse_address.c \ + src/core/ext/client_channel/resolver.c \ + src/core/ext/client_channel/resolver_factory.c \ + src/core/ext/client_channel/resolver_registry.c \ + src/core/ext/client_channel/resolver_result.c \ + src/core/ext/client_channel/subchannel.c \ + src/core/ext/client_channel/subchannel_index.c \ + src/core/ext/client_channel/uri_parser.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/load_reporting/load_reporting.c \ @@ -7481,7 +7481,7 @@ endif DNS_RESOLVER_CONNECTIVITY_TEST_SRC = \ - test/core/client_config/resolvers/dns_resolver_connectivity_test.c \ + test/core/client_channel/resolvers/dns_resolver_connectivity_test.c \ DNS_RESOLVER_CONNECTIVITY_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(DNS_RESOLVER_CONNECTIVITY_TEST_SRC)))) ifeq ($(NO_SECURE),true) @@ -7501,7 +7501,7 @@ $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_test: $(DNS_RESOLVER_CONNECTIVITY_ endif -$(OBJDIR)/$(CONFIG)/test/core/client_config/resolvers/dns_resolver_connectivity_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/client_channel/resolvers/dns_resolver_connectivity_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_dns_resolver_connectivity_test: $(DNS_RESOLVER_CONNECTIVITY_TEST_OBJS:.o=.dep) @@ -7513,7 +7513,7 @@ endif DNS_RESOLVER_TEST_SRC = \ - test/core/client_config/resolvers/dns_resolver_test.c \ + test/core/client_channel/resolvers/dns_resolver_test.c \ DNS_RESOLVER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(DNS_RESOLVER_TEST_SRC)))) ifeq ($(NO_SECURE),true) @@ -7533,7 +7533,7 @@ $(BINDIR)/$(CONFIG)/dns_resolver_test: $(DNS_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CON endif -$(OBJDIR)/$(CONFIG)/test/core/client_config/resolvers/dns_resolver_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/client_channel/resolvers/dns_resolver_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_dns_resolver_test: $(DNS_RESOLVER_TEST_OBJS:.o=.dep) @@ -9689,7 +9689,7 @@ endif LB_POLICIES_TEST_SRC = \ - test/core/client_config/lb_policies_test.c \ + test/core/client_channel/lb_policies_test.c \ LB_POLICIES_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LB_POLICIES_TEST_SRC)))) ifeq ($(NO_SECURE),true) @@ -9709,7 +9709,7 @@ $(BINDIR)/$(CONFIG)/lb_policies_test: $(LB_POLICIES_TEST_OBJS) $(LIBDIR)/$(CONFI endif -$(OBJDIR)/$(CONFIG)/test/core/client_config/lb_policies_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/client_channel/lb_policies_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_lb_policies_test: $(LB_POLICIES_TEST_OBJS:.o=.dep) @@ -10329,7 +10329,7 @@ endif SET_INITIAL_CONNECT_STRING_TEST_SRC = \ - test/core/client_config/set_initial_connect_string_test.c \ + test/core/client_channel/set_initial_connect_string_test.c \ SET_INITIAL_CONNECT_STRING_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SET_INITIAL_CONNECT_STRING_TEST_SRC)))) ifeq ($(NO_SECURE),true) @@ -10349,7 +10349,7 @@ $(BINDIR)/$(CONFIG)/set_initial_connect_string_test: $(SET_INITIAL_CONNECT_STRIN endif -$(OBJDIR)/$(CONFIG)/test/core/client_config/set_initial_connect_string_test.o: $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/client_channel/set_initial_connect_string_test.o: $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_set_initial_connect_string_test: $(SET_INITIAL_CONNECT_STRING_TEST_OBJS:.o=.dep) @@ -10361,7 +10361,7 @@ endif SOCKADDR_RESOLVER_TEST_SRC = \ - test/core/client_config/resolvers/sockaddr_resolver_test.c \ + test/core/client_channel/resolvers/sockaddr_resolver_test.c \ SOCKADDR_RESOLVER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SOCKADDR_RESOLVER_TEST_SRC)))) ifeq ($(NO_SECURE),true) @@ -10381,7 +10381,7 @@ $(BINDIR)/$(CONFIG)/sockaddr_resolver_test: $(SOCKADDR_RESOLVER_TEST_OBJS) $(LIB endif -$(OBJDIR)/$(CONFIG)/test/core/client_config/resolvers/sockaddr_resolver_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/client_channel/resolvers/sockaddr_resolver_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_sockaddr_resolver_test: $(SOCKADDR_RESOLVER_TEST_OBJS:.o=.dep) @@ -10809,7 +10809,7 @@ endif URI_FUZZER_TEST_SRC = \ - test/core/client_config/uri_fuzzer_test.c \ + test/core/client_channel/uri_fuzzer_test.c \ URI_FUZZER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(URI_FUZZER_TEST_SRC)))) ifeq ($(NO_SECURE),true) @@ -10829,7 +10829,7 @@ $(BINDIR)/$(CONFIG)/uri_fuzzer_test: $(URI_FUZZER_TEST_OBJS) $(LIBDIR)/$(CONFIG) endif -$(OBJDIR)/$(CONFIG)/test/core/client_config/uri_fuzzer_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/client_channel/uri_fuzzer_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_uri_fuzzer_test: $(URI_FUZZER_TEST_OBJS:.o=.dep) @@ -10841,7 +10841,7 @@ endif URI_PARSER_TEST_SRC = \ - test/core/client_config/uri_parser_test.c \ + test/core/client_channel/uri_parser_test.c \ URI_PARSER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(URI_PARSER_TEST_SRC)))) ifeq ($(NO_SECURE),true) @@ -10861,7 +10861,7 @@ $(BINDIR)/$(CONFIG)/uri_parser_test: $(URI_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG) endif -$(OBJDIR)/$(CONFIG)/test/core/client_config/uri_parser_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/client_channel/uri_parser_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_uri_parser_test: $(URI_PARSER_TEST_OBJS:.o=.dep) @@ -12254,16 +12254,16 @@ $(BINDIR)/$(CONFIG)/interop_test: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/interop_test: $(PROTOBUF_DEP) $(INTEROP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/interop_test: $(PROTOBUF_DEP) $(INTEROP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(INTEROP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/interop_test + $(Q) $(LDXX) $(LDFLAGS) $(INTEROP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/interop_test endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/interop/interop_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/interop/interop_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a deps_interop_test: $(INTEROP_TEST_OBJS:.o=.dep) @@ -15829,7 +15829,7 @@ endif URI_FUZZER_TEST_ONE_ENTRY_SRC = \ - test/core/client_config/uri_fuzzer_test.c \ + test/core/client_channel/uri_fuzzer_test.c \ test/core/util/one_corpus_entry_fuzzer.c \ URI_FUZZER_TEST_ONE_ENTRY_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(URI_FUZZER_TEST_ONE_ENTRY_SRC)))) @@ -15850,7 +15850,7 @@ $(BINDIR)/$(CONFIG)/uri_fuzzer_test_one_entry: $(URI_FUZZER_TEST_ONE_ENTRY_OBJS) endif -$(OBJDIR)/$(CONFIG)/test/core/client_config/uri_fuzzer_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/client_channel/uri_fuzzer_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OBJDIR)/$(CONFIG)/test/core/util/one_corpus_entry_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a diff --git a/binding.gyp b/binding.gyp index 5aaf24a6015..6c717f271cb 100644 --- a/binding.gyp +++ b/binding.gyp @@ -711,26 +711,26 @@ 'src/core/lib/tsi/ssl_transport_security.c', 'src/core/lib/tsi/transport_security.c', 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c', - 'src/core/ext/client_config/channel_connectivity.c', - 'src/core/ext/client_config/client_channel.c', - 'src/core/ext/client_config/client_channel_factory.c', - 'src/core/ext/client_config/client_config_plugin.c', - 'src/core/ext/client_config/connector.c', - 'src/core/ext/client_config/default_initial_connect_string.c', - 'src/core/ext/client_config/http_connect_handshaker.c', - 'src/core/ext/client_config/initial_connect_string.c', - 'src/core/ext/client_config/lb_policy.c', - 'src/core/ext/client_config/lb_policy_factory.c', - 'src/core/ext/client_config/lb_policy_registry.c', - 'src/core/ext/client_config/method_config.c', - 'src/core/ext/client_config/parse_address.c', - 'src/core/ext/client_config/resolver.c', - 'src/core/ext/client_config/resolver_factory.c', - 'src/core/ext/client_config/resolver_registry.c', - 'src/core/ext/client_config/resolver_result.c', - 'src/core/ext/client_config/subchannel.c', - 'src/core/ext/client_config/subchannel_index.c', - 'src/core/ext/client_config/uri_parser.c', + 'src/core/ext/client_channel/channel_connectivity.c', + 'src/core/ext/client_channel/client_channel.c', + 'src/core/ext/client_channel/client_channel_factory.c', + 'src/core/ext/client_channel/client_channel_plugin.c', + 'src/core/ext/client_channel/connector.c', + 'src/core/ext/client_channel/default_initial_connect_string.c', + 'src/core/ext/client_channel/http_connect_handshaker.c', + 'src/core/ext/client_channel/initial_connect_string.c', + 'src/core/ext/client_channel/lb_policy.c', + 'src/core/ext/client_channel/lb_policy_factory.c', + 'src/core/ext/client_channel/lb_policy_registry.c', + 'src/core/ext/client_channel/method_config.c', + 'src/core/ext/client_channel/parse_address.c', + 'src/core/ext/client_channel/resolver.c', + 'src/core/ext/client_channel/resolver_factory.c', + 'src/core/ext/client_channel/resolver_registry.c', + 'src/core/ext/client_channel/resolver_result.c', + 'src/core/ext/client_channel/subchannel.c', + 'src/core/ext/client_channel/subchannel_index.c', + 'src/core/ext/client_channel/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', diff --git a/build.yaml b/build.yaml index 104dc0102be..c12595205dd 100644 --- a/build.yaml +++ b/build.yaml @@ -351,47 +351,47 @@ filegroups: - gpr uses: - grpc_codegen -- name: grpc_client_config +- name: grpc_client_channel headers: - - src/core/ext/client_config/client_channel.h - - src/core/ext/client_config/client_channel_factory.h - - src/core/ext/client_config/connector.h - - src/core/ext/client_config/http_connect_handshaker.h - - src/core/ext/client_config/initial_connect_string.h - - src/core/ext/client_config/lb_policy.h - - src/core/ext/client_config/lb_policy_factory.h - - src/core/ext/client_config/lb_policy_registry.h - - src/core/ext/client_config/method_config.h - - src/core/ext/client_config/parse_address.h - - src/core/ext/client_config/resolver.h - - src/core/ext/client_config/resolver_factory.h - - src/core/ext/client_config/resolver_registry.h - - src/core/ext/client_config/resolver_result.h - - src/core/ext/client_config/subchannel.h - - src/core/ext/client_config/subchannel_index.h - - src/core/ext/client_config/uri_parser.h - src: - - src/core/ext/client_config/channel_connectivity.c - - src/core/ext/client_config/client_channel.c - - src/core/ext/client_config/client_channel_factory.c - - src/core/ext/client_config/client_config_plugin.c - - src/core/ext/client_config/connector.c - - src/core/ext/client_config/default_initial_connect_string.c - - src/core/ext/client_config/http_connect_handshaker.c - - src/core/ext/client_config/initial_connect_string.c - - src/core/ext/client_config/lb_policy.c - - src/core/ext/client_config/lb_policy_factory.c - - src/core/ext/client_config/lb_policy_registry.c - - src/core/ext/client_config/method_config.c - - src/core/ext/client_config/parse_address.c - - src/core/ext/client_config/resolver.c - - src/core/ext/client_config/resolver_factory.c - - src/core/ext/client_config/resolver_registry.c - - src/core/ext/client_config/resolver_result.c - - src/core/ext/client_config/subchannel.c - - src/core/ext/client_config/subchannel_index.c - - src/core/ext/client_config/uri_parser.c - plugin: grpc_client_config + - src/core/ext/client_channel/client_channel.h + - src/core/ext/client_channel/client_channel_factory.h + - src/core/ext/client_channel/connector.h + - src/core/ext/client_channel/http_connect_handshaker.h + - src/core/ext/client_channel/initial_connect_string.h + - src/core/ext/client_channel/lb_policy.h + - src/core/ext/client_channel/lb_policy_factory.h + - src/core/ext/client_channel/lb_policy_registry.h + - src/core/ext/client_channel/method_config.h + - src/core/ext/client_channel/parse_address.h + - src/core/ext/client_channel/resolver.h + - src/core/ext/client_channel/resolver_factory.h + - src/core/ext/client_channel/resolver_registry.h + - src/core/ext/client_channel/resolver_result.h + - src/core/ext/client_channel/subchannel.h + - src/core/ext/client_channel/subchannel_index.h + - src/core/ext/client_channel/uri_parser.h + src: + - src/core/ext/client_channel/channel_connectivity.c + - src/core/ext/client_channel/client_channel.c + - src/core/ext/client_channel/client_channel_factory.c + - src/core/ext/client_channel/client_channel_plugin.c + - src/core/ext/client_channel/connector.c + - src/core/ext/client_channel/default_initial_connect_string.c + - src/core/ext/client_channel/http_connect_handshaker.c + - src/core/ext/client_channel/initial_connect_string.c + - src/core/ext/client_channel/lb_policy.c + - src/core/ext/client_channel/lb_policy_factory.c + - src/core/ext/client_channel/lb_policy_registry.c + - src/core/ext/client_channel/method_config.c + - src/core/ext/client_channel/parse_address.c + - src/core/ext/client_channel/resolver.c + - src/core/ext/client_channel/resolver_factory.c + - src/core/ext/client_channel/resolver_registry.c + - src/core/ext/client_channel/resolver_result.c + - src/core/ext/client_channel/subchannel.c + - src/core/ext/client_channel/subchannel_index.c + - src/core/ext/client_channel/uri_parser.c + plugin: grpc_client_channel uses: - grpc_base - name: grpc_codegen @@ -416,7 +416,7 @@ filegroups: plugin: grpc_lb_policy_grpclb uses: - grpc_base - - grpc_client_config + - grpc_client_channel - nanopb - name: grpc_lb_policy_pick_first src: @@ -424,14 +424,14 @@ filegroups: plugin: grpc_lb_policy_pick_first uses: - grpc_base - - grpc_client_config + - grpc_client_channel - name: grpc_lb_policy_round_robin src: - src/core/ext/lb_policy/round_robin/round_robin.c plugin: grpc_lb_policy_round_robin uses: - grpc_base - - grpc_client_config + - grpc_client_channel - name: grpc_load_reporting headers: - src/core/ext/load_reporting/load_reporting.h @@ -448,14 +448,14 @@ filegroups: plugin: grpc_resolver_dns_native uses: - grpc_base - - grpc_client_config + - grpc_client_channel - name: grpc_resolver_sockaddr src: - src/core/ext/resolver/sockaddr/sockaddr_resolver.c plugin: grpc_resolver_sockaddr uses: - grpc_base - - grpc_client_config + - grpc_client_channel - name: grpc_secure public_headers: - include/grpc/grpc_security.h @@ -606,14 +606,14 @@ filegroups: uses: - grpc_transport_chttp2 - grpc_base - - grpc_client_config + - grpc_client_channel - name: grpc_transport_chttp2_client_secure src: - src/core/ext/transport/chttp2/client/secure/secure_channel_create.c uses: - grpc_transport_chttp2 - grpc_base - - grpc_client_config + - grpc_client_channel - grpc_secure - name: grpc_transport_chttp2_server_insecure src: @@ -1032,7 +1032,7 @@ libs: src: - src/proto/grpc/reflection/v1alpha/reflection.proto - name: grpc++_test - build: test + build: private language: c++ headers: - include/grpc++/test/server_context_test_spouse.h @@ -1499,7 +1499,7 @@ targets: build: test language: c src: - - test/core/client_config/resolvers/dns_resolver_connectivity_test.c + - test/core/client_channel/resolvers/dns_resolver_connectivity_test.c deps: - grpc_test_util - grpc @@ -1509,7 +1509,7 @@ targets: build: test language: c src: - - test/core/client_config/resolvers/dns_resolver_test.c + - test/core/client_channel/resolvers/dns_resolver_test.c deps: - grpc_test_util - grpc @@ -2203,7 +2203,7 @@ targets: build: test language: c src: - - test/core/client_config/lb_policies_test.c + - test/core/client_channel/lb_policies_test.c deps: - grpc_test_util - grpc @@ -2425,7 +2425,7 @@ targets: build: test language: c src: - - test/core/client_config/set_initial_connect_string_test.c + - test/core/client_channel/set_initial_connect_string_test.c deps: - test_tcp_server - grpc_test_util @@ -2436,7 +2436,7 @@ targets: build: test language: c src: - - test/core/client_config/resolvers/sockaddr_resolver_test.c + - test/core/client_channel/resolvers/sockaddr_resolver_test.c deps: - grpc_test_util - grpc @@ -2602,20 +2602,20 @@ targets: build: fuzzer language: c src: - - test/core/client_config/uri_fuzzer_test.c + - test/core/client_channel/uri_fuzzer_test.c deps: - grpc_test_util - grpc - gpr_test_util - gpr corpus_dirs: - - test/core/client_config/uri_corpus + - test/core/client_channel/uri_corpus maxlen: 128 - name: uri_parser_test build: test language: c src: - - test/core/client_config/uri_parser_test.c + - test/core/client_channel/uri_parser_test.c deps: - grpc_test_util - grpc @@ -3057,6 +3057,7 @@ targets: - grpc - gpr_test_util - gpr + - grpc++_test_config platforms: - mac - linux diff --git a/config.m4 b/config.m4 index 7ef31709be4..a9b51ca71e9 100644 --- a/config.m4 +++ b/config.m4 @@ -230,26 +230,26 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/tsi/ssl_transport_security.c \ src/core/lib/tsi/transport_security.c \ src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \ - src/core/ext/client_config/channel_connectivity.c \ - src/core/ext/client_config/client_channel.c \ - src/core/ext/client_config/client_channel_factory.c \ - src/core/ext/client_config/client_config_plugin.c \ - src/core/ext/client_config/connector.c \ - src/core/ext/client_config/default_initial_connect_string.c \ - src/core/ext/client_config/http_connect_handshaker.c \ - src/core/ext/client_config/initial_connect_string.c \ - src/core/ext/client_config/lb_policy.c \ - src/core/ext/client_config/lb_policy_factory.c \ - src/core/ext/client_config/lb_policy_registry.c \ - src/core/ext/client_config/method_config.c \ - src/core/ext/client_config/parse_address.c \ - src/core/ext/client_config/resolver.c \ - src/core/ext/client_config/resolver_factory.c \ - src/core/ext/client_config/resolver_registry.c \ - src/core/ext/client_config/resolver_result.c \ - src/core/ext/client_config/subchannel.c \ - src/core/ext/client_config/subchannel_index.c \ - src/core/ext/client_config/uri_parser.c \ + src/core/ext/client_channel/channel_connectivity.c \ + src/core/ext/client_channel/client_channel.c \ + src/core/ext/client_channel/client_channel_factory.c \ + src/core/ext/client_channel/client_channel_plugin.c \ + src/core/ext/client_channel/connector.c \ + src/core/ext/client_channel/default_initial_connect_string.c \ + src/core/ext/client_channel/http_connect_handshaker.c \ + src/core/ext/client_channel/initial_connect_string.c \ + src/core/ext/client_channel/lb_policy.c \ + src/core/ext/client_channel/lb_policy_factory.c \ + src/core/ext/client_channel/lb_policy_registry.c \ + src/core/ext/client_channel/method_config.c \ + src/core/ext/client_channel/parse_address.c \ + src/core/ext/client_channel/resolver.c \ + src/core/ext/client_channel/resolver_factory.c \ + src/core/ext/client_channel/resolver_registry.c \ + src/core/ext/client_channel/resolver_result.c \ + src/core/ext/client_channel/subchannel.c \ + src/core/ext/client_channel/subchannel_index.c \ + src/core/ext/client_channel/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ @@ -588,7 +588,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/boringssl) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/census) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/census/gen) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/client_config) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/client_channel) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/pick_first) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 7c153fa3fa4..96d1f2bd752 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -779,21 +779,21 @@ Client asserts: ### unimplemented_method -This test verifies that calling an unimplemented RPC method returns the +This test verifies that calling an unimplemented RPC method returns the UNIMPLEMENTED status code. Server features: N/A Procedure: -* Client calls `grpc.testing.TestService/UnimplementedMethod` with an empty +* Client calls `grpc.testing.TestService/UnimplementedCall` with an empty request (defined as `grpc.testing.Empty`): ``` { } ``` - + Client asserts: * received status code is 12 (UNIMPLEMENTED) diff --git a/examples/node/dynamic_codegen/route_guide/route_guide_client.js b/examples/node/dynamic_codegen/route_guide/route_guide_client.js index 775b9addbfc..b7550b201a8 100644 --- a/examples/node/dynamic_codegen/route_guide/route_guide_client.js +++ b/examples/node/dynamic_codegen/route_guide/route_guide_client.js @@ -55,6 +55,7 @@ function runGetFeature(callback) { function featureCallback(error, feature) { if (error) { callback(error); + return; } if (feature.name === '') { console.log('Found no feature at ' + @@ -117,13 +118,17 @@ function runRecordRoute(callback) { string: 'db_path' }); fs.readFile(path.resolve(argv.db_path), function(err, data) { - if (err) callback(err); + if (err) { + callback(err); + return; + } var feature_list = JSON.parse(data); var num_points = 10; var call = client.recordRoute(function(error, stats) { if (error) { callback(error); + return; } console.log('Finished trip with', stats.point_count, 'points'); console.log('Passed', stats.feature_count, 'features'); diff --git a/examples/node/static_codegen/route_guide/route_guide_client.js b/examples/node/static_codegen/route_guide/route_guide_client.js index ecde78616b5..e16de44a1ac 100644 --- a/examples/node/static_codegen/route_guide/route_guide_client.js +++ b/examples/node/static_codegen/route_guide/route_guide_client.js @@ -56,6 +56,7 @@ function runGetFeature(callback) { function featureCallback(error, feature) { if (error) { callback(error); + return; } var latitude = feature.getLocation().getLatitude(); var longitude = feature.getLocation().getLongitude(); @@ -115,7 +116,10 @@ function runRecordRoute(callback) { string: 'db_path' }); fs.readFile(path.resolve(argv.db_path), function(err, data) { - if (err) callback(err); + if (err) { + callback(err); + return; + } // Transform the loaded features to Feature objects var feature_list = _.map(JSON.parse(data), function(value) { var feature = new messages.Feature(); @@ -131,6 +135,7 @@ function runRecordRoute(callback) { var call = client.recordRoute(function(error, stats) { if (error) { callback(error); + return; } console.log('Finished trip with', stats.getPointCount(), 'points'); console.log('Passed', stats.getFeatureCount(), 'features'); diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 5fa033e1bff..64864342627 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -380,23 +380,23 @@ Pod::Spec.new do |s| 'src/core/lib/tsi/ssl_types.h', 'src/core/lib/tsi/transport_security.h', 'src/core/lib/tsi/transport_security_interface.h', - 'src/core/ext/client_config/client_channel.h', - 'src/core/ext/client_config/client_channel_factory.h', - 'src/core/ext/client_config/connector.h', - 'src/core/ext/client_config/http_connect_handshaker.h', - 'src/core/ext/client_config/initial_connect_string.h', - 'src/core/ext/client_config/lb_policy.h', - 'src/core/ext/client_config/lb_policy_factory.h', - 'src/core/ext/client_config/lb_policy_registry.h', - 'src/core/ext/client_config/method_config.h', - 'src/core/ext/client_config/parse_address.h', - 'src/core/ext/client_config/resolver.h', - 'src/core/ext/client_config/resolver_factory.h', - 'src/core/ext/client_config/resolver_registry.h', - 'src/core/ext/client_config/resolver_result.h', - 'src/core/ext/client_config/subchannel.h', - 'src/core/ext/client_config/subchannel_index.h', - 'src/core/ext/client_config/uri_parser.h', + 'src/core/ext/client_channel/client_channel.h', + 'src/core/ext/client_channel/client_channel_factory.h', + 'src/core/ext/client_channel/connector.h', + 'src/core/ext/client_channel/http_connect_handshaker.h', + 'src/core/ext/client_channel/initial_connect_string.h', + 'src/core/ext/client_channel/lb_policy.h', + 'src/core/ext/client_channel/lb_policy_factory.h', + 'src/core/ext/client_channel/lb_policy_registry.h', + 'src/core/ext/client_channel/method_config.h', + 'src/core/ext/client_channel/parse_address.h', + 'src/core/ext/client_channel/resolver.h', + 'src/core/ext/client_channel/resolver_factory.h', + 'src/core/ext/client_channel/resolver_registry.h', + 'src/core/ext/client_channel/resolver_result.h', + 'src/core/ext/client_channel/subchannel.h', + 'src/core/ext/client_channel/subchannel_index.h', + 'src/core/ext/client_channel/uri_parser.h', 'src/core/ext/lb_policy/grpclb/grpclb.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', @@ -564,26 +564,26 @@ Pod::Spec.new do |s| 'src/core/lib/tsi/ssl_transport_security.c', 'src/core/lib/tsi/transport_security.c', 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c', - 'src/core/ext/client_config/channel_connectivity.c', - 'src/core/ext/client_config/client_channel.c', - 'src/core/ext/client_config/client_channel_factory.c', - 'src/core/ext/client_config/client_config_plugin.c', - 'src/core/ext/client_config/connector.c', - 'src/core/ext/client_config/default_initial_connect_string.c', - 'src/core/ext/client_config/http_connect_handshaker.c', - 'src/core/ext/client_config/initial_connect_string.c', - 'src/core/ext/client_config/lb_policy.c', - 'src/core/ext/client_config/lb_policy_factory.c', - 'src/core/ext/client_config/lb_policy_registry.c', - 'src/core/ext/client_config/method_config.c', - 'src/core/ext/client_config/parse_address.c', - 'src/core/ext/client_config/resolver.c', - 'src/core/ext/client_config/resolver_factory.c', - 'src/core/ext/client_config/resolver_registry.c', - 'src/core/ext/client_config/resolver_result.c', - 'src/core/ext/client_config/subchannel.c', - 'src/core/ext/client_config/subchannel_index.c', - 'src/core/ext/client_config/uri_parser.c', + 'src/core/ext/client_channel/channel_connectivity.c', + 'src/core/ext/client_channel/client_channel.c', + 'src/core/ext/client_channel/client_channel_factory.c', + 'src/core/ext/client_channel/client_channel_plugin.c', + 'src/core/ext/client_channel/connector.c', + 'src/core/ext/client_channel/default_initial_connect_string.c', + 'src/core/ext/client_channel/http_connect_handshaker.c', + 'src/core/ext/client_channel/initial_connect_string.c', + 'src/core/ext/client_channel/lb_policy.c', + 'src/core/ext/client_channel/lb_policy_factory.c', + 'src/core/ext/client_channel/lb_policy_registry.c', + 'src/core/ext/client_channel/method_config.c', + 'src/core/ext/client_channel/parse_address.c', + 'src/core/ext/client_channel/resolver.c', + 'src/core/ext/client_channel/resolver_factory.c', + 'src/core/ext/client_channel/resolver_registry.c', + 'src/core/ext/client_channel/resolver_result.c', + 'src/core/ext/client_channel/subchannel.c', + 'src/core/ext/client_channel/subchannel_index.c', + 'src/core/ext/client_channel/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', @@ -760,23 +760,23 @@ Pod::Spec.new do |s| 'src/core/lib/tsi/ssl_types.h', 'src/core/lib/tsi/transport_security.h', 'src/core/lib/tsi/transport_security_interface.h', - 'src/core/ext/client_config/client_channel.h', - 'src/core/ext/client_config/client_channel_factory.h', - 'src/core/ext/client_config/connector.h', - 'src/core/ext/client_config/http_connect_handshaker.h', - 'src/core/ext/client_config/initial_connect_string.h', - 'src/core/ext/client_config/lb_policy.h', - 'src/core/ext/client_config/lb_policy_factory.h', - 'src/core/ext/client_config/lb_policy_registry.h', - 'src/core/ext/client_config/method_config.h', - 'src/core/ext/client_config/parse_address.h', - 'src/core/ext/client_config/resolver.h', - 'src/core/ext/client_config/resolver_factory.h', - 'src/core/ext/client_config/resolver_registry.h', - 'src/core/ext/client_config/resolver_result.h', - 'src/core/ext/client_config/subchannel.h', - 'src/core/ext/client_config/subchannel_index.h', - 'src/core/ext/client_config/uri_parser.h', + 'src/core/ext/client_channel/client_channel.h', + 'src/core/ext/client_channel/client_channel_factory.h', + 'src/core/ext/client_channel/connector.h', + 'src/core/ext/client_channel/http_connect_handshaker.h', + 'src/core/ext/client_channel/initial_connect_string.h', + 'src/core/ext/client_channel/lb_policy.h', + 'src/core/ext/client_channel/lb_policy_factory.h', + 'src/core/ext/client_channel/lb_policy_registry.h', + 'src/core/ext/client_channel/method_config.h', + 'src/core/ext/client_channel/parse_address.h', + 'src/core/ext/client_channel/resolver.h', + 'src/core/ext/client_channel/resolver_factory.h', + 'src/core/ext/client_channel/resolver_registry.h', + 'src/core/ext/client_channel/resolver_result.h', + 'src/core/ext/client_channel/subchannel.h', + 'src/core/ext/client_channel/subchannel_index.h', + 'src/core/ext/client_channel/uri_parser.h', 'src/core/ext/lb_policy/grpclb/grpclb.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', diff --git a/grpc.gemspec b/grpc.gemspec index 499aed517b9..3af7dc00e4f 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -300,23 +300,23 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/tsi/ssl_types.h ) s.files += %w( src/core/lib/tsi/transport_security.h ) s.files += %w( src/core/lib/tsi/transport_security_interface.h ) - s.files += %w( src/core/ext/client_config/client_channel.h ) - s.files += %w( src/core/ext/client_config/client_channel_factory.h ) - s.files += %w( src/core/ext/client_config/connector.h ) - s.files += %w( src/core/ext/client_config/http_connect_handshaker.h ) - s.files += %w( src/core/ext/client_config/initial_connect_string.h ) - s.files += %w( src/core/ext/client_config/lb_policy.h ) - s.files += %w( src/core/ext/client_config/lb_policy_factory.h ) - s.files += %w( src/core/ext/client_config/lb_policy_registry.h ) - s.files += %w( src/core/ext/client_config/method_config.h ) - s.files += %w( src/core/ext/client_config/parse_address.h ) - s.files += %w( src/core/ext/client_config/resolver.h ) - s.files += %w( src/core/ext/client_config/resolver_factory.h ) - s.files += %w( src/core/ext/client_config/resolver_registry.h ) - s.files += %w( src/core/ext/client_config/resolver_result.h ) - s.files += %w( src/core/ext/client_config/subchannel.h ) - s.files += %w( src/core/ext/client_config/subchannel_index.h ) - s.files += %w( src/core/ext/client_config/uri_parser.h ) + s.files += %w( src/core/ext/client_channel/client_channel.h ) + s.files += %w( src/core/ext/client_channel/client_channel_factory.h ) + s.files += %w( src/core/ext/client_channel/connector.h ) + s.files += %w( src/core/ext/client_channel/http_connect_handshaker.h ) + s.files += %w( src/core/ext/client_channel/initial_connect_string.h ) + s.files += %w( src/core/ext/client_channel/lb_policy.h ) + s.files += %w( src/core/ext/client_channel/lb_policy_factory.h ) + s.files += %w( src/core/ext/client_channel/lb_policy_registry.h ) + s.files += %w( src/core/ext/client_channel/method_config.h ) + s.files += %w( src/core/ext/client_channel/parse_address.h ) + s.files += %w( src/core/ext/client_channel/resolver.h ) + s.files += %w( src/core/ext/client_channel/resolver_factory.h ) + s.files += %w( src/core/ext/client_channel/resolver_registry.h ) + s.files += %w( src/core/ext/client_channel/resolver_result.h ) + s.files += %w( src/core/ext/client_channel/subchannel.h ) + s.files += %w( src/core/ext/client_channel/subchannel_index.h ) + s.files += %w( src/core/ext/client_channel/uri_parser.h ) s.files += %w( src/core/ext/lb_policy/grpclb/grpclb.h ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.h ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h ) @@ -484,26 +484,26 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/tsi/ssl_transport_security.c ) s.files += %w( src/core/lib/tsi/transport_security.c ) s.files += %w( src/core/ext/transport/chttp2/client/secure/secure_channel_create.c ) - s.files += %w( src/core/ext/client_config/channel_connectivity.c ) - s.files += %w( src/core/ext/client_config/client_channel.c ) - s.files += %w( src/core/ext/client_config/client_channel_factory.c ) - s.files += %w( src/core/ext/client_config/client_config_plugin.c ) - s.files += %w( src/core/ext/client_config/connector.c ) - s.files += %w( src/core/ext/client_config/default_initial_connect_string.c ) - s.files += %w( src/core/ext/client_config/http_connect_handshaker.c ) - s.files += %w( src/core/ext/client_config/initial_connect_string.c ) - s.files += %w( src/core/ext/client_config/lb_policy.c ) - s.files += %w( src/core/ext/client_config/lb_policy_factory.c ) - s.files += %w( src/core/ext/client_config/lb_policy_registry.c ) - s.files += %w( src/core/ext/client_config/method_config.c ) - s.files += %w( src/core/ext/client_config/parse_address.c ) - s.files += %w( src/core/ext/client_config/resolver.c ) - s.files += %w( src/core/ext/client_config/resolver_factory.c ) - s.files += %w( src/core/ext/client_config/resolver_registry.c ) - s.files += %w( src/core/ext/client_config/resolver_result.c ) - s.files += %w( src/core/ext/client_config/subchannel.c ) - s.files += %w( src/core/ext/client_config/subchannel_index.c ) - s.files += %w( src/core/ext/client_config/uri_parser.c ) + s.files += %w( src/core/ext/client_channel/channel_connectivity.c ) + s.files += %w( src/core/ext/client_channel/client_channel.c ) + s.files += %w( src/core/ext/client_channel/client_channel_factory.c ) + s.files += %w( src/core/ext/client_channel/client_channel_plugin.c ) + s.files += %w( src/core/ext/client_channel/connector.c ) + s.files += %w( src/core/ext/client_channel/default_initial_connect_string.c ) + s.files += %w( src/core/ext/client_channel/http_connect_handshaker.c ) + s.files += %w( src/core/ext/client_channel/initial_connect_string.c ) + s.files += %w( src/core/ext/client_channel/lb_policy.c ) + s.files += %w( src/core/ext/client_channel/lb_policy_factory.c ) + s.files += %w( src/core/ext/client_channel/lb_policy_registry.c ) + s.files += %w( src/core/ext/client_channel/method_config.c ) + s.files += %w( src/core/ext/client_channel/parse_address.c ) + s.files += %w( src/core/ext/client_channel/resolver.c ) + s.files += %w( src/core/ext/client_channel/resolver_factory.c ) + s.files += %w( src/core/ext/client_channel/resolver_registry.c ) + s.files += %w( src/core/ext/client_channel/resolver_result.c ) + s.files += %w( src/core/ext/client_channel/subchannel.c ) + s.files += %w( src/core/ext/client_channel/subchannel_index.c ) + s.files += %w( src/core/ext/client_channel/uri_parser.c ) s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c ) s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c ) diff --git a/package.xml b/package.xml index 80700919c71..15696a74dea 100644 --- a/package.xml +++ b/package.xml @@ -307,23 +307,23 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -491,26 +491,26 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/src/core/ext/client_config/README.md b/src/core/ext/client_channel/README.md similarity index 100% rename from src/core/ext/client_config/README.md rename to src/core/ext/client_channel/README.md diff --git a/src/core/ext/client_config/channel_connectivity.c b/src/core/ext/client_channel/channel_connectivity.c similarity index 99% rename from src/core/ext/client_config/channel_connectivity.c rename to src/core/ext/client_channel/channel_connectivity.c index ce3c13a4ee3..9797e665643 100644 --- a/src/core/ext/client_config/channel_connectivity.c +++ b/src/core/ext/client_channel/channel_connectivity.c @@ -36,7 +36,7 @@ #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/completion_queue.h" diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_channel/client_channel.c similarity index 91% rename from src/core/ext/client_config/client_channel.c rename to src/core/ext/client_channel/client_channel.c index beaa9637c3b..55bb877576f 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include #include @@ -42,9 +42,9 @@ #include #include -#include "src/core/ext/client_config/lb_policy_registry.h" -#include "src/core/ext/client_config/method_config.h" -#include "src/core/ext/client_config/subchannel.h" +#include "src/core/ext/client_channel/lb_policy_registry.h" +#include "src/core/ext/client_channel/method_config.h" +#include "src/core/ext/client_channel/subchannel.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/channel/deadline_filter.h" @@ -60,6 +60,54 @@ /* Client channel implementation */ +/************************************************************************* + * METHOD-CONFIG TABLE + */ + +typedef enum { + WAIT_FOR_READY_UNSET, + WAIT_FOR_READY_FALSE, + WAIT_FOR_READY_TRUE +} wait_for_ready_value; + +typedef struct method_parameters { + gpr_timespec timeout; + wait_for_ready_value wait_for_ready; +} method_parameters; + +static void *method_parameters_copy(void *value) { + void *new_value = gpr_malloc(sizeof(method_parameters)); + memcpy(new_value, value, sizeof(method_parameters)); + return new_value; +} + +static int method_parameters_cmp(void *value1, void *value2) { + const method_parameters *v1 = value1; + const method_parameters *v2 = value2; + const int retval = gpr_time_cmp(v1->timeout, v2->timeout); + if (retval != 0) return retval; + if (v1->wait_for_ready > v2->wait_for_ready) return 1; + if (v1->wait_for_ready < v2->wait_for_ready) return -1; + return 0; +} + +static const grpc_mdstr_hash_table_vtable method_parameters_vtable = { + gpr_free, method_parameters_copy, method_parameters_cmp}; + +static void *method_config_convert_value( + const grpc_method_config *method_config) { + method_parameters *value = gpr_malloc(sizeof(method_parameters)); + const gpr_timespec *timeout = grpc_method_config_get_timeout(method_config); + value->timeout = timeout != NULL ? *timeout : gpr_time_0(GPR_TIMESPAN); + const bool *wait_for_ready = + grpc_method_config_get_wait_for_ready(method_config); + value->wait_for_ready = + wait_for_ready == NULL + ? WAIT_FOR_READY_UNSET + : (wait_for_ready ? WAIT_FOR_READY_TRUE : WAIT_FOR_READY_FALSE); + return value; +} + /************************************************************************* * CHANNEL-WIDE FUNCTIONS */ @@ -76,8 +124,8 @@ typedef struct client_channel_channel_data { gpr_mu mu; /** currently active load balancer */ grpc_lb_policy *lb_policy; - /** method config table */ - grpc_method_config_table *method_config_table; + /** maps method names to method_parameters structs */ + grpc_mdstr_hash_table *method_params_table; /** incoming resolver result - set by resolver.next() */ grpc_resolver_result *resolver_result; /** a list of closures that are all waiting for config to come in */ @@ -177,7 +225,7 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, channel_data *chand = arg; grpc_lb_policy *lb_policy = NULL; grpc_lb_policy *old_lb_policy; - grpc_method_config_table *method_config_table = NULL; + grpc_mdstr_hash_table *method_params_table = NULL; grpc_connectivity_state state = GRPC_CHANNEL_TRANSIENT_FAILURE; bool exit_idle = false; grpc_error *state_error = GRPC_ERROR_CREATE("No load balancing policy"); @@ -230,8 +278,9 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, lb_policy_args.additional_args, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); - method_config_table = grpc_method_config_table_ref( - (grpc_method_config_table *)channel_arg->value.pointer.p); + method_params_table = grpc_method_config_table_convert( + (grpc_method_config_table *)channel_arg->value.pointer.p, + method_config_convert_value, &method_parameters_vtable); } grpc_resolver_result_unref(exec_ctx, chand->resolver_result); chand->resolver_result = NULL; @@ -245,10 +294,10 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, gpr_mu_lock(&chand->mu); old_lb_policy = chand->lb_policy; chand->lb_policy = lb_policy; - if (chand->method_config_table != NULL) { - grpc_method_config_table_unref(chand->method_config_table); + if (chand->method_params_table != NULL) { + grpc_mdstr_hash_table_unref(chand->method_params_table); } - chand->method_config_table = method_config_table; + chand->method_params_table = method_params_table; if (lb_policy != NULL) { grpc_exec_ctx_enqueue_list(exec_ctx, &chand->waiting_for_config_closures, NULL); @@ -409,8 +458,8 @@ static void cc_destroy_channel_elem(grpc_exec_ctx *exec_ctx, chand->interested_parties); GRPC_LB_POLICY_UNREF(exec_ctx, chand->lb_policy, "channel"); } - if (chand->method_config_table != NULL) { - grpc_method_config_table_unref(chand->method_config_table); + if (chand->method_params_table != NULL) { + grpc_mdstr_hash_table_unref(chand->method_params_table); } grpc_connectivity_state_destroy(exec_ctx, &chand->state_tracker); grpc_pollset_set_destroy(chand->interested_parties); @@ -448,11 +497,7 @@ typedef struct client_channel_call_data { grpc_mdstr *path; // Request path. gpr_timespec call_start_time; gpr_timespec deadline; - enum { - WAIT_FOR_READY_UNSET, - WAIT_FOR_READY_FALSE, - WAIT_FOR_READY_TRUE - } wait_for_ready_from_service_config; + wait_for_ready_value wait_for_ready_from_service_config; grpc_closure read_service_config; grpc_error *cancel_error; @@ -846,41 +891,39 @@ static void read_service_config(grpc_exec_ctx *exec_ctx, void *arg, if (error == GRPC_ERROR_NONE) { // Get the method config table from channel data. gpr_mu_lock(&chand->mu); - grpc_method_config_table *method_config_table = NULL; - if (chand->method_config_table != NULL) { - method_config_table = - grpc_method_config_table_ref(chand->method_config_table); + grpc_mdstr_hash_table *method_params_table = NULL; + if (chand->method_params_table != NULL) { + method_params_table = + grpc_mdstr_hash_table_ref(chand->method_params_table); } gpr_mu_unlock(&chand->mu); // If the method config table was present, use it. - if (method_config_table != NULL) { - const grpc_method_config *method_config = - grpc_method_config_table_get_method_config(method_config_table, - calld->path); - if (method_config != NULL) { - const gpr_timespec *per_method_timeout = - grpc_method_config_get_timeout(method_config); - const bool *wait_for_ready = - grpc_method_config_get_wait_for_ready(method_config); - if (per_method_timeout != NULL || wait_for_ready != NULL) { + if (method_params_table != NULL) { + const method_parameters *method_params = + grpc_method_config_table_get(method_params_table, calld->path); + if (method_params != NULL) { + const bool have_method_timeout = + gpr_time_cmp(method_params->timeout, gpr_time_0(GPR_TIMESPAN)) != 0; + if (have_method_timeout || + method_params->wait_for_ready != WAIT_FOR_READY_UNSET) { gpr_mu_lock(&calld->mu); - if (per_method_timeout != NULL) { - gpr_timespec per_method_deadline = - gpr_time_add(calld->call_start_time, *per_method_timeout); + if (have_method_timeout) { + const gpr_timespec per_method_deadline = + gpr_time_add(calld->call_start_time, method_params->timeout); if (gpr_time_cmp(per_method_deadline, calld->deadline) < 0) { calld->deadline = per_method_deadline; // Reset deadline timer. grpc_deadline_state_reset(exec_ctx, elem, calld->deadline); } } - if (wait_for_ready != NULL) { + if (method_params->wait_for_ready != WAIT_FOR_READY_UNSET) { calld->wait_for_ready_from_service_config = - *wait_for_ready ? WAIT_FOR_READY_TRUE : WAIT_FOR_READY_FALSE; + method_params->wait_for_ready; } gpr_mu_unlock(&calld->mu); } } - grpc_method_config_table_unref(method_config_table); + grpc_mdstr_hash_table_unref(method_params_table); } } GRPC_CALL_STACK_UNREF(exec_ctx, calld->owning_call, "read_service_config"); @@ -917,29 +960,25 @@ static grpc_error *cc_init_call_elem(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&chand->mu); if (chand->lb_policy != NULL) { // We already have a resolver result, so check for service config. - if (chand->method_config_table != NULL) { - grpc_method_config_table *method_config_table = - grpc_method_config_table_ref(chand->method_config_table); + if (chand->method_params_table != NULL) { + grpc_mdstr_hash_table *method_params_table = + grpc_mdstr_hash_table_ref(chand->method_params_table); gpr_mu_unlock(&chand->mu); - grpc_method_config *method_config = - grpc_method_config_table_get_method_config(method_config_table, - args->path); - if (method_config != NULL) { - const gpr_timespec *per_method_timeout = - grpc_method_config_get_timeout(method_config); - if (per_method_timeout != NULL) { + method_parameters *method_params = + grpc_method_config_table_get(method_params_table, args->path); + if (method_params != NULL) { + if (gpr_time_cmp(method_params->timeout, + gpr_time_0(GPR_CLOCK_MONOTONIC)) != 0) { gpr_timespec per_method_deadline = - gpr_time_add(calld->call_start_time, *per_method_timeout); + gpr_time_add(calld->call_start_time, method_params->timeout); calld->deadline = gpr_time_min(calld->deadline, per_method_deadline); } - const bool *wait_for_ready = - grpc_method_config_get_wait_for_ready(method_config); - if (wait_for_ready != NULL) { + if (method_params->wait_for_ready != WAIT_FOR_READY_UNSET) { calld->wait_for_ready_from_service_config = - *wait_for_ready ? WAIT_FOR_READY_TRUE : WAIT_FOR_READY_FALSE; + method_params->wait_for_ready; } } - grpc_method_config_table_unref(method_config_table); + grpc_mdstr_hash_table_unref(method_params_table); } else { gpr_mu_unlock(&chand->mu); } diff --git a/src/core/ext/client_config/client_channel.h b/src/core/ext/client_channel/client_channel.h similarity index 90% rename from src/core/ext/client_config/client_channel.h rename to src/core/ext/client_channel/client_channel.h index abb5ac4d878..ab5a84fdfbe 100644 --- a/src/core/ext/client_config/client_channel.h +++ b/src/core/ext/client_channel/client_channel.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_CLIENT_CHANNEL_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_CLIENT_CHANNEL_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_CLIENT_CHANNEL_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_CLIENT_CHANNEL_H -#include "src/core/ext/client_config/client_channel_factory.h" -#include "src/core/ext/client_config/resolver.h" +#include "src/core/ext/client_channel/client_channel_factory.h" +#include "src/core/ext/client_channel/resolver.h" #include "src/core/lib/channel/channel_stack.h" /* A client channel is a channel that begins disconnected, and can connect @@ -61,4 +61,4 @@ void grpc_client_channel_watch_connectivity_state( grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_pollset *pollset, grpc_connectivity_state *state, grpc_closure *on_complete); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_CLIENT_CHANNEL_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_CLIENT_CHANNEL_H */ diff --git a/src/core/ext/client_config/client_channel_factory.c b/src/core/ext/client_channel/client_channel_factory.c similarity index 97% rename from src/core/ext/client_config/client_channel_factory.c rename to src/core/ext/client_channel/client_channel_factory.c index 71c64c0da1b..db1cc9093c6 100644 --- a/src/core/ext/client_config/client_channel_factory.c +++ b/src/core/ext/client_channel/client_channel_factory.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/client_channel_factory.h" +#include "src/core/ext/client_channel/client_channel_factory.h" void grpc_client_channel_factory_ref(grpc_client_channel_factory* factory) { factory->vtable->ref(factory); diff --git a/src/core/ext/client_config/client_channel_factory.h b/src/core/ext/client_channel/client_channel_factory.h similarity index 93% rename from src/core/ext/client_config/client_channel_factory.h rename to src/core/ext/client_channel/client_channel_factory.h index 1241b9b781f..28828c2eb60 100644 --- a/src/core/ext/client_config/client_channel_factory.h +++ b/src/core/ext/client_channel/client_channel_factory.h @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_CLIENT_CHANNEL_FACTORY_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_CLIENT_CHANNEL_FACTORY_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H #include -#include "src/core/ext/client_config/subchannel.h" +#include "src/core/ext/client_channel/subchannel.h" #include "src/core/lib/channel/channel_stack.h" typedef struct grpc_client_channel_factory grpc_client_channel_factory; @@ -82,4 +82,4 @@ grpc_channel *grpc_client_channel_factory_create_channel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *factory, const char *target, grpc_client_channel_type type, grpc_channel_args *args); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_CLIENT_CHANNEL_FACTORY_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H */ diff --git a/src/core/ext/client_config/client_config_plugin.c b/src/core/ext/client_channel/client_channel_plugin.c similarity index 91% rename from src/core/ext/client_config/client_config_plugin.c rename to src/core/ext/client_channel/client_channel_plugin.c index dc3629d3833..a3e50798439 100644 --- a/src/core/ext/client_config/client_config_plugin.c +++ b/src/core/ext/client_channel/client_channel_plugin.c @@ -37,10 +37,10 @@ #include -#include "src/core/ext/client_config/client_channel.h" -#include "src/core/ext/client_config/lb_policy_registry.h" -#include "src/core/ext/client_config/resolver_registry.h" -#include "src/core/ext/client_config/subchannel_index.h" +#include "src/core/ext/client_channel/client_channel.h" +#include "src/core/ext/client_channel/lb_policy_registry.h" +#include "src/core/ext/client_channel/resolver_registry.h" +#include "src/core/ext/client_channel/subchannel_index.h" #include "src/core/lib/surface/channel_init.h" static bool append_filter(grpc_channel_stack_builder *builder, void *arg) { @@ -73,7 +73,7 @@ static bool set_default_host_if_unset(grpc_channel_stack_builder *builder, return true; } -void grpc_client_config_init(void) { +void grpc_client_channel_init(void) { grpc_lb_policy_registry_init(); grpc_resolver_registry_init(); grpc_subchannel_index_init(); @@ -83,7 +83,7 @@ void grpc_client_config_init(void) { (void *)&grpc_client_channel_filter); } -void grpc_client_config_shutdown(void) { +void grpc_client_channel_shutdown(void) { grpc_subchannel_index_shutdown(); grpc_channel_init_shutdown(); grpc_resolver_registry_shutdown(); diff --git a/src/core/ext/client_config/connector.c b/src/core/ext/client_channel/connector.c similarity index 97% rename from src/core/ext/client_config/connector.c rename to src/core/ext/client_channel/connector.c index 5b629ed5fb1..0582e5b3726 100644 --- a/src/core/ext/client_config/connector.c +++ b/src/core/ext/client_channel/connector.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/connector.h" +#include "src/core/ext/client_channel/connector.h" grpc_connector* grpc_connector_ref(grpc_connector* connector) { connector->vtable->ref(connector); diff --git a/src/core/ext/client_config/connector.h b/src/core/ext/client_channel/connector.h similarity index 96% rename from src/core/ext/client_config/connector.h rename to src/core/ext/client_channel/connector.h index ea9d23706e4..e08244b2c02 100644 --- a/src/core/ext/client_config/connector.h +++ b/src/core/ext/client_channel/connector.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_CONNECTOR_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_CONNECTOR_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_CONNECTOR_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_CONNECTOR_H #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/iomgr/sockaddr.h" @@ -89,4 +89,4 @@ void grpc_connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *connector, void grpc_connector_shutdown(grpc_exec_ctx *exec_ctx, grpc_connector *connector); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_CONNECTOR_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_CONNECTOR_H */ diff --git a/src/core/ext/client_config/default_initial_connect_string.c b/src/core/ext/client_channel/default_initial_connect_string.c similarity index 100% rename from src/core/ext/client_config/default_initial_connect_string.c rename to src/core/ext/client_channel/default_initial_connect_string.c diff --git a/src/core/ext/client_config/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c similarity index 98% rename from src/core/ext/client_config/http_connect_handshaker.c rename to src/core/ext/client_channel/http_connect_handshaker.c index fda1df173e1..ea2cbbdd970 100644 --- a/src/core/ext/client_config/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/http_connect_handshaker.h" +#include "src/core/ext/client_channel/http_connect_handshaker.h" #include @@ -40,7 +40,7 @@ #include #include -#include "src/core/ext/client_config/uri_parser.h" +#include "src/core/ext/client_channel/uri_parser.h" #include "src/core/lib/http/format_request.h" #include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/timer.h" diff --git a/src/core/ext/client_config/http_connect_handshaker.h b/src/core/ext/client_channel/http_connect_handshaker.h similarity index 91% rename from src/core/ext/client_config/http_connect_handshaker.h rename to src/core/ext/client_channel/http_connect_handshaker.h index 1fc39482678..c689df2b2b5 100644 --- a/src/core/ext/client_config/http_connect_handshaker.h +++ b/src/core/ext/client_channel/http_connect_handshaker.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_HTTP_CONNECT_HANDSHAKER_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_HTTP_CONNECT_HANDSHAKER_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_HTTP_CONNECT_HANDSHAKER_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_HTTP_CONNECT_HANDSHAKER_H #include "src/core/lib/channel/handshaker.h" @@ -44,4 +44,4 @@ grpc_handshaker* grpc_http_connect_handshaker_create(const char* proxy_server, /// Caller takes ownership of result. char* grpc_get_http_proxy_server(); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_HTTP_CONNECT_HANDSHAKER_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_HTTP_CONNECT_HANDSHAKER_H */ diff --git a/src/core/ext/client_config/initial_connect_string.c b/src/core/ext/client_channel/initial_connect_string.c similarity index 97% rename from src/core/ext/client_config/initial_connect_string.c rename to src/core/ext/client_channel/initial_connect_string.c index 41580d2106c..fd8ddb83a8e 100644 --- a/src/core/ext/client_config/initial_connect_string.c +++ b/src/core/ext/client_channel/initial_connect_string.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/initial_connect_string.h" +#include "src/core/ext/client_channel/initial_connect_string.h" #include diff --git a/src/core/ext/client_config/initial_connect_string.h b/src/core/ext/client_channel/initial_connect_string.h similarity index 91% rename from src/core/ext/client_config/initial_connect_string.h rename to src/core/ext/client_channel/initial_connect_string.h index 06f0767832a..39f6465fc99 100644 --- a/src/core/ext/client_config/initial_connect_string.h +++ b/src/core/ext/client_channel/initial_connect_string.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_INITIAL_CONNECT_STRING_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_INITIAL_CONNECT_STRING_H #include #include "src/core/lib/iomgr/sockaddr.h" @@ -47,4 +47,4 @@ void grpc_test_set_initial_connect_string_function( void grpc_set_initial_connect_string(struct sockaddr **addr, size_t *addr_len, gpr_slice *connect_string); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_INITIAL_CONNECT_STRING_H */ diff --git a/src/core/ext/client_config/lb_policy.c b/src/core/ext/client_channel/lb_policy.c similarity index 99% rename from src/core/ext/client_config/lb_policy.c rename to src/core/ext/client_channel/lb_policy.c index 46391272a69..45ee72e2f0c 100644 --- a/src/core/ext/client_config/lb_policy.c +++ b/src/core/ext/client_channel/lb_policy.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/lb_policy.h" +#include "src/core/ext/client_channel/lb_policy.h" #define WEAK_REF_BITS 16 diff --git a/src/core/ext/client_config/lb_policy.h b/src/core/ext/client_channel/lb_policy.h similarity index 97% rename from src/core/ext/client_config/lb_policy.h rename to src/core/ext/client_channel/lb_policy.h index de424cd1052..54ad7797920 100644 --- a/src/core/ext/client_config/lb_policy.h +++ b/src/core/ext/client_channel/lb_policy.h @@ -31,10 +31,11 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_LB_POLICY_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_LB_POLICY_H -#include "src/core/ext/client_config/subchannel.h" +#include "src/core/ext/client_channel/subchannel.h" +#include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/transport/connectivity_state.h" /** A load balancing policy: specified by a vtable and a struct (which @@ -192,4 +193,4 @@ grpc_connectivity_state grpc_lb_policy_check_connectivity( grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, grpc_error **connectivity_error); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_LB_POLICY_H */ diff --git a/src/core/ext/client_config/lb_policy_factory.c b/src/core/ext/client_channel/lb_policy_factory.c similarity index 98% rename from src/core/ext/client_config/lb_policy_factory.c rename to src/core/ext/client_channel/lb_policy_factory.c index c17af91a09e..45753e69420 100644 --- a/src/core/ext/client_config/lb_policy_factory.c +++ b/src/core/ext/client_channel/lb_policy_factory.c @@ -36,7 +36,7 @@ #include #include -#include "src/core/ext/client_config/lb_policy_factory.h" +#include "src/core/ext/client_channel/lb_policy_factory.h" grpc_lb_addresses* grpc_lb_addresses_create(size_t num_addresses) { grpc_lb_addresses* addresses = gpr_malloc(sizeof(grpc_lb_addresses)); diff --git a/src/core/ext/client_config/lb_policy_factory.h b/src/core/ext/client_channel/lb_policy_factory.h similarity index 94% rename from src/core/ext/client_config/lb_policy_factory.h rename to src/core/ext/client_channel/lb_policy_factory.h index ade55704f25..3e53972445f 100644 --- a/src/core/ext/client_config/lb_policy_factory.h +++ b/src/core/ext/client_channel/lb_policy_factory.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_FACTORY_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_FACTORY_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_LB_POLICY_FACTORY_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_LB_POLICY_FACTORY_H -#include "src/core/ext/client_config/client_channel_factory.h" -#include "src/core/ext/client_config/lb_policy.h" +#include "src/core/ext/client_channel/client_channel_factory.h" +#include "src/core/ext/client_channel/lb_policy.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/resolve_address.h" @@ -118,4 +118,4 @@ grpc_lb_policy *grpc_lb_policy_factory_create_lb_policy( grpc_exec_ctx *exec_ctx, grpc_lb_policy_factory *factory, grpc_lb_policy_args *args); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_FACTORY_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_LB_POLICY_FACTORY_H */ diff --git a/src/core/ext/client_config/lb_policy_registry.c b/src/core/ext/client_channel/lb_policy_registry.c similarity index 98% rename from src/core/ext/client_config/lb_policy_registry.c rename to src/core/ext/client_channel/lb_policy_registry.c index a23643ecc65..f46a721f9d4 100644 --- a/src/core/ext/client_config/lb_policy_registry.c +++ b/src/core/ext/client_channel/lb_policy_registry.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/lb_policy_registry.h" +#include "src/core/ext/client_channel/lb_policy_registry.h" #include diff --git a/src/core/ext/client_config/lb_policy_registry.h b/src/core/ext/client_channel/lb_policy_registry.h similarity index 90% rename from src/core/ext/client_config/lb_policy_registry.h rename to src/core/ext/client_channel/lb_policy_registry.h index 92f38d6de64..21c468e0210 100644 --- a/src/core/ext/client_config/lb_policy_registry.h +++ b/src/core/ext/client_channel/lb_policy_registry.h @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_REGISTRY_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_REGISTRY_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H -#include "src/core/ext/client_config/lb_policy_factory.h" +#include "src/core/ext/client_channel/lb_policy_factory.h" #include "src/core/lib/iomgr/exec_ctx.h" /** Initialize the registry and set \a default_factory as the factory to be @@ -52,4 +52,4 @@ void grpc_register_lb_policy(grpc_lb_policy_factory *factory); grpc_lb_policy *grpc_lb_policy_create(grpc_exec_ctx *exec_ctx, const char *name, grpc_lb_policy_args *args); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_REGISTRY_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H */ diff --git a/src/core/ext/client_config/method_config.c b/src/core/ext/client_channel/method_config.c similarity index 82% rename from src/core/ext/client_config/method_config.c rename to src/core/ext/client_channel/method_config.c index f8a82323e70..4313ad5e0e6 100644 --- a/src/core/ext/client_config/method_config.c +++ b/src/core/ext/client_channel/method_config.c @@ -29,7 +29,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#include "src/core/ext/client_config/method_config.h" +#include "src/core/ext/client_channel/method_config.h" #include @@ -254,12 +254,12 @@ int grpc_method_config_table_cmp(const grpc_method_config_table* table1, return grpc_mdstr_hash_table_cmp(table1, table2); } -grpc_method_config* grpc_method_config_table_get_method_config( - const grpc_method_config_table* table, const grpc_mdstr* path) { - grpc_method_config* method_config = grpc_mdstr_hash_table_get(table, path); +void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, + const grpc_mdstr* path) { + void* value = grpc_mdstr_hash_table_get(table, path); // If we didn't find a match for the path, try looking for a wildcard // entry (i.e., change "/service/method" to "/service/*"). - if (method_config == NULL) { + if (value == NULL) { const char* path_str = grpc_mdstr_as_c_string(path); const char* sep = strrchr(path_str, '/') + 1; const size_t len = (size_t)(sep - path_str); @@ -269,10 +269,10 @@ grpc_method_config* grpc_method_config_table_get_method_config( buf[len + 1] = '\0'; grpc_mdstr* wildcard_path = grpc_mdstr_from_string(buf); gpr_free(buf); - method_config = grpc_mdstr_hash_table_get(table, wildcard_path); + value = grpc_mdstr_hash_table_get(table, wildcard_path); GRPC_MDSTR_UNREF(wildcard_path); } - return method_config; + return value; } static void* copy_arg(void* p) { return grpc_method_config_table_ref(p); } @@ -294,3 +294,47 @@ grpc_arg grpc_method_config_table_create_channel_arg( arg.value.pointer.vtable = &arg_vtable; return arg; } + +// State used by convert_entry() below. +typedef struct conversion_state { + void* (*convert_value)(const grpc_method_config* method_config); + const grpc_mdstr_hash_table_vtable* vtable; + size_t num_entries; + grpc_mdstr_hash_table_entry* entries; +} conversion_state; + +// A function to be passed to grpc_mdstr_hash_table_iterate() to create +// a copy of the entries. +static void convert_entry(const grpc_mdstr_hash_table_entry* entry, + void* user_data) { + conversion_state* state = user_data; + state->entries[state->num_entries].key = GRPC_MDSTR_REF(entry->key); + state->entries[state->num_entries].value = state->convert_value(entry->value); + state->entries[state->num_entries].vtable = state->vtable; + ++state->num_entries; +} + +grpc_mdstr_hash_table* grpc_method_config_table_convert( + const grpc_method_config_table* table, + void* (*convert_value)(const grpc_method_config* method_config), + const grpc_mdstr_hash_table_vtable* vtable) { + // Create an array of the entries in the table with converted values. + conversion_state state; + state.convert_value = convert_value; + state.vtable = vtable; + state.num_entries = 0; + state.entries = gpr_malloc(sizeof(grpc_mdstr_hash_table_entry) * + grpc_mdstr_hash_table_num_entries(table)); + grpc_mdstr_hash_table_iterate(table, convert_entry, &state); + // Create a new table based on the array we just constructed. + grpc_mdstr_hash_table* new_table = + grpc_mdstr_hash_table_create(state.num_entries, state.entries); + // Clean up the array. + for (size_t i = 0; i < state.num_entries; ++i) { + GRPC_MDSTR_UNREF(state.entries[i].key); + vtable->destroy_value(state.entries[i].value); + } + gpr_free(state.entries); + // Return the new table. + return new_table; +} diff --git a/src/core/ext/client_config/method_config.h b/src/core/ext/client_channel/method_config.h similarity index 78% rename from src/core/ext/client_config/method_config.h rename to src/core/ext/client_channel/method_config.h index 1302ac425d5..4cbeee56257 100644 --- a/src/core/ext/client_config/method_config.h +++ b/src/core/ext/client_channel/method_config.h @@ -29,8 +29,8 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_METHOD_CONFIG_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_METHOD_CONFIG_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_METHOD_CONFIG_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_METHOD_CONFIG_H #include @@ -106,11 +106,31 @@ int grpc_method_config_table_cmp(const grpc_method_config_table* table1, /// the form "/service/method". /// Returns NULL if the method has no config. /// Caller does NOT own a reference to the result. -grpc_method_config* grpc_method_config_table_get_method_config( - const grpc_method_config_table* table, const grpc_mdstr* path); +/// +/// Note: This returns a void* instead of a grpc_method_config* so that +/// it can also be used for tables constructed via +/// grpc_method_config_table_convert(). +void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, + const grpc_mdstr* path); /// Returns a channel arg containing \a table. grpc_arg grpc_method_config_table_create_channel_arg( grpc_method_config_table* table); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_METHOD_CONFIG_H */ +/// Generates a new table from \a table whose values are converted to a +/// new form via the \a convert_value function. The new table will use +/// \a vtable for its values. +/// +/// This is generally used to convert the table's value type from +/// grpc_method_config to a simple struct containing only the parameters +/// relevant to a particular filter, thus avoiding the need for a hash +/// table lookup on the fast path. In that scenario, \a convert_value +/// will return a new instance of the struct containing the values from +/// the grpc_method_config, and \a vtable provides the methods for +/// operating on the struct type. +grpc_mdstr_hash_table* grpc_method_config_table_convert( + const grpc_method_config_table* table, + void* (*convert_value)(const grpc_method_config* method_config), + const grpc_mdstr_hash_table_vtable* vtable); + +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_METHOD_CONFIG_H */ diff --git a/src/core/ext/client_config/parse_address.c b/src/core/ext/client_channel/parse_address.c similarity index 98% rename from src/core/ext/client_config/parse_address.c rename to src/core/ext/client_channel/parse_address.c index 8b4abe24a61..31ca44299b5 100644 --- a/src/core/ext/client_config/parse_address.c +++ b/src/core/ext/client_channel/parse_address.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/parse_address.h" +#include "src/core/ext/client_channel/parse_address.h" #include #include diff --git a/src/core/ext/client_config/parse_address.h b/src/core/ext/client_channel/parse_address.h similarity index 91% rename from src/core/ext/client_config/parse_address.h rename to src/core/ext/client_channel/parse_address.h index 74c86f4d938..3aa6c41546c 100644 --- a/src/core/ext/client_config/parse_address.h +++ b/src/core/ext/client_channel/parse_address.h @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_PARSE_ADDRESS_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_PARSE_ADDRESS_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_PARSE_ADDRESS_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_PARSE_ADDRESS_H #include -#include "src/core/ext/client_config/uri_parser.h" +#include "src/core/ext/client_channel/uri_parser.h" #include "src/core/lib/iomgr/sockaddr.h" #ifdef GPR_HAVE_UNIX_SOCKET @@ -53,4 +53,4 @@ int parse_ipv4(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); * host:port pair. Returns true upon success. */ int parse_ipv6(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_PARSE_ADDRESS_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_PARSE_ADDRESS_H */ diff --git a/src/core/ext/client_config/resolver.c b/src/core/ext/client_channel/resolver.c similarity index 98% rename from src/core/ext/client_config/resolver.c rename to src/core/ext/client_channel/resolver.c index 7534ea62af5..0c26d95f2f1 100644 --- a/src/core/ext/client_config/resolver.c +++ b/src/core/ext/client_channel/resolver.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/resolver.h" +#include "src/core/ext/client_channel/resolver.h" void grpc_resolver_init(grpc_resolver *resolver, const grpc_resolver_vtable *vtable) { diff --git a/src/core/ext/client_config/resolver.h b/src/core/ext/client_channel/resolver.h similarity index 93% rename from src/core/ext/client_config/resolver.h rename to src/core/ext/client_channel/resolver.h index 88ac262d513..0951613175a 100644 --- a/src/core/ext/client_config/resolver.h +++ b/src/core/ext/client_channel/resolver.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_H -#include "src/core/ext/client_config/resolver_result.h" -#include "src/core/ext/client_config/subchannel.h" +#include "src/core/ext/client_channel/resolver_result.h" +#include "src/core/ext/client_channel/subchannel.h" #include "src/core/lib/iomgr/iomgr.h" typedef struct grpc_resolver grpc_resolver; @@ -91,4 +91,4 @@ void grpc_resolver_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, grpc_resolver_result **result, grpc_closure *on_complete); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_H */ diff --git a/src/core/ext/client_config/resolver_factory.c b/src/core/ext/client_channel/resolver_factory.c similarity index 97% rename from src/core/ext/client_config/resolver_factory.c rename to src/core/ext/client_channel/resolver_factory.c index 67832dcf59e..7c3d644257c 100644 --- a/src/core/ext/client_config/resolver_factory.c +++ b/src/core/ext/client_channel/resolver_factory.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/resolver_factory.h" +#include "src/core/ext/client_channel/resolver_factory.h" void grpc_resolver_factory_ref(grpc_resolver_factory* factory) { factory->vtable->ref(factory); diff --git a/src/core/ext/client_config/resolver_factory.h b/src/core/ext/client_channel/resolver_factory.h similarity index 89% rename from src/core/ext/client_config/resolver_factory.h rename to src/core/ext/client_channel/resolver_factory.h index 9ec5b9a70e7..1ad018ce1fe 100644 --- a/src/core/ext/client_config/resolver_factory.h +++ b/src/core/ext/client_channel/resolver_factory.h @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_FACTORY_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_FACTORY_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_FACTORY_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_FACTORY_H -#include "src/core/ext/client_config/client_channel_factory.h" -#include "src/core/ext/client_config/resolver.h" -#include "src/core/ext/client_config/uri_parser.h" +#include "src/core/ext/client_channel/client_channel_factory.h" +#include "src/core/ext/client_channel/resolver.h" +#include "src/core/ext/client_channel/uri_parser.h" typedef struct grpc_resolver_factory grpc_resolver_factory; typedef struct grpc_resolver_factory_vtable grpc_resolver_factory_vtable; @@ -76,4 +76,4 @@ grpc_resolver *grpc_resolver_factory_create_resolver( char *grpc_resolver_factory_get_default_authority( grpc_resolver_factory *factory, grpc_uri *uri); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_FACTORY_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_FACTORY_H */ diff --git a/src/core/ext/client_config/resolver_registry.c b/src/core/ext/client_channel/resolver_registry.c similarity index 97% rename from src/core/ext/client_config/resolver_registry.c rename to src/core/ext/client_channel/resolver_registry.c index bd5c683878d..ee433298746 100644 --- a/src/core/ext/client_config/resolver_registry.c +++ b/src/core/ext/client_channel/resolver_registry.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/resolver_registry.h" +#include "src/core/ext/client_channel/resolver_registry.h" #include @@ -55,7 +55,7 @@ void grpc_resolver_registry_shutdown(void) { grpc_resolver_factory_unref(g_all_of_the_resolvers[i]); } // FIXME(ctiller): this should live in grpc_resolver_registry_init, - // however that would have the client_config plugin call this AFTER we start + // however that would have the client_channel plugin call this AFTER we start // registering resolvers from third party plugins, and so they'd never show // up. // We likely need some kind of dependency system for plugins.... what form diff --git a/src/core/ext/client_config/resolver_registry.h b/src/core/ext/client_channel/resolver_registry.h similarity index 92% rename from src/core/ext/client_config/resolver_registry.h rename to src/core/ext/client_channel/resolver_registry.h index 4c6279b9789..0a39d4a1878 100644 --- a/src/core/ext/client_config/resolver_registry.h +++ b/src/core/ext/client_channel/resolver_registry.h @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_REGISTRY_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_REGISTRY_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_REGISTRY_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_REGISTRY_H -#include "src/core/ext/client_config/resolver_factory.h" +#include "src/core/ext/client_channel/resolver_factory.h" void grpc_resolver_registry_init(); void grpc_resolver_registry_shutdown(void); @@ -68,4 +68,4 @@ grpc_resolver_factory *grpc_resolver_factory_lookup(const char *name); representing the default authority to pass from a client. */ char *grpc_get_default_authority(const char *target); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_REGISTRY_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_REGISTRY_H */ diff --git a/src/core/ext/client_config/resolver_result.c b/src/core/ext/client_channel/resolver_result.c similarity index 98% rename from src/core/ext/client_config/resolver_result.c rename to src/core/ext/client_channel/resolver_result.c index 63480d152b7..ab1c215955b 100644 --- a/src/core/ext/client_config/resolver_result.c +++ b/src/core/ext/client_channel/resolver_result.c @@ -29,7 +29,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#include "src/core/ext/client_config/resolver_result.h" +#include "src/core/ext/client_channel/resolver_result.h" #include diff --git a/src/core/ext/client_config/resolver_result.h b/src/core/ext/client_channel/resolver_result.h similarity index 91% rename from src/core/ext/client_config/resolver_result.h rename to src/core/ext/client_channel/resolver_result.h index a7ea7c0f4b8..5421fd94705 100644 --- a/src/core/ext/client_config/resolver_result.h +++ b/src/core/ext/client_channel/resolver_result.h @@ -29,11 +29,10 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_RESULT_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_RESULT_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_RESULT_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_RESULT_H -#include "src/core/ext/client_config/lb_policy_factory.h" -#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/ext/client_channel/lb_policy_factory.h" // TODO(roth, ctiller): In the long term, we are considering replacing // the resolver_result data structure with grpc_channel_args. The idea is @@ -66,4 +65,4 @@ const char* grpc_resolver_result_get_lb_policy_name( grpc_channel_args* grpc_resolver_result_get_lb_policy_args( grpc_resolver_result* result); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_RESULT_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_RESULT_H */ diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_channel/subchannel.c similarity index 99% rename from src/core/ext/client_config/subchannel.c rename to src/core/ext/client_channel/subchannel.c index c531b3b1a80..672e5c3a913 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_channel/subchannel.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/subchannel.h" +#include "src/core/ext/client_channel/subchannel.h" #include #include @@ -39,9 +39,9 @@ #include #include -#include "src/core/ext/client_config/client_channel.h" -#include "src/core/ext/client_config/initial_connect_string.h" -#include "src/core/ext/client_config/subchannel_index.h" +#include "src/core/ext/client_channel/client_channel.h" +#include "src/core/ext/client_channel/initial_connect_string.h" +#include "src/core/ext/client_channel/subchannel_index.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/iomgr/timer.h" diff --git a/src/core/ext/client_config/subchannel.h b/src/core/ext/client_channel/subchannel.h similarity index 97% rename from src/core/ext/client_config/subchannel.h rename to src/core/ext/client_channel/subchannel.h index f8de26dfd51..c4a7da0c24a 100644 --- a/src/core/ext/client_config/subchannel.h +++ b/src/core/ext/client_channel/subchannel.h @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_SUBCHANNEL_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_SUBCHANNEL_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_SUBCHANNEL_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_SUBCHANNEL_H -#include "src/core/ext/client_config/connector.h" +#include "src/core/ext/client_channel/connector.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/transport/connectivity_state.h" @@ -176,4 +176,4 @@ grpc_subchannel *grpc_subchannel_create(grpc_exec_ctx *exec_ctx, grpc_connector *connector, grpc_subchannel_args *args); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_SUBCHANNEL_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_SUBCHANNEL_H */ diff --git a/src/core/ext/client_config/subchannel_index.c b/src/core/ext/client_channel/subchannel_index.c similarity index 99% rename from src/core/ext/client_config/subchannel_index.c rename to src/core/ext/client_channel/subchannel_index.c index 673f85b8cbc..bf22975fba4 100644 --- a/src/core/ext/client_config/subchannel_index.c +++ b/src/core/ext/client_channel/subchannel_index.c @@ -31,7 +31,7 @@ // // -#include "src/core/ext/client_config/subchannel_index.h" +#include "src/core/ext/client_channel/subchannel_index.h" #include #include diff --git a/src/core/ext/client_config/subchannel_index.h b/src/core/ext/client_channel/subchannel_index.h similarity index 92% rename from src/core/ext/client_config/subchannel_index.h rename to src/core/ext/client_channel/subchannel_index.h index 6b8d063855e..5b3af6b0546 100644 --- a/src/core/ext/client_config/subchannel_index.h +++ b/src/core/ext/client_channel/subchannel_index.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_SUBCHANNEL_INDEX_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_SUBCHANNEL_INDEX_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_SUBCHANNEL_INDEX_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_SUBCHANNEL_INDEX_H -#include "src/core/ext/client_config/connector.h" -#include "src/core/ext/client_config/subchannel.h" +#include "src/core/ext/client_channel/connector.h" +#include "src/core/ext/client_channel/subchannel.h" /** \file Provides an index of active subchannels so that they can be shared amongst channels */ @@ -74,4 +74,4 @@ void grpc_subchannel_index_init(void); /** Shutdown the subchannel index (global) */ void grpc_subchannel_index_shutdown(void); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_SUBCHANNEL_INDEX_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_SUBCHANNEL_INDEX_H */ diff --git a/src/core/ext/client_config/uri_parser.c b/src/core/ext/client_channel/uri_parser.c similarity index 99% rename from src/core/ext/client_config/uri_parser.c rename to src/core/ext/client_channel/uri_parser.c index 3ca1a58e692..bcb6a1dee43 100644 --- a/src/core/ext/client_config/uri_parser.c +++ b/src/core/ext/client_channel/uri_parser.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/uri_parser.h" +#include "src/core/ext/client_channel/uri_parser.h" #include diff --git a/src/core/ext/client_config/uri_parser.h b/src/core/ext/client_channel/uri_parser.h similarity index 93% rename from src/core/ext/client_config/uri_parser.h rename to src/core/ext/client_channel/uri_parser.h index 875a7cb07ca..5fe0e8f35e3 100644 --- a/src/core/ext/client_config/uri_parser.h +++ b/src/core/ext/client_channel/uri_parser.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_URI_PARSER_H -#define GRPC_CORE_EXT_CLIENT_CONFIG_URI_PARSER_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_URI_PARSER_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_URI_PARSER_H #include @@ -60,4 +60,4 @@ const char *grpc_uri_get_query_arg(const grpc_uri *uri, const char *key); /** destroy a uri */ void grpc_uri_destroy(grpc_uri *uri); -#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_URI_PARSER_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_URI_PARSER_H */ diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index b24b522449d..412090158ae 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -107,10 +107,10 @@ #include #include -#include "src/core/ext/client_config/client_channel_factory.h" -#include "src/core/ext/client_config/lb_policy_factory.h" -#include "src/core/ext/client_config/lb_policy_registry.h" -#include "src/core/ext/client_config/parse_address.h" +#include "src/core/ext/client_channel/client_channel_factory.h" +#include "src/core/ext/client_channel/lb_policy_factory.h" +#include "src/core/ext/client_channel/lb_policy_registry.h" +#include "src/core/ext/client_channel/parse_address.h" #include "src/core/ext/lb_policy/grpclb/grpclb.h" #include "src/core/ext/lb_policy/grpclb/load_balancer_api.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/ext/lb_policy/grpclb/grpclb.h b/src/core/ext/lb_policy/grpclb/grpclb.h index 83552b4fa02..ff23f3a5458 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.h +++ b/src/core/ext/lb_policy/grpclb/grpclb.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_LB_POLICY_GRPCLB_GRPCLB_H #define GRPC_CORE_EXT_LB_POLICY_GRPCLB_GRPCLB_H -#include "src/core/ext/client_config/lb_policy_factory.h" +#include "src/core/ext/client_channel/lb_policy_factory.h" /** Returns a load balancing factory for the glb policy, which tries to connect * to a load balancing server to decide the next successfully connected diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.h b/src/core/ext/lb_policy/grpclb/load_balancer_api.h index c1e73d08eff..079a64a3f32 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.h +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.h @@ -36,7 +36,7 @@ #include -#include "src/core/ext/client_config/lb_policy_factory.h" +#include "src/core/ext/client_channel/lb_policy_factory.h" #include "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h" #ifdef __cplusplus diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index da20b9281ba..270fe3fe702 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -34,7 +34,7 @@ #include #include -#include "src/core/ext/client_config/lb_policy_registry.h" +#include "src/core/ext/client_channel/lb_policy_registry.h" #include "src/core/lib/transport/connectivity_state.h" typedef struct pending_pick { diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index b8f4f67aeba..b32f6be99e1 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -63,7 +63,7 @@ #include -#include "src/core/ext/client_config/lb_policy_registry.h" +#include "src/core/ext/client_channel/lb_policy_registry.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/static_metadata.h" diff --git a/src/core/ext/load_reporting/load_reporting.h b/src/core/ext/load_reporting/load_reporting.h index e13097654d5..a157844734e 100644 --- a/src/core/ext/load_reporting/load_reporting.h +++ b/src/core/ext/load_reporting/load_reporting.h @@ -51,7 +51,7 @@ * The value corresponding to this key is an opaque binary blob reported by the * backend as part of its trailing metadata containing cost information for the * call. */ -#define GRPC_LB_COST_MD_KEY "lb-cost" +#define GRPC_LB_COST_MD_KEY "lb-cost-bin" /** Identifiers for the invocation point of the users LR callback */ typedef enum grpc_load_reporting_source { diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index 22bf36367f6..eeae2400fbc 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -193,7 +193,7 @@ static grpc_mdelem *lr_trailing_md_filter(void *user_data, grpc_mdelem *md) { grpc_call_element *elem = user_data; call_data *calld = elem->call_data; - if (md->key == GRPC_MDSTR_LB_COST) { + if (md->key == GRPC_MDSTR_LB_COST_BIN) { calld->trailing_md_string = gpr_strdup(grpc_mdstr_as_c_string(md->value)); return NULL; } diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index fa33ffd7bd5..b4ceee340e9 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -37,9 +37,9 @@ #include #include -#include "src/core/ext/client_config/http_connect_handshaker.h" -#include "src/core/ext/client_config/lb_policy_registry.h" -#include "src/core/ext/client_config/resolver_registry.h" +#include "src/core/ext/client_channel/http_connect_handshaker.h" +#include "src/core/ext/client_channel/lb_policy_registry.h" +#include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/support/backoff.h" diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 28dd2569e81..9924fc6fec2 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -41,9 +41,8 @@ #include #include -#include "src/core/ext/client_config/parse_address.h" -#include "src/core/ext/client_config/resolver_registry.h" -#include "src/core/lib/channel/channel_args.h" +#include "src/core/ext/client_channel/parse_address.h" +#include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" #include "src/core/lib/support/string.h" diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index f2ba62c218c..41432b54a93 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -40,9 +40,9 @@ #include #include -#include "src/core/ext/client_config/client_channel.h" -#include "src/core/ext/client_config/http_connect_handshaker.h" -#include "src/core/ext/client_config/resolver_registry.h" +#include "src/core/ext/client_channel/client_channel.h" +#include "src/core/ext/client_channel/http_connect_handshaker.h" +#include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/compress_filter.h" diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 94516f7f6f0..2e6b3f2fc88 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -40,9 +40,9 @@ #include #include -#include "src/core/ext/client_config/client_channel.h" -#include "src/core/ext/client_config/http_connect_handshaker.h" -#include "src/core/ext/client_config/resolver_registry.h" +#include "src/core/ext/client_channel/client_channel.h" +#include "src/core/ext/client_channel/http_connect_handshaker.h" +#include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/handshaker.h" @@ -291,8 +291,6 @@ static grpc_channel *client_channel_factory_create_channel( channel = NULL; } - GRPC_SECURITY_CONNECTOR_UNREF(&f->security_connector->base, - "client_channel_factory_create_channel"); return channel; } @@ -361,6 +359,9 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, grpc_channel *channel = client_channel_factory_create_channel( &exec_ctx, &f->base, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, NULL); + GRPC_SECURITY_CONNECTOR_UNREF(&f->security_connector->base, + "client_channel_factory_create_channel"); + grpc_client_channel_factory_unref(&exec_ctx, &f->base); grpc_exec_ctx_finish(&exec_ctx); diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 0f2bf97824b..f2221fb0fbe 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -42,6 +42,8 @@ #define EXPECTED_CONTENT_TYPE "application/grpc" #define EXPECTED_CONTENT_TYPE_LENGTH sizeof(EXPECTED_CONTENT_TYPE) - 1 +extern int grpc_http_trace; + typedef struct call_data { uint8_t seen_path; uint8_t seen_method; @@ -209,6 +211,11 @@ static void hs_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, err, GRPC_ERROR_CREATE("Missing te: trailers header")); } /* Error this call out */ + if (grpc_http_trace) { + const char *error_str = grpc_error_string(err); + gpr_log(GPR_ERROR, "Invalid http2 headers: %s", error_str); + grpc_error_free_string(error_str); + } grpc_call_element_send_cancel(exec_ctx, elem); } } else { diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 1382f199453..b8b25460356 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -38,13 +38,51 @@ #include #include -#include "src/core/ext/client_config/method_config.h" +#include "src/core/ext/client_channel/method_config.h" #include "src/core/lib/channel/channel_args.h" #define DEFAULT_MAX_SEND_MESSAGE_LENGTH -1 // Unlimited. // The protobuf library will (by default) start warning at 100 megs. #define DEFAULT_MAX_RECV_MESSAGE_LENGTH (4 * 1024 * 1024) +typedef struct message_size_limits { + int max_send_size; + int max_recv_size; +} message_size_limits; + +static void* message_size_limits_copy(void* value) { + void* new_value = gpr_malloc(sizeof(message_size_limits)); + memcpy(new_value, value, sizeof(message_size_limits)); + return new_value; +} + +static int message_size_limits_cmp(void* value1, void* value2) { + const message_size_limits* v1 = value1; + const message_size_limits* v2 = value2; + if (v1->max_send_size > v2->max_send_size) return 1; + if (v1->max_send_size < v2->max_send_size) return -1; + if (v1->max_recv_size > v2->max_recv_size) return 1; + if (v1->max_recv_size < v2->max_recv_size) return -1; + return 0; +} + +static const grpc_mdstr_hash_table_vtable message_size_limits_vtable = { + gpr_free, message_size_limits_copy, message_size_limits_cmp}; + +static void* method_config_convert_value( + const grpc_method_config* method_config) { + message_size_limits* value = gpr_malloc(sizeof(message_size_limits)); + const int32_t* max_request_message_bytes = + grpc_method_config_get_max_request_message_bytes(method_config); + value->max_send_size = + max_request_message_bytes != NULL ? *max_request_message_bytes : -1; + const int32_t* max_response_message_bytes = + grpc_method_config_get_max_response_message_bytes(method_config); + value->max_recv_size = + max_response_message_bytes != NULL ? *max_response_message_bytes : -1; + return value; +} + typedef struct call_data { int max_send_size; int max_recv_size; @@ -61,8 +99,8 @@ typedef struct call_data { typedef struct channel_data { int max_send_size; int max_recv_size; - // Method config table. - grpc_method_config_table* method_config_table; + // Maps path names to message_size_limits structs. + grpc_mdstr_hash_table* method_limit_table; } channel_data; // Callback invoked when we receive a message. Here we check the max @@ -132,24 +170,19 @@ static grpc_error* init_call_elem(grpc_exec_ctx* exec_ctx, // size to the receive limit. calld->max_send_size = chand->max_send_size; calld->max_recv_size = chand->max_recv_size; - if (chand->method_config_table != NULL) { - grpc_method_config* method_config = - grpc_method_config_table_get_method_config(chand->method_config_table, - args->path); - if (method_config != NULL) { - const int32_t* max_request_message_bytes = - grpc_method_config_get_max_request_message_bytes(method_config); - if (max_request_message_bytes != NULL && - (*max_request_message_bytes < calld->max_send_size || + if (chand->method_limit_table != NULL) { + message_size_limits* limits = + grpc_method_config_table_get(chand->method_limit_table, args->path); + if (limits != NULL) { + if (limits->max_send_size >= 0 && + (limits->max_send_size < calld->max_send_size || calld->max_send_size < 0)) { - calld->max_send_size = *max_request_message_bytes; + calld->max_send_size = limits->max_send_size; } - const int32_t* max_response_message_bytes = - grpc_method_config_get_max_response_message_bytes(method_config); - if (max_response_message_bytes != NULL && - (*max_response_message_bytes < calld->max_recv_size || + if (limits->max_recv_size >= 0 && + (limits->max_recv_size < calld->max_recv_size || calld->max_recv_size < 0)) { - calld->max_recv_size = *max_response_message_bytes; + calld->max_recv_size = limits->max_recv_size; } } } @@ -191,8 +224,9 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx, grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); - chand->method_config_table = grpc_method_config_table_ref( - (grpc_method_config_table*)channel_arg->value.pointer.p); + chand->method_limit_table = grpc_method_config_table_convert( + (grpc_method_config_table*)channel_arg->value.pointer.p, + method_config_convert_value, &message_size_limits_vtable); } } @@ -200,7 +234,7 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx, static void destroy_channel_elem(grpc_exec_ctx* exec_ctx, grpc_channel_element* elem) { channel_data* chand = elem->channel_data; - grpc_method_config_table_unref(chand->method_config_table); + grpc_mdstr_hash_table_unref(chand->method_limit_table); } const grpc_channel_filter grpc_message_size_filter = { diff --git a/src/core/lib/transport/mdstr_hash_table.c b/src/core/lib/transport/mdstr_hash_table.c index 4be0536dd76..8e914c420b1 100644 --- a/src/core/lib/transport/mdstr_hash_table.c +++ b/src/core/lib/transport/mdstr_hash_table.c @@ -42,6 +42,7 @@ struct grpc_mdstr_hash_table { gpr_refcount refs; size_t num_entries; + size_t size; grpc_mdstr_hash_table_entry* entries; }; @@ -50,13 +51,12 @@ struct grpc_mdstr_hash_table { static size_t grpc_mdstr_hash_table_find_index( const grpc_mdstr_hash_table* table, const grpc_mdstr* key, bool find_empty) { - for (size_t i = 0; i < table->num_entries; ++i) { - const size_t idx = (key->hash + i * i) % table->num_entries; - if (table->entries[idx].key == NULL) - return find_empty ? idx : table->num_entries; + for (size_t i = 0; i < table->size; ++i) { + const size_t idx = (key->hash + i * i) % table->size; + if (table->entries[idx].key == NULL) return find_empty ? idx : table->size; if (table->entries[idx].key == key) return idx; } - return table->num_entries; // Not found. + return table->size; // Not found. } static void grpc_mdstr_hash_table_add( @@ -65,7 +65,7 @@ static void grpc_mdstr_hash_table_add( GPR_ASSERT(value != NULL); const size_t idx = grpc_mdstr_hash_table_find_index(table, key, true /* find_empty */); - GPR_ASSERT(idx != table->num_entries); // Table should never be full. + GPR_ASSERT(idx != table->size); // Table should never be full. grpc_mdstr_hash_table_entry* entry = &table->entries[idx]; entry->key = GRPC_MDSTR_REF(key); entry->value = vtable->copy_value(value); @@ -77,11 +77,11 @@ grpc_mdstr_hash_table* grpc_mdstr_hash_table_create( grpc_mdstr_hash_table* table = gpr_malloc(sizeof(*table)); memset(table, 0, sizeof(*table)); gpr_ref_init(&table->refs, 1); + table->num_entries = num_entries; // Quadratic probing gets best performance when the table is no more // than half full. - table->num_entries = num_entries * 2; - const size_t entry_size = - sizeof(grpc_mdstr_hash_table_entry) * table->num_entries; + table->size = num_entries * 2; + const size_t entry_size = sizeof(grpc_mdstr_hash_table_entry) * table->size; table->entries = gpr_malloc(entry_size); memset(table->entries, 0, entry_size); for (size_t i = 0; i < num_entries; ++i) { @@ -98,7 +98,7 @@ grpc_mdstr_hash_table* grpc_mdstr_hash_table_ref(grpc_mdstr_hash_table* table) { int grpc_mdstr_hash_table_unref(grpc_mdstr_hash_table* table) { if (table != NULL && gpr_unref(&table->refs)) { - for (size_t i = 0; i < table->num_entries; ++i) { + for (size_t i = 0; i < table->size; ++i) { grpc_mdstr_hash_table_entry* entry = &table->entries[i]; if (entry->key != NULL) { GRPC_MDSTR_UNREF(entry->key); @@ -112,11 +112,15 @@ int grpc_mdstr_hash_table_unref(grpc_mdstr_hash_table* table) { return 0; } +size_t grpc_mdstr_hash_table_num_entries(const grpc_mdstr_hash_table* table) { + return table->num_entries; +} + void* grpc_mdstr_hash_table_get(const grpc_mdstr_hash_table* table, const grpc_mdstr* key) { const size_t idx = grpc_mdstr_hash_table_find_index(table, key, false /* find_empty */); - if (idx == table->num_entries) return NULL; // Not found. + if (idx == table->size) return NULL; // Not found. return table->entries[idx].value; } @@ -140,3 +144,14 @@ int grpc_mdstr_hash_table_cmp(const grpc_mdstr_hash_table* table1, } return 0; } + +void grpc_mdstr_hash_table_iterate( + const grpc_mdstr_hash_table* table, + void (*func)(const grpc_mdstr_hash_table_entry* entry, void* user_data), + void* user_data) { + for (size_t i = 0; i < table->size; ++i) { + if (table->entries[i].key != NULL) { + func(&table->entries[i], user_data); + } + } +} diff --git a/src/core/lib/transport/mdstr_hash_table.h b/src/core/lib/transport/mdstr_hash_table.h index 52e5b023db0..bceb4df93de 100644 --- a/src/core/lib/transport/mdstr_hash_table.h +++ b/src/core/lib/transport/mdstr_hash_table.h @@ -70,6 +70,9 @@ grpc_mdstr_hash_table* grpc_mdstr_hash_table_ref(grpc_mdstr_hash_table* table); /** Returns 1 when \a table is destroyed. */ int grpc_mdstr_hash_table_unref(grpc_mdstr_hash_table* table); +/** Returns the number of entries in \a table. */ +size_t grpc_mdstr_hash_table_num_entries(const grpc_mdstr_hash_table* table); + /** Returns the value from \a table associated with \a key. Returns NULL if \a key is not found. */ void* grpc_mdstr_hash_table_get(const grpc_mdstr_hash_table* table, @@ -80,4 +83,10 @@ void* grpc_mdstr_hash_table_get(const grpc_mdstr_hash_table* table, int grpc_mdstr_hash_table_cmp(const grpc_mdstr_hash_table* table1, const grpc_mdstr_hash_table* table2); +/** Iterates over the entries in \a table, calling \a func for each entry. */ +void grpc_mdstr_hash_table_iterate( + const grpc_mdstr_hash_table* table, + void (*func)(const grpc_mdstr_hash_table_entry* entry, void* user_data), + void* user_data); + #endif /* GRPC_CORE_LIB_TRANSPORT_MDSTR_HASH_TABLE_H */ diff --git a/src/core/lib/transport/static_metadata.c b/src/core/lib/transport/static_metadata.c index f019ef156a7..8b22592b45d 100644 --- a/src/core/lib/transport/static_metadata.c +++ b/src/core/lib/transport/static_metadata.c @@ -126,7 +126,7 @@ const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = { "if-range", "if-unmodified-since", "last-modified", - "lb-cost", + "lb-cost-bin", "lb-token", "link", "location", diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h index e0a8196419e..28ad6f2961a 100644 --- a/src/core/lib/transport/static_metadata.h +++ b/src/core/lib/transport/static_metadata.h @@ -175,8 +175,8 @@ extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT]; #define GRPC_MDSTR_IF_UNMODIFIED_SINCE (&grpc_static_mdstr_table[62]) /* "last-modified" */ #define GRPC_MDSTR_LAST_MODIFIED (&grpc_static_mdstr_table[63]) -/* "lb-cost" */ -#define GRPC_MDSTR_LB_COST (&grpc_static_mdstr_table[64]) +/* "lb-cost-bin" */ +#define GRPC_MDSTR_LB_COST_BIN (&grpc_static_mdstr_table[64]) /* "lb-token" */ #define GRPC_MDSTR_LB_TOKEN (&grpc_static_mdstr_table[65]) /* "link" */ @@ -337,8 +337,8 @@ extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT]; #define GRPC_MDELEM_IF_UNMODIFIED_SINCE_EMPTY (&grpc_static_mdelem_table[44]) /* "last-modified": "" */ #define GRPC_MDELEM_LAST_MODIFIED_EMPTY (&grpc_static_mdelem_table[45]) -/* "lb-cost": "" */ -#define GRPC_MDELEM_LB_COST_EMPTY (&grpc_static_mdelem_table[46]) +/* "lb-cost-bin": "" */ +#define GRPC_MDELEM_LB_COST_BIN_EMPTY (&grpc_static_mdelem_table[46]) /* "lb-token": "" */ #define GRPC_MDELEM_LB_TOKEN_EMPTY (&grpc_static_mdelem_table[47]) /* "link": "" */ diff --git a/src/core/plugin_registry/grpc_cronet_plugin_registry.c b/src/core/plugin_registry/grpc_cronet_plugin_registry.c index d0b5f5c7027..d339ed327fd 100644 --- a/src/core/plugin_registry/grpc_cronet_plugin_registry.c +++ b/src/core/plugin_registry/grpc_cronet_plugin_registry.c @@ -35,12 +35,12 @@ extern void grpc_chttp2_plugin_init(void); extern void grpc_chttp2_plugin_shutdown(void); -extern void grpc_client_config_init(void); -extern void grpc_client_config_shutdown(void); +extern void grpc_client_channel_init(void); +extern void grpc_client_channel_shutdown(void); void grpc_register_built_in_plugins(void) { grpc_register_plugin(grpc_chttp2_plugin_init, grpc_chttp2_plugin_shutdown); - grpc_register_plugin(grpc_client_config_init, - grpc_client_config_shutdown); + grpc_register_plugin(grpc_client_channel_init, + grpc_client_channel_shutdown); } diff --git a/src/core/plugin_registry/grpc_plugin_registry.c b/src/core/plugin_registry/grpc_plugin_registry.c index 7a7a9ce477a..2efd9cd1ad7 100644 --- a/src/core/plugin_registry/grpc_plugin_registry.c +++ b/src/core/plugin_registry/grpc_plugin_registry.c @@ -35,8 +35,8 @@ extern void grpc_chttp2_plugin_init(void); extern void grpc_chttp2_plugin_shutdown(void); -extern void grpc_client_config_init(void); -extern void grpc_client_config_shutdown(void); +extern void grpc_client_channel_init(void); +extern void grpc_client_channel_shutdown(void); extern void grpc_lb_policy_grpclb_init(void); extern void grpc_lb_policy_grpclb_shutdown(void); extern void grpc_lb_policy_pick_first_init(void); @@ -55,8 +55,8 @@ extern void census_grpc_plugin_shutdown(void); void grpc_register_built_in_plugins(void) { grpc_register_plugin(grpc_chttp2_plugin_init, grpc_chttp2_plugin_shutdown); - grpc_register_plugin(grpc_client_config_init, - grpc_client_config_shutdown); + grpc_register_plugin(grpc_client_channel_init, + grpc_client_channel_shutdown); grpc_register_plugin(grpc_lb_policy_grpclb_init, grpc_lb_policy_grpclb_shutdown); grpc_register_plugin(grpc_lb_policy_pick_first_init, diff --git a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c index ad4ddf0ff48..8b18af699db 100644 --- a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c +++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c @@ -35,8 +35,8 @@ extern void grpc_chttp2_plugin_init(void); extern void grpc_chttp2_plugin_shutdown(void); -extern void grpc_client_config_init(void); -extern void grpc_client_config_shutdown(void); +extern void grpc_client_channel_init(void); +extern void grpc_client_channel_shutdown(void); extern void grpc_resolver_dns_native_init(void); extern void grpc_resolver_dns_native_shutdown(void); extern void grpc_resolver_sockaddr_init(void); @@ -55,8 +55,8 @@ extern void census_grpc_plugin_shutdown(void); void grpc_register_built_in_plugins(void) { grpc_register_plugin(grpc_chttp2_plugin_init, grpc_chttp2_plugin_shutdown); - grpc_register_plugin(grpc_client_config_init, - grpc_client_config_shutdown); + grpc_register_plugin(grpc_client_channel_init, + grpc_client_channel_shutdown); grpc_register_plugin(grpc_resolver_dns_native_init, grpc_resolver_dns_native_shutdown); grpc_register_plugin(grpc_resolver_sockaddr_init, diff --git a/src/csharp/Grpc.Auth/GoogleAuthInterceptors.cs b/src/csharp/Grpc.Auth/GoogleAuthInterceptors.cs index 96d6ee87ae4..722b51f470c 100644 --- a/src/csharp/Grpc.Auth/GoogleAuthInterceptors.cs +++ b/src/csharp/Grpc.Auth/GoogleAuthInterceptors.cs @@ -33,6 +33,7 @@ using System; using System.Threading; +using System.Threading.Tasks; using Google.Apis.Auth.OAuth2; using Grpc.Core; @@ -72,9 +73,10 @@ namespace Grpc.Auth public static AsyncAuthInterceptor FromAccessToken(string accessToken) { GrpcPreconditions.CheckNotNull(accessToken); - return new AsyncAuthInterceptor(async (context, metadata) => + return new AsyncAuthInterceptor((context, metadata) => { metadata.Add(CreateBearerTokenHeader(accessToken)); + return Task.FromResult(null); }); } diff --git a/src/csharp/Grpc.Core/DefaultCallInvoker.cs b/src/csharp/Grpc.Core/DefaultCallInvoker.cs index 1a99e41153b..b15aaefcd6a 100644 --- a/src/csharp/Grpc.Core/DefaultCallInvoker.cs +++ b/src/csharp/Grpc.Core/DefaultCallInvoker.cs @@ -102,6 +102,7 @@ namespace Grpc.Core return Calls.AsyncDuplexStreamingCall(call); } + /// Creates call invocation details for given method. protected virtual CallInvocationDetails CreateCall(Method method, string host, CallOptions options) where TRequest : class where TResponse : class diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj index 622813fb381..e75dc9faf1e 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.csproj +++ b/src/csharp/Grpc.Core/Grpc.Core.csproj @@ -138,6 +138,7 @@ + diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index 3ed2df203de..c57c904eb9d 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -59,7 +59,6 @@ namespace Grpc.Core static ILogger logger = new NullLogger(); - readonly object myLock = new object(); readonly GrpcThreadPool threadPool; readonly DebugStats debugStats = new DebugStats(); readonly AtomicCounter cqPickerCounter = new AtomicCounter(); diff --git a/src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs b/src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs index c28a6f64d39..26449ee5393 100644 --- a/src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs @@ -93,21 +93,6 @@ namespace Grpc.Core.Internal return data; } - // Gets data of server_rpc_new completion. - public ServerRpcNew GetServerRpcNew(Server server) - { - var call = Native.grpcsharp_batch_context_server_rpc_new_call(this); - - var method = Marshal.PtrToStringAnsi(Native.grpcsharp_batch_context_server_rpc_new_method(this)); - var host = Marshal.PtrToStringAnsi(Native.grpcsharp_batch_context_server_rpc_new_host(this)); - var deadline = Native.grpcsharp_batch_context_server_rpc_new_deadline(this); - - IntPtr metadataArrayPtr = Native.grpcsharp_batch_context_server_rpc_new_request_metadata(this); - var metadata = MetadataArraySafeHandle.ReadMetadataFromPtrUnsafe(metadataArrayPtr); - - return new ServerRpcNew(server, call, method, host, deadline, metadata); - } - // Gets data of receive_close_on_server completion. public bool GetReceivedCloseOnServerCancelled() { diff --git a/src/csharp/Grpc.Core/Internal/CompletionRegistry.cs b/src/csharp/Grpc.Core/Internal/CompletionRegistry.cs index 628844f2422..7e2f0e9c6c9 100644 --- a/src/csharp/Grpc.Core/Internal/CompletionRegistry.cs +++ b/src/csharp/Grpc.Core/Internal/CompletionRegistry.cs @@ -44,6 +44,8 @@ namespace Grpc.Core.Internal internal delegate void BatchCompletionDelegate(bool success, BatchContextSafeHandle ctx); + internal delegate void RequestCallCompletionDelegate(bool success, RequestCallContextSafeHandle ctx); + internal class CompletionRegistry { static readonly ILogger Logger = GrpcEnvironment.Logger.ForType(); @@ -68,6 +70,12 @@ namespace Grpc.Core.Internal Register(ctx.Handle, opCallback); } + public void RegisterRequestCallCompletion(RequestCallContextSafeHandle ctx, RequestCallCompletionDelegate callback) + { + OpCompletionDelegate opCallback = ((success) => HandleRequestCallCompletion(success, ctx, callback)); + Register(ctx.Handle, opCallback); + } + public OpCompletionDelegate Extract(IntPtr key) { OpCompletionDelegate value; @@ -84,7 +92,26 @@ namespace Grpc.Core.Internal } catch (Exception e) { - Logger.Error(e, "Exception occured while invoking completion delegate."); + Logger.Error(e, "Exception occured while invoking batch completion delegate."); + } + finally + { + if (ctx != null) + { + ctx.Dispose(); + } + } + } + + private static void HandleRequestCallCompletion(bool success, RequestCallContextSafeHandle ctx, RequestCallCompletionDelegate callback) + { + try + { + callback(success, ctx); + } + catch (Exception e) + { + Logger.Error(e, "Exception occured while invoking request call completion delegate."); } finally { diff --git a/src/csharp/Grpc.Core/Internal/InterceptingCallInvoker.cs b/src/csharp/Grpc.Core/Internal/InterceptingCallInvoker.cs index ef48dc71212..0c63e2092a5 100644 --- a/src/csharp/Grpc.Core/Internal/InterceptingCallInvoker.cs +++ b/src/csharp/Grpc.Core/Internal/InterceptingCallInvoker.cs @@ -48,7 +48,7 @@ namespace Grpc.Core.Internal readonly Func callOptionsInterceptor; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// public InterceptingCallInvoker(CallInvoker callInvoker, Func hostInterceptor = null, diff --git a/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs b/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs index 26af6311d52..b3714481eb2 100644 --- a/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs +++ b/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs @@ -78,7 +78,10 @@ namespace Grpc.Core.Internal { var context = new AuthInterceptorContext(Marshal.PtrToStringAnsi(serviceUrlPtr), Marshal.PtrToStringAnsi(methodNamePtr)); - StartGetMetadata(context, callbackPtr, userDataPtr); + // Don't await, we are in a native callback and need to return. + #pragma warning disable 4014 + GetMetadataAsync(context, callbackPtr, userDataPtr); + #pragma warning restore 4014 } catch (Exception e) { @@ -87,7 +90,7 @@ namespace Grpc.Core.Internal } } - private async Task StartGetMetadata(AuthInterceptorContext context, IntPtr callbackPtr, IntPtr userDataPtr) + private async Task GetMetadataAsync(AuthInterceptorContext context, IntPtr callbackPtr, IntPtr userDataPtr) { try { diff --git a/src/csharp/Grpc.Core/Internal/NativeMethods.cs b/src/csharp/Grpc.Core/Internal/NativeMethods.cs index f457c9dbf1e..40ba7e30cb0 100644 --- a/src/csharp/Grpc.Core/Internal/NativeMethods.cs +++ b/src/csharp/Grpc.Core/Internal/NativeMethods.cs @@ -64,14 +64,17 @@ namespace Grpc.Core.Internal public readonly Delegates.grpcsharp_batch_context_recv_status_on_client_status_delegate grpcsharp_batch_context_recv_status_on_client_status; public readonly Delegates.grpcsharp_batch_context_recv_status_on_client_details_delegate grpcsharp_batch_context_recv_status_on_client_details; public readonly Delegates.grpcsharp_batch_context_recv_status_on_client_trailing_metadata_delegate grpcsharp_batch_context_recv_status_on_client_trailing_metadata; - public readonly Delegates.grpcsharp_batch_context_server_rpc_new_call_delegate grpcsharp_batch_context_server_rpc_new_call; - public readonly Delegates.grpcsharp_batch_context_server_rpc_new_method_delegate grpcsharp_batch_context_server_rpc_new_method; - public readonly Delegates.grpcsharp_batch_context_server_rpc_new_host_delegate grpcsharp_batch_context_server_rpc_new_host; - public readonly Delegates.grpcsharp_batch_context_server_rpc_new_deadline_delegate grpcsharp_batch_context_server_rpc_new_deadline; - public readonly Delegates.grpcsharp_batch_context_server_rpc_new_request_metadata_delegate grpcsharp_batch_context_server_rpc_new_request_metadata; public readonly Delegates.grpcsharp_batch_context_recv_close_on_server_cancelled_delegate grpcsharp_batch_context_recv_close_on_server_cancelled; public readonly Delegates.grpcsharp_batch_context_destroy_delegate grpcsharp_batch_context_destroy; + public readonly Delegates.grpcsharp_request_call_context_create_delegate grpcsharp_request_call_context_create; + public readonly Delegates.grpcsharp_request_call_context_call_delegate grpcsharp_request_call_context_call; + public readonly Delegates.grpcsharp_request_call_context_method_delegate grpcsharp_request_call_context_method; + public readonly Delegates.grpcsharp_request_call_context_host_delegate grpcsharp_request_call_context_host; + public readonly Delegates.grpcsharp_request_call_context_deadline_delegate grpcsharp_request_call_context_deadline; + public readonly Delegates.grpcsharp_request_call_context_request_metadata_delegate grpcsharp_request_call_context_request_metadata; + public readonly Delegates.grpcsharp_request_call_context_destroy_delegate grpcsharp_request_call_context_destroy; + public readonly Delegates.grpcsharp_composite_call_credentials_create_delegate grpcsharp_composite_call_credentials_create; public readonly Delegates.grpcsharp_call_credentials_release_delegate grpcsharp_call_credentials_release; @@ -170,14 +173,17 @@ namespace Grpc.Core.Internal this.grpcsharp_batch_context_recv_status_on_client_status = GetMethodDelegate(library); this.grpcsharp_batch_context_recv_status_on_client_details = GetMethodDelegate(library); this.grpcsharp_batch_context_recv_status_on_client_trailing_metadata = GetMethodDelegate(library); - this.grpcsharp_batch_context_server_rpc_new_call = GetMethodDelegate(library); - this.grpcsharp_batch_context_server_rpc_new_method = GetMethodDelegate(library); - this.grpcsharp_batch_context_server_rpc_new_host = GetMethodDelegate(library); - this.grpcsharp_batch_context_server_rpc_new_deadline = GetMethodDelegate(library); - this.grpcsharp_batch_context_server_rpc_new_request_metadata = GetMethodDelegate(library); this.grpcsharp_batch_context_recv_close_on_server_cancelled = GetMethodDelegate(library); this.grpcsharp_batch_context_destroy = GetMethodDelegate(library); + this.grpcsharp_request_call_context_create = GetMethodDelegate(library); + this.grpcsharp_request_call_context_call = GetMethodDelegate(library); + this.grpcsharp_request_call_context_method = GetMethodDelegate(library); + this.grpcsharp_request_call_context_host = GetMethodDelegate(library); + this.grpcsharp_request_call_context_deadline = GetMethodDelegate(library); + this.grpcsharp_request_call_context_request_metadata = GetMethodDelegate(library); + this.grpcsharp_request_call_context_destroy = GetMethodDelegate(library); + this.grpcsharp_composite_call_credentials_create = GetMethodDelegate(library); this.grpcsharp_call_credentials_release = GetMethodDelegate(library); @@ -302,14 +308,17 @@ namespace Grpc.Core.Internal public delegate StatusCode grpcsharp_batch_context_recv_status_on_client_status_delegate(BatchContextSafeHandle ctx); public delegate IntPtr grpcsharp_batch_context_recv_status_on_client_details_delegate(BatchContextSafeHandle ctx); // returns const char* public delegate IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata_delegate(BatchContextSafeHandle ctx); - public delegate CallSafeHandle grpcsharp_batch_context_server_rpc_new_call_delegate(BatchContextSafeHandle ctx); - public delegate IntPtr grpcsharp_batch_context_server_rpc_new_method_delegate(BatchContextSafeHandle ctx); // returns const char* - public delegate IntPtr grpcsharp_batch_context_server_rpc_new_host_delegate(BatchContextSafeHandle ctx); // returns const char* - public delegate Timespec grpcsharp_batch_context_server_rpc_new_deadline_delegate(BatchContextSafeHandle ctx); - public delegate IntPtr grpcsharp_batch_context_server_rpc_new_request_metadata_delegate(BatchContextSafeHandle ctx); public delegate int grpcsharp_batch_context_recv_close_on_server_cancelled_delegate(BatchContextSafeHandle ctx); public delegate void grpcsharp_batch_context_destroy_delegate(IntPtr ctx); + public delegate RequestCallContextSafeHandle grpcsharp_request_call_context_create_delegate(); + public delegate CallSafeHandle grpcsharp_request_call_context_call_delegate(RequestCallContextSafeHandle ctx); + public delegate IntPtr grpcsharp_request_call_context_method_delegate(RequestCallContextSafeHandle ctx); // returns const char* + public delegate IntPtr grpcsharp_request_call_context_host_delegate(RequestCallContextSafeHandle ctx); // returns const char* + public delegate Timespec grpcsharp_request_call_context_deadline_delegate(RequestCallContextSafeHandle ctx); + public delegate IntPtr grpcsharp_request_call_context_request_metadata_delegate(RequestCallContextSafeHandle ctx); + public delegate void grpcsharp_request_call_context_destroy_delegate(IntPtr ctx); + public delegate CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create_delegate(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2); public delegate void grpcsharp_call_credentials_release_delegate(IntPtr credentials); @@ -393,7 +402,7 @@ namespace Grpc.Core.Internal public delegate int grpcsharp_server_add_insecure_http2_port_delegate(ServerSafeHandle server, string addr); public delegate int grpcsharp_server_add_secure_http2_port_delegate(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds); public delegate void grpcsharp_server_start_delegate(ServerSafeHandle server); - public delegate CallError grpcsharp_server_request_call_delegate(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); + public delegate CallError grpcsharp_server_request_call_delegate(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx); public delegate void grpcsharp_server_cancel_all_calls_delegate(ServerSafeHandle server); public delegate void grpcsharp_server_shutdown_and_notify_callback_delegate(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); public delegate void grpcsharp_server_destroy_delegate(IntPtr server); diff --git a/src/csharp/Grpc.Core/Internal/RequestCallContextSafeHandle.cs b/src/csharp/Grpc.Core/Internal/RequestCallContextSafeHandle.cs new file mode 100644 index 00000000000..ea7819d7b1f --- /dev/null +++ b/src/csharp/Grpc.Core/Internal/RequestCallContextSafeHandle.cs @@ -0,0 +1,85 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Runtime.InteropServices; +using Grpc.Core; + +namespace Grpc.Core.Internal +{ + /// + /// grpcsharp_request_call_context + /// + internal class RequestCallContextSafeHandle : SafeHandleZeroIsInvalid + { + static readonly NativeMethods Native = NativeMethods.Get(); + + private RequestCallContextSafeHandle() + { + } + + public static RequestCallContextSafeHandle Create() + { + return Native.grpcsharp_request_call_context_create(); + } + + public IntPtr Handle + { + get + { + return handle; + } + } + + // Gets data of server_rpc_new completion. + public ServerRpcNew GetServerRpcNew(Server server) + { + var call = Native.grpcsharp_request_call_context_call(this); + + var method = Marshal.PtrToStringAnsi(Native.grpcsharp_request_call_context_method(this)); + var host = Marshal.PtrToStringAnsi(Native.grpcsharp_request_call_context_host(this)); + var deadline = Native.grpcsharp_request_call_context_deadline(this); + + IntPtr metadataArrayPtr = Native.grpcsharp_request_call_context_request_metadata(this); + var metadata = MetadataArraySafeHandle.ReadMetadataFromPtrUnsafe(metadataArrayPtr); + + return new ServerRpcNew(server, call, method, host, deadline, metadata); + } + + protected override bool ReleaseHandle() + { + Native.grpcsharp_request_call_context_destroy(handle); + return true; + } + } +} diff --git a/src/csharp/Grpc.Core/Internal/ServerSafeHandle.cs b/src/csharp/Grpc.Core/Internal/ServerSafeHandle.cs index 014a8db78f2..7d7b8386162 100644 --- a/src/csharp/Grpc.Core/Internal/ServerSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/ServerSafeHandle.cs @@ -85,12 +85,12 @@ namespace Grpc.Core.Internal } } - public void RequestCall(BatchCompletionDelegate callback, CompletionQueueSafeHandle completionQueue) + public void RequestCall(RequestCallCompletionDelegate callback, CompletionQueueSafeHandle completionQueue) { using (completionQueue.NewScope()) { - var ctx = BatchContextSafeHandle.Create(); - completionQueue.CompletionRegistry.RegisterBatchCompletion(ctx, callback); + var ctx = RequestCallContextSafeHandle.Create(); + completionQueue.CompletionRegistry.RegisterRequestCallCompletion(ctx, callback); Native.grpcsharp_server_request_call(this, completionQueue, ctx).CheckOk(); } } diff --git a/src/csharp/Grpc.Core/Internal/UnmanagedLibrary.cs b/src/csharp/Grpc.Core/Internal/UnmanagedLibrary.cs index 31e14028494..1553bdd687e 100644 --- a/src/csharp/Grpc.Core/Internal/UnmanagedLibrary.cs +++ b/src/csharp/Grpc.Core/Internal/UnmanagedLibrary.cs @@ -134,7 +134,11 @@ namespace Grpc.Core.Internal { throw new MissingMethodException(string.Format("The native method \"{0}\" does not exist", methodName)); } - return Marshal.GetDelegateForFunctionPointer(ptr, typeof(T)) as T; +#if NETSTANDARD1_5 + return Marshal.GetDelegateForFunctionPointer(ptr); // non-generic version is obsolete +#else + return Marshal.GetDelegateForFunctionPointer(ptr, typeof(T)) as T; // generic version not available in .NET45 +#endif } /// diff --git a/src/csharp/Grpc.Core/Metadata.cs b/src/csharp/Grpc.Core/Metadata.cs index 915bec146c9..6fc715d6ee1 100644 --- a/src/csharp/Grpc.Core/Metadata.cs +++ b/src/csharp/Grpc.Core/Metadata.cs @@ -95,11 +95,18 @@ namespace Grpc.Core #region IList members + + /// + /// + /// public int IndexOf(Metadata.Entry item) { return entries.IndexOf(item); } + /// + /// + /// public void Insert(int index, Metadata.Entry item) { GrpcPreconditions.CheckNotNull(item); @@ -107,12 +114,18 @@ namespace Grpc.Core entries.Insert(index, item); } + /// + /// + /// public void RemoveAt(int index) { CheckWriteable(); entries.RemoveAt(index); } + /// + /// + /// public Metadata.Entry this[int index] { get @@ -128,6 +141,9 @@ namespace Grpc.Core } } + /// + /// + /// public void Add(Metadata.Entry item) { GrpcPreconditions.CheckNotNull(item); @@ -135,48 +151,75 @@ namespace Grpc.Core entries.Add(item); } + /// + /// + /// public void Add(string key, string value) { Add(new Entry(key, value)); } + /// + /// + /// public void Add(string key, byte[] valueBytes) { Add(new Entry(key, valueBytes)); } + /// + /// + /// public void Clear() { CheckWriteable(); entries.Clear(); } + /// + /// + /// public bool Contains(Metadata.Entry item) { return entries.Contains(item); } + /// + /// + /// public void CopyTo(Metadata.Entry[] array, int arrayIndex) { entries.CopyTo(array, arrayIndex); } + /// + /// + /// public int Count { get { return entries.Count; } } + /// + /// + /// public bool IsReadOnly { get { return readOnly; } } + /// + /// + /// public bool Remove(Metadata.Entry item) { CheckWriteable(); return entries.Remove(item); } + /// + /// + /// public IEnumerator GetEnumerator() { return entries.GetEnumerator(); @@ -221,7 +264,7 @@ namespace Grpc.Core public Entry(string key, byte[] valueBytes) { this.key = NormalizeKey(key); - GrpcPreconditions.CheckArgument(this.key.EndsWith(BinaryHeaderSuffix), + GrpcPreconditions.CheckArgument(HasBinaryHeaderSuffix(this.key), "Key for binary valued metadata entry needs to have suffix indicating binary value."); this.value = null; GrpcPreconditions.CheckNotNull(valueBytes, "valueBytes"); @@ -237,7 +280,7 @@ namespace Grpc.Core public Entry(string key, string value) { this.key = NormalizeKey(key); - GrpcPreconditions.CheckArgument(!this.key.EndsWith(BinaryHeaderSuffix), + GrpcPreconditions.CheckArgument(!HasBinaryHeaderSuffix(this.key), "Key for ASCII valued metadata entry cannot have suffix indicating binary value."); this.value = GrpcPreconditions.CheckNotNull(value, "value"); this.valueBytes = null; @@ -324,7 +367,7 @@ namespace Grpc.Core /// internal static Entry CreateUnsafe(string key, byte[] valueBytes) { - if (key.EndsWith(BinaryHeaderSuffix)) + if (HasBinaryHeaderSuffix(key)) { return new Entry(key, null, valueBytes); } @@ -338,6 +381,27 @@ namespace Grpc.Core "Metadata entry key not valid. Keys can only contain lowercase alphanumeric characters, underscores and hyphens."); return normalized; } + + /// + /// Returns true if the key has "-bin" binary header suffix. + /// + private static bool HasBinaryHeaderSuffix(string key) + { + // We don't use just string.EndsWith because its implementation is extremely slow + // on CoreCLR and we've seen significant differences in gRPC benchmarks caused by it. + // See https://github.com/dotnet/coreclr/issues/5612 + + int len = key.Length; + if (len >= 4 && + key[len - 4] == '-' && + key[len - 3] == 'b' && + key[len - 2] == 'i' && + key[len - 1] == 'n') + { + return true; + } + return false; + } } } } diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index dd4a405ed92..63c1d9cd00f 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -47,7 +47,7 @@ namespace Grpc.Core /// public class Server { - const int InitialAllowRpcTokenCountPerCq = 10; + const int DefaultRequestCallTokensPerCq = 2000; static readonly ILogger Logger = GrpcEnvironment.Logger.ForType(); readonly AtomicCounter activeCallCounter = new AtomicCounter(); @@ -66,7 +66,7 @@ namespace Grpc.Core bool startRequested; volatile bool shutdownRequested; - + int requestCallTokensPerCq = DefaultRequestCallTokensPerCq; /// /// Creates a new server. @@ -132,6 +132,27 @@ namespace Grpc.Core } } + /// + /// Experimental API. Might anytime change without prior notice. + /// Number or calls requested via grpc_server_request_call at any given time for each completion queue. + /// + public int RequestCallTokensPerCompletionQueue + { + get + { + return requestCallTokensPerCq; + } + set + { + lock (myLock) + { + GrpcPreconditions.CheckState(!startRequested); + GrpcPreconditions.CheckArgument(value > 0); + requestCallTokensPerCq = value; + } + } + } + /// /// Starts the server. /// @@ -145,9 +166,7 @@ namespace Grpc.Core handle.Start(); - // Starting with more than one AllowOneRpc tokens can significantly increase - // unary RPC throughput. - for (int i = 0; i < InitialAllowRpcTokenCountPerCq; i++) + for (int i = 0; i < requestCallTokensPerCq; i++) { foreach (var cq in environment.CompletionQueues) { @@ -310,7 +329,7 @@ namespace Grpc.Core /// /// Selects corresponding handler for given call and handles the call. /// - private async Task HandleCallAsync(ServerRpcNew newRpc, CompletionQueueSafeHandle cq) + private async Task HandleCallAsync(ServerRpcNew newRpc, CompletionQueueSafeHandle cq, Action continuation) { try { @@ -325,25 +344,40 @@ namespace Grpc.Core { Logger.Warning(e, "Exception while handling RPC."); } + finally + { + continuation(); + } } /// /// Handles the native callback. /// - private void HandleNewServerRpc(bool success, BatchContextSafeHandle ctx, CompletionQueueSafeHandle cq) + private void HandleNewServerRpc(bool success, RequestCallContextSafeHandle ctx, CompletionQueueSafeHandle cq) { - Task.Run(() => AllowOneRpc(cq)); - + bool nextRpcRequested = false; if (success) { - ServerRpcNew newRpc = ctx.GetServerRpcNew(this); + var newRpc = ctx.GetServerRpcNew(this); // after server shutdown, the callback returns with null call if (!newRpc.Call.IsInvalid) { - HandleCallAsync(newRpc, cq); // we don't need to await. + nextRpcRequested = true; + + // Start asynchronous handler for the call. + // Don't await, the continuations will run on gRPC thread pool once triggered + // by cq.Next(). + #pragma warning disable 4014 + HandleCallAsync(newRpc, cq, () => AllowOneRpc(cq)); + #pragma warning restore 4014 } } + + if (!nextRpcRequested) + { + AllowOneRpc(cq); + } } /// diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json index 1b900c8af32..fe200f8d440 100644 --- a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json +++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json @@ -67,5 +67,10 @@ } } } + }, + "runtimeOptions": { + "configProperties": { + "System.GC.Server": true + } } } diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index 7a46a55a5b8..5ba83b143ed 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -195,8 +195,11 @@ namespace Grpc.IntegrationTesting case "status_code_and_message": await RunStatusCodeAndMessageAsync(client); break; + case "unimplemented_service": + RunUnimplementedService(new UnimplementedService.UnimplementedServiceClient(channel)); + break; case "unimplemented_method": - RunUnimplementedMethod(new UnimplementedService.UnimplementedServiceClient(channel)); + RunUnimplementedMethod(client); break; case "client_compressed_unary": RunClientCompressedUnary(client); @@ -577,7 +580,16 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static void RunUnimplementedMethod(UnimplementedService.UnimplementedServiceClient client) + public static void RunUnimplementedService(UnimplementedService.UnimplementedServiceClient client) + { + Console.WriteLine("running unimplemented_service"); + var e = Assert.Throws(() => client.UnimplementedCall(new Empty())); + + Assert.AreEqual(StatusCode.Unimplemented, e.Status.StatusCode); + Console.WriteLine("Passed!"); + } + + public static void RunUnimplementedMethod(TestService.TestServiceClient client) { Console.WriteLine("running unimplemented_method"); var e = Assert.Throws(() => client.UnimplementedCall(new Empty())); diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs b/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs index f907f630dab..4960a53f92d 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs @@ -145,10 +145,16 @@ namespace Grpc.IntegrationTesting await InteropClient.RunStatusCodeAndMessageAsync(client); } + [Test] + public void UnimplementedService() + { + InteropClient.RunUnimplementedService(new UnimplementedService.UnimplementedServiceClient(channel)); + } + [Test] public void UnimplementedMethod() { - InteropClient.RunUnimplementedMethod(new UnimplementedService.UnimplementedServiceClient(channel)); + InteropClient.RunUnimplementedMethod(client); } } } diff --git a/src/csharp/Grpc.IntegrationTesting/QpsWorker.cs b/src/csharp/Grpc.IntegrationTesting/QpsWorker.cs index 865556c2426..62a7347d420 100644 --- a/src/csharp/Grpc.IntegrationTesting/QpsWorker.cs +++ b/src/csharp/Grpc.IntegrationTesting/QpsWorker.cs @@ -76,6 +76,11 @@ namespace Grpc.IntegrationTesting private async Task RunAsync() { + // (ThreadPoolSize == ProcessorCount) gives best throughput in benchmarks + // and doesn't seem to harm performance even when server and client + // are running on the same machine. + GrpcEnvironment.SetThreadPoolSize(Environment.ProcessorCount); + string host = "0.0.0.0"; int port = options.DriverPort; diff --git a/src/csharp/Grpc.IntegrationTesting/Test.cs b/src/csharp/Grpc.IntegrationTesting/Test.cs index 88c2b8a921f..d2fa9f8013a 100644 --- a/src/csharp/Grpc.IntegrationTesting/Test.cs +++ b/src/csharp/Grpc.IntegrationTesting/Test.cs @@ -24,25 +24,28 @@ namespace Grpc.Testing { string.Concat( "CiFzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL3Rlc3QucHJvdG8SDGdycGMudGVz", "dGluZxoic3JjL3Byb3RvL2dycGMvdGVzdGluZy9lbXB0eS5wcm90bxolc3Jj", - "L3Byb3RvL2dycGMvdGVzdGluZy9tZXNzYWdlcy5wcm90bzK7BAoLVGVzdFNl", + "L3Byb3RvL2dycGMvdGVzdGluZy9tZXNzYWdlcy5wcm90bzLLBQoLVGVzdFNl", "cnZpY2USNQoJRW1wdHlDYWxsEhMuZ3JwYy50ZXN0aW5nLkVtcHR5GhMuZ3Jw", "Yy50ZXN0aW5nLkVtcHR5EkYKCVVuYXJ5Q2FsbBIbLmdycGMudGVzdGluZy5T", - "aW1wbGVSZXF1ZXN0GhwuZ3JwYy50ZXN0aW5nLlNpbXBsZVJlc3BvbnNlEmwK", - "E1N0cmVhbWluZ091dHB1dENhbGwSKC5ncnBjLnRlc3RpbmcuU3RyZWFtaW5n", - "T3V0cHV0Q2FsbFJlcXVlc3QaKS5ncnBjLnRlc3RpbmcuU3RyZWFtaW5nT3V0", - "cHV0Q2FsbFJlc3BvbnNlMAESaQoSU3RyZWFtaW5nSW5wdXRDYWxsEicuZ3Jw", - "Yy50ZXN0aW5nLlN0cmVhbWluZ0lucHV0Q2FsbFJlcXVlc3QaKC5ncnBjLnRl", - "c3RpbmcuU3RyZWFtaW5nSW5wdXRDYWxsUmVzcG9uc2UoARJpCg5GdWxsRHVw", - "bGV4Q2FsbBIoLmdycGMudGVzdGluZy5TdHJlYW1pbmdPdXRwdXRDYWxsUmVx", - "dWVzdBopLmdycGMudGVzdGluZy5TdHJlYW1pbmdPdXRwdXRDYWxsUmVzcG9u", - "c2UoATABEmkKDkhhbGZEdXBsZXhDYWxsEiguZ3JwYy50ZXN0aW5nLlN0cmVh", - "bWluZ091dHB1dENhbGxSZXF1ZXN0GikuZ3JwYy50ZXN0aW5nLlN0cmVhbWlu", - "Z091dHB1dENhbGxSZXNwb25zZSgBMAEyVQoUVW5pbXBsZW1lbnRlZFNlcnZp", - "Y2USPQoRVW5pbXBsZW1lbnRlZENhbGwSEy5ncnBjLnRlc3RpbmcuRW1wdHka", - "Ey5ncnBjLnRlc3RpbmcuRW1wdHkyiQEKEFJlY29ubmVjdFNlcnZpY2USOwoF", - "U3RhcnQSHS5ncnBjLnRlc3RpbmcuUmVjb25uZWN0UGFyYW1zGhMuZ3JwYy50", - "ZXN0aW5nLkVtcHR5EjgKBFN0b3ASEy5ncnBjLnRlc3RpbmcuRW1wdHkaGy5n", - "cnBjLnRlc3RpbmcuUmVjb25uZWN0SW5mb2IGcHJvdG8z")); + "aW1wbGVSZXF1ZXN0GhwuZ3JwYy50ZXN0aW5nLlNpbXBsZVJlc3BvbnNlEk8K", + "EkNhY2hlYWJsZVVuYXJ5Q2FsbBIbLmdycGMudGVzdGluZy5TaW1wbGVSZXF1", + "ZXN0GhwuZ3JwYy50ZXN0aW5nLlNpbXBsZVJlc3BvbnNlEmwKE1N0cmVhbWlu", + "Z091dHB1dENhbGwSKC5ncnBjLnRlc3RpbmcuU3RyZWFtaW5nT3V0cHV0Q2Fs", + "bFJlcXVlc3QaKS5ncnBjLnRlc3RpbmcuU3RyZWFtaW5nT3V0cHV0Q2FsbFJl", + "c3BvbnNlMAESaQoSU3RyZWFtaW5nSW5wdXRDYWxsEicuZ3JwYy50ZXN0aW5n", + "LlN0cmVhbWluZ0lucHV0Q2FsbFJlcXVlc3QaKC5ncnBjLnRlc3RpbmcuU3Ry", + "ZWFtaW5nSW5wdXRDYWxsUmVzcG9uc2UoARJpCg5GdWxsRHVwbGV4Q2FsbBIo", + "LmdycGMudGVzdGluZy5TdHJlYW1pbmdPdXRwdXRDYWxsUmVxdWVzdBopLmdy", + "cGMudGVzdGluZy5TdHJlYW1pbmdPdXRwdXRDYWxsUmVzcG9uc2UoATABEmkK", + "DkhhbGZEdXBsZXhDYWxsEiguZ3JwYy50ZXN0aW5nLlN0cmVhbWluZ091dHB1", + "dENhbGxSZXF1ZXN0GikuZ3JwYy50ZXN0aW5nLlN0cmVhbWluZ091dHB1dENh", + "bGxSZXNwb25zZSgBMAESPQoRVW5pbXBsZW1lbnRlZENhbGwSEy5ncnBjLnRl", + "c3RpbmcuRW1wdHkaEy5ncnBjLnRlc3RpbmcuRW1wdHkyVQoUVW5pbXBsZW1l", + "bnRlZFNlcnZpY2USPQoRVW5pbXBsZW1lbnRlZENhbGwSEy5ncnBjLnRlc3Rp", + "bmcuRW1wdHkaEy5ncnBjLnRlc3RpbmcuRW1wdHkyiQEKEFJlY29ubmVjdFNl", + "cnZpY2USOwoFU3RhcnQSHS5ncnBjLnRlc3RpbmcuUmVjb25uZWN0UGFyYW1z", + "GhMuZ3JwYy50ZXN0aW5nLkVtcHR5EjgKBFN0b3ASEy5ncnBjLnRlc3Rpbmcu", + "RW1wdHkaGy5ncnBjLnRlc3RpbmcuUmVjb25uZWN0SW5mb2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Grpc.Testing.EmptyReflection.Descriptor, global::Grpc.Testing.MessagesReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null)); diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs index 61f2ed4015a..8d649bf5c52 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs @@ -71,6 +71,13 @@ namespace Grpc.Testing { __Marshaller_SimpleRequest, __Marshaller_SimpleResponse); + static readonly Method __Method_CacheableUnaryCall = new Method( + MethodType.Unary, + __ServiceName, + "CacheableUnaryCall", + __Marshaller_SimpleRequest, + __Marshaller_SimpleResponse); + static readonly Method __Method_StreamingOutputCall = new Method( MethodType.ServerStreaming, __ServiceName, @@ -99,6 +106,13 @@ namespace Grpc.Testing { __Marshaller_StreamingOutputCallRequest, __Marshaller_StreamingOutputCallResponse); + static readonly Method __Method_UnimplementedCall = new Method( + MethodType.Unary, + __ServiceName, + "UnimplementedCall", + __Marshaller_Empty, + __Marshaller_Empty); + /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor { @@ -124,6 +138,16 @@ namespace Grpc.Testing { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// One request followed by one response. Response has cache control + /// headers set such that a caching HTTP proxy (such as GFE) can + /// satisfy subsequent requests. + /// + public virtual global::System.Threading.Tasks.Task CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context) + { + throw new RpcException(new Status(StatusCode.Unimplemented, "")); + } + /// /// One request followed by a sequence of responses (streamed download). /// The server returns the payload with client desired type and sizes. @@ -163,6 +187,15 @@ namespace Grpc.Testing { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// The test server will not implement this method. It will be used + /// to test the behavior when clients call unimplemented methods. + /// + public virtual global::System.Threading.Tasks.Task UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context) + { + throw new RpcException(new Status(StatusCode.Unimplemented, "")); + } + } /// Client for TestService @@ -245,6 +278,42 @@ namespace Grpc.Testing { return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request); } /// + /// One request followed by one response. Response has cache control + /// headers set such that a caching HTTP proxy (such as GFE) can + /// satisfy subsequent requests. + /// + public virtual global::Grpc.Testing.SimpleResponse CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) + { + return CacheableUnaryCall(request, new CallOptions(headers, deadline, cancellationToken)); + } + /// + /// One request followed by one response. Response has cache control + /// headers set such that a caching HTTP proxy (such as GFE) can + /// satisfy subsequent requests. + /// + public virtual global::Grpc.Testing.SimpleResponse CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_CacheableUnaryCall, null, options, request); + } + /// + /// One request followed by one response. Response has cache control + /// headers set such that a caching HTTP proxy (such as GFE) can + /// satisfy subsequent requests. + /// + public virtual AsyncUnaryCall CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) + { + return CacheableUnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); + } + /// + /// One request followed by one response. Response has cache control + /// headers set such that a caching HTTP proxy (such as GFE) can + /// satisfy subsequent requests. + /// + public virtual AsyncUnaryCall CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_CacheableUnaryCall, null, options, request); + } + /// /// One request followed by a sequence of responses (streamed download). /// The server returns the payload with client desired type and sizes. /// @@ -314,6 +383,38 @@ namespace Grpc.Testing { { return CallInvoker.AsyncDuplexStreamingCall(__Method_HalfDuplexCall, null, options); } + /// + /// The test server will not implement this method. It will be used + /// to test the behavior when clients call unimplemented methods. + /// + public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) + { + return UnimplementedCall(request, new CallOptions(headers, deadline, cancellationToken)); + } + /// + /// The test server will not implement this method. It will be used + /// to test the behavior when clients call unimplemented methods. + /// + public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request); + } + /// + /// The test server will not implement this method. It will be used + /// to test the behavior when clients call unimplemented methods. + /// + public virtual AsyncUnaryCall UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) + { + return UnimplementedCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); + } + /// + /// The test server will not implement this method. It will be used + /// to test the behavior when clients call unimplemented methods. + /// + public virtual AsyncUnaryCall UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request); + } /// Creates a new instance of client from given ClientBaseConfiguration. protected override TestServiceClient NewInstance(ClientBaseConfiguration configuration) { @@ -327,10 +428,12 @@ namespace Grpc.Testing { return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall) .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) + .AddMethod(__Method_CacheableUnaryCall, serviceImpl.CacheableUnaryCall) .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall) .AddMethod(__Method_StreamingInputCall, serviceImpl.StreamingInputCall) .AddMethod(__Method_FullDuplexCall, serviceImpl.FullDuplexCall) - .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall).Build(); + .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall) + .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); } } diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 068bf709b81..9a5d7869d34 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -84,11 +84,6 @@ typedef struct grpcsharp_batch_context { size_t status_details_capacity; } recv_status_on_client; int recv_close_on_server_cancelled; - struct { - grpc_call *call; - grpc_call_details call_details; - grpc_metadata_array request_metadata; - } server_rpc_new; } grpcsharp_batch_context; GPR_EXPORT grpcsharp_batch_context *GPR_CALLTYPE grpcsharp_batch_context_create() { @@ -97,6 +92,18 @@ GPR_EXPORT grpcsharp_batch_context *GPR_CALLTYPE grpcsharp_batch_context_create( return ctx; } +typedef struct { + grpc_call *call; + grpc_call_details call_details; + grpc_metadata_array request_metadata; +} grpcsharp_request_call_context; + +GPR_EXPORT grpcsharp_request_call_context *GPR_CALLTYPE grpcsharp_request_call_context_create() { + grpcsharp_request_call_context *ctx = gpr_malloc(sizeof(grpcsharp_request_call_context)); + memset(ctx, 0, sizeof(grpcsharp_request_call_context)); + return ctx; +} + /* * Destroys array->metadata. * The array pointer itself is not freed. @@ -230,13 +237,20 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_batch_context_destroy(grpcsharp_batch_con &(ctx->recv_status_on_client.trailing_metadata)); gpr_free((void *)ctx->recv_status_on_client.status_details); + gpr_free(ctx); +} + +GPR_EXPORT void GPR_CALLTYPE grpcsharp_request_call_context_destroy(grpcsharp_request_call_context *ctx) { + if (!ctx) { + return; + } /* NOTE: ctx->server_rpc_new.call is not destroyed because callback handler is supposed to take its ownership. */ - grpc_call_details_destroy(&(ctx->server_rpc_new.call_details)); + grpc_call_details_destroy(&(ctx->call_details)); grpcsharp_metadata_array_destroy_metadata_only( - &(ctx->server_rpc_new.request_metadata)); + &(ctx->request_metadata)); gpr_free(ctx); } @@ -303,32 +317,32 @@ grpcsharp_batch_context_recv_status_on_client_trailing_metadata( return &(ctx->recv_status_on_client.trailing_metadata); } -GPR_EXPORT grpc_call *GPR_CALLTYPE grpcsharp_batch_context_server_rpc_new_call( - const grpcsharp_batch_context *ctx) { - return ctx->server_rpc_new.call; +GPR_EXPORT grpc_call *GPR_CALLTYPE grpcsharp_request_call_context_call( + const grpcsharp_request_call_context *ctx) { + return ctx->call; } GPR_EXPORT const char *GPR_CALLTYPE -grpcsharp_batch_context_server_rpc_new_method( - const grpcsharp_batch_context *ctx) { - return ctx->server_rpc_new.call_details.method; +grpcsharp_request_call_context_method( + const grpcsharp_request_call_context *ctx) { + return ctx->call_details.method; } -GPR_EXPORT const char *GPR_CALLTYPE grpcsharp_batch_context_server_rpc_new_host( - const grpcsharp_batch_context *ctx) { - return ctx->server_rpc_new.call_details.host; +GPR_EXPORT const char *GPR_CALLTYPE grpcsharp_request_call_context_host( + const grpcsharp_request_call_context *ctx) { + return ctx->call_details.host; } GPR_EXPORT gpr_timespec GPR_CALLTYPE -grpcsharp_batch_context_server_rpc_new_deadline( - const grpcsharp_batch_context *ctx) { - return ctx->server_rpc_new.call_details.deadline; +grpcsharp_request_call_context_deadline( + const grpcsharp_request_call_context *ctx) { + return ctx->call_details.deadline; } GPR_EXPORT const grpc_metadata_array *GPR_CALLTYPE -grpcsharp_batch_context_server_rpc_new_request_metadata( - const grpcsharp_batch_context *ctx) { - return &(ctx->server_rpc_new.request_metadata); +grpcsharp_request_call_context_request_metadata( + const grpcsharp_request_call_context *ctx) { + return &(ctx->request_metadata); } GPR_EXPORT int32_t GPR_CALLTYPE @@ -853,10 +867,10 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_server_destroy(grpc_server *server) { GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_server_request_call(grpc_server *server, grpc_completion_queue *cq, - grpcsharp_batch_context *ctx) { + grpcsharp_request_call_context *ctx) { return grpc_server_request_call( - server, &(ctx->server_rpc_new.call), &(ctx->server_rpc_new.call_details), - &(ctx->server_rpc_new.request_metadata), cq, cq, ctx); + server, &(ctx->call), &(ctx->call_details), + &(ctx->request_metadata), cq, cq, ctx); } /* Security */ diff --git a/src/node/ext/node_grpc.cc b/src/node/ext/node_grpc.cc index 745b5023d59..848c601587f 100644 --- a/src/node/ext/node_grpc.cc +++ b/src/node/ext/node_grpc.cc @@ -261,10 +261,10 @@ void InitLogConstants(Local exports) { Nan::HandleScope scope; Local log_verbosity = Nan::New(); Nan::Set(exports, Nan::New("logVerbosity").ToLocalChecked(), log_verbosity); - Local DEBUG(Nan::New(GPR_LOG_SEVERITY_DEBUG)); - Nan::Set(log_verbosity, Nan::New("DEBUG").ToLocalChecked(), DEBUG); - Local INFO(Nan::New(GPR_LOG_SEVERITY_INFO)); - Nan::Set(log_verbosity, Nan::New("INFO").ToLocalChecked(), INFO); + Local LOG_DEBUG(Nan::New(GPR_LOG_SEVERITY_DEBUG)); + Nan::Set(log_verbosity, Nan::New("DEBUG").ToLocalChecked(), LOG_DEBUG); + Local LOG_INFO(Nan::New(GPR_LOG_SEVERITY_INFO)); + Nan::Set(log_verbosity, Nan::New("INFO").ToLocalChecked(), LOG_INFO); Local LOG_ERROR(Nan::New(GPR_LOG_SEVERITY_ERROR)); Nan::Set(log_verbosity, Nan::New("ERROR").ToLocalChecked(), LOG_ERROR); } diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index e8f2d37bd8b..a59a66b2aa9 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -375,7 +375,8 @@ function statusCodeAndMessage(client, done) { duplex.end(); } -function unimplementedMethod(client, done) { +// NOTE: the client param to this function is from UnimplementedService +function unimplementedService(client, done) { client.unimplementedCall({}, function(err, resp) { assert(err); assert.strictEqual(err.code, grpc.status.UNIMPLEMENTED); @@ -384,6 +385,15 @@ function unimplementedMethod(client, done) { }); } +// NOTE: the client param to this function is from TestService +function unimplementedMethod(client, done) { + client.unimplementedCall({}, function(err, resp) { + assert(err); + assert.strictEqual(err.code, grpc.status.UNIMPLEMENTED); + done(); + }); +} + /** * Run one of the authentication tests. * @param {string} expected_user The expected username in the response @@ -527,8 +537,10 @@ var test_cases = { Client: testProto.TestService}, status_code_and_message: {run: statusCodeAndMessage, Client: testProto.TestService}, - unimplemented_method: {run: unimplementedMethod, + unimplemented_service: {run: unimplementedService, Client: testProto.UnimplementedService}, + unimplemented_method: {run: unimplementedMethod, + Client: testProto.TestService}, compute_engine_creds: {run: computeEngineCreds, Client: testProto.TestService, getCreds: getApplicationCreds}, diff --git a/src/node/test/interop_sanity_test.js b/src/node/test/interop_sanity_test.js index f008a87585c..58f8842c0d8 100644 --- a/src/node/test/interop_sanity_test.js +++ b/src/node/test/interop_sanity_test.js @@ -98,6 +98,10 @@ describe('Interop tests', function() { interop_client.runTest(port, name_override, 'status_code_and_message', true, true, done); }); + it('should pass unimplemented_service', function(done) { + interop_client.runTest(port, name_override, 'unimplemented_service', + true, true, done); + }); it('should pass unimplemented_method', function(done) { interop_client.runTest(port, name_override, 'unimplemented_method', true, true, done); diff --git a/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj b/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj index 8d34b26c4fc..ab7159cda2f 100644 --- a/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj +++ b/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 48; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ @@ -129,7 +129,7 @@ 6369A2621A9322E20015FC5C /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = gRPC; TargetAttributes = { 6369A2691A9322E20015FC5C = { @@ -138,7 +138,7 @@ }; }; buildConfigurationList = 6369A2651A9322E20015FC5C /* Build configuration list for PBXProject "Sample" */; - compatibilityVersion = "Xcode 8.0"; + compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( @@ -253,10 +253,8 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -265,7 +263,6 @@ ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -299,10 +296,8 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -310,7 +305,6 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; diff --git a/src/objective-c/examples/Sample/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/src/objective-c/examples/Sample/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme index 881474b111c..d399e22e460 100644 --- a/src/objective-c/examples/Sample/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme +++ b/src/objective-c/examples/Sample/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme @@ -1,6 +1,6 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + gRPC.$(PRODUCT_NAME:rfc1034identifier) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj index 8dccbf0f72b..c4a6567ae0e 100644 --- a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj +++ b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 48; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ @@ -535,7 +535,7 @@ 635697BF1B14FC11007A7283 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0630; ORGANIZATIONNAME = gRPC; TargetAttributes = { 5E8A5DA31D3840B4000F8BC4 = { @@ -565,7 +565,7 @@ }; }; buildConfigurationList = 635697C21B14FC11007A7283 /* Build configuration list for PBXProject "Tests" */; - compatibilityVersion = "Xcode 8.0"; + compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( @@ -1151,10 +1151,8 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; @@ -1207,7 +1205,6 @@ ); INFOPLIST_FILE = Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "gRPC.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Cronet; @@ -1365,7 +1362,6 @@ ); INFOPLIST_FILE = Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "gRPC.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -1380,7 +1376,6 @@ ); INFOPLIST_FILE = Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "gRPC.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -1398,16 +1393,13 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1444,10 +1436,8 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme index 740a1c0672d..d1d616c4cf2 100644 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme +++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme @@ -1,6 +1,6 @@ #include -#include "src/core/ext/client_config/client_channel.h" -#include "src/core/ext/client_config/lb_policy_registry.h" +#include "src/core/ext/client_channel/client_channel.h" +#include "src/core/ext/client_channel/lb_policy_registry.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/channel.h" diff --git a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c similarity index 98% rename from test/core/client_config/resolvers/dns_resolver_connectivity_test.c rename to test/core/client_channel/resolvers/dns_resolver_connectivity_test.c index d3b961959d2..07723c229d2 100644 --- a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c +++ b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c @@ -36,7 +36,7 @@ #include #include -#include "src/core/ext/client_config/resolver_registry.h" +#include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/timer.h" #include "test/core/util/test_config.h" diff --git a/test/core/client_config/resolvers/dns_resolver_test.c b/test/core/client_channel/resolvers/dns_resolver_test.c similarity index 98% rename from test/core/client_config/resolvers/dns_resolver_test.c rename to test/core/client_channel/resolvers/dns_resolver_test.c index c3f4cb12444..41a9125431f 100644 --- a/test/core/client_config/resolvers/dns_resolver_test.c +++ b/test/core/client_channel/resolvers/dns_resolver_test.c @@ -35,7 +35,7 @@ #include -#include "src/core/ext/client_config/resolver_registry.h" +#include "src/core/ext/client_channel/resolver_registry.h" #include "test/core/util/test_config.h" static void test_succeeds(grpc_resolver_factory *factory, const char *string) { diff --git a/test/core/client_config/resolvers/sockaddr_resolver_test.c b/test/core/client_channel/resolvers/sockaddr_resolver_test.c similarity index 97% rename from test/core/client_config/resolvers/sockaddr_resolver_test.c rename to test/core/client_channel/resolvers/sockaddr_resolver_test.c index b5d96efa1d9..c39052cd9dd 100644 --- a/test/core/client_config/resolvers/sockaddr_resolver_test.c +++ b/test/core/client_channel/resolvers/sockaddr_resolver_test.c @@ -37,8 +37,8 @@ #include #include -#include "src/core/ext/client_config/resolver_registry.h" -#include "src/core/ext/client_config/resolver_result.h" +#include "src/core/ext/client_channel/resolver_registry.h" +#include "src/core/ext/client_channel/resolver_result.h" #include "test/core/util/test_config.h" diff --git a/test/core/client_config/set_initial_connect_string_test.c b/test/core/client_channel/set_initial_connect_string_test.c similarity index 99% rename from test/core/client_config/set_initial_connect_string_test.c rename to test/core/client_channel/set_initial_connect_string_test.c index 1b51424f7ed..b7bd67567cf 100644 --- a/test/core/client_config/set_initial_connect_string_test.c +++ b/test/core/client_channel/set_initial_connect_string_test.c @@ -39,7 +39,7 @@ #include #include -#include "src/core/ext/client_config/initial_connect_string.h" +#include "src/core/ext/client_channel/initial_connect_string.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/support/string.h" diff --git a/test/core/client_config/uri_corpus/02d156dc5e6f2c11c90c2e06fcee04adf036a342 b/test/core/client_channel/uri_corpus/02d156dc5e6f2c11c90c2e06fcee04adf036a342 similarity index 100% rename from test/core/client_config/uri_corpus/02d156dc5e6f2c11c90c2e06fcee04adf036a342 rename to test/core/client_channel/uri_corpus/02d156dc5e6f2c11c90c2e06fcee04adf036a342 diff --git a/test/core/client_config/uri_corpus/042dc4512fa3d391c5170cf3aa61e6a638f84342 b/test/core/client_channel/uri_corpus/042dc4512fa3d391c5170cf3aa61e6a638f84342 similarity index 100% rename from test/core/client_config/uri_corpus/042dc4512fa3d391c5170cf3aa61e6a638f84342 rename to test/core/client_channel/uri_corpus/042dc4512fa3d391c5170cf3aa61e6a638f84342 diff --git a/test/core/client_config/uri_corpus/0e9bbe975f2027e8c39c89f85f667530368e7d11 b/test/core/client_channel/uri_corpus/0e9bbe975f2027e8c39c89f85f667530368e7d11 similarity index 100% rename from test/core/client_config/uri_corpus/0e9bbe975f2027e8c39c89f85f667530368e7d11 rename to test/core/client_channel/uri_corpus/0e9bbe975f2027e8c39c89f85f667530368e7d11 diff --git a/test/core/client_config/uri_corpus/1155aa6ea7ef262a81a63692513ea395f84dad6f b/test/core/client_channel/uri_corpus/1155aa6ea7ef262a81a63692513ea395f84dad6f similarity index 100% rename from test/core/client_config/uri_corpus/1155aa6ea7ef262a81a63692513ea395f84dad6f rename to test/core/client_channel/uri_corpus/1155aa6ea7ef262a81a63692513ea395f84dad6f diff --git a/test/core/client_config/uri_corpus/13856a5569ffd085a4d5c07af5f8e9310835a118 b/test/core/client_channel/uri_corpus/13856a5569ffd085a4d5c07af5f8e9310835a118 similarity index 100% rename from test/core/client_config/uri_corpus/13856a5569ffd085a4d5c07af5f8e9310835a118 rename to test/core/client_channel/uri_corpus/13856a5569ffd085a4d5c07af5f8e9310835a118 diff --git a/test/core/client_config/uri_corpus/14b57bcbf1e17b1db1de491ef2ba3768f704b7dc b/test/core/client_channel/uri_corpus/14b57bcbf1e17b1db1de491ef2ba3768f704b7dc similarity index 100% rename from test/core/client_config/uri_corpus/14b57bcbf1e17b1db1de491ef2ba3768f704b7dc rename to test/core/client_channel/uri_corpus/14b57bcbf1e17b1db1de491ef2ba3768f704b7dc diff --git a/test/core/client_config/uri_corpus/1794310671a060eead6e5ee66ac978a18ec7e84f b/test/core/client_channel/uri_corpus/1794310671a060eead6e5ee66ac978a18ec7e84f similarity index 100% rename from test/core/client_config/uri_corpus/1794310671a060eead6e5ee66ac978a18ec7e84f rename to test/core/client_channel/uri_corpus/1794310671a060eead6e5ee66ac978a18ec7e84f diff --git a/test/core/client_config/uri_corpus/1d30b2a79afbaf2828ff42b9a9647e942ba1ab80 b/test/core/client_channel/uri_corpus/1d30b2a79afbaf2828ff42b9a9647e942ba1ab80 similarity index 100% rename from test/core/client_config/uri_corpus/1d30b2a79afbaf2828ff42b9a9647e942ba1ab80 rename to test/core/client_channel/uri_corpus/1d30b2a79afbaf2828ff42b9a9647e942ba1ab80 diff --git a/test/core/client_config/uri_corpus/1fcf5d9c333b70596cf5ba04d1f7affdf445b971 b/test/core/client_channel/uri_corpus/1fcf5d9c333b70596cf5ba04d1f7affdf445b971 similarity index 100% rename from test/core/client_config/uri_corpus/1fcf5d9c333b70596cf5ba04d1f7affdf445b971 rename to test/core/client_channel/uri_corpus/1fcf5d9c333b70596cf5ba04d1f7affdf445b971 diff --git a/test/core/client_config/uri_corpus/23162c8a8936e20b195404c21337ee734d02a6bc b/test/core/client_channel/uri_corpus/23162c8a8936e20b195404c21337ee734d02a6bc similarity index 100% rename from test/core/client_config/uri_corpus/23162c8a8936e20b195404c21337ee734d02a6bc rename to test/core/client_channel/uri_corpus/23162c8a8936e20b195404c21337ee734d02a6bc diff --git a/test/core/client_config/uri_corpus/23f3198b815ca60bdadcaae682b9f965dda387f1 b/test/core/client_channel/uri_corpus/23f3198b815ca60bdadcaae682b9f965dda387f1 similarity index 100% rename from test/core/client_config/uri_corpus/23f3198b815ca60bdadcaae682b9f965dda387f1 rename to test/core/client_channel/uri_corpus/23f3198b815ca60bdadcaae682b9f965dda387f1 diff --git a/test/core/client_config/uri_corpus/2ef3893b43f1f60b77b59ce06a6bce9815d78eaf b/test/core/client_channel/uri_corpus/2ef3893b43f1f60b77b59ce06a6bce9815d78eaf similarity index 100% rename from test/core/client_config/uri_corpus/2ef3893b43f1f60b77b59ce06a6bce9815d78eaf rename to test/core/client_channel/uri_corpus/2ef3893b43f1f60b77b59ce06a6bce9815d78eaf diff --git a/test/core/client_config/uri_corpus/356c3c129e203b5c74550b4209764d74b9caefce b/test/core/client_channel/uri_corpus/356c3c129e203b5c74550b4209764d74b9caefce similarity index 100% rename from test/core/client_config/uri_corpus/356c3c129e203b5c74550b4209764d74b9caefce rename to test/core/client_channel/uri_corpus/356c3c129e203b5c74550b4209764d74b9caefce diff --git a/test/core/client_config/uri_corpus/396568fc41c8ccb31ec925b4a862e4d29ead1327 b/test/core/client_channel/uri_corpus/396568fc41c8ccb31ec925b4a862e4d29ead1327 similarity index 100% rename from test/core/client_config/uri_corpus/396568fc41c8ccb31ec925b4a862e4d29ead1327 rename to test/core/client_channel/uri_corpus/396568fc41c8ccb31ec925b4a862e4d29ead1327 diff --git a/test/core/client_config/uri_corpus/3b1e7526a99918006b87e499d2beb6c4ac9c3c0c b/test/core/client_channel/uri_corpus/3b1e7526a99918006b87e499d2beb6c4ac9c3c0c similarity index 100% rename from test/core/client_config/uri_corpus/3b1e7526a99918006b87e499d2beb6c4ac9c3c0c rename to test/core/client_channel/uri_corpus/3b1e7526a99918006b87e499d2beb6c4ac9c3c0c diff --git a/test/core/client_config/uri_corpus/3b58860f3451d3e7aad99690a8d39782ca5116fc b/test/core/client_channel/uri_corpus/3b58860f3451d3e7aad99690a8d39782ca5116fc similarity index 100% rename from test/core/client_config/uri_corpus/3b58860f3451d3e7aad99690a8d39782ca5116fc rename to test/core/client_channel/uri_corpus/3b58860f3451d3e7aad99690a8d39782ca5116fc diff --git a/test/core/client_config/uri_corpus/41963cc10752f70c3af7e3d85868efb097a0ea9c b/test/core/client_channel/uri_corpus/41963cc10752f70c3af7e3d85868efb097a0ea9c similarity index 100% rename from test/core/client_config/uri_corpus/41963cc10752f70c3af7e3d85868efb097a0ea9c rename to test/core/client_channel/uri_corpus/41963cc10752f70c3af7e3d85868efb097a0ea9c diff --git a/test/core/client_config/uri_corpus/47b5228404451fc9d4071fa69192514bb4ce33c1 b/test/core/client_channel/uri_corpus/47b5228404451fc9d4071fa69192514bb4ce33c1 similarity index 100% rename from test/core/client_config/uri_corpus/47b5228404451fc9d4071fa69192514bb4ce33c1 rename to test/core/client_channel/uri_corpus/47b5228404451fc9d4071fa69192514bb4ce33c1 diff --git a/test/core/client_config/uri_corpus/56a2da4b2e6fb795243901023ed8d0aa083d1aab b/test/core/client_channel/uri_corpus/56a2da4b2e6fb795243901023ed8d0aa083d1aab similarity index 100% rename from test/core/client_config/uri_corpus/56a2da4b2e6fb795243901023ed8d0aa083d1aab rename to test/core/client_channel/uri_corpus/56a2da4b2e6fb795243901023ed8d0aa083d1aab diff --git a/test/core/client_config/uri_corpus/574c2f13858a9a6d724654bd913ede9ae3abf822 b/test/core/client_channel/uri_corpus/574c2f13858a9a6d724654bd913ede9ae3abf822 similarity index 100% rename from test/core/client_config/uri_corpus/574c2f13858a9a6d724654bd913ede9ae3abf822 rename to test/core/client_channel/uri_corpus/574c2f13858a9a6d724654bd913ede9ae3abf822 diff --git a/test/core/client_config/uri_corpus/582f789c19033a152094cbf8565f14154a778ddb b/test/core/client_channel/uri_corpus/582f789c19033a152094cbf8565f14154a778ddb similarity index 100% rename from test/core/client_config/uri_corpus/582f789c19033a152094cbf8565f14154a778ddb rename to test/core/client_channel/uri_corpus/582f789c19033a152094cbf8565f14154a778ddb diff --git a/test/core/client_config/uri_corpus/636c5606fc23713a1bae88c8899c0541cfad4fd8 b/test/core/client_channel/uri_corpus/636c5606fc23713a1bae88c8899c0541cfad4fd8 similarity index 100% rename from test/core/client_config/uri_corpus/636c5606fc23713a1bae88c8899c0541cfad4fd8 rename to test/core/client_channel/uri_corpus/636c5606fc23713a1bae88c8899c0541cfad4fd8 diff --git a/test/core/client_config/uri_corpus/63fe493b270b17426d77a27cbf3abac5b2c2794a b/test/core/client_channel/uri_corpus/63fe493b270b17426d77a27cbf3abac5b2c2794a similarity index 100% rename from test/core/client_config/uri_corpus/63fe493b270b17426d77a27cbf3abac5b2c2794a rename to test/core/client_channel/uri_corpus/63fe493b270b17426d77a27cbf3abac5b2c2794a diff --git a/test/core/client_config/uri_corpus/655300a902b62662296a8e46bfb04fbcb07182cb b/test/core/client_channel/uri_corpus/655300a902b62662296a8e46bfb04fbcb07182cb similarity index 100% rename from test/core/client_config/uri_corpus/655300a902b62662296a8e46bfb04fbcb07182cb rename to test/core/client_channel/uri_corpus/655300a902b62662296a8e46bfb04fbcb07182cb diff --git a/test/core/client_config/uri_corpus/6ae3acd9d8507b61bf235748026080a4138dba58 b/test/core/client_channel/uri_corpus/6ae3acd9d8507b61bf235748026080a4138dba58 similarity index 100% rename from test/core/client_config/uri_corpus/6ae3acd9d8507b61bf235748026080a4138dba58 rename to test/core/client_channel/uri_corpus/6ae3acd9d8507b61bf235748026080a4138dba58 diff --git a/test/core/client_config/uri_corpus/6b70979a70a038ff6607d6cf85485ee95baf58e6 b/test/core/client_channel/uri_corpus/6b70979a70a038ff6607d6cf85485ee95baf58e6 similarity index 100% rename from test/core/client_config/uri_corpus/6b70979a70a038ff6607d6cf85485ee95baf58e6 rename to test/core/client_channel/uri_corpus/6b70979a70a038ff6607d6cf85485ee95baf58e6 diff --git a/test/core/client_config/uri_corpus/7314ab3545a7535a26e0e8aad67caea5534d68b1 b/test/core/client_channel/uri_corpus/7314ab3545a7535a26e0e8aad67caea5534d68b1 similarity index 100% rename from test/core/client_config/uri_corpus/7314ab3545a7535a26e0e8aad67caea5534d68b1 rename to test/core/client_channel/uri_corpus/7314ab3545a7535a26e0e8aad67caea5534d68b1 diff --git a/test/core/client_config/uri_corpus/7ff4d8b8d1ffd0d42c48bbb91e5856a9ec31aecb b/test/core/client_channel/uri_corpus/7ff4d8b8d1ffd0d42c48bbb91e5856a9ec31aecb similarity index 100% rename from test/core/client_config/uri_corpus/7ff4d8b8d1ffd0d42c48bbb91e5856a9ec31aecb rename to test/core/client_channel/uri_corpus/7ff4d8b8d1ffd0d42c48bbb91e5856a9ec31aecb diff --git a/test/core/client_config/uri_corpus/87daa131e0973b77a232a870ed749ef29cf58e6d b/test/core/client_channel/uri_corpus/87daa131e0973b77a232a870ed749ef29cf58e6d similarity index 100% rename from test/core/client_config/uri_corpus/87daa131e0973b77a232a870ed749ef29cf58e6d rename to test/core/client_channel/uri_corpus/87daa131e0973b77a232a870ed749ef29cf58e6d diff --git a/test/core/client_config/uri_corpus/884dcaee2908ffe5f12b65b8eba81016099c4266 b/test/core/client_channel/uri_corpus/884dcaee2908ffe5f12b65b8eba81016099c4266 similarity index 100% rename from test/core/client_config/uri_corpus/884dcaee2908ffe5f12b65b8eba81016099c4266 rename to test/core/client_channel/uri_corpus/884dcaee2908ffe5f12b65b8eba81016099c4266 diff --git a/test/core/client_config/uri_corpus/8d7e944fd5d0ede94097fcc98b47b09a3f9c76cb b/test/core/client_channel/uri_corpus/8d7e944fd5d0ede94097fcc98b47b09a3f9c76cb similarity index 100% rename from test/core/client_config/uri_corpus/8d7e944fd5d0ede94097fcc98b47b09a3f9c76cb rename to test/core/client_channel/uri_corpus/8d7e944fd5d0ede94097fcc98b47b09a3f9c76cb diff --git a/test/core/client_config/uri_corpus/9671149af0b444f59bbdf71340d3441dadd8a7b4 b/test/core/client_channel/uri_corpus/9671149af0b444f59bbdf71340d3441dadd8a7b4 similarity index 100% rename from test/core/client_config/uri_corpus/9671149af0b444f59bbdf71340d3441dadd8a7b4 rename to test/core/client_channel/uri_corpus/9671149af0b444f59bbdf71340d3441dadd8a7b4 diff --git a/test/core/client_config/uri_corpus/96c8d266b7dc037288ef305c996608270f72e7fb b/test/core/client_channel/uri_corpus/96c8d266b7dc037288ef305c996608270f72e7fb similarity index 100% rename from test/core/client_config/uri_corpus/96c8d266b7dc037288ef305c996608270f72e7fb rename to test/core/client_channel/uri_corpus/96c8d266b7dc037288ef305c996608270f72e7fb diff --git a/test/core/client_config/uri_corpus/975536c71ade4800415a7e9c2f1b45c35a6d5ea8 b/test/core/client_channel/uri_corpus/975536c71ade4800415a7e9c2f1b45c35a6d5ea8 similarity index 100% rename from test/core/client_config/uri_corpus/975536c71ade4800415a7e9c2f1b45c35a6d5ea8 rename to test/core/client_channel/uri_corpus/975536c71ade4800415a7e9c2f1b45c35a6d5ea8 diff --git a/test/core/client_config/uri_corpus/99750aa67d30beaea8af565c829d4999aa8cb91b b/test/core/client_channel/uri_corpus/99750aa67d30beaea8af565c829d4999aa8cb91b similarity index 100% rename from test/core/client_config/uri_corpus/99750aa67d30beaea8af565c829d4999aa8cb91b rename to test/core/client_channel/uri_corpus/99750aa67d30beaea8af565c829d4999aa8cb91b diff --git a/test/core/client_config/uri_corpus/a1140f3f8b5cffc1010221b9a4084a25fb75c1f6 b/test/core/client_channel/uri_corpus/a1140f3f8b5cffc1010221b9a4084a25fb75c1f6 similarity index 100% rename from test/core/client_config/uri_corpus/a1140f3f8b5cffc1010221b9a4084a25fb75c1f6 rename to test/core/client_channel/uri_corpus/a1140f3f8b5cffc1010221b9a4084a25fb75c1f6 diff --git a/test/core/client_config/uri_corpus/a1f0f9b75bb354eb063d7cba4fcfa2d0b88d63de b/test/core/client_channel/uri_corpus/a1f0f9b75bb354eb063d7cba4fcfa2d0b88d63de similarity index 100% rename from test/core/client_config/uri_corpus/a1f0f9b75bb354eb063d7cba4fcfa2d0b88d63de rename to test/core/client_channel/uri_corpus/a1f0f9b75bb354eb063d7cba4fcfa2d0b88d63de diff --git a/test/core/client_config/uri_corpus/a296eb3d1d436ed7df7195b10aa3c4de3896f98d b/test/core/client_channel/uri_corpus/a296eb3d1d436ed7df7195b10aa3c4de3896f98d similarity index 100% rename from test/core/client_config/uri_corpus/a296eb3d1d436ed7df7195b10aa3c4de3896f98d rename to test/core/client_channel/uri_corpus/a296eb3d1d436ed7df7195b10aa3c4de3896f98d diff --git a/test/core/client_config/uri_corpus/a8b8e66050b424f1b8c07d46f868199fb7f60e38 b/test/core/client_channel/uri_corpus/a8b8e66050b424f1b8c07d46f868199fb7f60e38 similarity index 100% rename from test/core/client_config/uri_corpus/a8b8e66050b424f1b8c07d46f868199fb7f60e38 rename to test/core/client_channel/uri_corpus/a8b8e66050b424f1b8c07d46f868199fb7f60e38 diff --git a/test/core/client_config/uri_corpus/aba1472880406a318ce207ee79815b7acf087757 b/test/core/client_channel/uri_corpus/aba1472880406a318ce207ee79815b7acf087757 similarity index 100% rename from test/core/client_config/uri_corpus/aba1472880406a318ce207ee79815b7acf087757 rename to test/core/client_channel/uri_corpus/aba1472880406a318ce207ee79815b7acf087757 diff --git a/test/core/client_config/uri_corpus/af55baf8c8855e563befdf1eefbcbd46c5ddb8d2 b/test/core/client_channel/uri_corpus/af55baf8c8855e563befdf1eefbcbd46c5ddb8d2 similarity index 100% rename from test/core/client_config/uri_corpus/af55baf8c8855e563befdf1eefbcbd46c5ddb8d2 rename to test/core/client_channel/uri_corpus/af55baf8c8855e563befdf1eefbcbd46c5ddb8d2 diff --git a/test/core/client_config/uri_corpus/b3c0bf66c2bf5d24ef1daf4cc5a9d6d5bd0e8bfd b/test/core/client_channel/uri_corpus/b3c0bf66c2bf5d24ef1daf4cc5a9d6d5bd0e8bfd similarity index 100% rename from test/core/client_config/uri_corpus/b3c0bf66c2bf5d24ef1daf4cc5a9d6d5bd0e8bfd rename to test/core/client_channel/uri_corpus/b3c0bf66c2bf5d24ef1daf4cc5a9d6d5bd0e8bfd diff --git a/test/core/client_config/uri_corpus/c28a47409cf5d95bb372238d01e73d8b831408e4 b/test/core/client_channel/uri_corpus/c28a47409cf5d95bb372238d01e73d8b831408e4 similarity index 100% rename from test/core/client_config/uri_corpus/c28a47409cf5d95bb372238d01e73d8b831408e4 rename to test/core/client_channel/uri_corpus/c28a47409cf5d95bb372238d01e73d8b831408e4 diff --git a/test/core/client_config/uri_corpus/c3ef1d41888063a08700c3add1e4465aabcf8807 b/test/core/client_channel/uri_corpus/c3ef1d41888063a08700c3add1e4465aabcf8807 similarity index 100% rename from test/core/client_config/uri_corpus/c3ef1d41888063a08700c3add1e4465aabcf8807 rename to test/core/client_channel/uri_corpus/c3ef1d41888063a08700c3add1e4465aabcf8807 diff --git a/test/core/client_config/uri_corpus/c550a76af21f9b9cc92a386d5c8998b26f8f2e4d b/test/core/client_channel/uri_corpus/c550a76af21f9b9cc92a386d5c8998b26f8f2e4d similarity index 100% rename from test/core/client_config/uri_corpus/c550a76af21f9b9cc92a386d5c8998b26f8f2e4d rename to test/core/client_channel/uri_corpus/c550a76af21f9b9cc92a386d5c8998b26f8f2e4d diff --git a/test/core/client_config/uri_corpus/c79721406d0ab80495f186fd88e37fba98637ae9 b/test/core/client_channel/uri_corpus/c79721406d0ab80495f186fd88e37fba98637ae9 similarity index 100% rename from test/core/client_config/uri_corpus/c79721406d0ab80495f186fd88e37fba98637ae9 rename to test/core/client_channel/uri_corpus/c79721406d0ab80495f186fd88e37fba98637ae9 diff --git a/test/core/client_config/uri_corpus/ceb4e2264ba7a8d5be47d276b37ec09489e00245 b/test/core/client_channel/uri_corpus/ceb4e2264ba7a8d5be47d276b37ec09489e00245 similarity index 100% rename from test/core/client_config/uri_corpus/ceb4e2264ba7a8d5be47d276b37ec09489e00245 rename to test/core/client_channel/uri_corpus/ceb4e2264ba7a8d5be47d276b37ec09489e00245 diff --git a/test/core/client_config/uri_corpus/cf4395958f5bfb46fd6f535a39657d016c75114c b/test/core/client_channel/uri_corpus/cf4395958f5bfb46fd6f535a39657d016c75114c similarity index 100% rename from test/core/client_config/uri_corpus/cf4395958f5bfb46fd6f535a39657d016c75114c rename to test/core/client_channel/uri_corpus/cf4395958f5bfb46fd6f535a39657d016c75114c diff --git a/test/core/client_config/uri_corpus/d46668372b7e20154a89409a7430a28e642afdca b/test/core/client_channel/uri_corpus/d46668372b7e20154a89409a7430a28e642afdca similarity index 100% rename from test/core/client_config/uri_corpus/d46668372b7e20154a89409a7430a28e642afdca rename to test/core/client_channel/uri_corpus/d46668372b7e20154a89409a7430a28e642afdca diff --git a/test/core/client_config/uri_corpus/d6fe7412a0a1d1c733160246f3fa425f4f97682a b/test/core/client_channel/uri_corpus/d6fe7412a0a1d1c733160246f3fa425f4f97682a similarity index 100% rename from test/core/client_config/uri_corpus/d6fe7412a0a1d1c733160246f3fa425f4f97682a rename to test/core/client_channel/uri_corpus/d6fe7412a0a1d1c733160246f3fa425f4f97682a diff --git a/test/core/client_config/uri_corpus/dns.txt b/test/core/client_channel/uri_corpus/dns.txt similarity index 100% rename from test/core/client_config/uri_corpus/dns.txt rename to test/core/client_channel/uri_corpus/dns.txt diff --git a/test/core/client_config/uri_corpus/e241f29957b0e30ec11aaaf91b2339f7015fa5fd b/test/core/client_channel/uri_corpus/e241f29957b0e30ec11aaaf91b2339f7015fa5fd similarity index 100% rename from test/core/client_config/uri_corpus/e241f29957b0e30ec11aaaf91b2339f7015fa5fd rename to test/core/client_channel/uri_corpus/e241f29957b0e30ec11aaaf91b2339f7015fa5fd diff --git a/test/core/client_config/uri_corpus/ea02d9fea9bad5b89cf353a0169238f584177e71 b/test/core/client_channel/uri_corpus/ea02d9fea9bad5b89cf353a0169238f584177e71 similarity index 100% rename from test/core/client_config/uri_corpus/ea02d9fea9bad5b89cf353a0169238f584177e71 rename to test/core/client_channel/uri_corpus/ea02d9fea9bad5b89cf353a0169238f584177e71 diff --git a/test/core/client_config/uri_corpus/ec4731dddf94ed3ea92ae4d5a71f145ab6e3f6ee b/test/core/client_channel/uri_corpus/ec4731dddf94ed3ea92ae4d5a71f145ab6e3f6ee similarity index 100% rename from test/core/client_config/uri_corpus/ec4731dddf94ed3ea92ae4d5a71f145ab6e3f6ee rename to test/core/client_channel/uri_corpus/ec4731dddf94ed3ea92ae4d5a71f145ab6e3f6ee diff --git a/test/core/client_config/uri_corpus/ed2f78646f19fc47dd85ff0877c232b71913ece2 b/test/core/client_channel/uri_corpus/ed2f78646f19fc47dd85ff0877c232b71913ece2 similarity index 100% rename from test/core/client_config/uri_corpus/ed2f78646f19fc47dd85ff0877c232b71913ece2 rename to test/core/client_channel/uri_corpus/ed2f78646f19fc47dd85ff0877c232b71913ece2 diff --git a/test/core/client_config/uri_corpus/f6889f4a6350fea1596a3adea5cdac02bd5d1ff3 b/test/core/client_channel/uri_corpus/f6889f4a6350fea1596a3adea5cdac02bd5d1ff3 similarity index 100% rename from test/core/client_config/uri_corpus/f6889f4a6350fea1596a3adea5cdac02bd5d1ff3 rename to test/core/client_channel/uri_corpus/f6889f4a6350fea1596a3adea5cdac02bd5d1ff3 diff --git a/test/core/client_config/uri_corpus/f6f3bd030f0d321efe7c51ca3f057de23509af67 b/test/core/client_channel/uri_corpus/f6f3bd030f0d321efe7c51ca3f057de23509af67 similarity index 100% rename from test/core/client_config/uri_corpus/f6f3bd030f0d321efe7c51ca3f057de23509af67 rename to test/core/client_channel/uri_corpus/f6f3bd030f0d321efe7c51ca3f057de23509af67 diff --git a/test/core/client_config/uri_corpus/f97598cff03306af3c70400608fec47268b5075d b/test/core/client_channel/uri_corpus/f97598cff03306af3c70400608fec47268b5075d similarity index 100% rename from test/core/client_config/uri_corpus/f97598cff03306af3c70400608fec47268b5075d rename to test/core/client_channel/uri_corpus/f97598cff03306af3c70400608fec47268b5075d diff --git a/test/core/client_config/uri_corpus/f9e1ec1fc642b575bc9955618b7065747f56b101 b/test/core/client_channel/uri_corpus/f9e1ec1fc642b575bc9955618b7065747f56b101 similarity index 100% rename from test/core/client_config/uri_corpus/f9e1ec1fc642b575bc9955618b7065747f56b101 rename to test/core/client_channel/uri_corpus/f9e1ec1fc642b575bc9955618b7065747f56b101 diff --git a/test/core/client_config/uri_corpus/fe0630a3aeed2ec6f474f362e4c839478290d5c4 b/test/core/client_channel/uri_corpus/fe0630a3aeed2ec6f474f362e4c839478290d5c4 similarity index 100% rename from test/core/client_config/uri_corpus/fe0630a3aeed2ec6f474f362e4c839478290d5c4 rename to test/core/client_channel/uri_corpus/fe0630a3aeed2ec6f474f362e4c839478290d5c4 diff --git a/test/core/client_config/uri_corpus/ipv4.txt b/test/core/client_channel/uri_corpus/ipv4.txt similarity index 100% rename from test/core/client_config/uri_corpus/ipv4.txt rename to test/core/client_channel/uri_corpus/ipv4.txt diff --git a/test/core/client_config/uri_corpus/ipv6.txt b/test/core/client_channel/uri_corpus/ipv6.txt similarity index 100% rename from test/core/client_config/uri_corpus/ipv6.txt rename to test/core/client_channel/uri_corpus/ipv6.txt diff --git a/test/core/client_config/uri_corpus/unix.txt b/test/core/client_channel/uri_corpus/unix.txt similarity index 100% rename from test/core/client_config/uri_corpus/unix.txt rename to test/core/client_channel/uri_corpus/unix.txt diff --git a/test/core/client_config/uri_fuzzer_test.c b/test/core/client_channel/uri_fuzzer_test.c similarity index 97% rename from test/core/client_config/uri_fuzzer_test.c rename to test/core/client_channel/uri_fuzzer_test.c index f297140559c..d2e3fb40eac 100644 --- a/test/core/client_config/uri_fuzzer_test.c +++ b/test/core/client_channel/uri_fuzzer_test.c @@ -37,7 +37,7 @@ #include -#include "src/core/ext/client_config/uri_parser.h" +#include "src/core/ext/client_channel/uri_parser.h" bool squelch = true; bool leak_check = true; diff --git a/test/core/client_config/uri_parser_test.c b/test/core/client_channel/uri_parser_test.c similarity index 99% rename from test/core/client_config/uri_parser_test.c rename to test/core/client_channel/uri_parser_test.c index 323e8b6f70b..5f32d3270c1 100644 --- a/test/core/client_config/uri_parser_test.c +++ b/test/core/client_channel/uri_parser_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/ext/client_config/uri_parser.h" +#include "src/core/ext/client_channel/uri_parser.h" #include diff --git a/test/core/end2end/fake_resolver.c b/test/core/end2end/fake_resolver.c index 32dc9e2711d..5669ce51e88 100644 --- a/test/core/end2end/fake_resolver.c +++ b/test/core/end2end/fake_resolver.c @@ -42,9 +42,9 @@ #include #include -#include "src/core/ext/client_config/method_config.h" -#include "src/core/ext/client_config/parse_address.h" -#include "src/core/ext/client_config/resolver_registry.h" +#include "src/core/ext/client_channel/method_config.h" +#include "src/core/ext/client_channel/parse_address.h" +#include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" diff --git a/test/core/end2end/fixtures/h2_census.c b/test/core/end2end/fixtures/h2_census.c index 36c2d24329c..c2e1acf57f6 100644 --- a/test/core/end2end/fixtures/h2_census.c +++ b/test/core/end2end/fixtures/h2_census.c @@ -41,7 +41,7 @@ #include #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/connected_channel.h" diff --git a/test/core/end2end/fixtures/h2_compress.c b/test/core/end2end/fixtures/h2_compress.c index 0e84588517a..94a198f380d 100644 --- a/test/core/end2end/fixtures/h2_compress.c +++ b/test/core/end2end/fixtures/h2_compress.c @@ -41,7 +41,7 @@ #include #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/connected_channel.h" diff --git a/test/core/end2end/fixtures/h2_fake_resolver.c b/test/core/end2end/fixtures/h2_fake_resolver.c index 89debddb044..429f3c95f91 100644 --- a/test/core/end2end/fixtures/h2_fake_resolver.c +++ b/test/core/end2end/fixtures/h2_fake_resolver.c @@ -41,7 +41,7 @@ #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/channel/http_server_filter.h" diff --git a/test/core/end2end/fixtures/h2_full+pipe.c b/test/core/end2end/fixtures/h2_full+pipe.c index 359af1aaf8c..5d4c44ce94f 100644 --- a/test/core/end2end/fixtures/h2_full+pipe.c +++ b/test/core/end2end/fixtures/h2_full+pipe.c @@ -41,7 +41,7 @@ #include #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/channel/http_server_filter.h" diff --git a/test/core/end2end/fixtures/h2_full+trace.c b/test/core/end2end/fixtures/h2_full+trace.c index ac997b05abf..64aa53a5ae8 100644 --- a/test/core/end2end/fixtures/h2_full+trace.c +++ b/test/core/end2end/fixtures/h2_full+trace.c @@ -41,7 +41,7 @@ #include #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/channel/http_server_filter.h" diff --git a/test/core/end2end/fixtures/h2_full.c b/test/core/end2end/fixtures/h2_full.c index a72ab3aedd3..182ce23a51b 100644 --- a/test/core/end2end/fixtures/h2_full.c +++ b/test/core/end2end/fixtures/h2_full.c @@ -41,7 +41,7 @@ #include #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/channel/http_server_filter.h" diff --git a/test/core/end2end/fixtures/h2_http_proxy.c b/test/core/end2end/fixtures/h2_http_proxy.c index f616da9ed5c..2acc06f5496 100644 --- a/test/core/end2end/fixtures/h2_http_proxy.c +++ b/test/core/end2end/fixtures/h2_http_proxy.c @@ -42,7 +42,7 @@ #include #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/channel/http_server_filter.h" diff --git a/test/core/end2end/fixtures/h2_load_reporting.c b/test/core/end2end/fixtures/h2_load_reporting.c index fc4db27e3ce..0957666a443 100644 --- a/test/core/end2end/fixtures/h2_load_reporting.c +++ b/test/core/end2end/fixtures/h2_load_reporting.c @@ -41,7 +41,7 @@ #include #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/load_reporting/load_reporting.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/core/end2end/fixtures/h2_proxy.c b/test/core/end2end/fixtures/h2_proxy.c index ea1da2abc11..2671e0abde8 100644 --- a/test/core/end2end/fixtures/h2_proxy.c +++ b/test/core/end2end/fixtures/h2_proxy.c @@ -41,7 +41,7 @@ #include #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/channel/http_server_filter.h" diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index f9688491407..ae54ca800f9 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -40,7 +40,7 @@ #include #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/compress_filter.h" #include "src/core/lib/channel/connected_channel.h" diff --git a/test/core/end2end/fixtures/h2_sockpair.c b/test/core/end2end/fixtures/h2_sockpair.c index 50eeaa30eb7..8f7083af59a 100644 --- a/test/core/end2end/fixtures/h2_sockpair.c +++ b/test/core/end2end/fixtures/h2_sockpair.c @@ -40,7 +40,7 @@ #include #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/compress_filter.h" #include "src/core/lib/channel/connected_channel.h" diff --git a/test/core/end2end/fixtures/h2_sockpair_1byte.c b/test/core/end2end/fixtures/h2_sockpair_1byte.c index 795fe51d893..b3d9924c122 100644 --- a/test/core/end2end/fixtures/h2_sockpair_1byte.c +++ b/test/core/end2end/fixtures/h2_sockpair_1byte.c @@ -40,7 +40,7 @@ #include #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/compress_filter.h" #include "src/core/lib/channel/connected_channel.h" diff --git a/test/core/end2end/fixtures/h2_uds.c b/test/core/end2end/fixtures/h2_uds.c index e280bb8c291..888d6c0a10a 100644 --- a/test/core/end2end/fixtures/h2_uds.c +++ b/test/core/end2end/fixtures/h2_uds.c @@ -44,7 +44,7 @@ #include #include #include -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/channel/http_server_filter.h" diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary index 181bbe845e1..12db0ff0248 100644 --- a/test/core/end2end/fuzzers/hpack.dictionary +++ b/test/core/end2end/fuzzers/hpack.dictionary @@ -63,7 +63,7 @@ "\x08if-range" "\x13if-unmodified-since" "\x0Dlast-modified" -"\x07lb-cost" +"\x0Blb-cost-bin" "\x08lb-token" "\x04link" "\x08location" @@ -138,7 +138,7 @@ "\x00\x08if-range\x00" "\x00\x13if-unmodified-since\x00" "\x00\x0Dlast-modified\x00" -"\x00\x07lb-cost\x00" +"\x00\x0Blb-cost-bin\x00" "\x00\x08lb-token\x00" "\x00\x04link\x00" "\x00\x08location\x00" diff --git a/test/core/surface/channel_create_test.c b/test/core/surface/channel_create_test.c index 580eb303f68..ad7970aab9d 100644 --- a/test/core/surface/channel_create_test.c +++ b/test/core/surface/channel_create_test.c @@ -33,7 +33,7 @@ #include #include -#include "src/core/ext/client_config/resolver_registry.h" +#include "src/core/ext/client_channel/resolver_registry.h" #include "test/core/util/test_config.h" void test_unknown_scheme_target(void) { diff --git a/test/core/surface/secure_channel_create_test.c b/test/core/surface/secure_channel_create_test.c index f8a9a642115..444ebdc0938 100644 --- a/test/core/surface/secure_channel_create_test.c +++ b/test/core/surface/secure_channel_create_test.c @@ -36,7 +36,7 @@ #include #include #include -#include "src/core/ext/client_config/resolver_registry.h" +#include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/security/transport/security_connector.h" #include "src/core/lib/surface/channel.h" diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index 80f2fa4f4d9..b6056f9ae4c 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -51,7 +51,7 @@ #include extern "C" { -#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/support/string.h" diff --git a/test/cpp/interop/interop_test.cc b/test/cpp/interop/interop_test.cc index 8e71a2bb295..c066598d363 100644 --- a/test/cpp/interop/interop_test.cc +++ b/test/cpp/interop/interop_test.cc @@ -44,17 +44,21 @@ #include #include +#include #include #include #include #include #include "test/core/util/port.h" +#include "test/cpp/util/test_config.h" extern "C" { #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/support/string.h" } +DEFINE_string(extra_server_flags, "", "Extra flags to pass to server."); + int test_client(const char* root, const char* host, int port) { int status; pid_t cli; @@ -80,6 +84,7 @@ int test_client(const char* root, const char* host, int port) { } int main(int argc, char** argv) { + grpc::testing::InitTest(&argc, &argv, true); char* me = argv[0]; char* lslash = strrchr(me, '/'); char root[1024]; @@ -105,15 +110,19 @@ int main(int argc, char** argv) { /* start the server */ svr = fork(); if (svr == 0) { - char* binary_path; - char* port_arg; - gpr_asprintf(&binary_path, "%s/interop_server", root); - gpr_asprintf(&port_arg, "--port=%d", port); - - execl(binary_path, binary_path, port_arg, NULL); - - gpr_free(binary_path); - gpr_free(port_arg); + const size_t num_args = 3 + !FLAGS_extra_server_flags.empty(); + char** args = (char**)gpr_malloc(sizeof(char*) * num_args); + memset(args, 0, sizeof(char*) * num_args); + gpr_asprintf(&args[0], "%s/interop_server", root); + gpr_asprintf(&args[1], "--port=%d", port); + if (!FLAGS_extra_server_flags.empty()) { + args[2] = gpr_strdup(FLAGS_extra_server_flags.c_str()); + } + execv(args[0], args); + for (size_t i = 0; i < num_args - 1; ++i) { + gpr_free(args[i]); + } + gpr_free(args); return 1; } /* wait a little */ diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index 6f8cad279c8..cf3762dbb8d 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -110,7 +110,7 @@ CONFIG = [ ('if-unmodified-since', ''), ('last-modified', ''), ('lb-token', ''), - ('lb-cost', ''), + ('lb-cost-bin', ''), ('link', ''), ('location', ''), ('max-forwards', ''), diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 5c11ed49f5f..be10d59ed3f 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -917,23 +917,23 @@ src/core/lib/tsi/ssl_transport_security.h \ src/core/lib/tsi/ssl_types.h \ src/core/lib/tsi/transport_security.h \ src/core/lib/tsi/transport_security_interface.h \ -src/core/ext/client_config/client_channel.h \ -src/core/ext/client_config/client_channel_factory.h \ -src/core/ext/client_config/connector.h \ -src/core/ext/client_config/http_connect_handshaker.h \ -src/core/ext/client_config/initial_connect_string.h \ -src/core/ext/client_config/lb_policy.h \ -src/core/ext/client_config/lb_policy_factory.h \ -src/core/ext/client_config/lb_policy_registry.h \ -src/core/ext/client_config/method_config.h \ -src/core/ext/client_config/parse_address.h \ -src/core/ext/client_config/resolver.h \ -src/core/ext/client_config/resolver_factory.h \ -src/core/ext/client_config/resolver_registry.h \ -src/core/ext/client_config/resolver_result.h \ -src/core/ext/client_config/subchannel.h \ -src/core/ext/client_config/subchannel_index.h \ -src/core/ext/client_config/uri_parser.h \ +src/core/ext/client_channel/client_channel.h \ +src/core/ext/client_channel/client_channel_factory.h \ +src/core/ext/client_channel/connector.h \ +src/core/ext/client_channel/http_connect_handshaker.h \ +src/core/ext/client_channel/initial_connect_string.h \ +src/core/ext/client_channel/lb_policy.h \ +src/core/ext/client_channel/lb_policy_factory.h \ +src/core/ext/client_channel/lb_policy_registry.h \ +src/core/ext/client_channel/method_config.h \ +src/core/ext/client_channel/parse_address.h \ +src/core/ext/client_channel/resolver.h \ +src/core/ext/client_channel/resolver_factory.h \ +src/core/ext/client_channel/resolver_registry.h \ +src/core/ext/client_channel/resolver_result.h \ +src/core/ext/client_channel/subchannel.h \ +src/core/ext/client_channel/subchannel_index.h \ +src/core/ext/client_channel/uri_parser.h \ src/core/ext/lb_policy/grpclb/grpclb.h \ src/core/ext/lb_policy/grpclb/load_balancer_api.h \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h \ @@ -1101,26 +1101,26 @@ src/core/lib/tsi/fake_transport_security.c \ src/core/lib/tsi/ssl_transport_security.c \ src/core/lib/tsi/transport_security.c \ src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \ -src/core/ext/client_config/channel_connectivity.c \ -src/core/ext/client_config/client_channel.c \ -src/core/ext/client_config/client_channel_factory.c \ -src/core/ext/client_config/client_config_plugin.c \ -src/core/ext/client_config/connector.c \ -src/core/ext/client_config/default_initial_connect_string.c \ -src/core/ext/client_config/http_connect_handshaker.c \ -src/core/ext/client_config/initial_connect_string.c \ -src/core/ext/client_config/lb_policy.c \ -src/core/ext/client_config/lb_policy_factory.c \ -src/core/ext/client_config/lb_policy_registry.c \ -src/core/ext/client_config/method_config.c \ -src/core/ext/client_config/parse_address.c \ -src/core/ext/client_config/resolver.c \ -src/core/ext/client_config/resolver_factory.c \ -src/core/ext/client_config/resolver_registry.c \ -src/core/ext/client_config/resolver_result.c \ -src/core/ext/client_config/subchannel.c \ -src/core/ext/client_config/subchannel_index.c \ -src/core/ext/client_config/uri_parser.c \ +src/core/ext/client_channel/channel_connectivity.c \ +src/core/ext/client_channel/client_channel.c \ +src/core/ext/client_channel/client_channel_factory.c \ +src/core/ext/client_channel/client_channel_plugin.c \ +src/core/ext/client_channel/connector.c \ +src/core/ext/client_channel/default_initial_connect_string.c \ +src/core/ext/client_channel/http_connect_handshaker.c \ +src/core/ext/client_channel/initial_connect_string.c \ +src/core/ext/client_channel/lb_policy.c \ +src/core/ext/client_channel/lb_policy_factory.c \ +src/core/ext/client_channel/lb_policy_registry.c \ +src/core/ext/client_channel/method_config.c \ +src/core/ext/client_channel/parse_address.c \ +src/core/ext/client_channel/resolver.c \ +src/core/ext/client_channel/resolver_factory.c \ +src/core/ext/client_channel/resolver_registry.c \ +src/core/ext/client_channel/resolver_result.c \ +src/core/ext/client_channel/subchannel.c \ +src/core/ext/client_channel/subchannel_index.c \ +src/core/ext/client_channel/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ diff --git a/tools/fuzzer/runners/uri_fuzzer_test.sh b/tools/fuzzer/runners/uri_fuzzer_test.sh index 84d63bf4142..316f6c2599f 100644 --- a/tools/fuzzer/runners/uri_fuzzer_test.sh +++ b/tools/fuzzer/runners/uri_fuzzer_test.sh @@ -42,4 +42,4 @@ then flags="-use_traces=1 $flags" fi -bins/$config/uri_fuzzer_test $flags fuzzer_output test/core/client_config/uri_corpus +bins/$config/uri_fuzzer_test $flags fuzzer_output test/core/client_channel/uri_corpus diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 13bd6295232..3e339c22c51 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -222,6 +222,16 @@ class CXXLanguage: server_core_limit=1, async_server_threads=1, secure=secure) + yield _ping_pong_scenario( + 'cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_%s' % + (secstr), + rpc_type='UNARY', + client_type='ASYNC_CLIENT', + server_type='SYNC_SERVER', + unconstrained_client='async', + secure=secure, + categories=smoketest_categories + [SCALABLE]) + for rpc_type in ['unary', 'streaming']: for synchronicity in ['sync', 'async']: yield _ping_pong_scenario( diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index 92149115fe2..099ab89ddff 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -91,12 +91,11 @@ def create_qpsworker_job(language, shortname=None, else: host_and_port='localhost:%s' % port - # TODO(jtattermusch): with some care, we can calculate the right timeout - # of a worker from the sum of warmup + benchmark times for all the scenarios jobspec = jobset.JobSpec( cmdline=cmdline, shortname=shortname, - timeout_seconds=2*60*60) + timeout_seconds=5*60, # workers get restarted after each scenario + verbose_success=True) return QpsWorkerJob(jobspec, language, host_and_port) @@ -357,6 +356,7 @@ def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*', def finish_qps_workers(jobs): """Waits for given jobs to finish and eventually kills them.""" retries = 0 + num_killed = 0 while any(job.is_running() for job in jobs): for job in qpsworker_jobs: if job.is_running(): @@ -365,10 +365,11 @@ def finish_qps_workers(jobs): print('Killing all QPS workers.') for job in jobs: job.kill() + num_killed += 1 retries += 1 time.sleep(3) print('All QPS workers finished.') - + return num_killed argp = argparse.ArgumentParser(description='Run performance tests.') argp.add_argument('-l', '--language', @@ -450,6 +451,8 @@ scenarios = create_scenarios(languages, if not scenarios: raise Exception('No scenarios to run') +total_scenario_failures = 0 +qps_workers_killed = 0 for scenario in scenarios: if args.dry_run: print(scenario.name) @@ -457,8 +460,14 @@ for scenario in scenarios: try: for worker in scenario.workers: worker.start() - jobset.run([scenario.jobspec, - create_quit_jobspec(scenario.workers, remote_host=args.remote_driver_host)], - newline_on_success=True, maxjobs=1) + scenario_failures, _ = jobset.run([scenario.jobspec, + create_quit_jobspec(scenario.workers, remote_host=args.remote_driver_host)], + newline_on_success=True, maxjobs=1) + total_scenario_failures += scenario_failures finally: - finish_qps_workers(scenario.workers) + # Consider qps workers that need to be killed as failures + qps_workers_killed += finish_qps_workers(scenario.workers) + +if total_scenario_failures > 0 or qps_workers_killed > 0: + print ("%s scenarios failed and %s qps worker jobs killed" % (total_scenario_failures, qps_workers_killed)) + sys.exit(1) diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 307b89900d1..9a49c614800 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -365,7 +365,7 @@ "language": "c", "name": "dns_resolver_connectivity_test", "src": [ - "test/core/client_config/resolvers/dns_resolver_connectivity_test.c" + "test/core/client_channel/resolvers/dns_resolver_connectivity_test.c" ], "third_party": false, "type": "target" @@ -382,7 +382,7 @@ "language": "c", "name": "dns_resolver_test", "src": [ - "test/core/client_config/resolvers/dns_resolver_test.c" + "test/core/client_channel/resolvers/dns_resolver_test.c" ], "third_party": false, "type": "target" @@ -1480,7 +1480,7 @@ "language": "c", "name": "lb_policies_test", "src": [ - "test/core/client_config/lb_policies_test.c" + "test/core/client_channel/lb_policies_test.c" ], "third_party": false, "type": "target" @@ -1819,7 +1819,7 @@ "language": "c", "name": "set_initial_connect_string_test", "src": [ - "test/core/client_config/set_initial_connect_string_test.c" + "test/core/client_channel/set_initial_connect_string_test.c" ], "third_party": false, "type": "target" @@ -1836,7 +1836,7 @@ "language": "c", "name": "sockaddr_resolver_test", "src": [ - "test/core/client_config/resolvers/sockaddr_resolver_test.c" + "test/core/client_channel/resolvers/sockaddr_resolver_test.c" ], "third_party": false, "type": "target" @@ -2074,7 +2074,7 @@ "language": "c", "name": "uri_fuzzer_test", "src": [ - "test/core/client_config/uri_fuzzer_test.c" + "test/core/client_channel/uri_fuzzer_test.c" ], "third_party": false, "type": "target" @@ -2091,7 +2091,7 @@ "language": "c", "name": "uri_parser_test", "src": [ - "test/core/client_config/uri_parser_test.c" + "test/core/client_channel/uri_parser_test.c" ], "third_party": false, "type": "target" @@ -2712,6 +2712,7 @@ "gpr", "gpr_test_util", "grpc", + "grpc++_test_config", "grpc_test_util" ], "headers": [], @@ -4749,7 +4750,7 @@ "language": "c", "name": "uri_fuzzer_test_one_entry", "src": [ - "test/core/client_config/uri_fuzzer_test.c", + "test/core/client_channel/uri_fuzzer_test.c", "test/core/util/one_corpus_entry_fuzzer.c" ], "third_party": false, @@ -6746,65 +6747,65 @@ "grpc_base" ], "headers": [ - "src/core/ext/client_config/client_channel.h", - "src/core/ext/client_config/client_channel_factory.h", - "src/core/ext/client_config/connector.h", - "src/core/ext/client_config/http_connect_handshaker.h", - "src/core/ext/client_config/initial_connect_string.h", - "src/core/ext/client_config/lb_policy.h", - "src/core/ext/client_config/lb_policy_factory.h", - "src/core/ext/client_config/lb_policy_registry.h", - "src/core/ext/client_config/method_config.h", - "src/core/ext/client_config/parse_address.h", - "src/core/ext/client_config/resolver.h", - "src/core/ext/client_config/resolver_factory.h", - "src/core/ext/client_config/resolver_registry.h", - "src/core/ext/client_config/resolver_result.h", - "src/core/ext/client_config/subchannel.h", - "src/core/ext/client_config/subchannel_index.h", - "src/core/ext/client_config/uri_parser.h" + "src/core/ext/client_channel/client_channel.h", + "src/core/ext/client_channel/client_channel_factory.h", + "src/core/ext/client_channel/connector.h", + "src/core/ext/client_channel/http_connect_handshaker.h", + "src/core/ext/client_channel/initial_connect_string.h", + "src/core/ext/client_channel/lb_policy.h", + "src/core/ext/client_channel/lb_policy_factory.h", + "src/core/ext/client_channel/lb_policy_registry.h", + "src/core/ext/client_channel/method_config.h", + "src/core/ext/client_channel/parse_address.h", + "src/core/ext/client_channel/resolver.h", + "src/core/ext/client_channel/resolver_factory.h", + "src/core/ext/client_channel/resolver_registry.h", + "src/core/ext/client_channel/resolver_result.h", + "src/core/ext/client_channel/subchannel.h", + "src/core/ext/client_channel/subchannel_index.h", + "src/core/ext/client_channel/uri_parser.h" ], "is_filegroup": true, "language": "c", - "name": "grpc_client_config", - "src": [ - "src/core/ext/client_config/channel_connectivity.c", - "src/core/ext/client_config/client_channel.c", - "src/core/ext/client_config/client_channel.h", - "src/core/ext/client_config/client_channel_factory.c", - "src/core/ext/client_config/client_channel_factory.h", - "src/core/ext/client_config/client_config_plugin.c", - "src/core/ext/client_config/connector.c", - "src/core/ext/client_config/connector.h", - "src/core/ext/client_config/default_initial_connect_string.c", - "src/core/ext/client_config/http_connect_handshaker.c", - "src/core/ext/client_config/http_connect_handshaker.h", - "src/core/ext/client_config/initial_connect_string.c", - "src/core/ext/client_config/initial_connect_string.h", - "src/core/ext/client_config/lb_policy.c", - "src/core/ext/client_config/lb_policy.h", - "src/core/ext/client_config/lb_policy_factory.c", - "src/core/ext/client_config/lb_policy_factory.h", - "src/core/ext/client_config/lb_policy_registry.c", - "src/core/ext/client_config/lb_policy_registry.h", - "src/core/ext/client_config/method_config.c", - "src/core/ext/client_config/method_config.h", - "src/core/ext/client_config/parse_address.c", - "src/core/ext/client_config/parse_address.h", - "src/core/ext/client_config/resolver.c", - "src/core/ext/client_config/resolver.h", - "src/core/ext/client_config/resolver_factory.c", - "src/core/ext/client_config/resolver_factory.h", - "src/core/ext/client_config/resolver_registry.c", - "src/core/ext/client_config/resolver_registry.h", - "src/core/ext/client_config/resolver_result.c", - "src/core/ext/client_config/resolver_result.h", - "src/core/ext/client_config/subchannel.c", - "src/core/ext/client_config/subchannel.h", - "src/core/ext/client_config/subchannel_index.c", - "src/core/ext/client_config/subchannel_index.h", - "src/core/ext/client_config/uri_parser.c", - "src/core/ext/client_config/uri_parser.h" + "name": "grpc_client_channel", + "src": [ + "src/core/ext/client_channel/channel_connectivity.c", + "src/core/ext/client_channel/client_channel.c", + "src/core/ext/client_channel/client_channel.h", + "src/core/ext/client_channel/client_channel_factory.c", + "src/core/ext/client_channel/client_channel_factory.h", + "src/core/ext/client_channel/client_channel_plugin.c", + "src/core/ext/client_channel/connector.c", + "src/core/ext/client_channel/connector.h", + "src/core/ext/client_channel/default_initial_connect_string.c", + "src/core/ext/client_channel/http_connect_handshaker.c", + "src/core/ext/client_channel/http_connect_handshaker.h", + "src/core/ext/client_channel/initial_connect_string.c", + "src/core/ext/client_channel/initial_connect_string.h", + "src/core/ext/client_channel/lb_policy.c", + "src/core/ext/client_channel/lb_policy.h", + "src/core/ext/client_channel/lb_policy_factory.c", + "src/core/ext/client_channel/lb_policy_factory.h", + "src/core/ext/client_channel/lb_policy_registry.c", + "src/core/ext/client_channel/lb_policy_registry.h", + "src/core/ext/client_channel/method_config.c", + "src/core/ext/client_channel/method_config.h", + "src/core/ext/client_channel/parse_address.c", + "src/core/ext/client_channel/parse_address.h", + "src/core/ext/client_channel/resolver.c", + "src/core/ext/client_channel/resolver.h", + "src/core/ext/client_channel/resolver_factory.c", + "src/core/ext/client_channel/resolver_factory.h", + "src/core/ext/client_channel/resolver_registry.c", + "src/core/ext/client_channel/resolver_registry.h", + "src/core/ext/client_channel/resolver_result.c", + "src/core/ext/client_channel/resolver_result.h", + "src/core/ext/client_channel/subchannel.c", + "src/core/ext/client_channel/subchannel.h", + "src/core/ext/client_channel/subchannel_index.c", + "src/core/ext/client_channel/subchannel_index.h", + "src/core/ext/client_channel/uri_parser.c", + "src/core/ext/client_channel/uri_parser.h" ], "third_party": false, "type": "filegroup" @@ -6839,7 +6840,7 @@ "deps": [ "gpr", "grpc_base", - "grpc_client_config", + "grpc_client_channel", "nanopb" ], "headers": [ @@ -6865,7 +6866,7 @@ "deps": [ "gpr", "grpc_base", - "grpc_client_config" + "grpc_client_channel" ], "headers": [], "is_filegroup": true, @@ -6881,7 +6882,7 @@ "deps": [ "gpr", "grpc_base", - "grpc_client_config" + "grpc_client_channel" ], "headers": [], "is_filegroup": true, @@ -6918,7 +6919,7 @@ "deps": [ "gpr", "grpc_base", - "grpc_client_config" + "grpc_client_channel" ], "headers": [], "is_filegroup": true, @@ -6934,7 +6935,7 @@ "deps": [ "gpr", "grpc_base", - "grpc_client_config" + "grpc_client_channel" ], "headers": [], "is_filegroup": true, @@ -7181,7 +7182,7 @@ "deps": [ "gpr", "grpc_base", - "grpc_client_config", + "grpc_client_channel", "grpc_transport_chttp2" ], "headers": [], @@ -7199,7 +7200,7 @@ "deps": [ "gpr", "grpc_base", - "grpc_client_config", + "grpc_client_channel", "grpc_secure", "grpc_transport_chttp2" ], diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index a35def57d00..a1d59c00537 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -34141,6 +34141,27 @@ "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_secure", "timeout_seconds": 180 }, + { + "args": [ + "--scenarios_json", + "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" + ], + "boringssl": true, + "ci_platforms": [ + "linux" + ], + "cpu_cost": 8, + "defaults": "boringssl", + "exclude_configs": [], + "flaky": false, + "language": "c++", + "name": "json_run_localhost", + "platforms": [ + "linux" + ], + "shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_secure", + "timeout_seconds": 180 + }, { "args": [ "--scenarios_json", @@ -34456,6 +34477,27 @@ "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_insecure", "timeout_seconds": 180 }, + { + "args": [ + "--scenarios_json", + "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" + ], + "boringssl": true, + "ci_platforms": [ + "linux" + ], + "cpu_cost": 8, + "defaults": "boringssl", + "exclude_configs": [], + "flaky": false, + "language": "c++", + "name": "json_run_localhost", + "platforms": [ + "linux" + ], + "shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_insecure", + "timeout_seconds": 180 + }, { "args": [ "--scenarios_json", @@ -100279,7 +100321,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/02d156dc5e6f2c11c90c2e06fcee04adf036a342" + "test/core/client_channel/uri_corpus/02d156dc5e6f2c11c90c2e06fcee04adf036a342" ], "ci_platforms": [ "linux" @@ -100298,7 +100340,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/042dc4512fa3d391c5170cf3aa61e6a638f84342" + "test/core/client_channel/uri_corpus/042dc4512fa3d391c5170cf3aa61e6a638f84342" ], "ci_platforms": [ "linux" @@ -100317,7 +100359,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/0e9bbe975f2027e8c39c89f85f667530368e7d11" + "test/core/client_channel/uri_corpus/0e9bbe975f2027e8c39c89f85f667530368e7d11" ], "ci_platforms": [ "linux" @@ -100336,7 +100378,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/1155aa6ea7ef262a81a63692513ea395f84dad6f" + "test/core/client_channel/uri_corpus/1155aa6ea7ef262a81a63692513ea395f84dad6f" ], "ci_platforms": [ "linux" @@ -100355,7 +100397,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/13856a5569ffd085a4d5c07af5f8e9310835a118" + "test/core/client_channel/uri_corpus/13856a5569ffd085a4d5c07af5f8e9310835a118" ], "ci_platforms": [ "linux" @@ -100374,7 +100416,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/14b57bcbf1e17b1db1de491ef2ba3768f704b7dc" + "test/core/client_channel/uri_corpus/14b57bcbf1e17b1db1de491ef2ba3768f704b7dc" ], "ci_platforms": [ "linux" @@ -100393,7 +100435,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/1794310671a060eead6e5ee66ac978a18ec7e84f" + "test/core/client_channel/uri_corpus/1794310671a060eead6e5ee66ac978a18ec7e84f" ], "ci_platforms": [ "linux" @@ -100412,7 +100454,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/1d30b2a79afbaf2828ff42b9a9647e942ba1ab80" + "test/core/client_channel/uri_corpus/1d30b2a79afbaf2828ff42b9a9647e942ba1ab80" ], "ci_platforms": [ "linux" @@ -100431,7 +100473,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/1fcf5d9c333b70596cf5ba04d1f7affdf445b971" + "test/core/client_channel/uri_corpus/1fcf5d9c333b70596cf5ba04d1f7affdf445b971" ], "ci_platforms": [ "linux" @@ -100450,7 +100492,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/23162c8a8936e20b195404c21337ee734d02a6bc" + "test/core/client_channel/uri_corpus/23162c8a8936e20b195404c21337ee734d02a6bc" ], "ci_platforms": [ "linux" @@ -100469,7 +100511,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/23f3198b815ca60bdadcaae682b9f965dda387f1" + "test/core/client_channel/uri_corpus/23f3198b815ca60bdadcaae682b9f965dda387f1" ], "ci_platforms": [ "linux" @@ -100488,7 +100530,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/2ef3893b43f1f60b77b59ce06a6bce9815d78eaf" + "test/core/client_channel/uri_corpus/2ef3893b43f1f60b77b59ce06a6bce9815d78eaf" ], "ci_platforms": [ "linux" @@ -100507,7 +100549,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/356c3c129e203b5c74550b4209764d74b9caefce" + "test/core/client_channel/uri_corpus/356c3c129e203b5c74550b4209764d74b9caefce" ], "ci_platforms": [ "linux" @@ -100526,7 +100568,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/396568fc41c8ccb31ec925b4a862e4d29ead1327" + "test/core/client_channel/uri_corpus/396568fc41c8ccb31ec925b4a862e4d29ead1327" ], "ci_platforms": [ "linux" @@ -100545,7 +100587,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/3b1e7526a99918006b87e499d2beb6c4ac9c3c0c" + "test/core/client_channel/uri_corpus/3b1e7526a99918006b87e499d2beb6c4ac9c3c0c" ], "ci_platforms": [ "linux" @@ -100564,7 +100606,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/3b58860f3451d3e7aad99690a8d39782ca5116fc" + "test/core/client_channel/uri_corpus/3b58860f3451d3e7aad99690a8d39782ca5116fc" ], "ci_platforms": [ "linux" @@ -100583,7 +100625,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/41963cc10752f70c3af7e3d85868efb097a0ea9c" + "test/core/client_channel/uri_corpus/41963cc10752f70c3af7e3d85868efb097a0ea9c" ], "ci_platforms": [ "linux" @@ -100602,7 +100644,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/47b5228404451fc9d4071fa69192514bb4ce33c1" + "test/core/client_channel/uri_corpus/47b5228404451fc9d4071fa69192514bb4ce33c1" ], "ci_platforms": [ "linux" @@ -100621,7 +100663,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/56a2da4b2e6fb795243901023ed8d0aa083d1aab" + "test/core/client_channel/uri_corpus/56a2da4b2e6fb795243901023ed8d0aa083d1aab" ], "ci_platforms": [ "linux" @@ -100640,7 +100682,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/574c2f13858a9a6d724654bd913ede9ae3abf822" + "test/core/client_channel/uri_corpus/574c2f13858a9a6d724654bd913ede9ae3abf822" ], "ci_platforms": [ "linux" @@ -100659,7 +100701,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/582f789c19033a152094cbf8565f14154a778ddb" + "test/core/client_channel/uri_corpus/582f789c19033a152094cbf8565f14154a778ddb" ], "ci_platforms": [ "linux" @@ -100678,7 +100720,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/636c5606fc23713a1bae88c8899c0541cfad4fd8" + "test/core/client_channel/uri_corpus/636c5606fc23713a1bae88c8899c0541cfad4fd8" ], "ci_platforms": [ "linux" @@ -100697,7 +100739,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/63fe493b270b17426d77a27cbf3abac5b2c2794a" + "test/core/client_channel/uri_corpus/63fe493b270b17426d77a27cbf3abac5b2c2794a" ], "ci_platforms": [ "linux" @@ -100716,7 +100758,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/655300a902b62662296a8e46bfb04fbcb07182cb" + "test/core/client_channel/uri_corpus/655300a902b62662296a8e46bfb04fbcb07182cb" ], "ci_platforms": [ "linux" @@ -100735,7 +100777,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/6ae3acd9d8507b61bf235748026080a4138dba58" + "test/core/client_channel/uri_corpus/6ae3acd9d8507b61bf235748026080a4138dba58" ], "ci_platforms": [ "linux" @@ -100754,7 +100796,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/6b70979a70a038ff6607d6cf85485ee95baf58e6" + "test/core/client_channel/uri_corpus/6b70979a70a038ff6607d6cf85485ee95baf58e6" ], "ci_platforms": [ "linux" @@ -100773,7 +100815,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/7314ab3545a7535a26e0e8aad67caea5534d68b1" + "test/core/client_channel/uri_corpus/7314ab3545a7535a26e0e8aad67caea5534d68b1" ], "ci_platforms": [ "linux" @@ -100792,7 +100834,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/7ff4d8b8d1ffd0d42c48bbb91e5856a9ec31aecb" + "test/core/client_channel/uri_corpus/7ff4d8b8d1ffd0d42c48bbb91e5856a9ec31aecb" ], "ci_platforms": [ "linux" @@ -100811,7 +100853,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/87daa131e0973b77a232a870ed749ef29cf58e6d" + "test/core/client_channel/uri_corpus/87daa131e0973b77a232a870ed749ef29cf58e6d" ], "ci_platforms": [ "linux" @@ -100830,7 +100872,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/884dcaee2908ffe5f12b65b8eba81016099c4266" + "test/core/client_channel/uri_corpus/884dcaee2908ffe5f12b65b8eba81016099c4266" ], "ci_platforms": [ "linux" @@ -100849,7 +100891,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/8d7e944fd5d0ede94097fcc98b47b09a3f9c76cb" + "test/core/client_channel/uri_corpus/8d7e944fd5d0ede94097fcc98b47b09a3f9c76cb" ], "ci_platforms": [ "linux" @@ -100868,7 +100910,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/9671149af0b444f59bbdf71340d3441dadd8a7b4" + "test/core/client_channel/uri_corpus/9671149af0b444f59bbdf71340d3441dadd8a7b4" ], "ci_platforms": [ "linux" @@ -100887,7 +100929,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/96c8d266b7dc037288ef305c996608270f72e7fb" + "test/core/client_channel/uri_corpus/96c8d266b7dc037288ef305c996608270f72e7fb" ], "ci_platforms": [ "linux" @@ -100906,7 +100948,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/975536c71ade4800415a7e9c2f1b45c35a6d5ea8" + "test/core/client_channel/uri_corpus/975536c71ade4800415a7e9c2f1b45c35a6d5ea8" ], "ci_platforms": [ "linux" @@ -100925,7 +100967,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/99750aa67d30beaea8af565c829d4999aa8cb91b" + "test/core/client_channel/uri_corpus/99750aa67d30beaea8af565c829d4999aa8cb91b" ], "ci_platforms": [ "linux" @@ -100944,7 +100986,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/a1140f3f8b5cffc1010221b9a4084a25fb75c1f6" + "test/core/client_channel/uri_corpus/a1140f3f8b5cffc1010221b9a4084a25fb75c1f6" ], "ci_platforms": [ "linux" @@ -100963,7 +101005,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/a1f0f9b75bb354eb063d7cba4fcfa2d0b88d63de" + "test/core/client_channel/uri_corpus/a1f0f9b75bb354eb063d7cba4fcfa2d0b88d63de" ], "ci_platforms": [ "linux" @@ -100982,7 +101024,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/a296eb3d1d436ed7df7195b10aa3c4de3896f98d" + "test/core/client_channel/uri_corpus/a296eb3d1d436ed7df7195b10aa3c4de3896f98d" ], "ci_platforms": [ "linux" @@ -101001,7 +101043,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/a8b8e66050b424f1b8c07d46f868199fb7f60e38" + "test/core/client_channel/uri_corpus/a8b8e66050b424f1b8c07d46f868199fb7f60e38" ], "ci_platforms": [ "linux" @@ -101020,7 +101062,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/aba1472880406a318ce207ee79815b7acf087757" + "test/core/client_channel/uri_corpus/aba1472880406a318ce207ee79815b7acf087757" ], "ci_platforms": [ "linux" @@ -101039,7 +101081,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/af55baf8c8855e563befdf1eefbcbd46c5ddb8d2" + "test/core/client_channel/uri_corpus/af55baf8c8855e563befdf1eefbcbd46c5ddb8d2" ], "ci_platforms": [ "linux" @@ -101058,7 +101100,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/b3c0bf66c2bf5d24ef1daf4cc5a9d6d5bd0e8bfd" + "test/core/client_channel/uri_corpus/b3c0bf66c2bf5d24ef1daf4cc5a9d6d5bd0e8bfd" ], "ci_platforms": [ "linux" @@ -101077,7 +101119,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/c28a47409cf5d95bb372238d01e73d8b831408e4" + "test/core/client_channel/uri_corpus/c28a47409cf5d95bb372238d01e73d8b831408e4" ], "ci_platforms": [ "linux" @@ -101096,7 +101138,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/c3ef1d41888063a08700c3add1e4465aabcf8807" + "test/core/client_channel/uri_corpus/c3ef1d41888063a08700c3add1e4465aabcf8807" ], "ci_platforms": [ "linux" @@ -101115,7 +101157,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/c550a76af21f9b9cc92a386d5c8998b26f8f2e4d" + "test/core/client_channel/uri_corpus/c550a76af21f9b9cc92a386d5c8998b26f8f2e4d" ], "ci_platforms": [ "linux" @@ -101134,7 +101176,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/c79721406d0ab80495f186fd88e37fba98637ae9" + "test/core/client_channel/uri_corpus/c79721406d0ab80495f186fd88e37fba98637ae9" ], "ci_platforms": [ "linux" @@ -101153,7 +101195,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/ceb4e2264ba7a8d5be47d276b37ec09489e00245" + "test/core/client_channel/uri_corpus/ceb4e2264ba7a8d5be47d276b37ec09489e00245" ], "ci_platforms": [ "linux" @@ -101172,7 +101214,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/cf4395958f5bfb46fd6f535a39657d016c75114c" + "test/core/client_channel/uri_corpus/cf4395958f5bfb46fd6f535a39657d016c75114c" ], "ci_platforms": [ "linux" @@ -101191,7 +101233,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/d46668372b7e20154a89409a7430a28e642afdca" + "test/core/client_channel/uri_corpus/d46668372b7e20154a89409a7430a28e642afdca" ], "ci_platforms": [ "linux" @@ -101210,7 +101252,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/d6fe7412a0a1d1c733160246f3fa425f4f97682a" + "test/core/client_channel/uri_corpus/d6fe7412a0a1d1c733160246f3fa425f4f97682a" ], "ci_platforms": [ "linux" @@ -101229,7 +101271,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/dns.txt" + "test/core/client_channel/uri_corpus/dns.txt" ], "ci_platforms": [ "linux" @@ -101248,7 +101290,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/e241f29957b0e30ec11aaaf91b2339f7015fa5fd" + "test/core/client_channel/uri_corpus/e241f29957b0e30ec11aaaf91b2339f7015fa5fd" ], "ci_platforms": [ "linux" @@ -101267,7 +101309,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/ea02d9fea9bad5b89cf353a0169238f584177e71" + "test/core/client_channel/uri_corpus/ea02d9fea9bad5b89cf353a0169238f584177e71" ], "ci_platforms": [ "linux" @@ -101286,7 +101328,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/ec4731dddf94ed3ea92ae4d5a71f145ab6e3f6ee" + "test/core/client_channel/uri_corpus/ec4731dddf94ed3ea92ae4d5a71f145ab6e3f6ee" ], "ci_platforms": [ "linux" @@ -101305,7 +101347,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/ed2f78646f19fc47dd85ff0877c232b71913ece2" + "test/core/client_channel/uri_corpus/ed2f78646f19fc47dd85ff0877c232b71913ece2" ], "ci_platforms": [ "linux" @@ -101324,7 +101366,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/f6889f4a6350fea1596a3adea5cdac02bd5d1ff3" + "test/core/client_channel/uri_corpus/f6889f4a6350fea1596a3adea5cdac02bd5d1ff3" ], "ci_platforms": [ "linux" @@ -101343,7 +101385,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/f6f3bd030f0d321efe7c51ca3f057de23509af67" + "test/core/client_channel/uri_corpus/f6f3bd030f0d321efe7c51ca3f057de23509af67" ], "ci_platforms": [ "linux" @@ -101362,7 +101404,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/f97598cff03306af3c70400608fec47268b5075d" + "test/core/client_channel/uri_corpus/f97598cff03306af3c70400608fec47268b5075d" ], "ci_platforms": [ "linux" @@ -101381,7 +101423,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/f9e1ec1fc642b575bc9955618b7065747f56b101" + "test/core/client_channel/uri_corpus/f9e1ec1fc642b575bc9955618b7065747f56b101" ], "ci_platforms": [ "linux" @@ -101400,7 +101442,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/fe0630a3aeed2ec6f474f362e4c839478290d5c4" + "test/core/client_channel/uri_corpus/fe0630a3aeed2ec6f474f362e4c839478290d5c4" ], "ci_platforms": [ "linux" @@ -101419,7 +101461,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/ipv4.txt" + "test/core/client_channel/uri_corpus/ipv4.txt" ], "ci_platforms": [ "linux" @@ -101438,7 +101480,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/ipv6.txt" + "test/core/client_channel/uri_corpus/ipv6.txt" ], "ci_platforms": [ "linux" @@ -101457,7 +101499,7 @@ }, { "args": [ - "test/core/client_config/uri_corpus/unix.txt" + "test/core/client_channel/uri_corpus/unix.txt" ], "ci_platforms": [ "linux" diff --git a/vsprojects/vcxproj/test/grpc++_test/grpc++_test.vcxproj b/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj similarity index 65% rename from vsprojects/vcxproj/test/grpc++_test/grpc++_test.vcxproj rename to vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj index 995d60d09ea..cd3e406f9dc 100644 --- a/vsprojects/vcxproj/test/grpc++_test/grpc++_test.vcxproj +++ b/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj @@ -1,6 +1,5 @@ - Debug @@ -38,12 +37,12 @@ v140 - Application + StaticLibrary true Unicode - Application + StaticLibrary false true Unicode @@ -53,27 +52,15 @@ - - - - grpc++_test - static - Debug - static - Debug grpc++_test - static - Release - static - Release @@ -171,25 +158,13 @@ {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - diff --git a/vsprojects/vcxproj/test/grpc++_test/grpc++_test.vcxproj.filters b/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj.filters similarity index 100% rename from vsprojects/vcxproj/test/grpc++_test/grpc++_test.vcxproj.filters rename to vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj.filters diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 1eeabf55488..fb18150d1ac 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -426,23 +426,23 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -759,45 +759,45 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index fe693fcabc7..004ee066e06 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -442,65 +442,65 @@ src\core\ext\transport\chttp2\client\secure - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel src\core\ext\transport\chttp2\server\insecure @@ -1070,56 +1070,56 @@ src\core\lib\tsi - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel src\core\ext\lb_policy\grpclb @@ -1211,8 +1211,8 @@ {4a14dd37-5868-c656-7333-fa80574cbb07} - - {003725f8-37fc-80b5-deba-baae32caf915} + + {36eee53a-cd19-738a-c387-20c44a2bfd07} {030f00ff-6c54-76c8-12df-37e3008335d1} diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 5f96e6d01dc..7f2b8afe3ad 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -392,23 +392,23 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -675,45 +675,45 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 028fbbae774..4b3a1b9959b 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -367,65 +367,65 @@ src\core\ext\transport\chttp2\client\insecure - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel src\core\ext\resolver\dns\native @@ -908,56 +908,56 @@ src\core\ext\transport\chttp2\alpn - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel - - src\core\ext\client_config + + src\core\ext\client_channel src\core\ext\load_reporting @@ -1049,8 +1049,8 @@ {dfe53168-57b0-3ac4-d8ba-07fd958cc8f5} - - {25fa8af3-0a05-987c-741f-fa8ff9d65d51} + + {2edd1aad-34cf-0c66-e03e-b1b2dd81d9a8} {a23781d2-27e4-7cb0-12cd-59782ecb21ce} diff --git a/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj b/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj index 76ac196dda6..e8958bbe324 100644 --- a/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj +++ b/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj @@ -158,7 +158,7 @@ - + diff --git a/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj.filters b/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj.filters index e49318df110..eb80b8eed5f 100644 --- a/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj.filters @@ -1,8 +1,8 @@ - - test\core\client_config\resolvers + + test\core\client_channel\resolvers @@ -13,11 +13,11 @@ {cc06b800-cd26-f7a8-7ecf-ec789e78881b} - - {4fbd5c0a-d1e3-6658-5788-2fc6f2cc9071} + + {0998596f-2aa1-8205-173b-0bd27b7617d1} - - {eab637a2-7ac1-f6be-4fc2-c8989c66070b} + + {8925594d-dbe2-fee6-1553-d3258d9361da} diff --git a/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj b/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj index 1f3089b9aae..83375104abf 100644 --- a/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj +++ b/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj @@ -158,7 +158,7 @@ - + diff --git a/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj.filters b/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj.filters index ea6e7077f25..540da557e69 100644 --- a/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj.filters @@ -1,8 +1,8 @@ - - test\core\client_config\resolvers + + test\core\client_channel\resolvers @@ -13,11 +13,11 @@ {edc57049-e918-50c2-5ba9-04771a506c89} - - {7922598e-4d7b-3a07-85d1-467b736756f6} + + {227838e2-4ac8-f960-68b6-e82cc6e0cefa} - - {fb24db82-f42b-3f44-fb9b-b540e8f9c6ab} + + {5d51c3a6-a50e-4d84-53b3-44ee7c39f36c} diff --git a/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj b/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj index 22b364f35cb..b4da0194db4 100644 --- a/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj +++ b/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj @@ -158,7 +158,7 @@ - + diff --git a/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj.filters b/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj.filters index d6068138121..362cfab89d9 100644 --- a/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj.filters @@ -1,8 +1,8 @@ - - test\core\client_config + + test\core\client_channel @@ -13,8 +13,8 @@ {6e194f4b-ceb1-0e6b-e77a-8149b0411d99} - - {f948fe8f-47f8-fcce-2740-6c390af3c30b} + + {c4b19e85-1a5c-066b-9503-b58971695a58} diff --git a/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj b/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj index 8ba7432824d..9e586c647c7 100644 --- a/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj +++ b/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj @@ -167,7 +167,7 @@ {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - + {3D3EAEA9-76C4-0CFE-4718-5A1F6B7F72C8} diff --git a/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj b/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj index 5fda7205266..a438391f252 100644 --- a/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj +++ b/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj @@ -158,7 +158,7 @@ - + diff --git a/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj.filters b/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj.filters index 8abfa1991af..4422a3e7925 100644 --- a/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj.filters @@ -1,8 +1,8 @@ - - test\core\client_config + + test\core\client_channel @@ -13,8 +13,8 @@ {a554b5ef-0c80-ac03-1848-bccd947a06a6} - - {a6c4917f-b1b0-e958-6ea8-34950c2f8f36} + + {4726253c-a562-0ace-2798-996807381208} diff --git a/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj b/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj index 1062132c604..8d5d02e7073 100644 --- a/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj +++ b/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj @@ -158,7 +158,7 @@ - + diff --git a/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj.filters b/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj.filters index 50de4b37772..aa63da1502a 100644 --- a/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj.filters @@ -1,8 +1,8 @@ - - test\core\client_config\resolvers + + test\core\client_channel\resolvers @@ -13,11 +13,11 @@ {efc6f7cf-eb13-376c-85bb-64fae70baf03} - - {cba53434-a270-8e21-2976-5f7950730eb8} + + {a3fef8b1-3b99-63c9-5f35-feff99af1381} - - {79868613-ffd2-ead6-5b23-fc1d8d0709ba} + + {d32b4315-4e08-e492-5e10-4dc0c5c8cd55} diff --git a/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj b/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj index 51c4a274a8b..d5229e06cb2 100644 --- a/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj +++ b/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj @@ -158,7 +158,7 @@ - + diff --git a/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj.filters b/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj.filters index e95dd1d9d2d..bafab6af635 100644 --- a/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj.filters @@ -1,8 +1,8 @@ - - test\core\client_config + + test\core\client_channel @@ -13,8 +13,8 @@ {5e9a3063-bec4-a26c-b10d-13c866d4e639} - - {65156042-def7-b09c-d76e-38ba78456f20} + + {1d9f3085-019b-9673-74b6-55a857b824af}