diff options
31 files changed, 279 insertions, 199 deletions
@@ -195,6 +195,7 @@ cc_library( "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.h", "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_channel_factory.h", "src/core/lib/client_config/client_config.h", "src/core/lib/client_config/connector.h", "src/core/lib/client_config/initial_connect_string.h", @@ -210,7 +211,6 @@ cc_library( "src/core/lib/client_config/resolvers/dns_resolver.h", "src/core/lib/client_config/resolvers/sockaddr_resolver.h", "src/core/lib/client_config/subchannel.h", - "src/core/lib/client_config/subchannel_factory.h", "src/core/lib/client_config/subchannel_index.h", "src/core/lib/client_config/uri_parser.h", "src/core/lib/compression/algorithm_metadata.h", @@ -339,6 +339,7 @@ cc_library( "src/core/lib/channel/http_client_filter.c", "src/core/lib/channel/http_server_filter.c", "src/core/lib/channel/subchannel_call_holder.c", + "src/core/lib/client_config/client_channel_factory.c", "src/core/lib/client_config/client_config.c", "src/core/lib/client_config/connector.c", "src/core/lib/client_config/default_initial_connect_string.c", @@ -355,7 +356,6 @@ cc_library( "src/core/lib/client_config/resolvers/dns_resolver.c", "src/core/lib/client_config/resolvers/sockaddr_resolver.c", "src/core/lib/client_config/subchannel.c", - "src/core/lib/client_config/subchannel_factory.c", "src/core/lib/client_config/subchannel_index.c", "src/core/lib/client_config/uri_parser.c", "src/core/lib/compression/compression_algorithm.c", @@ -566,6 +566,7 @@ cc_library( "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.h", "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_channel_factory.h", "src/core/lib/client_config/client_config.h", "src/core/lib/client_config/connector.h", "src/core/lib/client_config/initial_connect_string.h", @@ -581,7 +582,6 @@ cc_library( "src/core/lib/client_config/resolvers/dns_resolver.h", "src/core/lib/client_config/resolvers/sockaddr_resolver.h", "src/core/lib/client_config/subchannel.h", - "src/core/lib/client_config/subchannel_factory.h", "src/core/lib/client_config/subchannel_index.h", "src/core/lib/client_config/uri_parser.h", "src/core/lib/compression/algorithm_metadata.h", @@ -694,6 +694,7 @@ cc_library( "src/core/lib/channel/http_client_filter.c", "src/core/lib/channel/http_server_filter.c", "src/core/lib/channel/subchannel_call_holder.c", + "src/core/lib/client_config/client_channel_factory.c", "src/core/lib/client_config/client_config.c", "src/core/lib/client_config/connector.c", "src/core/lib/client_config/default_initial_connect_string.c", @@ -710,7 +711,6 @@ cc_library( "src/core/lib/client_config/resolvers/dns_resolver.c", "src/core/lib/client_config/resolvers/sockaddr_resolver.c", "src/core/lib/client_config/subchannel.c", - "src/core/lib/client_config/subchannel_factory.c", "src/core/lib/client_config/subchannel_index.c", "src/core/lib/client_config/uri_parser.c", "src/core/lib/compression/compression_algorithm.c", @@ -1404,6 +1404,7 @@ objc_library( "src/core/lib/channel/http_client_filter.c", "src/core/lib/channel/http_server_filter.c", "src/core/lib/channel/subchannel_call_holder.c", + "src/core/lib/client_config/client_channel_factory.c", "src/core/lib/client_config/client_config.c", "src/core/lib/client_config/connector.c", "src/core/lib/client_config/default_initial_connect_string.c", @@ -1420,7 +1421,6 @@ objc_library( "src/core/lib/client_config/resolvers/dns_resolver.c", "src/core/lib/client_config/resolvers/sockaddr_resolver.c", "src/core/lib/client_config/subchannel.c", - "src/core/lib/client_config/subchannel_factory.c", "src/core/lib/client_config/subchannel_index.c", "src/core/lib/client_config/uri_parser.c", "src/core/lib/compression/compression_algorithm.c", @@ -1573,6 +1573,7 @@ objc_library( "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.h", "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_channel_factory.h", "src/core/lib/client_config/client_config.h", "src/core/lib/client_config/connector.h", "src/core/lib/client_config/initial_connect_string.h", @@ -1588,7 +1589,6 @@ objc_library( "src/core/lib/client_config/resolvers/dns_resolver.h", "src/core/lib/client_config/resolvers/sockaddr_resolver.h", "src/core/lib/client_config/subchannel.h", - "src/core/lib/client_config/subchannel_factory.h", "src/core/lib/client_config/subchannel_index.h", "src/core/lib/client_config/uri_parser.h", "src/core/lib/compression/algorithm_metadata.h", @@ -2477,6 +2477,7 @@ LIBGRPC_SRC = \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ src/core/lib/channel/subchannel_call_holder.c \ + src/core/lib/client_config/client_channel_factory.c \ src/core/lib/client_config/client_config.c \ src/core/lib/client_config/connector.c \ src/core/lib/client_config/default_initial_connect_string.c \ @@ -2493,7 +2494,6 @@ LIBGRPC_SRC = \ src/core/lib/client_config/resolvers/dns_resolver.c \ src/core/lib/client_config/resolvers/sockaddr_resolver.c \ src/core/lib/client_config/subchannel.c \ - src/core/lib/client_config/subchannel_factory.c \ src/core/lib/client_config/subchannel_index.c \ src/core/lib/client_config/uri_parser.c \ src/core/lib/compression/compression_algorithm.c \ @@ -2836,6 +2836,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ src/core/lib/channel/subchannel_call_holder.c \ + src/core/lib/client_config/client_channel_factory.c \ src/core/lib/client_config/client_config.c \ src/core/lib/client_config/connector.c \ src/core/lib/client_config/default_initial_connect_string.c \ @@ -2852,7 +2853,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/client_config/resolvers/dns_resolver.c \ src/core/lib/client_config/resolvers/sockaddr_resolver.c \ src/core/lib/client_config/subchannel.c \ - src/core/lib/client_config/subchannel_factory.c \ src/core/lib/client_config/subchannel_index.c \ src/core/lib/client_config/uri_parser.c \ src/core/lib/compression/compression_algorithm.c \ diff --git a/binding.gyp b/binding.gyp index a1cdf2ec36..39cc84243f 100644 --- a/binding.gyp +++ b/binding.gyp @@ -601,6 +601,7 @@ 'src/core/lib/channel/http_client_filter.c', 'src/core/lib/channel/http_server_filter.c', 'src/core/lib/channel/subchannel_call_holder.c', + 'src/core/lib/client_config/client_channel_factory.c', 'src/core/lib/client_config/client_config.c', 'src/core/lib/client_config/connector.c', 'src/core/lib/client_config/default_initial_connect_string.c', @@ -617,7 +618,6 @@ 'src/core/lib/client_config/resolvers/dns_resolver.c', 'src/core/lib/client_config/resolvers/sockaddr_resolver.c', 'src/core/lib/client_config/subchannel.c', - 'src/core/lib/client_config/subchannel_factory.c', 'src/core/lib/client_config/subchannel_index.c', 'src/core/lib/client_config/uri_parser.c', 'src/core/lib/compression/compression_algorithm.c', diff --git a/build.yaml b/build.yaml index 43d3c680b8..0eb40d7472 100644 --- a/build.yaml +++ b/build.yaml @@ -259,6 +259,7 @@ filegroups: - src/core/lib/channel/http_client_filter.h - src/core/lib/channel/http_server_filter.h - src/core/lib/channel/subchannel_call_holder.h + - src/core/lib/client_config/client_channel_factory.h - src/core/lib/client_config/client_config.h - src/core/lib/client_config/connector.h - src/core/lib/client_config/initial_connect_string.h @@ -274,7 +275,6 @@ filegroups: - src/core/lib/client_config/resolvers/dns_resolver.h - src/core/lib/client_config/resolvers/sockaddr_resolver.h - src/core/lib/client_config/subchannel.h - - src/core/lib/client_config/subchannel_factory.h - src/core/lib/client_config/subchannel_index.h - src/core/lib/client_config/uri_parser.h - src/core/lib/compression/algorithm_metadata.h @@ -359,6 +359,7 @@ filegroups: - src/core/lib/channel/http_client_filter.c - src/core/lib/channel/http_server_filter.c - src/core/lib/channel/subchannel_call_holder.c + - src/core/lib/client_config/client_channel_factory.c - src/core/lib/client_config/client_config.c - src/core/lib/client_config/connector.c - src/core/lib/client_config/default_initial_connect_string.c @@ -375,7 +376,6 @@ filegroups: - src/core/lib/client_config/resolvers/dns_resolver.c - src/core/lib/client_config/resolvers/sockaddr_resolver.c - src/core/lib/client_config/subchannel.c - - src/core/lib/client_config/subchannel_factory.c - src/core/lib/client_config/subchannel_index.c - src/core/lib/client_config/uri_parser.c - src/core/lib/compression/compression_algorithm.c @@ -123,6 +123,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ src/core/lib/channel/subchannel_call_holder.c \ + src/core/lib/client_config/client_channel_factory.c \ src/core/lib/client_config/client_config.c \ src/core/lib/client_config/connector.c \ src/core/lib/client_config/default_initial_connect_string.c \ @@ -139,7 +140,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/client_config/resolvers/dns_resolver.c \ src/core/lib/client_config/resolvers/sockaddr_resolver.c \ src/core/lib/client_config/subchannel.c \ - src/core/lib/client_config/subchannel_factory.c \ src/core/lib/client_config/subchannel_index.c \ src/core/lib/client_config/uri_parser.c \ src/core/lib/compression/compression_algorithm.c \ diff --git a/gRPC.podspec b/gRPC.podspec index 08330eb8e1..f518e48fb9 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -197,6 +197,7 @@ Pod::Spec.new do |s| 'src/core/lib/channel/http_client_filter.h', 'src/core/lib/channel/http_server_filter.h', 'src/core/lib/channel/subchannel_call_holder.h', + 'src/core/lib/client_config/client_channel_factory.h', 'src/core/lib/client_config/client_config.h', 'src/core/lib/client_config/connector.h', 'src/core/lib/client_config/initial_connect_string.h', @@ -212,7 +213,6 @@ Pod::Spec.new do |s| 'src/core/lib/client_config/resolvers/dns_resolver.h', 'src/core/lib/client_config/resolvers/sockaddr_resolver.h', 'src/core/lib/client_config/subchannel.h', - 'src/core/lib/client_config/subchannel_factory.h', 'src/core/lib/client_config/subchannel_index.h', 'src/core/lib/client_config/uri_parser.h', 'src/core/lib/compression/algorithm_metadata.h', @@ -358,6 +358,7 @@ Pod::Spec.new do |s| 'src/core/lib/channel/http_client_filter.c', 'src/core/lib/channel/http_server_filter.c', 'src/core/lib/channel/subchannel_call_holder.c', + 'src/core/lib/client_config/client_channel_factory.c', 'src/core/lib/client_config/client_config.c', 'src/core/lib/client_config/connector.c', 'src/core/lib/client_config/default_initial_connect_string.c', @@ -374,7 +375,6 @@ Pod::Spec.new do |s| 'src/core/lib/client_config/resolvers/dns_resolver.c', 'src/core/lib/client_config/resolvers/sockaddr_resolver.c', 'src/core/lib/client_config/subchannel.c', - 'src/core/lib/client_config/subchannel_factory.c', 'src/core/lib/client_config/subchannel_index.c', 'src/core/lib/client_config/uri_parser.c', 'src/core/lib/compression/compression_algorithm.c', @@ -528,6 +528,7 @@ Pod::Spec.new do |s| 'src/core/lib/channel/http_client_filter.h', 'src/core/lib/channel/http_server_filter.h', 'src/core/lib/channel/subchannel_call_holder.h', + 'src/core/lib/client_config/client_channel_factory.h', 'src/core/lib/client_config/client_config.h', 'src/core/lib/client_config/connector.h', 'src/core/lib/client_config/initial_connect_string.h', @@ -543,7 +544,6 @@ Pod::Spec.new do |s| 'src/core/lib/client_config/resolvers/dns_resolver.h', 'src/core/lib/client_config/resolvers/sockaddr_resolver.h', 'src/core/lib/client_config/subchannel.h', - 'src/core/lib/client_config/subchannel_factory.h', 'src/core/lib/client_config/subchannel_index.h', 'src/core/lib/client_config/uri_parser.h', 'src/core/lib/compression/algorithm_metadata.h', diff --git a/grpc.gemspec b/grpc.gemspec index c516f5278f..94677aa6af 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -193,6 +193,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/channel/http_client_filter.h ) s.files += %w( src/core/lib/channel/http_server_filter.h ) s.files += %w( src/core/lib/channel/subchannel_call_holder.h ) + s.files += %w( src/core/lib/client_config/client_channel_factory.h ) s.files += %w( src/core/lib/client_config/client_config.h ) s.files += %w( src/core/lib/client_config/connector.h ) s.files += %w( src/core/lib/client_config/initial_connect_string.h ) @@ -208,7 +209,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/client_config/resolvers/dns_resolver.h ) s.files += %w( src/core/lib/client_config/resolvers/sockaddr_resolver.h ) s.files += %w( src/core/lib/client_config/subchannel.h ) - s.files += %w( src/core/lib/client_config/subchannel_factory.h ) s.files += %w( src/core/lib/client_config/subchannel_index.h ) s.files += %w( src/core/lib/client_config/uri_parser.h ) s.files += %w( src/core/lib/compression/algorithm_metadata.h ) @@ -341,6 +341,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/channel/http_client_filter.c ) s.files += %w( src/core/lib/channel/http_server_filter.c ) s.files += %w( src/core/lib/channel/subchannel_call_holder.c ) + s.files += %w( src/core/lib/client_config/client_channel_factory.c ) s.files += %w( src/core/lib/client_config/client_config.c ) s.files += %w( src/core/lib/client_config/connector.c ) s.files += %w( src/core/lib/client_config/default_initial_connect_string.c ) @@ -357,7 +358,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/client_config/resolvers/dns_resolver.c ) s.files += %w( src/core/lib/client_config/resolvers/sockaddr_resolver.c ) s.files += %w( src/core/lib/client_config/subchannel.c ) - s.files += %w( src/core/lib/client_config/subchannel_factory.c ) s.files += %w( src/core/lib/client_config/subchannel_index.c ) s.files += %w( src/core/lib/client_config/uri_parser.c ) s.files += %w( src/core/lib/compression/compression_algorithm.c ) diff --git a/package.json b/package.json index 4da7c708f0..99aea807fc 100644 --- a/package.json +++ b/package.json @@ -136,6 +136,7 @@ "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.h", "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_channel_factory.h", "src/core/lib/client_config/client_config.h", "src/core/lib/client_config/connector.h", "src/core/lib/client_config/initial_connect_string.h", @@ -151,7 +152,6 @@ "src/core/lib/client_config/resolvers/dns_resolver.h", "src/core/lib/client_config/resolvers/sockaddr_resolver.h", "src/core/lib/client_config/subchannel.h", - "src/core/lib/client_config/subchannel_factory.h", "src/core/lib/client_config/subchannel_index.h", "src/core/lib/client_config/uri_parser.h", "src/core/lib/compression/algorithm_metadata.h", @@ -284,6 +284,7 @@ "src/core/lib/channel/http_client_filter.c", "src/core/lib/channel/http_server_filter.c", "src/core/lib/channel/subchannel_call_holder.c", + "src/core/lib/client_config/client_channel_factory.c", "src/core/lib/client_config/client_config.c", "src/core/lib/client_config/connector.c", "src/core/lib/client_config/default_initial_connect_string.c", @@ -300,7 +301,6 @@ "src/core/lib/client_config/resolvers/dns_resolver.c", "src/core/lib/client_config/resolvers/sockaddr_resolver.c", "src/core/lib/client_config/subchannel.c", - "src/core/lib/client_config/subchannel_factory.c", "src/core/lib/client_config/subchannel_index.c", "src/core/lib/client_config/uri_parser.c", "src/core/lib/compression/compression_algorithm.c", diff --git a/package.xml b/package.xml index a40cd160ae..c124181161 100644 --- a/package.xml +++ b/package.xml @@ -197,6 +197,7 @@ <file baseinstalldir="/" name="src/core/lib/channel/http_client_filter.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/channel/http_server_filter.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/channel/subchannel_call_holder.h" role="src" /> + <file baseinstalldir="/" name="src/core/lib/client_config/client_channel_factory.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/client_config.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/connector.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/initial_connect_string.h" role="src" /> @@ -212,7 +213,6 @@ <file baseinstalldir="/" name="src/core/lib/client_config/resolvers/dns_resolver.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/resolvers/sockaddr_resolver.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/subchannel.h" role="src" /> - <file baseinstalldir="/" name="src/core/lib/client_config/subchannel_factory.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/subchannel_index.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/uri_parser.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/compression/algorithm_metadata.h" role="src" /> @@ -345,6 +345,7 @@ <file baseinstalldir="/" name="src/core/lib/channel/http_client_filter.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/channel/http_server_filter.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/channel/subchannel_call_holder.c" role="src" /> + <file baseinstalldir="/" name="src/core/lib/client_config/client_channel_factory.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/client_config.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/connector.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/default_initial_connect_string.c" role="src" /> @@ -361,7 +362,6 @@ <file baseinstalldir="/" name="src/core/lib/client_config/resolvers/dns_resolver.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/resolvers/sockaddr_resolver.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/subchannel.c" role="src" /> - <file baseinstalldir="/" name="src/core/lib/client_config/subchannel_factory.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/subchannel_index.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/client_config/uri_parser.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/compression/compression_algorithm.c" role="src" /> 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 cf987a02e0..fdf81ae59a 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -136,31 +136,35 @@ static const grpc_connector_vtable connector_vtable = { connector_ref, connector_unref, connector_shutdown, connector_connect}; typedef struct { - grpc_subchannel_factory base; + grpc_client_channel_factory base; gpr_refcount refs; grpc_channel_args *merge_args; grpc_channel *master; -} subchannel_factory; +} client_channel_factory; -static void subchannel_factory_ref(grpc_subchannel_factory *scf) { - subchannel_factory *f = (subchannel_factory *)scf; +static void client_channel_factory_ref( + grpc_client_channel_factory *cc_factory) { + client_channel_factory *f = (client_channel_factory *)cc_factory; gpr_ref(&f->refs); } -static void subchannel_factory_unref(grpc_exec_ctx *exec_ctx, - grpc_subchannel_factory *scf) { - subchannel_factory *f = (subchannel_factory *)scf; +static void client_channel_factory_unref( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory) { + client_channel_factory *f = (client_channel_factory *)cc_factory; if (gpr_unref(&f->refs)) { - GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, f->master, "subchannel_factory"); + if (f->master != NULL) { + GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, f->master, + "client_channel_factory"); + } grpc_channel_args_destroy(f->merge_args); gpr_free(f); } } -static grpc_subchannel *subchannel_factory_create_subchannel( - grpc_exec_ctx *exec_ctx, grpc_subchannel_factory *scf, +static grpc_subchannel *client_channel_factory_create_subchannel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, grpc_subchannel_args *args) { - subchannel_factory *f = (subchannel_factory *)scf; + client_channel_factory *f = (client_channel_factory *)cc_factory; connector *c = gpr_malloc(sizeof(*c)); grpc_channel_args *final_args = grpc_channel_args_merge(args->args, f->merge_args); @@ -175,9 +179,32 @@ static grpc_subchannel *subchannel_factory_create_subchannel( return s; } -static const grpc_subchannel_factory_vtable subchannel_factory_vtable = { - subchannel_factory_ref, subchannel_factory_unref, - subchannel_factory_create_subchannel}; +static grpc_channel *client_channel_factory_create_channel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, + const char *target, grpc_channel_args *args) { + client_channel_factory *f = (client_channel_factory *)cc_factory; + grpc_channel_args *final_args = grpc_channel_args_merge(args, f->merge_args); + grpc_channel *channel = grpc_channel_create(exec_ctx, target, final_args, + GRPC_CLIENT_CHANNEL, NULL); + grpc_channel_args_destroy(final_args); + grpc_resolver *resolver = grpc_resolver_create(target, &f->base); + if (!resolver) { + GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, + "client_channel_factory_create_channel"); + return NULL; + } + + grpc_client_channel_set_resolver( + exec_ctx, grpc_channel_get_channel_stack(channel), resolver); + GRPC_RESOLVER_UNREF(exec_ctx, resolver, "create_channel"); + + return channel; +} + +static const grpc_client_channel_factory_vtable client_channel_factory_vtable = + {client_channel_factory_ref, client_channel_factory_unref, + client_channel_factory_create_subchannel, + client_channel_factory_create_channel}; /* Create a client channel: Asynchronously: - resolve target @@ -186,38 +213,27 @@ static const grpc_subchannel_factory_vtable subchannel_factory_vtable = { grpc_channel *grpc_insecure_channel_create(const char *target, const grpc_channel_args *args, void *reserved) { - grpc_channel *channel = NULL; - grpc_resolver *resolver; - subchannel_factory *f; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; GRPC_API_TRACE( "grpc_insecure_channel_create(target=%p, args=%p, reserved=%p)", 3, (target, args, reserved)); GPR_ASSERT(!reserved); - channel = - grpc_channel_create(&exec_ctx, target, args, GRPC_CLIENT_CHANNEL, NULL); - - f = gpr_malloc(sizeof(*f)); - f->base.vtable = &subchannel_factory_vtable; + client_channel_factory *f = gpr_malloc(sizeof(*f)); + memset(f, 0, sizeof(*f)); + f->base.vtable = &client_channel_factory_vtable; gpr_ref_init(&f->refs, 1); f->merge_args = grpc_channel_args_copy(args); - f->master = channel; - GRPC_CHANNEL_INTERNAL_REF(f->master, "subchannel_factory"); - resolver = grpc_resolver_create(target, &f->base); - if (!resolver) { - GRPC_CHANNEL_INTERNAL_UNREF(&exec_ctx, f->master, "subchannel_factory"); - grpc_subchannel_factory_unref(&exec_ctx, &f->base); - grpc_exec_ctx_finish(&exec_ctx); - return NULL; - } - grpc_client_channel_set_resolver( - &exec_ctx, grpc_channel_get_channel_stack(channel), resolver); - GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "create"); - grpc_subchannel_factory_unref(&exec_ctx, &f->base); + grpc_channel *channel = + client_channel_factory_create_channel(&exec_ctx, &f->base, target, NULL); + if (channel != NULL) { + f->master = channel; + GRPC_CHANNEL_INTERNAL_REF(f->master, "grpc_insecure_channel_create"); + } + grpc_client_channel_factory_unref(&exec_ctx, &f->base); grpc_exec_ctx_finish(&exec_ctx); - return channel; + return channel; /* may be NULL */ } 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 203475ba52..eecca9cf06 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 @@ -192,34 +192,38 @@ static const grpc_connector_vtable connector_vtable = { connector_ref, connector_unref, connector_shutdown, connector_connect}; typedef struct { - grpc_subchannel_factory base; + grpc_client_channel_factory base; gpr_refcount refs; grpc_channel_args *merge_args; grpc_channel_security_connector *security_connector; grpc_channel *master; -} subchannel_factory; +} client_channel_factory; -static void subchannel_factory_ref(grpc_subchannel_factory *scf) { - subchannel_factory *f = (subchannel_factory *)scf; +static void client_channel_factory_ref( + grpc_client_channel_factory *cc_factory) { + client_channel_factory *f = (client_channel_factory *)cc_factory; gpr_ref(&f->refs); } -static void subchannel_factory_unref(grpc_exec_ctx *exec_ctx, - grpc_subchannel_factory *scf) { - subchannel_factory *f = (subchannel_factory *)scf; +static void client_channel_factory_unref( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory) { + client_channel_factory *f = (client_channel_factory *)cc_factory; if (gpr_unref(&f->refs)) { GRPC_SECURITY_CONNECTOR_UNREF(&f->security_connector->base, - "subchannel_factory"); - GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, f->master, "subchannel_factory"); + "client_channel_factory"); + if (f->master != NULL) { + GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, f->master, + "client_channel_factory"); + } grpc_channel_args_destroy(f->merge_args); gpr_free(f); } } -static grpc_subchannel *subchannel_factory_create_subchannel( - grpc_exec_ctx *exec_ctx, grpc_subchannel_factory *scf, +static grpc_subchannel *client_channel_factory_create_subchannel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, grpc_subchannel_args *args) { - subchannel_factory *f = (subchannel_factory *)scf; + client_channel_factory *f = (client_channel_factory *)cc_factory; connector *c = gpr_malloc(sizeof(*c)); grpc_channel_args *final_args = grpc_channel_args_merge(args->args, f->merge_args); @@ -236,9 +240,36 @@ static grpc_subchannel *subchannel_factory_create_subchannel( return s; } -static const grpc_subchannel_factory_vtable subchannel_factory_vtable = { - subchannel_factory_ref, subchannel_factory_unref, - subchannel_factory_create_subchannel}; +static grpc_channel *client_channel_factory_create_channel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, + const char *target, grpc_channel_args *args) { + client_channel_factory *f = (client_channel_factory *)cc_factory; + + grpc_channel_args *final_args = grpc_channel_args_merge(args, f->merge_args); + grpc_channel *channel = grpc_channel_create(exec_ctx, target, final_args, + GRPC_CLIENT_CHANNEL, NULL); + grpc_channel_args_destroy(final_args); + + grpc_resolver *resolver = grpc_resolver_create(target, &f->base); + if (resolver != NULL) { + grpc_client_channel_set_resolver( + exec_ctx, grpc_channel_get_channel_stack(channel), resolver); + GRPC_RESOLVER_UNREF(exec_ctx, resolver, "create"); + } else { + GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, + "client_channel_factory_create_channel"); + channel = NULL; + } + + GRPC_SECURITY_CONNECTOR_UNREF(&f->security_connector->base, + "client_channel_factory_create_channel"); + return channel; +} + +static const grpc_client_channel_factory_vtable client_channel_factory_vtable = + {client_channel_factory_ref, client_channel_factory_unref, + client_channel_factory_create_subchannel, + client_channel_factory_create_channel}; /* Create a secure client channel: Asynchronously: - resolve target @@ -248,13 +279,11 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, const char *target, const grpc_channel_args *args, void *reserved) { - grpc_channel *channel; grpc_arg connector_arg; grpc_channel_args *args_copy; grpc_channel_args *new_args_from_connector; grpc_channel_security_connector *security_connector; - grpc_resolver *resolver; - subchannel_factory *f; + client_channel_factory *f; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; GRPC_API_TRACE( @@ -284,35 +313,30 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, new_args_from_connector != NULL ? new_args_from_connector : args, &connector_arg, 1); - channel = grpc_channel_create(&exec_ctx, target, args_copy, - GRPC_CLIENT_CHANNEL, NULL); - f = gpr_malloc(sizeof(*f)); - f->base.vtable = &subchannel_factory_vtable; + memset(f, 0, sizeof(*f)); + f->base.vtable = &client_channel_factory_vtable; gpr_ref_init(&f->refs, 1); - GRPC_SECURITY_CONNECTOR_REF(&security_connector->base, "subchannel_factory"); - f->security_connector = security_connector; + f->merge_args = grpc_channel_args_copy(args_copy); - f->master = channel; - GRPC_CHANNEL_INTERNAL_REF(channel, "subchannel_factory"); - resolver = grpc_resolver_create(target, &f->base); - if (resolver) { - grpc_client_channel_set_resolver( - &exec_ctx, grpc_channel_get_channel_stack(channel), resolver); - GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "create"); - } - grpc_subchannel_factory_unref(&exec_ctx, &f->base); - GRPC_SECURITY_CONNECTOR_UNREF(&security_connector->base, "channel_create"); grpc_channel_args_destroy(args_copy); if (new_args_from_connector != NULL) { grpc_channel_args_destroy(new_args_from_connector); } - if (!resolver) { - GRPC_CHANNEL_INTERNAL_UNREF(&exec_ctx, channel, "subchannel_factory"); - channel = NULL; + GRPC_SECURITY_CONNECTOR_REF(&security_connector->base, + "grpc_secure_channel_create"); + f->security_connector = security_connector; + + grpc_channel *channel = + client_channel_factory_create_channel(&exec_ctx, &f->base, target, NULL); + if (channel != NULL) { + f->master = channel; + GRPC_CHANNEL_INTERNAL_REF(f->master, "grpc_secure_channel_create"); } + + grpc_client_channel_factory_unref(&exec_ctx, &f->base); grpc_exec_ctx_finish(&exec_ctx); - return channel; + return channel; /* may be NULL */ } diff --git a/src/core/lib/client_config/README.md b/src/core/lib/client_config/README.md index fff7a5af5b..7024fd540d 100644 --- a/src/core/lib/client_config/README.md +++ b/src/core/lib/client_config/README.md @@ -40,7 +40,7 @@ decisions (for example, by avoiding disconnected backends). Configured sub-channels are fully setup to participate in the grpc data plane. Their behavior is specified by a set of grpc channel filters defined at their construction. To customize this behavior, resolvers build -grpc_subchannel_factory objects, which use the decorator pattern to customize +grpc_client_channel_factory objects, which use the decorator pattern to customize construction arguments for concrete grpc_subchannel instances. diff --git a/src/core/lib/client_config/subchannel_factory.c b/src/core/lib/client_config/client_channel_factory.c index 727a48a6c8..c079ce09dd 100644 --- a/src/core/lib/client_config/subchannel_factory.c +++ b/src/core/lib/client_config/client_channel_factory.c @@ -31,19 +31,25 @@ * */ -#include "src/core/lib/client_config/subchannel_factory.h" +#include "src/core/lib/client_config/client_channel_factory.h" -void grpc_subchannel_factory_ref(grpc_subchannel_factory* factory) { +void grpc_client_channel_factory_ref(grpc_client_channel_factory* factory) { factory->vtable->ref(factory); } -void grpc_subchannel_factory_unref(grpc_exec_ctx* exec_ctx, - grpc_subchannel_factory* factory) { +void grpc_client_channel_factory_unref(grpc_exec_ctx* exec_ctx, + grpc_client_channel_factory* factory) { factory->vtable->unref(exec_ctx, factory); } -grpc_subchannel* grpc_subchannel_factory_create_subchannel( - grpc_exec_ctx* exec_ctx, grpc_subchannel_factory* factory, +grpc_subchannel* grpc_client_channel_factory_create_subchannel( + grpc_exec_ctx* exec_ctx, grpc_client_channel_factory* factory, grpc_subchannel_args* args) { return factory->vtable->create_subchannel(exec_ctx, factory, args); } + +grpc_channel* grpc_client_channel_factory_create_channel( + grpc_exec_ctx* exec_ctx, grpc_client_channel_factory* factory, + const char* target, grpc_channel_args* args) { + return factory->vtable->create_channel(exec_ctx, factory, target, args); +} diff --git a/src/core/lib/client_config/subchannel_factory.h b/src/core/lib/client_config/client_channel_factory.h index 3ba2f860fe..3dd9dfea12 100644 --- a/src/core/lib/client_config/subchannel_factory.h +++ b/src/core/lib/client_config/client_channel_factory.h @@ -31,36 +31,48 @@ * */ -#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H -#define GRPC_CORE_LIB_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_CLIENT_CHANNEL_FACTORY_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_CLIENT_CHANNEL_FACTORY_H + +#include <grpc/grpc_security.h> +#include <grpc/impl/codegen/grpc_types.h> #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/client_config/subchannel.h" -typedef struct grpc_subchannel_factory grpc_subchannel_factory; -typedef struct grpc_subchannel_factory_vtable grpc_subchannel_factory_vtable; +typedef struct grpc_client_channel_factory grpc_client_channel_factory; +typedef struct grpc_client_channel_factory_vtable + grpc_client_channel_factory_vtable; /** Constructor for new configured channels. Creating decorators around this type is encouraged to adapt behavior. */ -struct grpc_subchannel_factory { - const grpc_subchannel_factory_vtable *vtable; +struct grpc_client_channel_factory { + const grpc_client_channel_factory_vtable *vtable; }; -struct grpc_subchannel_factory_vtable { - void (*ref)(grpc_subchannel_factory *factory); - void (*unref)(grpc_exec_ctx *exec_ctx, grpc_subchannel_factory *factory); +struct grpc_client_channel_factory_vtable { + void (*ref)(grpc_client_channel_factory *factory); + void (*unref)(grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *factory); grpc_subchannel *(*create_subchannel)(grpc_exec_ctx *exec_ctx, - grpc_subchannel_factory *factory, + grpc_client_channel_factory *factory, grpc_subchannel_args *args); + grpc_channel *(*create_channel)(grpc_exec_ctx *exec_ctx, + grpc_client_channel_factory *factory, + const char *target, grpc_channel_args *args); }; -void grpc_subchannel_factory_ref(grpc_subchannel_factory *factory); -void grpc_subchannel_factory_unref(grpc_exec_ctx *exec_ctx, - grpc_subchannel_factory *factory); +void grpc_client_channel_factory_ref(grpc_client_channel_factory *factory); +void grpc_client_channel_factory_unref(grpc_exec_ctx *exec_ctx, + grpc_client_channel_factory *factory); /** Create a new grpc_subchannel */ -grpc_subchannel *grpc_subchannel_factory_create_subchannel( - grpc_exec_ctx *exec_ctx, grpc_subchannel_factory *factory, +grpc_subchannel *grpc_client_channel_factory_create_subchannel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *factory, grpc_subchannel_args *args); -#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H */ +/** Create a new grpc_channel */ +grpc_channel *grpc_client_channel_factory_create_channel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *factory, + const char *target, grpc_channel_args *args); + +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_CLIENT_CHANNEL_FACTORY_H */ diff --git a/src/core/lib/client_config/resolver_factory.h b/src/core/lib/client_config/resolver_factory.h index 7765c3c844..91bdbfe01c 100644 --- a/src/core/lib/client_config/resolver_factory.h +++ b/src/core/lib/client_config/resolver_factory.h @@ -34,8 +34,8 @@ #ifndef GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVER_FACTORY_H #define GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVER_FACTORY_H +#include "src/core/lib/client_config/client_channel_factory.h" #include "src/core/lib/client_config/resolver.h" -#include "src/core/lib/client_config/subchannel_factory.h" #include "src/core/lib/client_config/uri_parser.h" typedef struct grpc_resolver_factory grpc_resolver_factory; @@ -49,7 +49,7 @@ struct grpc_resolver_factory { typedef struct grpc_resolver_args { grpc_uri *uri; - grpc_subchannel_factory *subchannel_factory; + grpc_client_channel_factory *client_channel_factory; } grpc_resolver_args; struct grpc_resolver_factory_vtable { diff --git a/src/core/lib/client_config/resolver_registry.c b/src/core/lib/client_config/resolver_registry.c index 29bd00c284..ff03041bc5 100644 --- a/src/core/lib/client_config/resolver_registry.c +++ b/src/core/lib/client_config/resolver_registry.c @@ -115,14 +115,14 @@ static grpc_resolver_factory *resolve_factory(const char *target, } grpc_resolver *grpc_resolver_create( - const char *target, grpc_subchannel_factory *subchannel_factory) { + const char *target, grpc_client_channel_factory *client_channel_factory) { grpc_uri *uri = NULL; grpc_resolver_factory *factory = resolve_factory(target, &uri); grpc_resolver *resolver; grpc_resolver_args args; memset(&args, 0, sizeof(args)); args.uri = uri; - args.subchannel_factory = subchannel_factory; + args.client_channel_factory = client_channel_factory; resolver = grpc_resolver_factory_create_resolver(factory, &args); grpc_uri_destroy(uri); return resolver; diff --git a/src/core/lib/client_config/resolver_registry.h b/src/core/lib/client_config/resolver_registry.h index 22289ca6bd..eec830bbcb 100644 --- a/src/core/lib/client_config/resolver_registry.h +++ b/src/core/lib/client_config/resolver_registry.h @@ -56,7 +56,7 @@ void grpc_register_resolver_type(grpc_resolver_factory *factory); return it. If a resolver factory was not found, return NULL. */ grpc_resolver *grpc_resolver_create( - const char *target, grpc_subchannel_factory *subchannel_factory); + const char *target, grpc_client_channel_factory *client_channel_factory); /** Given a target, return a (freshly allocated with gpr_malloc) string representing the default authority to pass from a client. */ diff --git a/src/core/lib/client_config/resolvers/dns_resolver.c b/src/core/lib/client_config/resolvers/dns_resolver.c index ab445730ad..078fda298a 100644 --- a/src/core/lib/client_config/resolvers/dns_resolver.c +++ b/src/core/lib/client_config/resolvers/dns_resolver.c @@ -60,7 +60,7 @@ typedef struct { /** default port to use */ char *default_port; /** subchannel factory */ - grpc_subchannel_factory *subchannel_factory; + grpc_client_channel_factory *client_channel_factory; /** load balancing policy name */ char *lb_policy_name; @@ -178,8 +178,9 @@ static void dns_on_resolved(grpc_exec_ctx *exec_ctx, void *arg, memset(&args, 0, sizeof(args)); args.addr = (struct sockaddr *)(addresses->addrs[i].addr); args.addr_len = (size_t)addresses->addrs[i].len; - grpc_subchannel *subchannel = grpc_subchannel_factory_create_subchannel( - exec_ctx, r->subchannel_factory, &args); + grpc_subchannel *subchannel = + grpc_client_channel_factory_create_subchannel( + exec_ctx, r->client_channel_factory, &args); if (subchannel != NULL) { subchannels[naddrs++] = subchannel; } @@ -244,7 +245,7 @@ static void dns_destroy(grpc_exec_ctx *exec_ctx, grpc_resolver *gr) { if (r->resolved_config) { grpc_client_config_unref(exec_ctx, r->resolved_config); } - grpc_subchannel_factory_unref(exec_ctx, r->subchannel_factory); + grpc_client_channel_factory_unref(exec_ctx, r->client_channel_factory); gpr_free(r->name); gpr_free(r->default_port); gpr_free(r->lb_policy_name); @@ -271,10 +272,10 @@ static grpc_resolver *dns_create(grpc_resolver_args *args, grpc_resolver_init(&r->base, &dns_resolver_vtable); r->name = gpr_strdup(path); r->default_port = gpr_strdup(default_port); - r->subchannel_factory = args->subchannel_factory; + r->client_channel_factory = args->client_channel_factory; gpr_backoff_init(&r->backoff_state, BACKOFF_MULTIPLIER, BACKOFF_JITTER, BACKOFF_MIN_SECONDS * 1000, BACKOFF_MAX_SECONDS * 1000); - grpc_subchannel_factory_ref(r->subchannel_factory); + grpc_client_channel_factory_ref(r->client_channel_factory); r->lb_policy_name = gpr_strdup(lb_policy_name); return &r->base; } diff --git a/src/core/lib/client_config/resolvers/sockaddr_resolver.c b/src/core/lib/client_config/resolvers/sockaddr_resolver.c index 66cddc3ed9..c2492a44b4 100644 --- a/src/core/lib/client_config/resolvers/sockaddr_resolver.c +++ b/src/core/lib/client_config/resolvers/sockaddr_resolver.c @@ -53,7 +53,7 @@ typedef struct { /** refcount */ gpr_refcount refs; /** subchannel factory */ - grpc_subchannel_factory *subchannel_factory; + grpc_client_channel_factory *client_channel_factory; /** load balancing policy name */ char *lb_policy_name; @@ -139,8 +139,8 @@ static void sockaddr_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx, memset(&args, 0, sizeof(args)); args.addr = (struct sockaddr *)&r->addrs[i]; args.addr_len = r->addrs_len[i]; - subchannels[i] = grpc_subchannel_factory_create_subchannel( - exec_ctx, r->subchannel_factory, &args); + subchannels[i] = grpc_client_channel_factory_create_subchannel( + exec_ctx, r->client_channel_factory, &args); } memset(&lb_policy_args, 0, sizeof(lb_policy_args)); lb_policy_args.subchannels = subchannels; @@ -159,7 +159,7 @@ static void sockaddr_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx, static void sockaddr_destroy(grpc_exec_ctx *exec_ctx, grpc_resolver *gr) { sockaddr_resolver *r = (sockaddr_resolver *)gr; gpr_mu_destroy(&r->mu); - grpc_subchannel_factory_unref(exec_ctx, r->subchannel_factory); + grpc_client_channel_factory_unref(exec_ctx, r->client_channel_factory); gpr_free(r->addrs); gpr_free(r->addrs_len); gpr_free(r->lb_policy_name); @@ -337,8 +337,8 @@ static grpc_resolver *sockaddr_create( gpr_ref_init(&r->refs, 1); gpr_mu_init(&r->mu); grpc_resolver_init(&r->base, &sockaddr_resolver_vtable); - r->subchannel_factory = args->subchannel_factory; - grpc_subchannel_factory_ref(r->subchannel_factory); + r->client_channel_factory = args->client_channel_factory; + grpc_client_channel_factory_ref(r->client_channel_factory); return &r->base; } diff --git a/src/core/lib/client_config/resolvers/zookeeper_resolver.c b/src/core/lib/client_config/resolvers/zookeeper_resolver.c index 3bb0bbdf5c..4548344611 100644 --- a/src/core/lib/client_config/resolvers/zookeeper_resolver.c +++ b/src/core/lib/client_config/resolvers/zookeeper_resolver.c @@ -59,7 +59,7 @@ typedef struct { /** name to resolve */ char *name; /** subchannel factory */ - grpc_subchannel_factory *subchannel_factory; + grpc_client_channel_factory *client_channel_factory; /** load balancing policy name */ char *lb_policy_name; @@ -196,8 +196,8 @@ static void zookeeper_on_resolved(grpc_exec_ctx *exec_ctx, void *arg, memset(&args, 0, sizeof(args)); args.addr = (struct sockaddr *)(addresses->addrs[i].addr); args.addr_len = addresses->addrs[i].len; - subchannels[i] = grpc_subchannel_factory_create_subchannel( - exec_ctx, r->subchannel_factory, &args); + subchannels[i] = grpc_client_channel_factory_create_subchannel( + exec_ctx, r->client_channel_factory, &args); } lb_policy_args.subchannels = subchannels; lb_policy_args.num_subchannels = addresses->naddrs; @@ -432,7 +432,7 @@ static void zookeeper_destroy(grpc_exec_ctx *exec_ctx, grpc_resolver *gr) { if (r->resolved_config != NULL) { grpc_client_config_unref(exec_ctx, r->resolved_config); } - grpc_subchannel_factory_unref(exec_ctx, r->subchannel_factory); + grpc_client_channel_factory_unref(exec_ctx, r->client_channel_factory); gpr_free(r->name); gpr_free(r->lb_policy_name); gpr_free(r); @@ -462,8 +462,8 @@ static grpc_resolver *zookeeper_create(grpc_resolver_args *args, grpc_resolver_init(&r->base, &zookeeper_resolver_vtable); r->name = gpr_strdup(path); - r->subchannel_factory = args->subchannel_factory; - grpc_subchannel_factory_ref(r->subchannel_factory); + r->client_channel_factory = args->client_channel_factory; + grpc_client_channel_factory_ref(r->client_channel_factory); r->lb_policy_name = gpr_strdup(lb_policy_name); diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h index 09de0fccc9..04f26b5501 100644 --- a/src/core/lib/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -35,7 +35,7 @@ #define GRPC_CORE_LIB_SURFACE_CHANNEL_H #include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/client_config/subchannel_factory.h" +#include "src/core/lib/client_config/client_channel_factory.h" #include "src/core/lib/surface/channel_stack_type.h" grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 3c57ad71da..3468fdfbdd 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -117,6 +117,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/channel/http_client_filter.c', 'src/core/lib/channel/http_server_filter.c', 'src/core/lib/channel/subchannel_call_holder.c', + 'src/core/lib/client_config/client_channel_factory.c', 'src/core/lib/client_config/client_config.c', 'src/core/lib/client_config/connector.c', 'src/core/lib/client_config/default_initial_connect_string.c', @@ -133,7 +134,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/client_config/resolvers/dns_resolver.c', 'src/core/lib/client_config/resolvers/sockaddr_resolver.c', 'src/core/lib/client_config/subchannel.c', - 'src/core/lib/client_config/subchannel_factory.c', 'src/core/lib/client_config/subchannel_index.c', 'src/core/lib/client_config/uri_parser.c', 'src/core/lib/compression/compression_algorithm.c', diff --git a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c b/test/core/client_config/resolvers/dns_resolver_connectivity_test.c index dc6a614d55..020e93d3ab 100644 --- a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c +++ b/test/core/client_config/resolvers/dns_resolver_connectivity_test.c @@ -42,20 +42,27 @@ #include "src/core/lib/iomgr/timer.h" #include "test/core/util/test_config.h" -static void subchannel_factory_ref(grpc_subchannel_factory *scv) {} -static void subchannel_factory_unref(grpc_exec_ctx *exec_ctx, - grpc_subchannel_factory *scv) {} -static grpc_subchannel *subchannel_factory_create_subchannel( - grpc_exec_ctx *exec_ctx, grpc_subchannel_factory *factory, +static void client_channel_factory_ref(grpc_client_channel_factory *scv) {} +static void client_channel_factory_unref(grpc_exec_ctx *exec_ctx, + grpc_client_channel_factory *scv) {} +static grpc_subchannel *client_channel_factory_create_subchannel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *factory, grpc_subchannel_args *args) { return NULL; } -static const grpc_subchannel_factory_vtable sc_vtable = { - subchannel_factory_ref, subchannel_factory_unref, - subchannel_factory_create_subchannel}; +static grpc_channel *client_channel_factory_create_channel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, + const char *target, grpc_channel_args *args) { + GPR_UNREACHABLE_CODE(return NULL); +} + +static const grpc_client_channel_factory_vtable sc_vtable = { + client_channel_factory_ref, client_channel_factory_unref, + client_channel_factory_create_subchannel, + client_channel_factory_create_channel}; -static grpc_subchannel_factory sc_factory = {&sc_vtable}; +static grpc_client_channel_factory cc_factory = {&sc_vtable}; static gpr_mu g_mu; static bool g_fail_resolution = true; @@ -85,7 +92,7 @@ static grpc_resolver *create_resolver(const char *name) { grpc_resolver_args args; memset(&args, 0, sizeof(args)); args.uri = uri; - args.subchannel_factory = &sc_factory; + args.client_channel_factory = &cc_factory; grpc_resolver *resolver = grpc_resolver_factory_create_resolver(factory, &args); grpc_resolver_factory_unref(factory); diff --git a/test/core/client_config/resolvers/dns_resolver_test.c b/test/core/client_config/resolvers/dns_resolver_test.c index 6c7a6b27e4..2ec45e4131 100644 --- a/test/core/client_config/resolvers/dns_resolver_test.c +++ b/test/core/client_config/resolvers/dns_resolver_test.c @@ -40,20 +40,27 @@ #include "src/core/lib/client_config/resolver.h" #include "test/core/util/test_config.h" -static void subchannel_factory_ref(grpc_subchannel_factory *scv) {} -static void subchannel_factory_unref(grpc_exec_ctx *exec_ctx, - grpc_subchannel_factory *scv) {} -static grpc_subchannel *subchannel_factory_create_subchannel( - grpc_exec_ctx *exec_ctx, grpc_subchannel_factory *factory, +static void client_channel_factory_ref(grpc_client_channel_factory *scv) {} +static void client_channel_factory_unref(grpc_exec_ctx *exec_ctx, + grpc_client_channel_factory *scv) {} +static grpc_subchannel *client_channel_factory_create_subchannel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *factory, grpc_subchannel_args *args) { GPR_UNREACHABLE_CODE(return NULL); } -static const grpc_subchannel_factory_vtable sc_vtable = { - subchannel_factory_ref, subchannel_factory_unref, - subchannel_factory_create_subchannel}; +static grpc_channel *client_channel_factory_create_channel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, + const char *target, grpc_channel_args *args) { + GPR_UNREACHABLE_CODE(return NULL); +} + +static const grpc_client_channel_factory_vtable sc_vtable = { + client_channel_factory_ref, client_channel_factory_unref, + client_channel_factory_create_subchannel, + client_channel_factory_create_channel}; -static grpc_subchannel_factory sc_factory = {&sc_vtable}; +static grpc_client_channel_factory cc_factory = {&sc_vtable}; static void test_succeeds(grpc_resolver_factory *factory, const char *string) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -65,7 +72,7 @@ static void test_succeeds(grpc_resolver_factory *factory, const char *string) { GPR_ASSERT(uri); memset(&args, 0, sizeof(args)); args.uri = uri; - args.subchannel_factory = &sc_factory; + args.client_channel_factory = &cc_factory; resolver = grpc_resolver_factory_create_resolver(factory, &args); GPR_ASSERT(resolver != NULL); GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test_succeeds"); diff --git a/test/core/client_config/resolvers/sockaddr_resolver_test.c b/test/core/client_config/resolvers/sockaddr_resolver_test.c index fafddfd166..220c0b8c14 100644 --- a/test/core/client_config/resolvers/sockaddr_resolver_test.c +++ b/test/core/client_config/resolvers/sockaddr_resolver_test.c @@ -40,20 +40,27 @@ #include "src/core/lib/client_config/resolver.h" #include "test/core/util/test_config.h" -static void subchannel_factory_ref(grpc_subchannel_factory *scv) {} -static void subchannel_factory_unref(grpc_exec_ctx *exec_ctx, - grpc_subchannel_factory *scv) {} -static grpc_subchannel *subchannel_factory_create_subchannel( - grpc_exec_ctx *exec_ctx, grpc_subchannel_factory *factory, +static void client_channel_factory_ref(grpc_client_channel_factory *scv) {} +static void client_channel_factory_unref(grpc_exec_ctx *exec_ctx, + grpc_client_channel_factory *scv) {} +static grpc_subchannel *client_channel_factory_create_subchannel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *factory, grpc_subchannel_args *args) { GPR_UNREACHABLE_CODE(return NULL); } -static const grpc_subchannel_factory_vtable sc_vtable = { - subchannel_factory_ref, subchannel_factory_unref, - subchannel_factory_create_subchannel}; +static grpc_channel *client_channel_factory_create_channel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, + const char *target, grpc_channel_args *args) { + GPR_UNREACHABLE_CODE(return NULL); +} + +static const grpc_client_channel_factory_vtable sc_vtable = { + client_channel_factory_ref, client_channel_factory_unref, + client_channel_factory_create_subchannel, + client_channel_factory_create_channel}; -static grpc_subchannel_factory sc_factory = {&sc_vtable}; +static grpc_client_channel_factory cc_factory = {&sc_vtable}; static void test_succeeds(grpc_resolver_factory *factory, const char *string) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -65,7 +72,7 @@ static void test_succeeds(grpc_resolver_factory *factory, const char *string) { GPR_ASSERT(uri); memset(&args, 0, sizeof(args)); args.uri = uri; - args.subchannel_factory = &sc_factory; + args.client_channel_factory = &cc_factory; resolver = grpc_resolver_factory_create_resolver(factory, &args); GPR_ASSERT(resolver != NULL); GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test_succeeds"); diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index bb7177f52f..3a10d1379f 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -809,6 +809,7 @@ src/core/lib/channel/context.h \ src/core/lib/channel/http_client_filter.h \ src/core/lib/channel/http_server_filter.h \ src/core/lib/channel/subchannel_call_holder.h \ +src/core/lib/client_config/client_channel_factory.h \ src/core/lib/client_config/client_config.h \ src/core/lib/client_config/connector.h \ src/core/lib/client_config/initial_connect_string.h \ @@ -824,7 +825,6 @@ src/core/lib/client_config/resolver_registry.h \ src/core/lib/client_config/resolvers/dns_resolver.h \ src/core/lib/client_config/resolvers/sockaddr_resolver.h \ src/core/lib/client_config/subchannel.h \ -src/core/lib/client_config/subchannel_factory.h \ src/core/lib/client_config/subchannel_index.h \ src/core/lib/client_config/uri_parser.h \ src/core/lib/compression/algorithm_metadata.h \ @@ -957,6 +957,7 @@ src/core/lib/channel/connected_channel.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ src/core/lib/channel/subchannel_call_holder.c \ +src/core/lib/client_config/client_channel_factory.c \ src/core/lib/client_config/client_config.c \ src/core/lib/client_config/connector.c \ src/core/lib/client_config/default_initial_connect_string.c \ @@ -973,7 +974,6 @@ src/core/lib/client_config/resolver_registry.c \ src/core/lib/client_config/resolvers/dns_resolver.c \ src/core/lib/client_config/resolvers/sockaddr_resolver.c \ src/core/lib/client_config/subchannel.c \ -src/core/lib/client_config/subchannel_factory.c \ src/core/lib/client_config/subchannel_index.c \ src/core/lib/client_config/uri_parser.c \ src/core/lib/compression/compression_algorithm.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index d7c9839d5a..dec8b1fe37 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4024,6 +4024,7 @@ "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.h", "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_channel_factory.h", "src/core/lib/client_config/client_config.h", "src/core/lib/client_config/connector.h", "src/core/lib/client_config/initial_connect_string.h", @@ -4039,7 +4040,6 @@ "src/core/lib/client_config/resolvers/dns_resolver.h", "src/core/lib/client_config/resolvers/sockaddr_resolver.h", "src/core/lib/client_config/subchannel.h", - "src/core/lib/client_config/subchannel_factory.h", "src/core/lib/client_config/subchannel_index.h", "src/core/lib/client_config/uri_parser.h", "src/core/lib/compression/algorithm_metadata.h", @@ -4225,6 +4225,8 @@ "src/core/lib/channel/http_server_filter.h", "src/core/lib/channel/subchannel_call_holder.c", "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_channel_factory.c", + "src/core/lib/client_config/client_channel_factory.h", "src/core/lib/client_config/client_config.c", "src/core/lib/client_config/client_config.h", "src/core/lib/client_config/connector.c", @@ -4256,8 +4258,6 @@ "src/core/lib/client_config/resolvers/sockaddr_resolver.h", "src/core/lib/client_config/subchannel.c", "src/core/lib/client_config/subchannel.h", - "src/core/lib/client_config/subchannel_factory.c", - "src/core/lib/client_config/subchannel_factory.h", "src/core/lib/client_config/subchannel_index.c", "src/core/lib/client_config/subchannel_index.h", "src/core/lib/client_config/uri_parser.c", @@ -4652,6 +4652,7 @@ "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.h", "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_channel_factory.h", "src/core/lib/client_config/client_config.h", "src/core/lib/client_config/connector.h", "src/core/lib/client_config/initial_connect_string.h", @@ -4667,7 +4668,6 @@ "src/core/lib/client_config/resolvers/dns_resolver.h", "src/core/lib/client_config/resolvers/sockaddr_resolver.h", "src/core/lib/client_config/subchannel.h", - "src/core/lib/client_config/subchannel_factory.h", "src/core/lib/client_config/subchannel_index.h", "src/core/lib/client_config/uri_parser.h", "src/core/lib/compression/algorithm_metadata.h", @@ -4836,6 +4836,8 @@ "src/core/lib/channel/http_server_filter.h", "src/core/lib/channel/subchannel_call_holder.c", "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_channel_factory.c", + "src/core/lib/client_config/client_channel_factory.h", "src/core/lib/client_config/client_config.c", "src/core/lib/client_config/client_config.h", "src/core/lib/client_config/connector.c", @@ -4867,8 +4869,6 @@ "src/core/lib/client_config/resolvers/sockaddr_resolver.h", "src/core/lib/client_config/subchannel.c", "src/core/lib/client_config/subchannel.h", - "src/core/lib/client_config/subchannel_factory.c", - "src/core/lib/client_config/subchannel_factory.h", "src/core/lib/client_config/subchannel_index.c", "src/core/lib/client_config/subchannel_index.h", "src/core/lib/client_config/uri_parser.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index c20f8d7070..ad7f888e49 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -318,6 +318,7 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\http_client_filter.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\http_server_filter.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\subchannel_call_holder.h" /> + <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\client_channel_factory.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\client_config.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\connector.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\initial_connect_string.h" /> @@ -333,7 +334,6 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\resolvers\dns_resolver.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\resolvers\sockaddr_resolver.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel.h" /> - <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_factory.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_index.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\uri_parser.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\algorithm_metadata.h" /> @@ -511,6 +511,8 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\subchannel_call_holder.c"> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\client_channel_factory.c"> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\client_config.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\connector.c"> @@ -543,8 +545,6 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel.c"> </ClCompile> - <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_factory.c"> - </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_index.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\uri_parser.c"> diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index f03b20703f..48aaa04ad3 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -130,6 +130,9 @@ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\subchannel_call_holder.c"> <Filter>src\core\lib\channel</Filter> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\client_channel_factory.c"> + <Filter>src\core\lib\client_config</Filter> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\client_config.c"> <Filter>src\core\lib\client_config</Filter> </ClCompile> @@ -178,9 +181,6 @@ <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel.c"> <Filter>src\core\lib\client_config</Filter> </ClCompile> - <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_factory.c"> - <Filter>src\core\lib\client_config</Filter> - </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_index.c"> <Filter>src\core\lib\client_config</Filter> </ClCompile> @@ -644,6 +644,9 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\subchannel_call_holder.h"> <Filter>src\core\lib\channel</Filter> </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\client_channel_factory.h"> + <Filter>src\core\lib\client_config</Filter> + </ClInclude> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\client_config.h"> <Filter>src\core\lib\client_config</Filter> </ClInclude> @@ -689,9 +692,6 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel.h"> <Filter>src\core\lib\client_config</Filter> </ClInclude> - <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_factory.h"> - <Filter>src\core\lib\client_config</Filter> - </ClInclude> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_index.h"> <Filter>src\core\lib\client_config</Filter> </ClInclude> diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index e89cc8a125..77b5ef7039 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -308,6 +308,7 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\http_client_filter.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\http_server_filter.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\subchannel_call_holder.h" /> + <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\client_channel_factory.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\client_config.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\connector.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\initial_connect_string.h" /> @@ -323,7 +324,6 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\resolvers\dns_resolver.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\resolvers\sockaddr_resolver.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel.h" /> - <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_factory.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_index.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\uri_parser.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\algorithm_metadata.h" /> @@ -483,6 +483,8 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\subchannel_call_holder.c"> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\client_channel_factory.c"> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\client_config.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\connector.c"> @@ -515,8 +517,6 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel.c"> </ClCompile> - <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_factory.c"> - </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_index.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\uri_parser.c"> diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index c9f1ad6943..4fa1fee9fb 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -124,6 +124,9 @@ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\subchannel_call_holder.c"> <Filter>src\core\lib\channel</Filter> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\client_channel_factory.c"> + <Filter>src\core\lib\client_config</Filter> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\client_config.c"> <Filter>src\core\lib\client_config</Filter> </ClCompile> @@ -172,9 +175,6 @@ <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel.c"> <Filter>src\core\lib\client_config</Filter> </ClCompile> - <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_factory.c"> - <Filter>src\core\lib\client_config</Filter> - </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_index.c"> <Filter>src\core\lib\client_config</Filter> </ClCompile> @@ -581,6 +581,9 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\subchannel_call_holder.h"> <Filter>src\core\lib\channel</Filter> </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\client_channel_factory.h"> + <Filter>src\core\lib\client_config</Filter> + </ClInclude> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\client_config.h"> <Filter>src\core\lib\client_config</Filter> </ClInclude> @@ -626,9 +629,6 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel.h"> <Filter>src\core\lib\client_config</Filter> </ClInclude> - <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_factory.h"> - <Filter>src\core\lib\client_config</Filter> - </ClInclude> <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\subchannel_index.h"> <Filter>src\core\lib\client_config</Filter> </ClInclude> |