aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--BUILD93
-rw-r--r--CMakeLists.txt88
-rw-r--r--Makefile741
-rw-r--r--binding.gyp1
-rw-r--r--build.yaml91
-rw-r--r--config.m41
-rw-r--r--doc/cpp-style-guide.md88
-rw-r--r--gRPC-Core.podspec3
-rwxr-xr-xgrpc.gemspec2
-rw-r--r--include/grpc++/alarm.h2
-rw-r--r--include/grpc++/channel.h20
-rw-r--r--include/grpc++/ext/proto_server_reflection_plugin.h12
-rw-r--r--include/grpc++/ext/reflection.grpc.pb.h188
-rw-r--r--include/grpc++/ext/reflection.pb.h2125
-rw-r--r--include/grpc++/generic/async_generic_service.h4
-rw-r--r--include/grpc++/generic/generic_stub.h2
-rw-r--r--include/grpc++/grpc++.h4
-rw-r--r--include/grpc++/impl/codegen/async_stream.h64
-rw-r--r--include/grpc++/impl/codegen/async_unary_call.h9
-rw-r--r--include/grpc++/impl/codegen/call.h14
-rw-r--r--include/grpc++/impl/codegen/client_context.h6
-rw-r--r--include/grpc++/impl/codegen/config.h83
-rw-r--r--include/grpc++/impl/codegen/core_codegen.h67
-rw-r--r--include/grpc++/impl/codegen/method_handler_impl.h10
-rw-r--r--include/grpc++/impl/codegen/proto_utils.h22
-rw-r--r--include/grpc++/impl/codegen/server_context.h2
-rw-r--r--include/grpc++/impl/codegen/server_interface.h10
-rw-r--r--include/grpc++/impl/codegen/sync_no_cxx11.h111
-rw-r--r--include/grpc++/impl/codegen/sync_stream.h76
-rw-r--r--include/grpc++/impl/codegen/time.h4
-rw-r--r--include/grpc++/impl/grpc_library.h8
-rw-r--r--include/grpc++/impl/sync.h39
-rw-r--r--include/grpc++/impl/thd_no_cxx11.h117
-rw-r--r--include/grpc++/resource_quota.h2
-rw-r--r--include/grpc++/server.h28
-rw-r--r--include/grpc++/support/byte_buffer.h2
-rw-r--r--include/grpc++/support/channel_arguments.h5
-rw-r--r--include/grpc++/support/slice.h2
-rw-r--r--package.xml2
-rw-r--r--setup.py2
-rw-r--r--src/compiler/cpp_generator.cc67
-rw-r--r--src/compiler/python_generator.cc454
-rw-r--r--src/compiler/python_generator.h4
-rw-r--r--src/core/ext/client_channel/lb_policy.h6
-rw-r--r--src/core/ext/lb_policy/grpclb/grpclb.c693
-rw-r--r--src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h4
-rw-r--r--src/core/ext/lb_policy/round_robin/round_robin.c45
-rw-r--r--src/core/ext/resolver/dns/native/dns_resolver.c2
-rw-r--r--src/core/ext/transport/chttp2/client/secure/secure_channel_create.c2
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_parser.c26
-rw-r--r--src/core/lib/channel/compress_filter.c10
-rw-r--r--src/core/lib/channel/http_server_filter.c1
-rw-r--r--src/core/lib/iomgr/endpoint_pair_uv.c5
-rw-r--r--src/core/lib/iomgr/network_status_tracker.c2
-rw-r--r--src/core/lib/iomgr/resource_quota.c204
-rw-r--r--src/core/lib/iomgr/resource_quota.h93
-rw-r--r--src/core/lib/iomgr/tcp_client_uv.c36
-rw-r--r--src/core/lib/iomgr/tcp_posix.c37
-rw-r--r--src/core/lib/iomgr/tcp_server_posix.c45
-rw-r--r--src/core/lib/iomgr/tcp_server_uv.c24
-rw-r--r--src/core/lib/iomgr/tcp_uv.c71
-rw-r--r--src/core/lib/iomgr/tcp_uv.h4
-rw-r--r--src/core/lib/iomgr/tcp_windows.c53
-rw-r--r--src/core/lib/security/transport/security_connector.c4
-rw-r--r--src/core/lib/surface/call.c6
-rw-r--r--src/core/lib/surface/version.c2
-rw-r--r--src/core/lib/transport/pid_controller.c (renamed from include/grpc++/impl/codegen/impl/sync.h)32
-rw-r--r--src/core/lib/transport/pid_controller.h (renamed from include/grpc++/impl/codegen/sync.h)39
-rw-r--r--src/core/lib/tsi/ssl_transport_security.c16
-rw-r--r--src/cpp/client/channel_cc.cc6
-rw-r--r--src/cpp/client/client_context.cc12
-rw-r--r--src/cpp/client/cronet_credentials.cc8
-rw-r--r--src/cpp/client/insecure_credentials.cc8
-rw-r--r--src/cpp/client/secure_credentials.h14
-rw-r--r--src/cpp/common/channel_arguments.cc10
-rw-r--r--src/cpp/common/channel_filter.h2
-rw-r--r--src/cpp/common/secure_auth_context.h21
-rw-r--r--src/cpp/common/version_cc.cc (renamed from include/grpc++/impl/thd_cxx11.h)16
-rw-r--r--src/cpp/ext/proto_server_reflection.h23
-rw-r--r--src/cpp/ext/reflection.grpc.pb.cc97
-rw-r--r--src/cpp/ext/reflection.pb.cc4045
-rw-r--r--src/cpp/server/dynamic_thread_pool.cc18
-rw-r--r--src/cpp/server/dynamic_thread_pool.h17
-rw-r--r--src/cpp/server/insecure_server_credentials.cc7
-rw-r--r--src/cpp/server/secure_server_credentials.h11
-rw-r--r--src/cpp/server/server_cc.cc32
-rw-r--r--src/cpp/server/server_context.cc17
-rw-r--r--src/cpp/thread_manager/thread_manager.cc29
-rw-r--r--src/cpp/thread_manager/thread_manager.h13
-rw-r--r--src/cpp/util/time_cc.cc5
-rwxr-xr-xsrc/google_benchmark/gen_build_yaml.py (renamed from tools/dockerfile/grpc_check_generated_pb_files/check_pb_files.sh)37
-rw-r--r--src/objective-c/GRPCClient/GRPCCall+ChannelArg.h17
-rw-r--r--src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h16
-rw-r--r--src/objective-c/GRPCClient/GRPCCall+OAuth2.h14
-rw-r--r--src/objective-c/GRPCClient/GRPCCall+Tests.h25
-rw-r--r--src/objective-c/GRPCClient/GRPCCall.h189
-rw-r--r--src/objective-c/GRPCClient/GRPCCall.m204
-rw-r--r--src/objective-c/GRPCClient/private/GRPCCompletionQueue.h17
-rw-r--r--src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.h19
-rw-r--r--src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m79
-rw-r--r--src/objective-c/GRPCClient/private/GRPCHost.m81
-rw-r--r--src/objective-c/GRPCClient/private/GRPCRequestHeaders.m41
-rw-r--r--src/objective-c/GRPCClient/private/GRPCWrappedCall.m86
-rw-r--r--src/objective-c/GRPCClient/private/NSError+GRPC.h7
-rw-r--r--src/php/lib/Grpc/AbstractCall.php8
-rw-r--r--src/php/lib/Grpc/BaseStub.php2
-rwxr-xr-xsrc/php/tests/interop/interop_client.php8
-rw-r--r--src/php/tests/unit_tests/CallTest.php2
-rw-r--r--src/proto/grpc/lb/v1/load_balancer.options3
-rw-r--r--src/proto/grpc/lb/v1/load_balancer.proto8
-rw-r--r--src/proto/grpc/reflection/v1alpha/reflection.proto4
-rw-r--r--src/python/grpcio/grpc_core_dependencies.py1
-rw-r--r--src/python/grpcio_health_checking/.gitignore1
-rw-r--r--src/python/grpcio_tests/.gitignore1
-rw-r--r--src/python/grpcio_tests/setup.py10
-rw-r--r--src/python/grpcio_tests/tests/_loader.py4
-rw-r--r--src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py304
-rw-r--r--[-rwxr-xr-x]src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/__init__.py (renamed from tools/distrib/check_generated_pb_files.sh)13
-rw-r--r--src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/same.proto39
-rw-r--r--src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_messages/__init__.py30
-rw-r--r--src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_messages/messages.proto35
-rw-r--r--src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_services/__init__.py30
-rw-r--r--src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_services/services.proto38
-rw-r--r--src/python/grpcio_tests/tests/tests.json90
-rw-r--r--src/python/grpcio_tests/tests/unit/_rpc_test.py4
-rw-r--r--src/ruby/ext/grpc/rb_compression_options.c2
-rw-r--r--templates/CMakeLists.txt.template2
-rw-r--r--templates/Makefile.template135
-rw-r--r--templates/src/cpp/common/version_cc.cc.template43
-rw-r--r--templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template4
-rw-r--r--templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template4
-rw-r--r--test/core/client_channel/lb_policies_test.c38
-rw-r--r--test/core/client_channel/set_initial_connect_string_test.c2
-rw-r--r--test/core/end2end/connection_refused_test.c37
-rw-r--r--test/core/end2end/end2end_test_utils.c (renamed from include/grpc++/impl/codegen/sync_cxx11.h)26
-rw-r--r--test/core/end2end/end2end_tests.h11
-rw-r--r--test/core/end2end/fake_resolver.c63
-rw-r--r--test/core/end2end/fixtures/h2_census.c8
-rw-r--r--test/core/end2end/fixtures/h2_compress.c8
-rw-r--r--test/core/end2end/fixtures/h2_fake_resolver.c128
-rw-r--r--test/core/end2end/fixtures/h2_fakesec.c8
-rw-r--r--test/core/end2end/fixtures/h2_fd.c11
-rw-r--r--test/core/end2end/fixtures/h2_full+pipe.c8
-rw-r--r--test/core/end2end/fixtures/h2_full+trace.c8
-rw-r--r--test/core/end2end/fixtures/h2_full.c8
-rw-r--r--test/core/end2end/fixtures/h2_http_proxy.c8
-rw-r--r--test/core/end2end/fixtures/h2_load_reporting.c8
-rw-r--r--test/core/end2end/fixtures/h2_oauth2.c8
-rw-r--r--test/core/end2end/fixtures/h2_proxy.c8
-rw-r--r--test/core/end2end/fixtures/h2_sockpair+trace.c10
-rw-r--r--test/core/end2end/fixtures/h2_sockpair.c10
-rw-r--r--test/core/end2end/fixtures/h2_sockpair_1byte.c11
-rw-r--r--test/core/end2end/fixtures/h2_ssl.c8
-rw-r--r--test/core/end2end/fixtures/h2_ssl_cert.c73
-rw-r--r--test/core/end2end/fixtures/h2_ssl_proxy.c8
-rw-r--r--test/core/end2end/fixtures/h2_uds.c8
-rw-r--r--test/core/end2end/fuzzers/client_fuzzer_corpus/server_hanging_response_1_headerbin0 -> 18 bytes
-rw-r--r--test/core/end2end/fuzzers/client_fuzzer_corpus/server_hanging_response_2_header2bin0 -> 27 bytes
-rwxr-xr-x[-rw-r--r--]test/core/end2end/fuzzers/generate_client_examples_of_bad_closing_streams.py (renamed from tools/dockerfile/grpc_check_generated_pb_files/Dockerfile)58
-rwxr-xr-xtest/core/end2end/gen_build_yaml.py7
-rw-r--r--test/core/end2end/tests/bad_hostname.c2
-rw-r--r--test/core/end2end/tests/binary_metadata.c11
-rw-r--r--test/core/end2end/tests/call_creds.c17
-rw-r--r--test/core/end2end/tests/cancel_after_accept.c53
-rw-r--r--test/core/end2end/tests/cancel_after_client_done.c8
-rw-r--r--test/core/end2end/tests/cancel_after_invoke.c8
-rw-r--r--test/core/end2end/tests/cancel_before_invoke.c8
-rw-r--r--test/core/end2end/tests/cancel_in_a_vacuum.c8
-rw-r--r--test/core/end2end/tests/cancel_with_status.c14
-rw-r--r--test/core/end2end/tests/compressed_payload.c20
-rw-r--r--test/core/end2end/tests/connectivity.c2
-rw-r--r--test/core/end2end/tests/default_host.c2
-rw-r--r--test/core/end2end/tests/disappearing_server.c19
-rw-r--r--test/core/end2end/tests/empty_batch.c13
-rw-r--r--test/core/end2end/tests/filter_call_init_fails.c8
-rw-r--r--test/core/end2end/tests/filter_causes_close.c8
-rw-r--r--test/core/end2end/tests/graceful_server_shutdown.c11
-rw-r--r--test/core/end2end/tests/high_initial_seqno.c17
-rw-r--r--test/core/end2end/tests/hpack_size.c17
-rw-r--r--test/core/end2end/tests/idempotent_request.c19
-rw-r--r--test/core/end2end/tests/invoke_large_request.c11
-rw-r--r--test/core/end2end/tests/large_metadata.c11
-rw-r--r--test/core/end2end/tests/load_reporting_hook.c24
-rw-r--r--test/core/end2end/tests/max_concurrent_streams.c33
-rw-r--r--test/core/end2end/tests/max_message_length.c111
-rw-r--r--test/core/end2end/tests/negative_deadline.c14
-rw-r--r--test/core/end2end/tests/network_status_change.c11
-rw-r--r--test/core/end2end/tests/no_logging.c25
-rw-r--r--test/core/end2end/tests/no_op.c2
-rw-r--r--test/core/end2end/tests/payload.c18
-rw-r--r--test/core/end2end/tests/ping.c2
-rw-r--r--test/core/end2end/tests/ping_pong_streaming.c9
-rw-r--r--test/core/end2end/tests/registered_call.c22
-rw-r--r--test/core/end2end/tests/request_with_flags.c8
-rw-r--r--test/core/end2end/tests/request_with_payload.c11
-rw-r--r--test/core/end2end/tests/resource_quota_server.c41
-rw-r--r--test/core/end2end/tests/server_finishes_request.c17
-rw-r--r--test/core/end2end/tests/shutdown_finishes_calls.c11
-rw-r--r--test/core/end2end/tests/shutdown_finishes_tags.c2
-rw-r--r--test/core/end2end/tests/simple_cacheable_request.c11
-rw-r--r--test/core/end2end/tests/simple_delayed_request.c11
-rw-r--r--test/core/end2end/tests/simple_metadata.c11
-rw-r--r--test/core/end2end/tests/simple_request.c19
-rw-r--r--test/core/end2end/tests/streaming_error_response.c11
-rw-r--r--test/core/end2end/tests/trailing_metadata.c11
-rw-r--r--test/core/iomgr/resource_quota_test.c253
-rw-r--r--test/core/transport/pid_controller_test.c77
-rw-r--r--test/core/util/mock_endpoint.c33
-rw-r--r--test/core/util/passthru_endpoint.c18
-rw-r--r--test/cpp/codegen/compiler_test_golden52
-rw-r--r--test/cpp/common/auth_property_iterator_test.cc4
-rw-r--r--test/cpp/end2end/async_end2end_test.cc10
-rw-r--r--test/cpp/end2end/client_crash_test_server.cc9
-rw-r--r--test/cpp/end2end/end2end_test.cc22
-rw-r--r--test/cpp/end2end/filter_end2end_test.cc20
-rw-r--r--test/cpp/end2end/generic_end2end_test.cc4
-rw-r--r--test/cpp/end2end/hybrid_end2end_test.cc28
-rw-r--r--test/cpp/end2end/mock_test.cc62
-rw-r--r--test/cpp/end2end/proto_server_reflection_test.cc2
-rw-r--r--test/cpp/end2end/round_robin_end2end_test.cc211
-rw-r--r--test/cpp/end2end/server_builder_plugin_test.cc29
-rw-r--r--test/cpp/end2end/server_crash_test.cc11
-rw-r--r--test/cpp/end2end/shutdown_test.cc6
-rw-r--r--test/cpp/end2end/streaming_throughput_test.cc10
-rw-r--r--test/cpp/end2end/test_service_impl.h12
-rw-r--r--test/cpp/end2end/thread_stress_test.cc52
-rw-r--r--test/cpp/grpclb/grpclb_test.cc22
-rw-r--r--test/cpp/interop/stress_test.cc5
-rw-r--r--test/cpp/microbenchmarks/noop-benchmark.cc (renamed from include/grpc++/impl/thd.h)18
-rw-r--r--test/cpp/qps/client.h2
-rw-r--r--test/cpp/qps/client_async.cc41
-rw-r--r--test/cpp/qps/client_sync.cc10
-rwxr-xr-xtest/cpp/qps/gen_build_yaml.py2
-rw-r--r--test/cpp/qps/interarrival.h6
-rw-r--r--test/cpp/qps/qps_worker.cc20
-rw-r--r--test/cpp/qps/report.h24
-rw-r--r--test/cpp/qps/server_async.cc22
-rw-r--r--test/cpp/qps/server_sync.cc8
-rw-r--r--test/cpp/thread_manager/thread_manager_test.cc7
-rw-r--r--test/cpp/util/cli_call.h2
-rw-r--r--test/cpp/util/cli_call_test.cc6
-rw-r--r--test/cpp/util/grpc_tool_test.cc9
-rw-r--r--test/cpp/util/metrics_server.h6
-rw-r--r--test/cpp/util/proto_file_parser.cc4
-rw-r--r--test/cpp/util/proto_reflection_descriptor_database.h16
-rw-r--r--test/cpp/util/test_credentials_provider.cc26
m---------third_party/google_benchmark0
-rw-r--r--tools/buildgen/generate_build_additions.sh1
-rwxr-xr-xtools/codegen/extensions/gen_reflection_proto.sh95
-rw-r--r--tools/dockerfile/test/cxx_jessie_x64/Dockerfile4
-rw-r--r--tools/dockerfile/test/cxx_jessie_x86/Dockerfile4
-rw-r--r--tools/doxygen/Doxyfile.c++9
-rw-r--r--tools/doxygen/Doxyfile.c++.internal10
-rw-r--r--tools/doxygen/Doxyfile.core2
-rw-r--r--tools/doxygen/Doxyfile.core.internal4
-rwxr-xr-xtools/gce/create_linux_worker.sh2
-rwxr-xr-xtools/run_tests/performance/bq_upload_result.py4
-rw-r--r--tools/run_tests/performance/scenario_result_schema.json5
-rwxr-xr-xtools/run_tests/run_tests.py4
-rwxr-xr-xtools/run_tests/run_tests_matrix.py79
-rwxr-xr-xtools/run_tests/sanity/check_submodules.sh2
-rwxr-xr-xtools/run_tests/sanity/check_version.py14
-rw-r--r--tools/run_tests/sanity/sanity_tests.yaml1
-rw-r--r--tools/run_tests/sources_and_headers.json217
-rw-r--r--tools/run_tests/tests.json2229
-rw-r--r--vsprojects/buildtests_c.sln83
-rw-r--r--vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj208
-rw-r--r--vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj.filters125
-rw-r--r--vsprojects/vcxproj/grpc++/grpc++.vcxproj11
-rw-r--r--vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters30
-rw-r--r--vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj (renamed from vsprojects/vcxproj/grpc++_reflection_codegen/grpc++_reflection_codegen.vcxproj)19
-rw-r--r--vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj.filters61
-rw-r--r--vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj60
-rw-r--r--vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters193
-rw-r--r--vsprojects/vcxproj/grpc++_reflection_codegen/grpc++_reflection_codegen.vcxproj.filters27
-rw-r--r--vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj3
-rw-r--r--vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters9
-rw-r--r--vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj11
-rw-r--r--vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters30
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj3
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj.filters6
-rw-r--r--vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj18
-rw-r--r--vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj.filters41
-rw-r--r--vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj3
-rw-r--r--vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters6
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj3
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters6
-rw-r--r--vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj3
-rw-r--r--vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters9
-rw-r--r--vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj3
-rw-r--r--vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters9
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj.filters24
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj.filters24
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj2
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters3
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj2
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters3
-rw-r--r--vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj4
-rw-r--r--vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj14
-rw-r--r--vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters17
-rw-r--r--vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj (renamed from vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj)37
-rw-r--r--vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj.filters21
-rw-r--r--vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj8
-rw-r--r--vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj.filters11
-rw-r--r--vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj207
-rw-r--r--vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj.filters21
-rw-r--r--vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj (renamed from vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj)11
-rw-r--r--vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters21
309 files changed, 5545 insertions, 13251 deletions
diff --git a/.gitmodules b/.gitmodules
index 3665cde63f..c32881cb95 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -17,3 +17,6 @@
[submodule "third_party/thrift"]
path = third_party/thrift
url = https://github.com/apache/thrift.git
+[submodule "third_party/google_benchmark"]
+ path = third_party/google_benchmark
+ url = https://github.com/google/benchmark
diff --git a/BUILD b/BUILD
index 264fe259b2..8690052bc4 100644
--- a/BUILD
+++ b/BUILD
@@ -252,6 +252,7 @@ cc_library(
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/method_config.h",
+ "src/core/lib/transport/pid_controller.h",
"src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.h",
@@ -436,6 +437,7 @@ cc_library(
"src/core/lib/transport/metadata.c",
"src/core/lib/transport/metadata_batch.c",
"src/core/lib/transport/method_config.c",
+ "src/core/lib/transport/pid_controller.c",
"src/core/lib/transport/static_metadata.c",
"src/core/lib/transport/timeout_encoding.c",
"src/core/lib/transport/transport.c",
@@ -676,6 +678,7 @@ cc_library(
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/method_config.h",
+ "src/core/lib/transport/pid_controller.h",
"src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.h",
@@ -845,6 +848,7 @@ cc_library(
"src/core/lib/transport/metadata.c",
"src/core/lib/transport/metadata_batch.c",
"src/core/lib/transport/method_config.c",
+ "src/core/lib/transport/pid_controller.c",
"src/core/lib/transport/static_metadata.c",
"src/core/lib/transport/timeout_encoding.c",
"src/core/lib/transport/transport.c",
@@ -1055,6 +1059,7 @@ cc_library(
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/method_config.h",
+ "src/core/lib/transport/pid_controller.h",
"src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.h",
@@ -1216,6 +1221,7 @@ cc_library(
"src/core/lib/transport/metadata.c",
"src/core/lib/transport/metadata_batch.c",
"src/core/lib/transport/method_config.c",
+ "src/core/lib/transport/pid_controller.c",
"src/core/lib/transport/static_metadata.c",
"src/core/lib/transport/timeout_encoding.c",
"src/core/lib/transport/transport.c",
@@ -1364,6 +1370,7 @@ cc_library(
"src/cpp/common/core_codegen.cc",
"src/cpp/common/resource_quota_cc.cc",
"src/cpp/common/rpc_method.cc",
+ "src/cpp/common/version_cc.cc",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
@@ -1402,12 +1409,6 @@ cc_library(
"include/grpc++/impl/server_builder_plugin.h",
"include/grpc++/impl/server_initializer.h",
"include/grpc++/impl/service_type.h",
- "include/grpc++/impl/sync.h",
- "include/grpc++/impl/sync_cxx11.h",
- "include/grpc++/impl/sync_no_cxx11.h",
- "include/grpc++/impl/thd.h",
- "include/grpc++/impl/thd_cxx11.h",
- "include/grpc++/impl/thd_no_cxx11.h",
"include/grpc++/resource_quota.h",
"include/grpc++/security/auth_context.h",
"include/grpc++/security/auth_metadata_processor.h",
@@ -1455,9 +1456,6 @@ cc_library(
"include/grpc++/impl/codegen/status_helper.h",
"include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h",
- "include/grpc++/impl/codegen/sync.h",
- "include/grpc++/impl/codegen/sync_cxx11.h",
- "include/grpc++/impl/codegen/sync_no_cxx11.h",
"include/grpc++/impl/codegen/sync_stream.h",
"include/grpc++/impl/codegen/time.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
@@ -1516,6 +1514,7 @@ cc_library(
"src/cpp/common/core_codegen.cc",
"src/cpp/common/resource_quota_cc.cc",
"src/cpp/common/rpc_method.cc",
+ "src/cpp/common/version_cc.cc",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
@@ -1554,12 +1553,6 @@ cc_library(
"include/grpc++/impl/server_builder_plugin.h",
"include/grpc++/impl/server_initializer.h",
"include/grpc++/impl/service_type.h",
- "include/grpc++/impl/sync.h",
- "include/grpc++/impl/sync_cxx11.h",
- "include/grpc++/impl/sync_no_cxx11.h",
- "include/grpc++/impl/thd.h",
- "include/grpc++/impl/thd_cxx11.h",
- "include/grpc++/impl/thd_no_cxx11.h",
"include/grpc++/resource_quota.h",
"include/grpc++/security/auth_context.h",
"include/grpc++/security/auth_metadata_processor.h",
@@ -1607,9 +1600,6 @@ cc_library(
"include/grpc++/impl/codegen/status_helper.h",
"include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h",
- "include/grpc++/impl/codegen/sync.h",
- "include/grpc++/impl/codegen/sync_cxx11.h",
- "include/grpc++/impl/codegen/sync_no_cxx11.h",
"include/grpc++/impl/codegen/sync_stream.h",
"include/grpc++/impl/codegen/time.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
@@ -1649,63 +1639,10 @@ cc_library(
"src/cpp/ext/proto_server_reflection.h",
"src/cpp/ext/proto_server_reflection.cc",
"src/cpp/ext/proto_server_reflection_plugin.cc",
- "src/cpp/ext/reflection.grpc.pb.cc",
- "src/cpp/ext/reflection.pb.cc",
+ "src/proto/grpc/reflection/v1alpha/reflection.proto",
],
hdrs = [
"include/grpc++/ext/proto_server_reflection_plugin.h",
- "include/grpc++/ext/reflection.grpc.pb.h",
- "include/grpc++/ext/reflection.pb.h",
- "include/grpc++/impl/codegen/proto_utils.h",
- "include/grpc++/impl/codegen/async_stream.h",
- "include/grpc++/impl/codegen/async_unary_call.h",
- "include/grpc++/impl/codegen/call.h",
- "include/grpc++/impl/codegen/call_hook.h",
- "include/grpc++/impl/codegen/channel_interface.h",
- "include/grpc++/impl/codegen/client_context.h",
- "include/grpc++/impl/codegen/client_unary_call.h",
- "include/grpc++/impl/codegen/completion_queue.h",
- "include/grpc++/impl/codegen/completion_queue_tag.h",
- "include/grpc++/impl/codegen/config.h",
- "include/grpc++/impl/codegen/core_codegen_interface.h",
- "include/grpc++/impl/codegen/create_auth_context.h",
- "include/grpc++/impl/codegen/grpc_library.h",
- "include/grpc++/impl/codegen/method_handler_impl.h",
- "include/grpc++/impl/codegen/rpc_method.h",
- "include/grpc++/impl/codegen/rpc_service_method.h",
- "include/grpc++/impl/codegen/security/auth_context.h",
- "include/grpc++/impl/codegen/serialization_traits.h",
- "include/grpc++/impl/codegen/server_context.h",
- "include/grpc++/impl/codegen/server_interface.h",
- "include/grpc++/impl/codegen/service_type.h",
- "include/grpc++/impl/codegen/status.h",
- "include/grpc++/impl/codegen/status_code_enum.h",
- "include/grpc++/impl/codegen/status_helper.h",
- "include/grpc++/impl/codegen/string_ref.h",
- "include/grpc++/impl/codegen/stub_options.h",
- "include/grpc++/impl/codegen/sync.h",
- "include/grpc++/impl/codegen/sync_cxx11.h",
- "include/grpc++/impl/codegen/sync_no_cxx11.h",
- "include/grpc++/impl/codegen/sync_stream.h",
- "include/grpc++/impl/codegen/time.h",
- "include/grpc/impl/codegen/byte_buffer_reader.h",
- "include/grpc/impl/codegen/compression_types.h",
- "include/grpc/impl/codegen/connectivity_state.h",
- "include/grpc/impl/codegen/grpc_types.h",
- "include/grpc/impl/codegen/propagation_bits.h",
- "include/grpc/impl/codegen/status.h",
- "include/grpc/impl/codegen/atm.h",
- "include/grpc/impl/codegen/atm_gcc_atomic.h",
- "include/grpc/impl/codegen/atm_gcc_sync.h",
- "include/grpc/impl/codegen/atm_windows.h",
- "include/grpc/impl/codegen/gpr_types.h",
- "include/grpc/impl/codegen/port_platform.h",
- "include/grpc/impl/codegen/slice.h",
- "include/grpc/impl/codegen/sync.h",
- "include/grpc/impl/codegen/sync_generic.h",
- "include/grpc/impl/codegen/sync_posix.h",
- "include/grpc/impl/codegen/sync_windows.h",
- "include/grpc++/impl/codegen/config_protobuf.h",
],
includes = [
"include",
@@ -1742,6 +1679,7 @@ cc_library(
"src/cpp/common/core_codegen.cc",
"src/cpp/common/resource_quota_cc.cc",
"src/cpp/common/rpc_method.cc",
+ "src/cpp/common/version_cc.cc",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
@@ -1780,12 +1718,6 @@ cc_library(
"include/grpc++/impl/server_builder_plugin.h",
"include/grpc++/impl/server_initializer.h",
"include/grpc++/impl/service_type.h",
- "include/grpc++/impl/sync.h",
- "include/grpc++/impl/sync_cxx11.h",
- "include/grpc++/impl/sync_no_cxx11.h",
- "include/grpc++/impl/thd.h",
- "include/grpc++/impl/thd_cxx11.h",
- "include/grpc++/impl/thd_no_cxx11.h",
"include/grpc++/resource_quota.h",
"include/grpc++/security/auth_context.h",
"include/grpc++/security/auth_metadata_processor.h",
@@ -1833,9 +1765,6 @@ cc_library(
"include/grpc++/impl/codegen/status_helper.h",
"include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h",
- "include/grpc++/impl/codegen/sync.h",
- "include/grpc++/impl/codegen/sync_cxx11.h",
- "include/grpc++/impl/codegen/sync_no_cxx11.h",
"include/grpc++/impl/codegen/sync_stream.h",
"include/grpc++/impl/codegen/time.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
@@ -2153,6 +2082,7 @@ objc_library(
"src/core/lib/transport/metadata.c",
"src/core/lib/transport/metadata_batch.c",
"src/core/lib/transport/method_config.c",
+ "src/core/lib/transport/pid_controller.c",
"src/core/lib/transport/static_metadata.c",
"src/core/lib/transport/timeout_encoding.c",
"src/core/lib/transport/transport.c",
@@ -2372,6 +2302,7 @@ objc_library(
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/method_config.h",
+ "src/core/lib/transport/pid_controller.h",
"src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.h",
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e2e75ed60b..b551ce3411 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -393,6 +393,7 @@ add_library(grpc
src/core/lib/transport/metadata.c
src/core/lib/transport/metadata_batch.c
src/core/lib/transport/method_config.c
+ src/core/lib/transport/pid_controller.c
src/core/lib/transport/static_metadata.c
src/core/lib/transport/timeout_encoding.c
src/core/lib/transport/transport.c
@@ -665,6 +666,7 @@ add_library(grpc_cronet
src/core/lib/transport/metadata.c
src/core/lib/transport/metadata_batch.c
src/core/lib/transport/method_config.c
+ src/core/lib/transport/pid_controller.c
src/core/lib/transport/static_metadata.c
src/core/lib/transport/timeout_encoding.c
src/core/lib/transport/transport.c
@@ -909,6 +911,7 @@ add_library(grpc_unsecure
src/core/lib/transport/metadata.c
src/core/lib/transport/metadata_batch.c
src/core/lib/transport/method_config.c
+ src/core/lib/transport/pid_controller.c
src/core/lib/transport/static_metadata.c
src/core/lib/transport/timeout_encoding.c
src/core/lib/transport/transport.c
@@ -1066,6 +1069,7 @@ add_library(grpc++
src/cpp/common/core_codegen.cc
src/cpp/common/resource_quota_cc.cc
src/cpp/common/rpc_method.cc
+ src/cpp/common/version_cc.cc
src/cpp/server/async_generic_service.cc
src/cpp/server/create_default_thread_pool.cc
src/cpp/server/dynamic_thread_pool.cc
@@ -1121,12 +1125,6 @@ foreach(_hdr
include/grpc++/impl/server_builder_plugin.h
include/grpc++/impl/server_initializer.h
include/grpc++/impl/service_type.h
- include/grpc++/impl/sync.h
- include/grpc++/impl/sync_cxx11.h
- include/grpc++/impl/sync_no_cxx11.h
- include/grpc++/impl/thd.h
- include/grpc++/impl/thd_cxx11.h
- include/grpc++/impl/thd_no_cxx11.h
include/grpc++/resource_quota.h
include/grpc++/security/auth_context.h
include/grpc++/security/auth_metadata_processor.h
@@ -1174,9 +1172,6 @@ foreach(_hdr
include/grpc++/impl/codegen/status_helper.h
include/grpc++/impl/codegen/string_ref.h
include/grpc++/impl/codegen/stub_options.h
- include/grpc++/impl/codegen/sync.h
- include/grpc++/impl/codegen/sync_cxx11.h
- include/grpc++/impl/codegen/sync_no_cxx11.h
include/grpc++/impl/codegen/sync_stream.h
include/grpc++/impl/codegen/time.h
include/grpc/impl/codegen/byte_buffer_reader.h
@@ -1232,6 +1227,7 @@ add_library(grpc++_cronet
src/cpp/common/core_codegen.cc
src/cpp/common/resource_quota_cc.cc
src/cpp/common/rpc_method.cc
+ src/cpp/common/version_cc.cc
src/cpp/server/async_generic_service.cc
src/cpp/server/create_default_thread_pool.cc
src/cpp/server/dynamic_thread_pool.cc
@@ -1287,12 +1283,6 @@ foreach(_hdr
include/grpc++/impl/server_builder_plugin.h
include/grpc++/impl/server_initializer.h
include/grpc++/impl/service_type.h
- include/grpc++/impl/sync.h
- include/grpc++/impl/sync_cxx11.h
- include/grpc++/impl/sync_no_cxx11.h
- include/grpc++/impl/thd.h
- include/grpc++/impl/thd_cxx11.h
- include/grpc++/impl/thd_no_cxx11.h
include/grpc++/resource_quota.h
include/grpc++/security/auth_context.h
include/grpc++/security/auth_metadata_processor.h
@@ -1340,9 +1330,6 @@ foreach(_hdr
include/grpc++/impl/codegen/status_helper.h
include/grpc++/impl/codegen/string_ref.h
include/grpc++/impl/codegen/stub_options.h
- include/grpc++/impl/codegen/sync.h
- include/grpc++/impl/codegen/sync_cxx11.h
- include/grpc++/impl/codegen/sync_no_cxx11.h
include/grpc++/impl/codegen/sync_stream.h
include/grpc++/impl/codegen/time.h
include/grpc/impl/codegen/byte_buffer_reader.h
@@ -1383,8 +1370,7 @@ endif()
add_library(grpc++_reflection
src/cpp/ext/proto_server_reflection.cc
src/cpp/ext/proto_server_reflection_plugin.cc
- src/cpp/ext/reflection.grpc.pb.cc
- src/cpp/ext/reflection.pb.cc
+ src/proto/grpc/reflection/v1alpha/reflection.proto
)
target_include_directories(grpc++_reflection
@@ -1402,58 +1388,6 @@ target_link_libraries(grpc++_reflection
foreach(_hdr
include/grpc++/ext/proto_server_reflection_plugin.h
- include/grpc++/ext/reflection.grpc.pb.h
- include/grpc++/ext/reflection.pb.h
- include/grpc++/impl/codegen/proto_utils.h
- include/grpc++/impl/codegen/async_stream.h
- include/grpc++/impl/codegen/async_unary_call.h
- include/grpc++/impl/codegen/call.h
- include/grpc++/impl/codegen/call_hook.h
- include/grpc++/impl/codegen/channel_interface.h
- include/grpc++/impl/codegen/client_context.h
- include/grpc++/impl/codegen/client_unary_call.h
- include/grpc++/impl/codegen/completion_queue.h
- include/grpc++/impl/codegen/completion_queue_tag.h
- include/grpc++/impl/codegen/config.h
- include/grpc++/impl/codegen/core_codegen_interface.h
- include/grpc++/impl/codegen/create_auth_context.h
- include/grpc++/impl/codegen/grpc_library.h
- include/grpc++/impl/codegen/method_handler_impl.h
- include/grpc++/impl/codegen/rpc_method.h
- include/grpc++/impl/codegen/rpc_service_method.h
- include/grpc++/impl/codegen/security/auth_context.h
- include/grpc++/impl/codegen/serialization_traits.h
- include/grpc++/impl/codegen/server_context.h
- include/grpc++/impl/codegen/server_interface.h
- include/grpc++/impl/codegen/service_type.h
- include/grpc++/impl/codegen/status.h
- include/grpc++/impl/codegen/status_code_enum.h
- include/grpc++/impl/codegen/status_helper.h
- include/grpc++/impl/codegen/string_ref.h
- include/grpc++/impl/codegen/stub_options.h
- include/grpc++/impl/codegen/sync.h
- include/grpc++/impl/codegen/sync_cxx11.h
- include/grpc++/impl/codegen/sync_no_cxx11.h
- include/grpc++/impl/codegen/sync_stream.h
- include/grpc++/impl/codegen/time.h
- include/grpc/impl/codegen/byte_buffer_reader.h
- include/grpc/impl/codegen/compression_types.h
- include/grpc/impl/codegen/connectivity_state.h
- include/grpc/impl/codegen/grpc_types.h
- include/grpc/impl/codegen/propagation_bits.h
- include/grpc/impl/codegen/status.h
- include/grpc/impl/codegen/atm.h
- include/grpc/impl/codegen/atm_gcc_atomic.h
- include/grpc/impl/codegen/atm_gcc_sync.h
- include/grpc/impl/codegen/atm_windows.h
- include/grpc/impl/codegen/gpr_types.h
- include/grpc/impl/codegen/port_platform.h
- include/grpc/impl/codegen/slice.h
- include/grpc/impl/codegen/sync.h
- include/grpc/impl/codegen/sync_generic.h
- include/grpc/impl/codegen/sync_posix.h
- include/grpc/impl/codegen/sync_windows.h
- include/grpc++/impl/codegen/config_protobuf.h
)
string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH)
@@ -1489,6 +1423,7 @@ add_library(grpc++_unsecure
src/cpp/common/core_codegen.cc
src/cpp/common/resource_quota_cc.cc
src/cpp/common/rpc_method.cc
+ src/cpp/common/version_cc.cc
src/cpp/server/async_generic_service.cc
src/cpp/server/create_default_thread_pool.cc
src/cpp/server/dynamic_thread_pool.cc
@@ -1544,12 +1479,6 @@ foreach(_hdr
include/grpc++/impl/server_builder_plugin.h
include/grpc++/impl/server_initializer.h
include/grpc++/impl/service_type.h
- include/grpc++/impl/sync.h
- include/grpc++/impl/sync_cxx11.h
- include/grpc++/impl/sync_no_cxx11.h
- include/grpc++/impl/thd.h
- include/grpc++/impl/thd_cxx11.h
- include/grpc++/impl/thd_no_cxx11.h
include/grpc++/resource_quota.h
include/grpc++/security/auth_context.h
include/grpc++/security/auth_metadata_processor.h
@@ -1597,9 +1526,6 @@ foreach(_hdr
include/grpc++/impl/codegen/status_helper.h
include/grpc++/impl/codegen/string_ref.h
include/grpc++/impl/codegen/stub_options.h
- include/grpc++/impl/codegen/sync.h
- include/grpc++/impl/codegen/sync_cxx11.h
- include/grpc++/impl/codegen/sync_no_cxx11.h
include/grpc++/impl/codegen/sync_stream.h
include/grpc++/impl/codegen/time.h
include/grpc/impl/codegen/byte_buffer_reader.h
diff --git a/Makefile b/Makefile
index b6e5e6a0c8..09520d0b68 100644
--- a/Makefile
+++ b/Makefile
@@ -434,7 +434,9 @@ E = @echo
Q = @
endif
-VERSION = 1.1.0-dev
+CORE_VERSION = 2.0.0-dev
+CPP_VERSION = 1.1.0-dev
+CSHARP_VERSION = 1.1.0-dev
CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
@@ -470,20 +472,36 @@ ifeq ($(HAS_PKG_CONFIG), true)
CACHE_MK += HAS_PKG_CONFIG = true,
endif
-PC_TEMPLATE = prefix=$(prefix),exec_prefix=\$${prefix},includedir=\$${prefix}/include,libdir=\$${exec_prefix}/lib,,Name: $(PC_NAME),Description: $(PC_DESCRIPTION),Version: $(VERSION),Cflags: -I\$${includedir} $(PC_CFLAGS),Requires.private: $(PC_REQUIRES_PRIVATE),Libs: -L\$${libdir} $(PC_LIB),Libs.private: $(PC_LIBS_PRIVATE)
+CORE_PC_TEMPLATE = prefix=$(prefix),exec_prefix=\$${prefix},includedir=\$${prefix}/include,libdir=\$${exec_prefix}/lib,,Name: $(PC_NAME),Description: $(PC_DESCRIPTION),Version: $(CORE_VERSION),Cflags: -I\$${includedir} $(PC_CFLAGS),Requires.private: $(PC_REQUIRES_PRIVATE),Libs: -L\$${libdir} $(PC_LIB),Libs.private: $(PC_LIBS_PRIVATE)
+
+CPP_PC_TEMPLATE = prefix=$(prefix),exec_prefix=\$${prefix},includedir=\$${prefix}/include,libdir=\$${exec_prefix}/lib,,Name: $(PC_NAME),Description: $(PC_DESCRIPTION),Version: $(CPP_VERSION),Cflags: -I\$${includedir} $(PC_CFLAGS),Requires.private: $(PC_REQUIRES_PRIVATE),Libs: -L\$${libdir} $(PC_LIB),Libs.private: $(PC_LIBS_PRIVATE)
+
+CSHARP_PC_TEMPLATE = prefix=$(prefix),exec_prefix=\$${prefix},includedir=\$${prefix}/include,libdir=\$${exec_prefix}/lib,,Name: $(PC_NAME),Description: $(PC_DESCRIPTION),Version: $(CSHARP_VERSION),Cflags: -I\$${includedir} $(PC_CFLAGS),Requires.private: $(PC_REQUIRES_PRIVATE),Libs: -L\$${libdir} $(PC_LIB),Libs.private: $(PC_LIBS_PRIVATE)
ifeq ($(SYSTEM),MINGW32)
-SHARED_EXT = dll
+SHARED_EXT_CORE = dll
+SHARED_EXT_CPP = dll
+SHARED_EXT_CSHARP = dll
SHARED_PREFIX =
-SHARED_VERSION = -1
+SHARED_VERSION_CORE = -2
+SHARED_VERSION_CPP = -1
+SHARED_VERSION_CSHARP = -1
else ifeq ($(SYSTEM),Darwin)
-SHARED_EXT = dylib
+SHARED_EXT_CORE = dylib
+SHARED_EXT_CPP = dylib
+SHARED_EXT_CSHARP = dylib
SHARED_PREFIX = lib
-SHARED_VERSION =
+SHARED_VERSION_CORE =
+SHARED_VERSION_CPP =
+SHARED_VERSION_CSHARP =
else
-SHARED_EXT = so.$(VERSION)
+SHARED_EXT_CORE = so.$(CORE_VERSION)
+SHARED_EXT_CPP = so.$(CPP_VERSION)
+SHARED_EXT_CSHARP = so.$(CSHARP_VERSION)
SHARED_PREFIX = lib
-SHARED_VERSION =
+SHARED_VERSION_CORE =
+SHARED_VERSION_CPP =
+SHARED_VERSION_CSHARP =
endif
ifeq ($(wildcard .git),)
@@ -718,7 +736,7 @@ PC_CFLAGS =
PC_REQUIRES_PRIVATE = $(PC_REQUIRES_GRPC) $(PC_REQUIRES_SECURE)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPC) $(PC_LIBS_SECURE)
PC_LIB = -lgrpc
-GRPC_PC_FILE := $(PC_TEMPLATE)
+GRPC_PC_FILE := $(CORE_PC_TEMPLATE)
# grpc_unsecure .pc file
PC_NAME = gRPC unsecure
@@ -727,7 +745,7 @@ PC_CFLAGS =
PC_REQUIRES_PRIVATE = $(PC_REQUIRES_GRPC)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPC)
PC_LIB = -lgrpc
-GRPC_UNSECURE_PC_FILE := $(PC_TEMPLATE)
+GRPC_UNSECURE_PC_FILE := $(CORE_PC_TEMPLATE)
PROTOBUF_PKG_CONFIG = false
@@ -789,7 +807,7 @@ PC_CFLAGS =
PC_REQUIRES_PRIVATE = grpc $(PC_REQUIRES_GRPCXX)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPCXX)
PC_LIB = -lgrpc++
-GRPCXX_PC_FILE := $(PC_TEMPLATE)
+GRPCXX_PC_FILE := $(CPP_PC_TEMPLATE)
# grpc++_unsecure .pc file
PC_NAME = gRPC++ unsecure
@@ -798,7 +816,7 @@ PC_CFLAGS =
PC_REQUIRES_PRIVATE = grpc_unsecure $(PC_REQUIRES_GRPCXX)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPCXX)
PC_LIB = -lgrpc++
-GRPCXX_UNSECURE_PC_FILE := $(PC_TEMPLATE)
+GRPCXX_UNSECURE_PC_FILE := $(CPP_PC_TEMPLATE)
ifeq ($(MAKECMDGOALS),clean)
NO_DEPS = true
@@ -1028,6 +1046,7 @@ timer_heap_test: $(BINDIR)/$(CONFIG)/timer_heap_test
timer_list_test: $(BINDIR)/$(CONFIG)/timer_list_test
transport_connectivity_state_test: $(BINDIR)/$(CONFIG)/transport_connectivity_state_test
transport_metadata_test: $(BINDIR)/$(CONFIG)/transport_metadata_test
+transport_pid_controller_test: $(BINDIR)/$(CONFIG)/transport_pid_controller_test
transport_security_test: $(BINDIR)/$(CONFIG)/transport_security_test
udp_server_test: $(BINDIR)/$(CONFIG)/udp_server_test
uri_fuzzer_test: $(BINDIR)/$(CONFIG)/uri_fuzzer_test
@@ -1069,6 +1088,7 @@ interop_test: $(BINDIR)/$(CONFIG)/interop_test
json_run_localhost: $(BINDIR)/$(CONFIG)/json_run_localhost
metrics_client: $(BINDIR)/$(CONFIG)/metrics_client
mock_test: $(BINDIR)/$(CONFIG)/mock_test
+noop-benchmark: $(BINDIR)/$(CONFIG)/noop-benchmark
proto_server_reflection_test: $(BINDIR)/$(CONFIG)/proto_server_reflection_test
qps_interarrival_test: $(BINDIR)/$(CONFIG)/qps_interarrival_test
qps_json_driver: $(BINDIR)/$(CONFIG)/qps_json_driver
@@ -1076,6 +1096,7 @@ qps_openloop_test: $(BINDIR)/$(CONFIG)/qps_openloop_test
qps_worker: $(BINDIR)/$(CONFIG)/qps_worker
reconnect_interop_client: $(BINDIR)/$(CONFIG)/reconnect_interop_client
reconnect_interop_server: $(BINDIR)/$(CONFIG)/reconnect_interop_server
+round_robin_end2end_test: $(BINDIR)/$(CONFIG)/round_robin_end2end_test
secure_auth_context_test: $(BINDIR)/$(CONFIG)/secure_auth_context_test
secure_sync_unary_ping_pong_test: $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test
server_builder_plugin_test: $(BINDIR)/$(CONFIG)/server_builder_plugin_test
@@ -1141,7 +1162,6 @@ bad_ssl_cert_server: $(BINDIR)/$(CONFIG)/bad_ssl_cert_server
bad_ssl_cert_test: $(BINDIR)/$(CONFIG)/bad_ssl_cert_test
h2_census_test: $(BINDIR)/$(CONFIG)/h2_census_test
h2_compress_test: $(BINDIR)/$(CONFIG)/h2_compress_test
-h2_fake_resolver_test: $(BINDIR)/$(CONFIG)/h2_fake_resolver_test
h2_fakesec_test: $(BINDIR)/$(CONFIG)/h2_fakesec_test
h2_fd_test: $(BINDIR)/$(CONFIG)/h2_fd_test
h2_full_test: $(BINDIR)/$(CONFIG)/h2_full_test
@@ -1160,7 +1180,6 @@ h2_ssl_proxy_test: $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test
h2_uds_test: $(BINDIR)/$(CONFIG)/h2_uds_test
h2_census_nosec_test: $(BINDIR)/$(CONFIG)/h2_census_nosec_test
h2_compress_nosec_test: $(BINDIR)/$(CONFIG)/h2_compress_nosec_test
-h2_fake_resolver_nosec_test: $(BINDIR)/$(CONFIG)/h2_fake_resolver_nosec_test
h2_fd_nosec_test: $(BINDIR)/$(CONFIG)/h2_fd_nosec_test
h2_full_nosec_test: $(BINDIR)/$(CONFIG)/h2_full_nosec_test
h2_full+pipe_nosec_test: $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test
@@ -1216,10 +1235,10 @@ static_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libgrpc++.a $(L
shared: shared_c shared_cxx
-shared_c: pc_c pc_c_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT)
-shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)
+shared_c: pc_c pc_c_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)
+shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)
-shared_csharp: shared_c $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT)
+shared_csharp: shared_c $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP)
grpc_csharp_ext: shared_csharp
plugins: $(PROTOC_PLUGINS)
@@ -1236,9 +1255,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.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++_proto_reflection_desc_db.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 $(LIBDIR)/$(CONFIG)/libgoogle_benchmark.a
else
-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
+privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.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)/libgoogle_benchmark.a
endif
@@ -1352,6 +1371,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/timer_list_test \
$(BINDIR)/$(CONFIG)/transport_connectivity_state_test \
$(BINDIR)/$(CONFIG)/transport_metadata_test \
+ $(BINDIR)/$(CONFIG)/transport_pid_controller_test \
$(BINDIR)/$(CONFIG)/transport_security_test \
$(BINDIR)/$(CONFIG)/udp_server_test \
$(BINDIR)/$(CONFIG)/uri_parser_test \
@@ -1371,7 +1391,6 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/bad_ssl_cert_test \
$(BINDIR)/$(CONFIG)/h2_census_test \
$(BINDIR)/$(CONFIG)/h2_compress_test \
- $(BINDIR)/$(CONFIG)/h2_fake_resolver_test \
$(BINDIR)/$(CONFIG)/h2_fakesec_test \
$(BINDIR)/$(CONFIG)/h2_fd_test \
$(BINDIR)/$(CONFIG)/h2_full_test \
@@ -1390,7 +1409,6 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/h2_uds_test \
$(BINDIR)/$(CONFIG)/h2_census_nosec_test \
$(BINDIR)/$(CONFIG)/h2_compress_nosec_test \
- $(BINDIR)/$(CONFIG)/h2_fake_resolver_nosec_test \
$(BINDIR)/$(CONFIG)/h2_fd_nosec_test \
$(BINDIR)/$(CONFIG)/h2_full_nosec_test \
$(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test \
@@ -1447,6 +1465,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/json_run_localhost \
$(BINDIR)/$(CONFIG)/metrics_client \
$(BINDIR)/$(CONFIG)/mock_test \
+ $(BINDIR)/$(CONFIG)/noop-benchmark \
$(BINDIR)/$(CONFIG)/proto_server_reflection_test \
$(BINDIR)/$(CONFIG)/qps_interarrival_test \
$(BINDIR)/$(CONFIG)/qps_json_driver \
@@ -1454,6 +1473,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/qps_worker \
$(BINDIR)/$(CONFIG)/reconnect_interop_client \
$(BINDIR)/$(CONFIG)/reconnect_interop_server \
+ $(BINDIR)/$(CONFIG)/round_robin_end2end_test \
$(BINDIR)/$(CONFIG)/secure_auth_context_test \
$(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test \
$(BINDIR)/$(CONFIG)/server_builder_plugin_test \
@@ -1536,6 +1556,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/json_run_localhost \
$(BINDIR)/$(CONFIG)/metrics_client \
$(BINDIR)/$(CONFIG)/mock_test \
+ $(BINDIR)/$(CONFIG)/noop-benchmark \
$(BINDIR)/$(CONFIG)/proto_server_reflection_test \
$(BINDIR)/$(CONFIG)/qps_interarrival_test \
$(BINDIR)/$(CONFIG)/qps_json_driver \
@@ -1543,6 +1564,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/qps_worker \
$(BINDIR)/$(CONFIG)/reconnect_interop_client \
$(BINDIR)/$(CONFIG)/reconnect_interop_server \
+ $(BINDIR)/$(CONFIG)/round_robin_end2end_test \
$(BINDIR)/$(CONFIG)/secure_auth_context_test \
$(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test \
$(BINDIR)/$(CONFIG)/server_builder_plugin_test \
@@ -1760,6 +1782,8 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/transport_connectivity_state_test || ( echo test transport_connectivity_state_test failed ; exit 1 )
$(E) "[RUN] Testing transport_metadata_test"
$(Q) $(BINDIR)/$(CONFIG)/transport_metadata_test || ( echo test transport_metadata_test failed ; exit 1 )
+ $(E) "[RUN] Testing transport_pid_controller_test"
+ $(Q) $(BINDIR)/$(CONFIG)/transport_pid_controller_test || ( echo test transport_pid_controller_test failed ; exit 1 )
$(E) "[RUN] Testing transport_security_test"
$(Q) $(BINDIR)/$(CONFIG)/transport_security_test || ( echo test transport_security_test failed ; exit 1 )
$(E) "[RUN] Testing udp_server_test"
@@ -1848,10 +1872,14 @@ test_cxx: buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/interop_test || ( echo test interop_test failed ; exit 1 )
$(E) "[RUN] Testing mock_test"
$(Q) $(BINDIR)/$(CONFIG)/mock_test || ( echo test mock_test failed ; exit 1 )
+ $(E) "[RUN] Testing noop-benchmark"
+ $(Q) $(BINDIR)/$(CONFIG)/noop-benchmark || ( echo test noop-benchmark failed ; exit 1 )
$(E) "[RUN] Testing proto_server_reflection_test"
$(Q) $(BINDIR)/$(CONFIG)/proto_server_reflection_test || ( echo test proto_server_reflection_test failed ; exit 1 )
$(E) "[RUN] Testing qps_openloop_test"
$(Q) $(BINDIR)/$(CONFIG)/qps_openloop_test || ( echo test qps_openloop_test failed ; exit 1 )
+ $(E) "[RUN] Testing round_robin_end2end_test"
+ $(Q) $(BINDIR)/$(CONFIG)/round_robin_end2end_test || ( echo test round_robin_end2end_test failed ; exit 1 )
$(E) "[RUN] Testing secure_auth_context_test"
$(Q) $(BINDIR)/$(CONFIG)/secure_auth_context_test || ( echo test secure_auth_context_test failed ; exit 1 )
$(E) "[RUN] Testing secure_sync_unary_ping_pong_test"
@@ -1930,32 +1958,32 @@ endif
strip-shared_c: shared_c
ifeq ($(CONFIG),opt)
- $(E) "[STRIP] Stripping $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT)"
- $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT)
- $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT)"
- $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT)
- $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT)"
- $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT)
- $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT)"
- $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT)
+ $(E) "[STRIP] Stripping $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)"
+ $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)
+ $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)"
+ $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)
+ $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)"
+ $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)
+ $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)"
+ $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)
endif
strip-shared_cxx: shared_cxx
ifeq ($(CONFIG),opt)
- $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT)"
- $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT)
- $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT)"
- $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT)
- $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT)"
- $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT)
- $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)"
- $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)
+ $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
+ $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)
+ $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
+ $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)
+ $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
+ $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)
+ $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
+ $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)
endif
strip-shared_csharp: shared_csharp
ifeq ($(CONFIG),opt)
- $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT)"
- $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT)
+ $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP)"
+ $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP)
endif
cache.mk::
@@ -2280,41 +2308,41 @@ install-static_cxx: static_cxx strip-static_cxx install-pkg-config_cxx
install-shared_c: shared_c strip-shared_c install-pkg-config_c
- $(E) "[INSTALL] Installing $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT)"
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)"
$(Q) $(INSTALL) -d $(prefix)/lib
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/$(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT_CORE)
ifeq ($(SYSTEM),MINGW32)
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgpr-imp.a $(prefix)/lib/libgpr-imp.a
else ifneq ($(SYSTEM),Darwin)
- $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgpr.so.1
- $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgpr.so
+ $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgpr.so.2
+ $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgpr.so
endif
- $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT)"
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)"
$(Q) $(INSTALL) -d $(prefix)/lib
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT_CORE)
ifeq ($(SYSTEM),MINGW32)
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc-imp.a $(prefix)/lib/libgrpc-imp.a
else ifneq ($(SYSTEM),Darwin)
- $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc.so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc.so
+ $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc.so.2
+ $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc.so
endif
- $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT)"
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)"
$(Q) $(INSTALL) -d $(prefix)/lib
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT_CORE)
ifeq ($(SYSTEM),MINGW32)
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_cronet-imp.a $(prefix)/lib/libgrpc_cronet-imp.a
else ifneq ($(SYSTEM),Darwin)
- $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_cronet.so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_cronet.so
+ $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_cronet.so.2
+ $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_cronet.so
endif
- $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT)"
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)"
$(Q) $(INSTALL) -d $(prefix)/lib
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT_CORE)
ifeq ($(SYSTEM),MINGW32)
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure-imp.a $(prefix)/lib/libgrpc_unsecure-imp.a
else ifneq ($(SYSTEM),Darwin)
- $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_unsecure.so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_unsecure.so
+ $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_unsecure.so.2
+ $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_unsecure.so
endif
ifneq ($(SYSTEM),MINGW32)
ifneq ($(SYSTEM),Darwin)
@@ -2324,41 +2352,41 @@ endif
install-shared_cxx: shared_cxx strip-shared_cxx install-shared_c install-pkg-config_cxx
- $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT)"
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
$(Q) $(INSTALL) -d $(prefix)/lib
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT_CPP)
ifeq ($(SYSTEM),MINGW32)
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++-imp.a $(prefix)/lib/libgrpc++-imp.a
else ifneq ($(SYSTEM),Darwin)
- $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++.so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++.so
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/libgrpc++.so.2
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/libgrpc++.so
endif
- $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT)"
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
$(Q) $(INSTALL) -d $(prefix)/lib
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/$(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT_CPP)
ifeq ($(SYSTEM),MINGW32)
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_cronet-imp.a $(prefix)/lib/libgrpc++_cronet-imp.a
else ifneq ($(SYSTEM),Darwin)
- $(Q) ln -sf $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_cronet.so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_cronet.so
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/libgrpc++_cronet.so.2
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/libgrpc++_cronet.so
endif
- $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT)"
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
$(Q) $(INSTALL) -d $(prefix)/lib
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT_CPP)
ifeq ($(SYSTEM),MINGW32)
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection-imp.a $(prefix)/lib/libgrpc++_reflection-imp.a
else ifneq ($(SYSTEM),Darwin)
- $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_reflection.so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_reflection.so
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/libgrpc++_reflection.so.2
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/libgrpc++_reflection.so
endif
- $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)"
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
$(Q) $(INSTALL) -d $(prefix)/lib
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT_CPP)
ifeq ($(SYSTEM),MINGW32)
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure-imp.a $(prefix)/lib/libgrpc++_unsecure-imp.a
else ifneq ($(SYSTEM),Darwin)
- $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_unsecure.so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_unsecure.so
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/libgrpc++_unsecure.so.2
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/lib/libgrpc++_unsecure.so
endif
ifneq ($(SYSTEM),MINGW32)
ifneq ($(SYSTEM),Darwin)
@@ -2368,14 +2396,14 @@ endif
install-shared_csharp: shared_csharp strip-shared_csharp
- $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT)"
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP)"
$(Q) $(INSTALL) -d $(prefix)/lib
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(prefix)/lib/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT_CSHARP)
ifeq ($(SYSTEM),MINGW32)
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext-imp.a $(prefix)/lib/libgrpc_csharp_ext-imp.a
else ifneq ($(SYSTEM),Darwin)
- $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_csharp_ext.so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_csharp_ext.so
+ $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(prefix)/lib/libgrpc_csharp_ext.so.2
+ $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(prefix)/lib/libgrpc_csharp_ext.so
endif
ifneq ($(SYSTEM),MINGW32)
ifneq ($(SYSTEM),Darwin)
@@ -2535,20 +2563,20 @@ endif
ifeq ($(SYSTEM),MINGW32)
-$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION).$(SHARED_EXT): $(LIBGPR_OBJS) $(ZLIB_DEP)
+$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGPR_OBJS) $(ZLIB_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared gpr.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS)
+ $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared gpr.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS)
else
-$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT): $(LIBGPR_OBJS) $(ZLIB_DEP)
+$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGPR_OBJS) $(ZLIB_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
ifeq ($(SYSTEM),Darwin)
- $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS)
+ $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS)
else
- $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.1 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS)
- $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).so.1
- $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).so
+ $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.2 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS)
+ $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so.2
+ $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so
endif
endif
@@ -2687,6 +2715,7 @@ LIBGRPC_SRC = \
src/core/lib/transport/metadata.c \
src/core/lib/transport/metadata_batch.c \
src/core/lib/transport/method_config.c \
+ src/core/lib/transport/pid_controller.c \
src/core/lib/transport/static_metadata.c \
src/core/lib/transport/timeout_encoding.c \
src/core/lib/transport/transport.c \
@@ -2829,7 +2858,7 @@ ifeq ($(NO_SECURE),true)
$(LIBDIR)/$(CONFIG)/libgrpc.a: openssl_dep_error
-$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT): openssl_dep_error
+$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): openssl_dep_error
else
@@ -2846,20 +2875,20 @@ endif
ifeq ($(SYSTEM),MINGW32)
-$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP)
+$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS)
+ $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS)
else
-$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP)
+$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
ifeq ($(SYSTEM),Darwin)
- $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS)
+ $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS)
else
- $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS)
- $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).so
+ $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS)
+ $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so.2
+ $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so
endif
endif
@@ -2977,6 +3006,7 @@ LIBGRPC_CRONET_SRC = \
src/core/lib/transport/metadata.c \
src/core/lib/transport/metadata_batch.c \
src/core/lib/transport/method_config.c \
+ src/core/lib/transport/pid_controller.c \
src/core/lib/transport/static_metadata.c \
src/core/lib/transport/timeout_encoding.c \
src/core/lib/transport/transport.c \
@@ -3091,7 +3121,7 @@ ifeq ($(NO_SECURE),true)
$(LIBDIR)/$(CONFIG)/libgrpc_cronet.a: openssl_dep_error
-$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT): openssl_dep_error
+$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): openssl_dep_error
else
@@ -3108,20 +3138,20 @@ endif
ifeq ($(SYSTEM),MINGW32)
-$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP)
+$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_cronet.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS)
+ $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_cronet.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS)
else
-$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP)
+$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
ifeq ($(SYSTEM),Darwin)
- $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS)
+ $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS)
else
- $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_cronet.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS)
- $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).so
+ $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_cronet.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS)
+ $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).so.2
+ $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).so
endif
endif
@@ -3258,6 +3288,7 @@ LIBGRPC_TEST_UTIL_SRC = \
src/core/lib/transport/metadata.c \
src/core/lib/transport/metadata_batch.c \
src/core/lib/transport/method_config.c \
+ src/core/lib/transport/pid_controller.c \
src/core/lib/transport/static_metadata.c \
src/core/lib/transport/timeout_encoding.c \
src/core/lib/transport/transport.c \
@@ -3468,6 +3499,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/transport/metadata.c \
src/core/lib/transport/metadata_batch.c \
src/core/lib/transport/method_config.c \
+ src/core/lib/transport/pid_controller.c \
src/core/lib/transport/static_metadata.c \
src/core/lib/transport/timeout_encoding.c \
src/core/lib/transport/transport.c \
@@ -3586,20 +3618,20 @@ endif
ifeq ($(SYSTEM),MINGW32)
-$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a
+$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS)
+ $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS)
else
-$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a
+$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
ifeq ($(SYSTEM),Darwin)
- $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS)
+ $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS)
else
- $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS)
- $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).so
+ $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS)
+ $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so.2
+ $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so
endif
endif
@@ -3708,6 +3740,7 @@ LIBGRPC++_SRC = \
src/cpp/common/core_codegen.cc \
src/cpp/common/resource_quota_cc.cc \
src/cpp/common/rpc_method.cc \
+ src/cpp/common/version_cc.cc \
src/cpp/server/async_generic_service.cc \
src/cpp/server/create_default_thread_pool.cc \
src/cpp/server/dynamic_thread_pool.cc \
@@ -3746,12 +3779,6 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/server_builder_plugin.h \
include/grpc++/impl/server_initializer.h \
include/grpc++/impl/service_type.h \
- include/grpc++/impl/sync.h \
- include/grpc++/impl/sync_cxx11.h \
- include/grpc++/impl/sync_no_cxx11.h \
- include/grpc++/impl/thd.h \
- include/grpc++/impl/thd_cxx11.h \
- include/grpc++/impl/thd_no_cxx11.h \
include/grpc++/resource_quota.h \
include/grpc++/security/auth_context.h \
include/grpc++/security/auth_metadata_processor.h \
@@ -3799,9 +3826,6 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/codegen/status_helper.h \
include/grpc++/impl/codegen/string_ref.h \
include/grpc++/impl/codegen/stub_options.h \
- include/grpc++/impl/codegen/sync.h \
- include/grpc++/impl/codegen/sync_cxx11.h \
- include/grpc++/impl/codegen/sync_no_cxx11.h \
include/grpc++/impl/codegen/sync_stream.h \
include/grpc++/impl/codegen/time.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
@@ -3831,7 +3855,7 @@ ifeq ($(NO_SECURE),true)
$(LIBDIR)/$(CONFIG)/libgrpc++.a: openssl_dep_error
-$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT): openssl_dep_error
+$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): openssl_dep_error
else
@@ -3841,7 +3865,7 @@ ifeq ($(NO_PROTOBUF),true)
$(LIBDIR)/$(CONFIG)/libgrpc++.a: protobuf_dep_error
-$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error
+$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): protobuf_dep_error
else
@@ -3857,20 +3881,20 @@ endif
ifeq ($(SYSTEM),MINGW32)
-$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(OPENSSL_DEP)
+$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT_CORE) $(OPENSSL_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp
+ $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp
else
-$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(OPENSSL_DEP)
+$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(OPENSSL_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
ifeq ($(SYSTEM),Darwin)
- $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc
+ $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc
else
- $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc
- $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so
+ $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).so.1
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).so
endif
endif
@@ -3903,6 +3927,7 @@ LIBGRPC++_CRONET_SRC = \
src/cpp/common/core_codegen.cc \
src/cpp/common/resource_quota_cc.cc \
src/cpp/common/rpc_method.cc \
+ src/cpp/common/version_cc.cc \
src/cpp/server/async_generic_service.cc \
src/cpp/server/create_default_thread_pool.cc \
src/cpp/server/dynamic_thread_pool.cc \
@@ -3941,12 +3966,6 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/server_builder_plugin.h \
include/grpc++/impl/server_initializer.h \
include/grpc++/impl/service_type.h \
- include/grpc++/impl/sync.h \
- include/grpc++/impl/sync_cxx11.h \
- include/grpc++/impl/sync_no_cxx11.h \
- include/grpc++/impl/thd.h \
- include/grpc++/impl/thd_cxx11.h \
- include/grpc++/impl/thd_no_cxx11.h \
include/grpc++/resource_quota.h \
include/grpc++/security/auth_context.h \
include/grpc++/security/auth_metadata_processor.h \
@@ -3994,9 +4013,6 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/codegen/status_helper.h \
include/grpc++/impl/codegen/string_ref.h \
include/grpc++/impl/codegen/stub_options.h \
- include/grpc++/impl/codegen/sync.h \
- include/grpc++/impl/codegen/sync_cxx11.h \
- include/grpc++/impl/codegen/sync_no_cxx11.h \
include/grpc++/impl/codegen/sync_stream.h \
include/grpc++/impl/codegen/time.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
@@ -4026,7 +4042,7 @@ ifeq ($(NO_SECURE),true)
$(LIBDIR)/$(CONFIG)/libgrpc++_cronet.a: openssl_dep_error
-$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT): openssl_dep_error
+$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): openssl_dep_error
else
@@ -4036,7 +4052,7 @@ ifeq ($(NO_PROTOBUF),true)
$(LIBDIR)/$(CONFIG)/libgrpc++_cronet.a: protobuf_dep_error
-$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error
+$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): protobuf_dep_error
else
@@ -4052,20 +4068,20 @@ endif
ifeq ($(SYSTEM),MINGW32)
-$(LIBDIR)/$(CONFIG)/grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_CRONET_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc_cronet.$(SHARED_EXT) $(OPENSSL_DEP)
+$(LIBDIR)/$(CONFIG)/grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_CRONET_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/grpc_cronet.$(SHARED_EXT_CORE) $(OPENSSL_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_cronet.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_cronet$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CRONET_OBJS) $(LDLIBS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_cronet-imp
+ $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_cronet.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_cronet$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_CRONET_OBJS) $(LDLIBS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_cronet-imp
else
-$(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_CRONET_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_cronet.$(SHARED_EXT) $(OPENSSL_DEP)
+$(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_CRONET_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet.$(SHARED_EXT_CORE) $(OPENSSL_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
ifeq ($(SYSTEM),Darwin)
- $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CRONET_OBJS) $(LDLIBS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_cronet
+ $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_CRONET_OBJS) $(LDLIBS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_cronet
else
- $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_cronet.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CRONET_OBJS) $(LDLIBS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_cronet
- $(Q) ln -sf $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION).so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION).so
+ $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_cronet.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_CRONET_OBJS) $(LDLIBS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_cronet
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP).so.1
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP).so
endif
endif
@@ -4080,77 +4096,22 @@ endif
endif
-LIBGRPC++_REFLECTION_SRC = \
- src/cpp/ext/proto_server_reflection.cc \
- src/cpp/ext/proto_server_reflection_plugin.cc \
- src/cpp/ext/reflection.grpc.pb.cc \
- src/cpp/ext/reflection.pb.cc \
+LIBGRPC++_PROTO_REFLECTION_DESC_DB_SRC = \
+ test/cpp/util/proto_reflection_descriptor_database.cc \
+ $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc \
PUBLIC_HEADERS_CXX += \
- include/grpc++/ext/proto_server_reflection_plugin.h \
- include/grpc++/ext/reflection.grpc.pb.h \
- include/grpc++/ext/reflection.pb.h \
- include/grpc++/impl/codegen/proto_utils.h \
- include/grpc++/impl/codegen/async_stream.h \
- include/grpc++/impl/codegen/async_unary_call.h \
- include/grpc++/impl/codegen/call.h \
- include/grpc++/impl/codegen/call_hook.h \
- include/grpc++/impl/codegen/channel_interface.h \
- include/grpc++/impl/codegen/client_context.h \
- include/grpc++/impl/codegen/client_unary_call.h \
- include/grpc++/impl/codegen/completion_queue.h \
- include/grpc++/impl/codegen/completion_queue_tag.h \
- include/grpc++/impl/codegen/config.h \
- include/grpc++/impl/codegen/core_codegen_interface.h \
- include/grpc++/impl/codegen/create_auth_context.h \
- include/grpc++/impl/codegen/grpc_library.h \
- include/grpc++/impl/codegen/method_handler_impl.h \
- include/grpc++/impl/codegen/rpc_method.h \
- include/grpc++/impl/codegen/rpc_service_method.h \
- include/grpc++/impl/codegen/security/auth_context.h \
- include/grpc++/impl/codegen/serialization_traits.h \
- include/grpc++/impl/codegen/server_context.h \
- include/grpc++/impl/codegen/server_interface.h \
- include/grpc++/impl/codegen/service_type.h \
- include/grpc++/impl/codegen/status.h \
- include/grpc++/impl/codegen/status_code_enum.h \
- include/grpc++/impl/codegen/status_helper.h \
- include/grpc++/impl/codegen/string_ref.h \
- include/grpc++/impl/codegen/stub_options.h \
- include/grpc++/impl/codegen/sync.h \
- include/grpc++/impl/codegen/sync_cxx11.h \
- include/grpc++/impl/codegen/sync_no_cxx11.h \
- include/grpc++/impl/codegen/sync_stream.h \
- include/grpc++/impl/codegen/time.h \
- include/grpc/impl/codegen/byte_buffer_reader.h \
- include/grpc/impl/codegen/compression_types.h \
- include/grpc/impl/codegen/connectivity_state.h \
- include/grpc/impl/codegen/grpc_types.h \
- include/grpc/impl/codegen/propagation_bits.h \
- include/grpc/impl/codegen/status.h \
- include/grpc/impl/codegen/atm.h \
- include/grpc/impl/codegen/atm_gcc_atomic.h \
- include/grpc/impl/codegen/atm_gcc_sync.h \
- include/grpc/impl/codegen/atm_windows.h \
- include/grpc/impl/codegen/gpr_types.h \
- include/grpc/impl/codegen/port_platform.h \
- include/grpc/impl/codegen/slice.h \
- include/grpc/impl/codegen/sync.h \
- include/grpc/impl/codegen/sync_generic.h \
- include/grpc/impl/codegen/sync_posix.h \
- include/grpc/impl/codegen/sync_windows.h \
include/grpc++/impl/codegen/config_protobuf.h \
-LIBGRPC++_REFLECTION_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_REFLECTION_SRC))))
+LIBGRPC++_PROTO_REFLECTION_DESC_DB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_PROTO_REFLECTION_DESC_DB_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure libraries if you don't have OpenSSL.
-$(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a: openssl_dep_error
+$(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a: openssl_dep_error
-$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): openssl_dep_error
else
@@ -4158,40 +4119,22 @@ ifeq ($(NO_PROTOBUF),true)
# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay.
-$(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a: protobuf_dep_error
+$(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a: protobuf_dep_error
-$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error
else
-$(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_REFLECTION_OBJS)
+$(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_PROTO_REFLECTION_DESC_DB_OBJS)
$(E) "[AR] Creating $@"
$(Q) mkdir -p `dirname $@`
- $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a
- $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBGRPC++_REFLECTION_OBJS)
+ $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a
+ $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBGRPC++_PROTO_REFLECTION_DESC_DB_OBJS)
ifeq ($(SYSTEM),Darwin)
- $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a
+ $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a
endif
-ifeq ($(SYSTEM),MINGW32)
-$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc++.$(SHARED_EXT) $(OPENSSL_DEP)
- $(E) "[LD] Linking $@"
- $(Q) mkdir -p `dirname $@`
- $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_reflection.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++-imp
-else
-$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT) $(OPENSSL_DEP)
- $(E) "[LD] Linking $@"
- $(Q) mkdir -p `dirname $@`
-ifeq ($(SYSTEM),Darwin)
- $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++
-else
- $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_reflection.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++
- $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).so
-endif
-endif
endif
@@ -4199,25 +4142,30 @@ endif
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
--include $(LIBGRPC++_REFLECTION_OBJS:.o=.dep)
+-include $(LIBGRPC++_PROTO_REFLECTION_DESC_DB_OBJS:.o=.dep)
endif
endif
+$(OBJDIR)/$(CONFIG)/test/cpp/util/proto_reflection_descriptor_database.o: $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc
-LIBGRPC++_REFLECTION_CODEGEN_SRC = \
+LIBGRPC++_REFLECTION_SRC = \
+ src/cpp/ext/proto_server_reflection.cc \
+ src/cpp/ext/proto_server_reflection_plugin.cc \
$(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc \
PUBLIC_HEADERS_CXX += \
+ include/grpc++/ext/proto_server_reflection_plugin.h \
-LIBGRPC++_REFLECTION_CODEGEN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_REFLECTION_CODEGEN_SRC))))
+LIBGRPC++_REFLECTION_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_REFLECTION_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure libraries if you don't have OpenSSL.
-$(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a: openssl_dep_error
+$(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a: openssl_dep_error
+$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): openssl_dep_error
else
@@ -4225,22 +4173,40 @@ ifeq ($(NO_PROTOBUF),true)
# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay.
-$(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a: protobuf_dep_error
+$(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a: protobuf_dep_error
+$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): protobuf_dep_error
else
-$(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_REFLECTION_CODEGEN_OBJS)
+$(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_REFLECTION_OBJS)
$(E) "[AR] Creating $@"
$(Q) mkdir -p `dirname $@`
- $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a
- $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a $(LIBGRPC++_REFLECTION_CODEGEN_OBJS)
+ $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a
+ $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBGRPC++_REFLECTION_OBJS)
ifeq ($(SYSTEM),Darwin)
- $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a
+ $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a
endif
+ifeq ($(SYSTEM),MINGW32)
+$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc++.$(SHARED_EXT_CPP) $(OPENSSL_DEP)
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_reflection.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++-imp
+else
+$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT_CPP) $(OPENSSL_DEP)
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ifeq ($(SYSTEM),Darwin)
+ $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++
+else
+ $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_reflection.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP).so.1
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP).so
+endif
+endif
endif
@@ -4248,9 +4214,11 @@ endif
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
--include $(LIBGRPC++_REFLECTION_CODEGEN_OBJS:.o=.dep)
+-include $(LIBGRPC++_REFLECTION_OBJS:.o=.dep)
endif
endif
+$(OBJDIR)/$(CONFIG)/src/cpp/ext/proto_server_reflection.o: $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc
+$(OBJDIR)/$(CONFIG)/src/cpp/ext/proto_server_reflection_plugin.o: $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc
LIBGRPC++_TEST_SRC = \
@@ -4390,9 +4358,6 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/codegen/status_helper.h \
include/grpc++/impl/codegen/string_ref.h \
include/grpc++/impl/codegen/stub_options.h \
- include/grpc++/impl/codegen/sync.h \
- include/grpc++/impl/codegen/sync_cxx11.h \
- include/grpc++/impl/codegen/sync_no_cxx11.h \
include/grpc++/impl/codegen/sync_stream.h \
include/grpc++/impl/codegen/time.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
@@ -4485,6 +4450,7 @@ LIBGRPC++_UNSECURE_SRC = \
src/cpp/common/core_codegen.cc \
src/cpp/common/resource_quota_cc.cc \
src/cpp/common/rpc_method.cc \
+ src/cpp/common/version_cc.cc \
src/cpp/server/async_generic_service.cc \
src/cpp/server/create_default_thread_pool.cc \
src/cpp/server/dynamic_thread_pool.cc \
@@ -4523,12 +4489,6 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/server_builder_plugin.h \
include/grpc++/impl/server_initializer.h \
include/grpc++/impl/service_type.h \
- include/grpc++/impl/sync.h \
- include/grpc++/impl/sync_cxx11.h \
- include/grpc++/impl/sync_no_cxx11.h \
- include/grpc++/impl/thd.h \
- include/grpc++/impl/thd_cxx11.h \
- include/grpc++/impl/thd_no_cxx11.h \
include/grpc++/resource_quota.h \
include/grpc++/security/auth_context.h \
include/grpc++/security/auth_metadata_processor.h \
@@ -4576,9 +4536,6 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/codegen/status_helper.h \
include/grpc++/impl/codegen/string_ref.h \
include/grpc++/impl/codegen/stub_options.h \
- include/grpc++/impl/codegen/sync.h \
- include/grpc++/impl/codegen/sync_cxx11.h \
- include/grpc++/impl/codegen/sync_no_cxx11.h \
include/grpc++/impl/codegen/sync_stream.h \
include/grpc++/impl/codegen/time.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
@@ -4608,7 +4565,7 @@ ifeq ($(NO_PROTOBUF),true)
$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a: protobuf_dep_error
-$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error
+$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): protobuf_dep_error
else
@@ -4624,20 +4581,20 @@ endif
ifeq ($(SYSTEM),MINGW32)
-$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc_unsecure.$(SHARED_EXT)
+$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/grpc_unsecure.$(SHARED_EXT_CORE)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_unsecure-imp
+ $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_unsecure-imp
else
-$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT)
+$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT_CORE)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
ifeq ($(SYSTEM),Darwin)
- $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure
+ $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure
else
- $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure
- $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so
+ $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).so.1
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).so
endif
endif
@@ -4653,10 +4610,11 @@ LIBGRPC_CLI_LIBS_SRC = \
test/cpp/util/cli_credentials.cc \
test/cpp/util/grpc_tool.cc \
test/cpp/util/proto_file_parser.cc \
- test/cpp/util/proto_reflection_descriptor_database.cc \
test/cpp/util/service_describer.cc \
+ $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc \
PUBLIC_HEADERS_CXX += \
+ include/grpc++/impl/codegen/config_protobuf.h \
LIBGRPC_CLI_LIBS_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_CLI_LIBS_SRC))))
@@ -4700,6 +4658,11 @@ ifneq ($(NO_DEPS),true)
-include $(LIBGRPC_CLI_LIBS_OBJS:.o=.dep)
endif
endif
+$(OBJDIR)/$(CONFIG)/test/cpp/util/cli_call.o: $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc
+$(OBJDIR)/$(CONFIG)/test/cpp/util/cli_credentials.o: $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc
+$(OBJDIR)/$(CONFIG)/test/cpp/util/grpc_tool.o: $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc
+$(OBJDIR)/$(CONFIG)/test/cpp/util/proto_file_parser.o: $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc
+$(OBJDIR)/$(CONFIG)/test/cpp/util/service_describer.o: $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc
LIBGRPC_PLUGIN_SUPPORT_SRC = \
@@ -5091,7 +5054,7 @@ ifeq ($(NO_SECURE),true)
$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a: openssl_dep_error
-$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT): openssl_dep_error
+$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP): openssl_dep_error
else
@@ -5108,20 +5071,20 @@ endif
ifeq ($(SYSTEM),MINGW32)
-$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP)
+$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared grpc_csharp_ext.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS)
+ $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared grpc_csharp_ext.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CSHARP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS)
else
-$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP)
+$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
ifeq ($(SYSTEM),Darwin)
- $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS)
+ $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT_CSHARP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS)
else
- $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS)
- $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).so.1
- $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).so
+ $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS)
+ $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT_CSHARP) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP).so.1
+ $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT_CSHARP) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP).so
endif
endif
@@ -6809,6 +6772,55 @@ ifneq ($(NO_DEPS),true)
endif
+LIBGOOGLE_BENCHMARK_SRC = \
+ third_party/google_benchmark/src/benchmark.cc \
+ third_party/google_benchmark/src/benchmark_register.cc \
+ third_party/google_benchmark/src/colorprint.cc \
+ third_party/google_benchmark/src/commandlineflags.cc \
+ third_party/google_benchmark/src/complexity.cc \
+ third_party/google_benchmark/src/console_reporter.cc \
+ third_party/google_benchmark/src/csv_reporter.cc \
+ third_party/google_benchmark/src/json_reporter.cc \
+ third_party/google_benchmark/src/reporter.cc \
+ third_party/google_benchmark/src/sleep.cc \
+ third_party/google_benchmark/src/string_util.cc \
+ third_party/google_benchmark/src/sysinfo.cc \
+ third_party/google_benchmark/src/timers.cc \
+
+PUBLIC_HEADERS_CXX += \
+
+LIBGOOGLE_BENCHMARK_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGOOGLE_BENCHMARK_SRC))))
+
+$(LIBGOOGLE_BENCHMARK_OBJS): CPPFLAGS += -Ithird_party/google_benchmark/include -DHAVE_POSIX_REGEX
+
+ifeq ($(NO_PROTOBUF),true)
+
+# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay.
+
+$(LIBDIR)/$(CONFIG)/libgoogle_benchmark.a: protobuf_dep_error
+
+
+else
+
+$(LIBDIR)/$(CONFIG)/libgoogle_benchmark.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBGOOGLE_BENCHMARK_OBJS)
+ $(E) "[AR] Creating $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgoogle_benchmark.a
+ $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgoogle_benchmark.a $(LIBGOOGLE_BENCHMARK_OBJS)
+ifeq ($(SYSTEM),Darwin)
+ $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgoogle_benchmark.a
+endif
+
+
+
+
+endif
+
+ifneq ($(NO_DEPS),true)
+-include $(LIBGOOGLE_BENCHMARK_OBJS:.o=.dep)
+endif
+
+
LIBZ_SRC = \
third_party/zlib/adler32.c \
third_party/zlib/compress.c \
@@ -6929,6 +6941,7 @@ endif
LIBEND2END_TESTS_SRC = \
test/core/end2end/end2end_tests.c \
+ test/core/end2end/end2end_test_utils.c \
test/core/end2end/tests/bad_hostname.c \
test/core/end2end/tests/binary_metadata.c \
test/core/end2end/tests/call_creds.c \
@@ -7013,6 +7026,7 @@ endif
LIBEND2END_NOSEC_TESTS_SRC = \
test/core/end2end/end2end_nosec_tests.c \
+ test/core/end2end/end2end_test_utils.c \
test/core/end2end/tests/bad_hostname.c \
test/core/end2end/tests/binary_metadata.c \
test/core/end2end/tests/cancel_after_accept.c \
@@ -11084,6 +11098,38 @@ endif
endif
+TRANSPORT_PID_CONTROLLER_TEST_SRC = \
+ test/core/transport/pid_controller_test.c \
+
+TRANSPORT_PID_CONTROLLER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(TRANSPORT_PID_CONTROLLER_TEST_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/transport_pid_controller_test: openssl_dep_error
+
+else
+
+
+
+$(BINDIR)/$(CONFIG)/transport_pid_controller_test: $(TRANSPORT_PID_CONTROLLER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LD) $(LDFLAGS) $(TRANSPORT_PID_CONTROLLER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/transport_pid_controller_test
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/core/transport/pid_controller_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+deps_transport_pid_controller_test: $(TRANSPORT_PID_CONTROLLER_TEST_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(TRANSPORT_PID_CONTROLLER_TEST_OBJS:.o=.dep)
+endif
+endif
+
+
TRANSPORT_SECURITY_TEST_SRC = \
test/core/tsi/transport_security_test.c \
@@ -12081,16 +12127,16 @@ $(BINDIR)/$(CONFIG)/grpc_cli: protobuf_dep_error
else
-$(BINDIR)/$(CONFIG)/grpc_cli: $(PROTOBUF_DEP) $(GRPC_CLI_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
+$(BINDIR)/$(CONFIG)/grpc_cli: $(PROTOBUF_DEP) $(GRPC_CLI_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LDXX) $(LDFLAGS) $(GRPC_CLI_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/grpc_cli
+ $(Q) $(LDXX) $(LDFLAGS) $(GRPC_CLI_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/grpc_cli
endif
endif
-$(OBJDIR)/$(CONFIG)/test/cpp/util/grpc_cli.o: $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
+$(OBJDIR)/$(CONFIG)/test/cpp/util/grpc_cli.o: $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
deps_grpc_cli: $(GRPC_CLI_OBJS:.o=.dep)
@@ -12322,7 +12368,6 @@ GRPC_TOOL_TEST_SRC = \
$(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc \
test/cpp/util/grpc_tool_test.cc \
- test/cpp/util/string_ref_helper.cc \
GRPC_TOOL_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_TOOL_TEST_SRC))))
ifeq ($(NO_SECURE),true)
@@ -12344,22 +12389,20 @@ $(BINDIR)/$(CONFIG)/grpc_tool_test: protobuf_dep_error
else
-$(BINDIR)/$(CONFIG)/grpc_tool_test: $(PROTOBUF_DEP) $(GRPC_TOOL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+$(BINDIR)/$(CONFIG)/grpc_tool_test: $(PROTOBUF_DEP) $(GRPC_TOOL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LDXX) $(LDFLAGS) $(GRPC_TOOL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.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)/grpc_tool_test
+ $(Q) $(LDXX) $(LDFLAGS) $(GRPC_TOOL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.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)/grpc_tool_test
endif
endif
-$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo.o: $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo.o: $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
-$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo_messages.o: $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo_messages.o: $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
-$(OBJDIR)/$(CONFIG)/test/cpp/util/grpc_tool_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
-
-$(OBJDIR)/$(CONFIG)/test/cpp/util/string_ref_helper.o: $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+$(OBJDIR)/$(CONFIG)/test/cpp/util/grpc_tool_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_grpc_tool_test: $(GRPC_TOOL_TEST_OBJS:.o=.dep)
@@ -12369,7 +12412,6 @@ ifneq ($(NO_DEPS),true)
endif
endif
$(OBJDIR)/$(CONFIG)/test/cpp/util/grpc_tool_test.o: $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc
-$(OBJDIR)/$(CONFIG)/test/cpp/util/string_ref_helper.o: $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc
GRPCLB_API_TEST_SRC = \
@@ -12747,9 +12789,51 @@ endif
endif
+NOOP-BENCHMARK_SRC = \
+ test/cpp/microbenchmarks/noop-benchmark.cc \
+
+NOOP-BENCHMARK_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(NOOP-BENCHMARK_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/noop-benchmark: openssl_dep_error
+
+else
+
+
+
+
+ifeq ($(NO_PROTOBUF),true)
+
+# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+.
+
+$(BINDIR)/$(CONFIG)/noop-benchmark: protobuf_dep_error
+
+else
+
+$(BINDIR)/$(CONFIG)/noop-benchmark: $(PROTOBUF_DEP) $(NOOP-BENCHMARK_OBJS) $(LIBDIR)/$(CONFIG)/libgoogle_benchmark.a
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LDXX) $(LDFLAGS) $(NOOP-BENCHMARK_OBJS) $(LIBDIR)/$(CONFIG)/libgoogle_benchmark.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/noop-benchmark
+
+endif
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/noop-benchmark.o: $(LIBDIR)/$(CONFIG)/libgoogle_benchmark.a
+
+deps_noop-benchmark: $(NOOP-BENCHMARK_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(NOOP-BENCHMARK_OBJS:.o=.dep)
+endif
+endif
+
+
PROTO_SERVER_REFLECTION_TEST_SRC = \
test/cpp/end2end/proto_server_reflection_test.cc \
- test/cpp/util/proto_reflection_descriptor_database.cc \
PROTO_SERVER_REFLECTION_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(PROTO_SERVER_REFLECTION_TEST_SRC))))
ifeq ($(NO_SECURE),true)
@@ -12771,18 +12855,16 @@ $(BINDIR)/$(CONFIG)/proto_server_reflection_test: protobuf_dep_error
else
-$(BINDIR)/$(CONFIG)/proto_server_reflection_test: $(PROTOBUF_DEP) $(PROTO_SERVER_REFLECTION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+$(BINDIR)/$(CONFIG)/proto_server_reflection_test: $(PROTOBUF_DEP) $(PROTO_SERVER_REFLECTION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LDXX) $(LDFLAGS) $(PROTO_SERVER_REFLECTION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.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)/proto_server_reflection_test
+ $(Q) $(LDXX) $(LDFLAGS) $(PROTO_SERVER_REFLECTION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.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)/proto_server_reflection_test
endif
endif
-$(OBJDIR)/$(CONFIG)/test/cpp/end2end/proto_server_reflection_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
-
-$(OBJDIR)/$(CONFIG)/test/cpp/util/proto_reflection_descriptor_database.o: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+$(OBJDIR)/$(CONFIG)/test/cpp/end2end/proto_server_reflection_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_proto_server_reflection_test: $(PROTO_SERVER_REFLECTION_TEST_OBJS:.o=.dep)
@@ -13071,6 +13153,49 @@ endif
$(OBJDIR)/$(CONFIG)/test/cpp/interop/reconnect_interop_server.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc
+ROUND_ROBIN_END2END_TEST_SRC = \
+ test/cpp/end2end/round_robin_end2end_test.cc \
+
+ROUND_ROBIN_END2END_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(ROUND_ROBIN_END2END_TEST_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/round_robin_end2end_test: openssl_dep_error
+
+else
+
+
+
+
+ifeq ($(NO_PROTOBUF),true)
+
+# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+.
+
+$(BINDIR)/$(CONFIG)/round_robin_end2end_test: protobuf_dep_error
+
+else
+
+$(BINDIR)/$(CONFIG)/round_robin_end2end_test: $(PROTOBUF_DEP) $(ROUND_ROBIN_END2END_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LDXX) $(LDFLAGS) $(ROUND_ROBIN_END2END_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.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)/round_robin_end2end_test
+
+endif
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/cpp/end2end/round_robin_end2end_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+deps_round_robin_end2end_test: $(ROUND_ROBIN_END2END_TEST_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(ROUND_ROBIN_END2END_TEST_OBJS:.o=.dep)
+endif
+endif
+
+
SECURE_AUTH_CONTEXT_TEST_SRC = \
test/cpp/common/secure_auth_context_test.cc \
@@ -15006,38 +15131,6 @@ endif
endif
-H2_FAKE_RESOLVER_TEST_SRC = \
- test/core/end2end/fixtures/h2_fake_resolver.c \
-
-H2_FAKE_RESOLVER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_FAKE_RESOLVER_TEST_SRC))))
-ifeq ($(NO_SECURE),true)
-
-# You can't build secure targets if you don't have OpenSSL.
-
-$(BINDIR)/$(CONFIG)/h2_fake_resolver_test: openssl_dep_error
-
-else
-
-
-
-$(BINDIR)/$(CONFIG)/h2_fake_resolver_test: $(H2_FAKE_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
- $(E) "[LD] Linking $@"
- $(Q) mkdir -p `dirname $@`
- $(Q) $(LD) $(LDFLAGS) $(H2_FAKE_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_fake_resolver_test
-
-endif
-
-$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_fake_resolver.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
-
-deps_h2_fake_resolver_test: $(H2_FAKE_RESOLVER_TEST_OBJS:.o=.dep)
-
-ifneq ($(NO_SECURE),true)
-ifneq ($(NO_DEPS),true)
--include $(H2_FAKE_RESOLVER_TEST_OBJS:.o=.dep)
-endif
-endif
-
-
H2_FAKESEC_TEST_SRC = \
test/core/end2end/fixtures/h2_fakesec.c \
@@ -15590,26 +15683,6 @@ ifneq ($(NO_DEPS),true)
endif
-H2_FAKE_RESOLVER_NOSEC_TEST_SRC = \
- test/core/end2end/fixtures/h2_fake_resolver.c \
-
-H2_FAKE_RESOLVER_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_FAKE_RESOLVER_NOSEC_TEST_SRC))))
-
-
-$(BINDIR)/$(CONFIG)/h2_fake_resolver_nosec_test: $(H2_FAKE_RESOLVER_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
- $(E) "[LD] Linking $@"
- $(Q) mkdir -p `dirname $@`
- $(Q) $(LD) $(LDFLAGS) $(H2_FAKE_RESOLVER_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_fake_resolver_nosec_test
-
-$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_fake_resolver.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
-
-deps_h2_fake_resolver_nosec_test: $(H2_FAKE_RESOLVER_NOSEC_TEST_OBJS:.o=.dep)
-
-ifneq ($(NO_DEPS),true)
--include $(H2_FAKE_RESOLVER_NOSEC_TEST_OBJS:.o=.dep)
-endif
-
-
H2_FD_NOSEC_TEST_SRC = \
test/core/end2end/fixtures/h2_fd.c \
@@ -16300,8 +16373,6 @@ src/cpp/common/secure_channel_arguments.cc: $(OPENSSL_DEP)
src/cpp/common/secure_create_auth_context.cc: $(OPENSSL_DEP)
src/cpp/ext/proto_server_reflection.cc: $(OPENSSL_DEP)
src/cpp/ext/proto_server_reflection_plugin.cc: $(OPENSSL_DEP)
-src/cpp/ext/reflection.grpc.pb.cc: $(OPENSSL_DEP)
-src/cpp/ext/reflection.pb.cc: $(OPENSSL_DEP)
src/cpp/server/secure_server_credentials.cc: $(OPENSSL_DEP)
src/cpp/test/server_context_test_spouse.cc: $(OPENSSL_DEP)
src/csharp/ext/grpc_csharp_ext.c: $(OPENSSL_DEP)
diff --git a/binding.gyp b/binding.gyp
index 9f3b75aaf3..bb215c4889 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -671,6 +671,7 @@
'src/core/lib/transport/metadata.c',
'src/core/lib/transport/metadata_batch.c',
'src/core/lib/transport/method_config.c',
+ 'src/core/lib/transport/pid_controller.c',
'src/core/lib/transport/static_metadata.c',
'src/core/lib/transport/timeout_encoding.c',
'src/core/lib/transport/transport.c',
diff --git a/build.yaml b/build.yaml
index 5d63f29070..c62e9e6bb8 100644
--- a/build.yaml
+++ b/build.yaml
@@ -12,6 +12,7 @@ settings:
'#08': Use "-preN" suffixes to identify pre-release versions
'#09': Per-language overrides are possible with (eg) ruby_version tag here
'#10': See the expand_version.py for all the quirks here
+ core_version: 2.0.0-dev
g_stands_for: good
version: 1.1.0-dev
filegroups:
@@ -256,6 +257,7 @@ filegroups:
- src/core/lib/transport/metadata.h
- src/core/lib/transport/metadata_batch.h
- src/core/lib/transport/method_config.h
+ - src/core/lib/transport/pid_controller.h
- src/core/lib/transport/static_metadata.h
- src/core/lib/transport/timeout_encoding.h
- src/core/lib/transport/transport.h
@@ -364,6 +366,7 @@ filegroups:
- src/core/lib/transport/metadata.c
- src/core/lib/transport/metadata_batch.c
- src/core/lib/transport/method_config.c
+ - src/core/lib/transport/pid_controller.c
- src/core/lib/transport/static_metadata.c
- src/core/lib/transport/timeout_encoding.c
- src/core/lib/transport/transport.c
@@ -684,8 +687,6 @@ filegroups:
deps:
- gpr
secure: true
- uses:
- - grpc_base
- name: grpc++_base
language: c++
public_headers:
@@ -710,12 +711,6 @@ filegroups:
- include/grpc++/impl/server_builder_plugin.h
- include/grpc++/impl/server_initializer.h
- include/grpc++/impl/service_type.h
- - include/grpc++/impl/sync.h
- - include/grpc++/impl/sync_cxx11.h
- - include/grpc++/impl/sync_no_cxx11.h
- - include/grpc++/impl/thd.h
- - include/grpc++/impl/thd_cxx11.h
- - include/grpc++/impl/thd_no_cxx11.h
- include/grpc++/resource_quota.h
- include/grpc++/security/auth_context.h
- include/grpc++/security/auth_metadata_processor.h
@@ -757,6 +752,7 @@ filegroups:
- src/cpp/common/core_codegen.cc
- src/cpp/common/resource_quota_cc.cc
- src/cpp/common/rpc_method.cc
+ - src/cpp/common/version_cc.cc
- src/cpp/server/async_generic_service.cc
- src/cpp/server/create_default_thread_pool.cc
- src/cpp/server/dynamic_thread_pool.cc
@@ -802,9 +798,6 @@ filegroups:
- include/grpc++/impl/codegen/status_helper.h
- include/grpc++/impl/codegen/string_ref.h
- include/grpc++/impl/codegen/stub_options.h
- - include/grpc++/impl/codegen/sync.h
- - include/grpc++/impl/codegen/sync_cxx11.h
- - include/grpc++/impl/codegen/sync_no_cxx11.h
- include/grpc++/impl/codegen/sync_stream.h
- include/grpc++/impl/codegen/time.h
uses:
@@ -828,14 +821,8 @@ filegroups:
- include/grpc++/impl/codegen/config_protobuf.h
- name: grpc++_reflection_proto
language: c++
- public_headers:
- - include/grpc++/ext/reflection.grpc.pb.h
- - include/grpc++/ext/reflection.pb.h
src:
- - src/cpp/ext/reflection.grpc.pb.cc
- - src/cpp/ext/reflection.pb.cc
- uses:
- - grpc++_codegen_proto
+ - src/proto/grpc/reflection/v1alpha/reflection.proto
- name: thrift_util
language: c++
public_headers:
@@ -1053,6 +1040,18 @@ libs:
platforms:
- linux
secure: true
+- name: grpc++_proto_reflection_desc_db
+ build: private
+ language: c++
+ headers:
+ - test/cpp/util/proto_reflection_descriptor_database.h
+ src:
+ - test/cpp/util/proto_reflection_descriptor_database.cc
+ deps:
+ - grpc++
+ filegroups:
+ - grpc++_reflection_proto
+ - grpc++_config_proto
- name: grpc++_reflection
build: all
language: c++
@@ -1067,11 +1066,6 @@ libs:
- grpc++
filegroups:
- grpc++_reflection_proto
-- name: grpc++_reflection_codegen
- build: private
- language: c++
- src:
- - src/proto/grpc/reflection/v1alpha/reflection.proto
- name: grpc++_test
build: private
language: c++
@@ -1144,18 +1138,19 @@ libs:
- test/cpp/util/config_grpc_cli.h
- test/cpp/util/grpc_tool.h
- test/cpp/util/proto_file_parser.h
- - test/cpp/util/proto_reflection_descriptor_database.h
- test/cpp/util/service_describer.h
src:
- test/cpp/util/cli_call.cc
- test/cpp/util/cli_credentials.cc
- test/cpp/util/grpc_tool.cc
- test/cpp/util/proto_file_parser.cc
- - test/cpp/util/proto_reflection_descriptor_database.cc
- test/cpp/util/service_describer.cc
deps:
- - grpc++_reflection
+ - grpc++_proto_reflection_desc_db
- grpc++
+ filegroups:
+ - grpc++_reflection_proto
+ - grpc++_config_proto
- name: grpc_plugin_support
build: protoc
language: c++
@@ -2677,6 +2672,16 @@ targets:
- grpc
- gpr_test_util
- gpr
+- name: transport_pid_controller_test
+ build: test
+ language: c
+ src:
+ - test/core/transport/pid_controller_test.c
+ deps:
+ - grpc_test_util
+ - grpc
+ - gpr_test_util
+ - gpr
- name: transport_security_test
build: test
language: c
@@ -2984,7 +2989,7 @@ targets:
- test/cpp/util/grpc_cli.cc
deps:
- grpc_cli_libs
- - grpc++_reflection
+ - grpc++_proto_reflection_desc_db
- grpc++
- grpc
- gpr
@@ -3061,16 +3066,15 @@ targets:
gtest: true
build: test
language: c++
- headers:
- - test/cpp/util/string_ref_helper.h
src:
- src/proto/grpc/testing/echo.proto
- src/proto/grpc/testing/echo_messages.proto
- test/cpp/util/grpc_tool_test.cc
- - test/cpp/util/string_ref_helper.cc
deps:
- grpc_cli_libs
+ - grpc++_proto_reflection_desc_db
- grpc++_reflection
+ - grpc++_test_util
- grpc_test_util
- grpc++
- grpc
@@ -3078,7 +3082,6 @@ targets:
- gpr
filegroups:
- grpc++_codegen_proto
- - grpc++_config_proto
- name: grpclb_api_test
gtest: true
build: test
@@ -3214,16 +3217,21 @@ targets:
- grpc
- gpr_test_util
- gpr
+- name: noop-benchmark
+ build: test
+ language: c++
+ src:
+ - test/cpp/microbenchmarks/noop-benchmark.cc
+ deps:
+ - google_benchmark
- name: proto_server_reflection_test
gtest: true
build: test
language: c++
- headers:
- - test/cpp/util/proto_reflection_descriptor_database.h
src:
- test/cpp/end2end/proto_server_reflection_test.cc
- - test/cpp/util/proto_reflection_descriptor_database.cc
deps:
+ - grpc++_proto_reflection_desc_db
- grpc++_reflection
- grpc++_test_util
- grpc_test_util
@@ -3337,6 +3345,19 @@ targets:
- gpr_test_util
- gpr
- grpc++_test_config
+- name: round_robin_end2end_test
+ gtest: true
+ build: test
+ language: c++
+ src:
+ - test/cpp/end2end/round_robin_end2end_test.cc
+ deps:
+ - grpc++_test_util
+ - grpc_test_util
+ - grpc++
+ - grpc
+ - gpr_test_util
+ - gpr
- name: secure_auth_context_test
gtest: true
build: test
@@ -3696,6 +3717,8 @@ defaults:
global:
CPPFLAGS: -g -Wall -Wextra -Werror -Wno-long-long -Wno-unused-parameter
LDFLAGS: -g
+ google_benchmark:
+ CPPFLAGS: -Ithird_party/google_benchmark/include -DHAVE_POSIX_REGEX
zlib:
CFLAGS: -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-implicit-function-declaration
$(W_NO_SHIFT_NEGATIVE_VALUE) -fvisibility=hidden
diff --git a/config.m4 b/config.m4
index 8f26e42678..09aaac635d 100644
--- a/config.m4
+++ b/config.m4
@@ -187,6 +187,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/transport/metadata.c \
src/core/lib/transport/metadata_batch.c \
src/core/lib/transport/method_config.c \
+ src/core/lib/transport/pid_controller.c \
src/core/lib/transport/static_metadata.c \
src/core/lib/transport/timeout_encoding.c \
src/core/lib/transport/transport.c \
diff --git a/doc/cpp-style-guide.md b/doc/cpp-style-guide.md
index 0138ceb737..a1f91353fe 100644
--- a/doc/cpp-style-guide.md
+++ b/doc/cpp-style-guide.md
@@ -1,91 +1,9 @@
GRPC C++ STYLE GUIDE
=====================
-Background
-----------
-
-Here we document style rules for C++ usage in the gRPC C++ bindings
-and tests.
-
-General
--------
-
-- The majority of gRPC's C++ requirements are drawn from the [Google C++ style
-guide] (https://google.github.io/styleguide/cppguide.html)
- - However, gRPC has some additional requirements to maintain
- [portability] (#portability)
-- As in C, layout rules are defined by clang-format, and all code
+The majority of gRPC's C++ requirements are drawn from the [Google C++ style
+guide] (https://google.github.io/styleguide/cppguide.html). Additionally,
+as in C, layout rules are defined by clang-format, and all code
should be passed through clang-format. A (docker-based) script to do
so is included in [tools/distrib/clang\_format\_code.sh]
(../tools/distrib/clang_format_code.sh).
-
-<a name="portability"></a>
-Portability Restrictions
--------------------
-
-gRPC supports a large number of compilers, ranging from those that are
-missing many key C++11 features to those that have quite detailed
-analysis. As a result, gRPC compiles with a high level of warnings and
-treat all warnings as errors. gRPC also forbids the use of some common
-C++11 constructs. Here are some guidelines, to be extended as needed:
-- Do not use range-based for. Expressions of the form
- ```c
- for (auto& i: vec) {
- // code
- }
- ```
-
- are not allowed and should be replaced with code such as
- ```c
- for (auto it = vec.begin; it != vec.end(); it++) {
- auto& i = *it;
- // code
- }
- ```
-
-- Do not use lambda of any kind (no capture, explicit capture, or
-default capture). Other C++ functional features such as
-`std::function` or `std::bind` are allowed
-- Do not use brace-list initializers.
-- Do not compare a pointer to `nullptr` . This is because gcc 4.4
- does not support `nullptr` directly and gRPC implements a subset of
- its features in [include/grpc++/impl/codegen/config.h]
- (../include/grpc++/impl/codegen/config.h). Instead, pointers should
- be checked for validity using their implicit conversion to `bool`.
- In other words, use `if (p)` rather than `if (p != nullptr)`
-- Do not initialize global/static pointer variables to `nullptr`. Just let
- the compiler implicitly initialize them to `nullptr` (which it will
- definitely do). The reason is that `nullptr` is an actual object in
- our implementation rather than just a constant pointer value, so
- static/global constructors will be called in a potentially
- undesirable sequence.
-- Do not use `final` or `override` as these are not supported by some
- compilers. Instead use `GRPC_FINAL` and `GRPC_OVERRIDE` . These
- compile down to the traditional C++ forms for compilers that support
- them but are just elided if the compiler does not support those features.
-- In the [include] (../../../tree/master/include/grpc++) and [src]
- (../../../tree/master/src/cpp) directory trees, you should also not
- use certain STL objects like `std::mutex`, `std::lock_guard`,
- `std::unique_lock`, `std::nullptr`, `std::thread` . Instead, use
- `grpc::mutex`, `grpc::lock_guard`, etc., which are gRPC
- implementations of the prominent features of these objects that are
- not always available. You can use the `std` versions of those in [test]
- (../../../tree/master/test/cpp)
-- Similarly, in the same directories, do not use `std::chrono` unless
- it is guarded by `#ifndef GRPC_CXX0X_NO_CHRONO` . For platforms that
- lack`std::chrono,` there is a C-language timer called gpr_timespec that can
- be used instead.
-- `std::unique_ptr` must be used with extreme care in any kind of
- collection. For example `vector<std::unique_ptr>` does not work in
- gcc 4.4 if the vector is constructed to its full size at
- initialization but does work if elements are added to the vector
- using functions like `push_back`. `map` and other pair-based
- collections do not work with `unique_ptr` under gcc 4.4. The issue
- is that many of these collection implementations assume a copy
- constructor
- to be available.
-- Don't use `std::this_thread` . Use `gpr_sleep_until` for sleeping a thread.
-- [Some adjacent character combinations cause problems]
- (https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C). If declaring a
- template against some class relative to the global namespace,
- `<::name` will be non-portable. Separate the `<` from the `:` and use `< ::name`.
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index 43aedecd06..706d7afee0 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -339,6 +339,7 @@ Pod::Spec.new do |s|
'src/core/lib/transport/metadata.h',
'src/core/lib/transport/metadata_batch.h',
'src/core/lib/transport/method_config.h',
+ 'src/core/lib/transport/pid_controller.h',
'src/core/lib/transport/static_metadata.h',
'src/core/lib/transport/timeout_encoding.h',
'src/core/lib/transport/transport.h',
@@ -527,6 +528,7 @@ Pod::Spec.new do |s|
'src/core/lib/transport/metadata.c',
'src/core/lib/transport/metadata_batch.c',
'src/core/lib/transport/method_config.c',
+ 'src/core/lib/transport/pid_controller.c',
'src/core/lib/transport/static_metadata.c',
'src/core/lib/transport/timeout_encoding.c',
'src/core/lib/transport/transport.c',
@@ -735,6 +737,7 @@ Pod::Spec.new do |s|
'src/core/lib/transport/metadata.h',
'src/core/lib/transport/metadata_batch.h',
'src/core/lib/transport/method_config.h',
+ 'src/core/lib/transport/pid_controller.h',
'src/core/lib/transport/static_metadata.h',
'src/core/lib/transport/timeout_encoding.h',
'src/core/lib/transport/transport.h',
diff --git a/grpc.gemspec b/grpc.gemspec
index 615a962cdb..f4919bfb25 100755
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -259,6 +259,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/transport/metadata.h )
s.files += %w( src/core/lib/transport/metadata_batch.h )
s.files += %w( src/core/lib/transport/method_config.h )
+ s.files += %w( src/core/lib/transport/pid_controller.h )
s.files += %w( src/core/lib/transport/static_metadata.h )
s.files += %w( src/core/lib/transport/timeout_encoding.h )
s.files += %w( src/core/lib/transport/transport.h )
@@ -447,6 +448,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/transport/metadata.c )
s.files += %w( src/core/lib/transport/metadata_batch.c )
s.files += %w( src/core/lib/transport/method_config.c )
+ s.files += %w( src/core/lib/transport/pid_controller.c )
s.files += %w( src/core/lib/transport/static_metadata.c )
s.files += %w( src/core/lib/transport/timeout_encoding.c )
s.files += %w( src/core/lib/transport/transport.c )
diff --git a/include/grpc++/alarm.h b/include/grpc++/alarm.h
index 1470fe8d97..9a15167cc7 100644
--- a/include/grpc++/alarm.h
+++ b/include/grpc++/alarm.h
@@ -78,7 +78,7 @@ class Alarm : private GrpcLibraryCodegen {
class AlarmEntry : public CompletionQueueTag {
public:
AlarmEntry(void* tag) : tag_(tag) {}
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE {
+ bool FinalizeResult(void** tag, bool* status) override {
*tag = tag_;
return true;
}
diff --git a/include/grpc++/channel.h b/include/grpc++/channel.h
index c535d57bff..c8360282e7 100644
--- a/include/grpc++/channel.h
+++ b/include/grpc++/channel.h
@@ -46,16 +46,16 @@ struct grpc_channel;
namespace grpc {
/// Channels represent a connection to an endpoint. Created by \a CreateChannel.
-class Channel GRPC_FINAL : public ChannelInterface,
- public CallHook,
- public std::enable_shared_from_this<Channel>,
- private GrpcLibraryCodegen {
+class Channel final : public ChannelInterface,
+ public CallHook,
+ public std::enable_shared_from_this<Channel>,
+ private GrpcLibraryCodegen {
public:
~Channel();
/// Get the current channel state. If the channel is in IDLE and
/// \a try_to_connect is set to true, try to connect.
- grpc_connectivity_state GetState(bool try_to_connect) GRPC_OVERRIDE;
+ grpc_connectivity_state GetState(bool try_to_connect) override;
private:
template <class InputMessage, class OutputMessage>
@@ -69,15 +69,15 @@ class Channel GRPC_FINAL : public ChannelInterface,
Channel(const grpc::string& host, grpc_channel* c_channel);
Call CreateCall(const RpcMethod& method, ClientContext* context,
- CompletionQueue* cq) GRPC_OVERRIDE;
- void PerformOpsOnCall(CallOpSetInterface* ops, Call* call) GRPC_OVERRIDE;
- void* RegisterMethod(const char* method) GRPC_OVERRIDE;
+ CompletionQueue* cq) override;
+ void PerformOpsOnCall(CallOpSetInterface* ops, Call* call) override;
+ void* RegisterMethod(const char* method) override;
void NotifyOnStateChangeImpl(grpc_connectivity_state last_observed,
gpr_timespec deadline, CompletionQueue* cq,
- void* tag) GRPC_OVERRIDE;
+ void* tag) override;
bool WaitForStateChangeImpl(grpc_connectivity_state last_observed,
- gpr_timespec deadline) GRPC_OVERRIDE;
+ gpr_timespec deadline) override;
const grpc::string host_;
grpc_channel* const c_channel_; // owned
diff --git a/include/grpc++/ext/proto_server_reflection_plugin.h b/include/grpc++/ext/proto_server_reflection_plugin.h
index 3e54882d41..66f39eb876 100644
--- a/include/grpc++/ext/proto_server_reflection_plugin.h
+++ b/include/grpc++/ext/proto_server_reflection_plugin.h
@@ -48,12 +48,12 @@ namespace reflection {
class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin {
public:
ProtoServerReflectionPlugin();
- ::grpc::string name() GRPC_OVERRIDE;
- void InitServer(::grpc::ServerInitializer* si) GRPC_OVERRIDE;
- void Finish(::grpc::ServerInitializer* si) GRPC_OVERRIDE;
- void ChangeArguments(const ::grpc::string& name, void* value) GRPC_OVERRIDE;
- bool has_async_methods() const GRPC_OVERRIDE;
- bool has_sync_methods() const GRPC_OVERRIDE;
+ ::grpc::string name() override;
+ void InitServer(::grpc::ServerInitializer* si) override;
+ void Finish(::grpc::ServerInitializer* si) override;
+ void ChangeArguments(const ::grpc::string& name, void* value) override;
+ bool has_async_methods() const override;
+ bool has_sync_methods() const override;
private:
std::shared_ptr<grpc::ProtoServerReflection> reflection_service_;
diff --git a/include/grpc++/ext/reflection.grpc.pb.h b/include/grpc++/ext/reflection.grpc.pb.h
deleted file mode 100644
index 151271c65b..0000000000
--- a/include/grpc++/ext/reflection.grpc.pb.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- *
- * 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.
- *
- */
-
-
-// Generated by tools/codegen/extensions/gen_reflection_proto.sh
-// If you make any local change, they will be lost.
-// source: reflection.proto
-// Original file comments:
-// Copyright 2016, 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.
-//
-// Service exported by server reflection
-//
-#ifndef GRPC_reflection_2eproto__INCLUDED
-#define GRPC_reflection_2eproto__INCLUDED
-
-#include <grpc++/ext/reflection.pb.h>
-
-#include <grpc++/impl/codegen/async_stream.h>
-#include <grpc++/impl/codegen/async_unary_call.h>
-#include <grpc++/impl/codegen/method_handler_impl.h>
-#include <grpc++/impl/codegen/proto_utils.h>
-#include <grpc++/impl/codegen/rpc_method.h>
-#include <grpc++/impl/codegen/service_type.h>
-#include <grpc++/impl/codegen/status.h>
-#include <grpc++/impl/codegen/stub_options.h>
-#include <grpc++/impl/codegen/sync_stream.h>
-
-namespace grpc {
-class CompletionQueue;
-class Channel;
-class RpcService;
-class ServerCompletionQueue;
-class ServerContext;
-} // namespace grpc
-
-namespace grpc {
-namespace reflection {
-namespace v1alpha {
-
-class ServerReflection GRPC_FINAL {
- public:
- class StubInterface {
- public:
- virtual ~StubInterface() {}
- // The reflection service is structured as a bidirectional stream, ensuring
- // all related requests go to a single server.
- std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> ServerReflectionInfo(::grpc::ClientContext* context) {
- return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(ServerReflectionInfoRaw(context));
- }
- std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> AsyncServerReflectionInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(AsyncServerReflectionInfoRaw(context, cq, tag));
- }
- private:
- virtual ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflectionInfoRaw(::grpc::ClientContext* context) = 0;
- virtual ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0;
- };
- class Stub GRPC_FINAL : public StubInterface {
- public:
- Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
- std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> ServerReflectionInfo(::grpc::ClientContext* context) {
- return std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(ServerReflectionInfoRaw(context));
- }
- std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> AsyncServerReflectionInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(AsyncServerReflectionInfoRaw(context, cq, tag));
- }
-
- private:
- std::shared_ptr< ::grpc::ChannelInterface> channel_;
- ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflectionInfoRaw(::grpc::ClientContext* context) GRPC_OVERRIDE;
- ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE;
- const ::grpc::RpcMethod rpcmethod_ServerReflectionInfo_;
- };
- static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
-
- class Service : public ::grpc::Service {
- public:
- Service();
- virtual ~Service();
- // The reflection service is structured as a bidirectional stream, ensuring
- // all related requests go to a single server.
- virtual ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream);
- };
- template <class BaseClass>
- class WithAsyncMethod_ServerReflectionInfo : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithAsyncMethod_ServerReflectionInfo() {
- ::grpc::Service::MarkMethodAsync(0);
- }
- ~WithAsyncMethod_ServerReflectionInfo() GRPC_OVERRIDE {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable synchronous version of this method
- ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) GRPC_FINAL GRPC_OVERRIDE {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- void RequestServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
- ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag);
- }
- };
- typedef WithAsyncMethod_ServerReflectionInfo<Service > AsyncService;
- template <class BaseClass>
- class WithGenericMethod_ServerReflectionInfo : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithGenericMethod_ServerReflectionInfo() {
- ::grpc::Service::MarkMethodGeneric(0);
- }
- ~WithGenericMethod_ServerReflectionInfo() GRPC_OVERRIDE {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable synchronous version of this method
- ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) GRPC_FINAL GRPC_OVERRIDE {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- };
- typedef Service StreamedUnaryService;
- typedef Service SplitStreamedService;
- typedef Service StreamedService;
-};
-
-} // namespace v1alpha
-} // namespace reflection
-} // namespace grpc
-
-
-#endif // GRPC_reflection_2eproto__INCLUDED
diff --git a/include/grpc++/ext/reflection.pb.h b/include/grpc++/ext/reflection.pb.h
deleted file mode 100644
index 6e645af10e..0000000000
--- a/include/grpc++/ext/reflection.pb.h
+++ /dev/null
@@ -1,2125 +0,0 @@
-/*
- *
- * 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.
- *
- */
-
-
-// Generated by tools/codegen/extensions/gen_reflection_proto.sh
-// source: reflection.proto
-
-#ifndef PROTOBUF_reflection_2eproto__INCLUDED
-#define PROTOBUF_reflection_2eproto__INCLUDED
-
-#include <string>
-
-#include <google/protobuf/stubs/common.h>
-
-#if GOOGLE_PROTOBUF_VERSION < 3001000
-#error This file was generated by a newer version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please update
-#error your headers.
-#endif
-#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
-#error This file was generated by an older version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please
-#error regenerate this file with a newer version of protoc.
-#endif
-
-#include <google/protobuf/arena.h>
-#include <google/protobuf/arenastring.h>
-#include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/metadata.h>
-#include <google/protobuf/message.h>
-#include <google/protobuf/repeated_field.h>
-#include <google/protobuf/extension_set.h>
-#include <google/protobuf/unknown_field_set.h>
-// @@protoc_insertion_point(includes)
-
-namespace grpc {
-namespace reflection {
-namespace v1alpha {
-
-// Internal implementation detail -- do not call these.
-void protobuf_AddDesc_reflection_2eproto();
-void protobuf_InitDefaults_reflection_2eproto();
-void protobuf_AssignDesc_reflection_2eproto();
-void protobuf_ShutdownFile_reflection_2eproto();
-
-class ErrorResponse;
-class ExtensionNumberResponse;
-class ExtensionRequest;
-class FileDescriptorResponse;
-class ListServiceResponse;
-class ServerReflectionRequest;
-class ServerReflectionResponse;
-class ServiceResponse;
-
-// ===================================================================
-
-class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServerReflectionRequest) */ {
- public:
- ServerReflectionRequest();
- virtual ~ServerReflectionRequest();
-
- ServerReflectionRequest(const ServerReflectionRequest& from);
-
- inline ServerReflectionRequest& operator=(const ServerReflectionRequest& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ServerReflectionRequest& default_instance();
-
- enum MessageRequestCase {
- kFileByFilename = 3,
- kFileContainingSymbol = 4,
- kFileContainingExtension = 5,
- kAllExtensionNumbersOfType = 6,
- kListServices = 7,
- MESSAGE_REQUEST_NOT_SET = 0,
- };
-
- static const ServerReflectionRequest* internal_default_instance();
-
- void Swap(ServerReflectionRequest* other);
-
- // implements Message ----------------------------------------------
-
- inline ServerReflectionRequest* New() const { return New(NULL); }
-
- ServerReflectionRequest* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ServerReflectionRequest& from);
- void MergeFrom(const ServerReflectionRequest& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ServerReflectionRequest* other);
- void UnsafeMergeFrom(const ServerReflectionRequest& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional string host = 1;
- void clear_host();
- static const int kHostFieldNumber = 1;
- const ::std::string& host() const;
- void set_host(const ::std::string& value);
- void set_host(const char* value);
- void set_host(const char* value, size_t size);
- ::std::string* mutable_host();
- ::std::string* release_host();
- void set_allocated_host(::std::string* host);
-
- // optional string file_by_filename = 3;
- private:
- bool has_file_by_filename() const;
- public:
- void clear_file_by_filename();
- static const int kFileByFilenameFieldNumber = 3;
- const ::std::string& file_by_filename() const;
- void set_file_by_filename(const ::std::string& value);
- void set_file_by_filename(const char* value);
- void set_file_by_filename(const char* value, size_t size);
- ::std::string* mutable_file_by_filename();
- ::std::string* release_file_by_filename();
- void set_allocated_file_by_filename(::std::string* file_by_filename);
-
- // optional string file_containing_symbol = 4;
- private:
- bool has_file_containing_symbol() const;
- public:
- void clear_file_containing_symbol();
- static const int kFileContainingSymbolFieldNumber = 4;
- const ::std::string& file_containing_symbol() const;
- void set_file_containing_symbol(const ::std::string& value);
- void set_file_containing_symbol(const char* value);
- void set_file_containing_symbol(const char* value, size_t size);
- ::std::string* mutable_file_containing_symbol();
- ::std::string* release_file_containing_symbol();
- void set_allocated_file_containing_symbol(::std::string* file_containing_symbol);
-
- // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5;
- bool has_file_containing_extension() const;
- void clear_file_containing_extension();
- static const int kFileContainingExtensionFieldNumber = 5;
- const ::grpc::reflection::v1alpha::ExtensionRequest& file_containing_extension() const;
- ::grpc::reflection::v1alpha::ExtensionRequest* mutable_file_containing_extension();
- ::grpc::reflection::v1alpha::ExtensionRequest* release_file_containing_extension();
- void set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension);
-
- // optional string all_extension_numbers_of_type = 6;
- private:
- bool has_all_extension_numbers_of_type() const;
- public:
- void clear_all_extension_numbers_of_type();
- static const int kAllExtensionNumbersOfTypeFieldNumber = 6;
- const ::std::string& all_extension_numbers_of_type() const;
- void set_all_extension_numbers_of_type(const ::std::string& value);
- void set_all_extension_numbers_of_type(const char* value);
- void set_all_extension_numbers_of_type(const char* value, size_t size);
- ::std::string* mutable_all_extension_numbers_of_type();
- ::std::string* release_all_extension_numbers_of_type();
- void set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type);
-
- // optional string list_services = 7;
- private:
- bool has_list_services() const;
- public:
- void clear_list_services();
- static const int kListServicesFieldNumber = 7;
- const ::std::string& list_services() const;
- void set_list_services(const ::std::string& value);
- void set_list_services(const char* value);
- void set_list_services(const char* value, size_t size);
- ::std::string* mutable_list_services();
- ::std::string* release_list_services();
- void set_allocated_list_services(::std::string* list_services);
-
- MessageRequestCase message_request_case() const;
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ServerReflectionRequest)
- private:
- inline void set_has_file_by_filename();
- inline void set_has_file_containing_symbol();
- inline void set_has_file_containing_extension();
- inline void set_has_all_extension_numbers_of_type();
- inline void set_has_list_services();
-
- inline bool has_message_request() const;
- void clear_message_request();
- inline void clear_has_message_request();
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::internal::ArenaStringPtr host_;
- union MessageRequestUnion {
- MessageRequestUnion() {}
- ::google::protobuf::internal::ArenaStringPtr file_by_filename_;
- ::google::protobuf::internal::ArenaStringPtr file_containing_symbol_;
- ::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension_;
- ::google::protobuf::internal::ArenaStringPtr all_extension_numbers_of_type_;
- ::google::protobuf::internal::ArenaStringPtr list_services_;
- } message_request_;
- mutable int _cached_size_;
- ::google::protobuf::uint32 _oneof_case_[1];
-
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ServerReflectionRequest> ServerReflectionRequest_default_instance_;
-
-// -------------------------------------------------------------------
-
-class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ExtensionRequest) */ {
- public:
- ExtensionRequest();
- virtual ~ExtensionRequest();
-
- ExtensionRequest(const ExtensionRequest& from);
-
- inline ExtensionRequest& operator=(const ExtensionRequest& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ExtensionRequest& default_instance();
-
- static const ExtensionRequest* internal_default_instance();
-
- void Swap(ExtensionRequest* other);
-
- // implements Message ----------------------------------------------
-
- inline ExtensionRequest* New() const { return New(NULL); }
-
- ExtensionRequest* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ExtensionRequest& from);
- void MergeFrom(const ExtensionRequest& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ExtensionRequest* other);
- void UnsafeMergeFrom(const ExtensionRequest& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional string containing_type = 1;
- void clear_containing_type();
- static const int kContainingTypeFieldNumber = 1;
- const ::std::string& containing_type() const;
- void set_containing_type(const ::std::string& value);
- void set_containing_type(const char* value);
- void set_containing_type(const char* value, size_t size);
- ::std::string* mutable_containing_type();
- ::std::string* release_containing_type();
- void set_allocated_containing_type(::std::string* containing_type);
-
- // optional int32 extension_number = 2;
- void clear_extension_number();
- static const int kExtensionNumberFieldNumber = 2;
- ::google::protobuf::int32 extension_number() const;
- void set_extension_number(::google::protobuf::int32 value);
-
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionRequest)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::internal::ArenaStringPtr containing_type_;
- ::google::protobuf::int32 extension_number_;
- mutable int _cached_size_;
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ExtensionRequest> ExtensionRequest_default_instance_;
-
-// -------------------------------------------------------------------
-
-class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServerReflectionResponse) */ {
- public:
- ServerReflectionResponse();
- virtual ~ServerReflectionResponse();
-
- ServerReflectionResponse(const ServerReflectionResponse& from);
-
- inline ServerReflectionResponse& operator=(const ServerReflectionResponse& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ServerReflectionResponse& default_instance();
-
- enum MessageResponseCase {
- kFileDescriptorResponse = 4,
- kAllExtensionNumbersResponse = 5,
- kListServicesResponse = 6,
- kErrorResponse = 7,
- MESSAGE_RESPONSE_NOT_SET = 0,
- };
-
- static const ServerReflectionResponse* internal_default_instance();
-
- void Swap(ServerReflectionResponse* other);
-
- // implements Message ----------------------------------------------
-
- inline ServerReflectionResponse* New() const { return New(NULL); }
-
- ServerReflectionResponse* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ServerReflectionResponse& from);
- void MergeFrom(const ServerReflectionResponse& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ServerReflectionResponse* other);
- void UnsafeMergeFrom(const ServerReflectionResponse& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional string valid_host = 1;
- void clear_valid_host();
- static const int kValidHostFieldNumber = 1;
- const ::std::string& valid_host() const;
- void set_valid_host(const ::std::string& value);
- void set_valid_host(const char* value);
- void set_valid_host(const char* value, size_t size);
- ::std::string* mutable_valid_host();
- ::std::string* release_valid_host();
- void set_allocated_valid_host(::std::string* valid_host);
-
- // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;
- bool has_original_request() const;
- void clear_original_request();
- static const int kOriginalRequestFieldNumber = 2;
- const ::grpc::reflection::v1alpha::ServerReflectionRequest& original_request() const;
- ::grpc::reflection::v1alpha::ServerReflectionRequest* mutable_original_request();
- ::grpc::reflection::v1alpha::ServerReflectionRequest* release_original_request();
- void set_allocated_original_request(::grpc::reflection::v1alpha::ServerReflectionRequest* original_request);
-
- // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4;
- bool has_file_descriptor_response() const;
- void clear_file_descriptor_response();
- static const int kFileDescriptorResponseFieldNumber = 4;
- const ::grpc::reflection::v1alpha::FileDescriptorResponse& file_descriptor_response() const;
- ::grpc::reflection::v1alpha::FileDescriptorResponse* mutable_file_descriptor_response();
- ::grpc::reflection::v1alpha::FileDescriptorResponse* release_file_descriptor_response();
- void set_allocated_file_descriptor_response(::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response);
-
- // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5;
- bool has_all_extension_numbers_response() const;
- void clear_all_extension_numbers_response();
- static const int kAllExtensionNumbersResponseFieldNumber = 5;
- const ::grpc::reflection::v1alpha::ExtensionNumberResponse& all_extension_numbers_response() const;
- ::grpc::reflection::v1alpha::ExtensionNumberResponse* mutable_all_extension_numbers_response();
- ::grpc::reflection::v1alpha::ExtensionNumberResponse* release_all_extension_numbers_response();
- void set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response);
-
- // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6;
- bool has_list_services_response() const;
- void clear_list_services_response();
- static const int kListServicesResponseFieldNumber = 6;
- const ::grpc::reflection::v1alpha::ListServiceResponse& list_services_response() const;
- ::grpc::reflection::v1alpha::ListServiceResponse* mutable_list_services_response();
- ::grpc::reflection::v1alpha::ListServiceResponse* release_list_services_response();
- void set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response);
-
- // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7;
- bool has_error_response() const;
- void clear_error_response();
- static const int kErrorResponseFieldNumber = 7;
- const ::grpc::reflection::v1alpha::ErrorResponse& error_response() const;
- ::grpc::reflection::v1alpha::ErrorResponse* mutable_error_response();
- ::grpc::reflection::v1alpha::ErrorResponse* release_error_response();
- void set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response);
-
- MessageResponseCase message_response_case() const;
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ServerReflectionResponse)
- private:
- inline void set_has_file_descriptor_response();
- inline void set_has_all_extension_numbers_response();
- inline void set_has_list_services_response();
- inline void set_has_error_response();
-
- inline bool has_message_response() const;
- void clear_message_response();
- inline void clear_has_message_response();
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::internal::ArenaStringPtr valid_host_;
- ::grpc::reflection::v1alpha::ServerReflectionRequest* original_request_;
- union MessageResponseUnion {
- MessageResponseUnion() {}
- ::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response_;
- ::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response_;
- ::grpc::reflection::v1alpha::ListServiceResponse* list_services_response_;
- ::grpc::reflection::v1alpha::ErrorResponse* error_response_;
- } message_response_;
- mutable int _cached_size_;
- ::google::protobuf::uint32 _oneof_case_[1];
-
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ServerReflectionResponse> ServerReflectionResponse_default_instance_;
-
-// -------------------------------------------------------------------
-
-class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.FileDescriptorResponse) */ {
- public:
- FileDescriptorResponse();
- virtual ~FileDescriptorResponse();
-
- FileDescriptorResponse(const FileDescriptorResponse& from);
-
- inline FileDescriptorResponse& operator=(const FileDescriptorResponse& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const FileDescriptorResponse& default_instance();
-
- static const FileDescriptorResponse* internal_default_instance();
-
- void Swap(FileDescriptorResponse* other);
-
- // implements Message ----------------------------------------------
-
- inline FileDescriptorResponse* New() const { return New(NULL); }
-
- FileDescriptorResponse* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const FileDescriptorResponse& from);
- void MergeFrom(const FileDescriptorResponse& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(FileDescriptorResponse* other);
- void UnsafeMergeFrom(const FileDescriptorResponse& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // repeated bytes file_descriptor_proto = 1;
- int file_descriptor_proto_size() const;
- void clear_file_descriptor_proto();
- static const int kFileDescriptorProtoFieldNumber = 1;
- const ::std::string& file_descriptor_proto(int index) const;
- ::std::string* mutable_file_descriptor_proto(int index);
- void set_file_descriptor_proto(int index, const ::std::string& value);
- void set_file_descriptor_proto(int index, const char* value);
- void set_file_descriptor_proto(int index, const void* value, size_t size);
- ::std::string* add_file_descriptor_proto();
- void add_file_descriptor_proto(const ::std::string& value);
- void add_file_descriptor_proto(const char* value);
- void add_file_descriptor_proto(const void* value, size_t size);
- const ::google::protobuf::RepeatedPtrField< ::std::string>& file_descriptor_proto() const;
- ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_file_descriptor_proto();
-
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.FileDescriptorResponse)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::RepeatedPtrField< ::std::string> file_descriptor_proto_;
- mutable int _cached_size_;
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<FileDescriptorResponse> FileDescriptorResponse_default_instance_;
-
-// -------------------------------------------------------------------
-
-class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ExtensionNumberResponse) */ {
- public:
- ExtensionNumberResponse();
- virtual ~ExtensionNumberResponse();
-
- ExtensionNumberResponse(const ExtensionNumberResponse& from);
-
- inline ExtensionNumberResponse& operator=(const ExtensionNumberResponse& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ExtensionNumberResponse& default_instance();
-
- static const ExtensionNumberResponse* internal_default_instance();
-
- void Swap(ExtensionNumberResponse* other);
-
- // implements Message ----------------------------------------------
-
- inline ExtensionNumberResponse* New() const { return New(NULL); }
-
- ExtensionNumberResponse* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ExtensionNumberResponse& from);
- void MergeFrom(const ExtensionNumberResponse& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ExtensionNumberResponse* other);
- void UnsafeMergeFrom(const ExtensionNumberResponse& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional string base_type_name = 1;
- void clear_base_type_name();
- static const int kBaseTypeNameFieldNumber = 1;
- const ::std::string& base_type_name() const;
- void set_base_type_name(const ::std::string& value);
- void set_base_type_name(const char* value);
- void set_base_type_name(const char* value, size_t size);
- ::std::string* mutable_base_type_name();
- ::std::string* release_base_type_name();
- void set_allocated_base_type_name(::std::string* base_type_name);
-
- // repeated int32 extension_number = 2;
- int extension_number_size() const;
- void clear_extension_number();
- static const int kExtensionNumberFieldNumber = 2;
- ::google::protobuf::int32 extension_number(int index) const;
- void set_extension_number(int index, ::google::protobuf::int32 value);
- void add_extension_number(::google::protobuf::int32 value);
- const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
- extension_number() const;
- ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
- mutable_extension_number();
-
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionNumberResponse)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::RepeatedField< ::google::protobuf::int32 > extension_number_;
- mutable int _extension_number_cached_byte_size_;
- ::google::protobuf::internal::ArenaStringPtr base_type_name_;
- mutable int _cached_size_;
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ExtensionNumberResponse> ExtensionNumberResponse_default_instance_;
-
-// -------------------------------------------------------------------
-
-class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ListServiceResponse) */ {
- public:
- ListServiceResponse();
- virtual ~ListServiceResponse();
-
- ListServiceResponse(const ListServiceResponse& from);
-
- inline ListServiceResponse& operator=(const ListServiceResponse& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ListServiceResponse& default_instance();
-
- static const ListServiceResponse* internal_default_instance();
-
- void Swap(ListServiceResponse* other);
-
- // implements Message ----------------------------------------------
-
- inline ListServiceResponse* New() const { return New(NULL); }
-
- ListServiceResponse* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ListServiceResponse& from);
- void MergeFrom(const ListServiceResponse& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ListServiceResponse* other);
- void UnsafeMergeFrom(const ListServiceResponse& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;
- int service_size() const;
- void clear_service();
- static const int kServiceFieldNumber = 1;
- const ::grpc::reflection::v1alpha::ServiceResponse& service(int index) const;
- ::grpc::reflection::v1alpha::ServiceResponse* mutable_service(int index);
- ::grpc::reflection::v1alpha::ServiceResponse* add_service();
- ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >*
- mutable_service();
- const ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >&
- service() const;
-
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ListServiceResponse)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse > service_;
- mutable int _cached_size_;
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ListServiceResponse> ListServiceResponse_default_instance_;
-
-// -------------------------------------------------------------------
-
-class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServiceResponse) */ {
- public:
- ServiceResponse();
- virtual ~ServiceResponse();
-
- ServiceResponse(const ServiceResponse& from);
-
- inline ServiceResponse& operator=(const ServiceResponse& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ServiceResponse& default_instance();
-
- static const ServiceResponse* internal_default_instance();
-
- void Swap(ServiceResponse* other);
-
- // implements Message ----------------------------------------------
-
- inline ServiceResponse* New() const { return New(NULL); }
-
- ServiceResponse* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ServiceResponse& from);
- void MergeFrom(const ServiceResponse& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ServiceResponse* other);
- void UnsafeMergeFrom(const ServiceResponse& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional string name = 1;
- void clear_name();
- static const int kNameFieldNumber = 1;
- const ::std::string& name() const;
- void set_name(const ::std::string& value);
- void set_name(const char* value);
- void set_name(const char* value, size_t size);
- ::std::string* mutable_name();
- ::std::string* release_name();
- void set_allocated_name(::std::string* name);
-
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ServiceResponse)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::internal::ArenaStringPtr name_;
- mutable int _cached_size_;
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ServiceResponse> ServiceResponse_default_instance_;
-
-// -------------------------------------------------------------------
-
-class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ErrorResponse) */ {
- public:
- ErrorResponse();
- virtual ~ErrorResponse();
-
- ErrorResponse(const ErrorResponse& from);
-
- inline ErrorResponse& operator=(const ErrorResponse& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ErrorResponse& default_instance();
-
- static const ErrorResponse* internal_default_instance();
-
- void Swap(ErrorResponse* other);
-
- // implements Message ----------------------------------------------
-
- inline ErrorResponse* New() const { return New(NULL); }
-
- ErrorResponse* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ErrorResponse& from);
- void MergeFrom(const ErrorResponse& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ErrorResponse* other);
- void UnsafeMergeFrom(const ErrorResponse& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional int32 error_code = 1;
- void clear_error_code();
- static const int kErrorCodeFieldNumber = 1;
- ::google::protobuf::int32 error_code() const;
- void set_error_code(::google::protobuf::int32 value);
-
- // optional string error_message = 2;
- void clear_error_message();
- static const int kErrorMessageFieldNumber = 2;
- const ::std::string& error_message() const;
- void set_error_message(const ::std::string& value);
- void set_error_message(const char* value);
- void set_error_message(const char* value, size_t size);
- ::std::string* mutable_error_message();
- ::std::string* release_error_message();
- void set_allocated_error_message(::std::string* error_message);
-
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ErrorResponse)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::internal::ArenaStringPtr error_message_;
- ::google::protobuf::int32 error_code_;
- mutable int _cached_size_;
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ErrorResponse> ErrorResponse_default_instance_;
-
-// ===================================================================
-
-
-// ===================================================================
-
-#if !PROTOBUF_INLINE_NOT_IN_HEADERS
-// ServerReflectionRequest
-
-// optional string host = 1;
-inline void ServerReflectionRequest::clear_host() {
- host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& ServerReflectionRequest::host() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.host)
- return host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ServerReflectionRequest::set_host(const ::std::string& value) {
-
- host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-}
-inline void ServerReflectionRequest::set_host(const char* value) {
-
- host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-}
-inline void ServerReflectionRequest::set_host(const char* value, size_t size) {
-
- host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-}
-inline ::std::string* ServerReflectionRequest::mutable_host() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.host)
- return host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServerReflectionRequest::release_host() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-
- return host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ServerReflectionRequest::set_allocated_host(::std::string* host) {
- if (host != NULL) {
-
- } else {
-
- }
- host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), host);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-}
-
-// optional string file_by_filename = 3;
-inline bool ServerReflectionRequest::has_file_by_filename() const {
- return message_request_case() == kFileByFilename;
-}
-inline void ServerReflectionRequest::set_has_file_by_filename() {
- _oneof_case_[0] = kFileByFilename;
-}
-inline void ServerReflectionRequest::clear_file_by_filename() {
- if (has_file_by_filename()) {
- message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_message_request();
- }
-}
-inline const ::std::string& ServerReflectionRequest::file_by_filename() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
- if (has_file_by_filename()) {
- return message_request_.file_by_filename_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-inline void ServerReflectionRequest::set_file_by_filename(const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
- if (!has_file_by_filename()) {
- clear_message_request();
- set_has_file_by_filename();
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
-}
-inline void ServerReflectionRequest::set_file_by_filename(const char* value) {
- if (!has_file_by_filename()) {
- clear_message_request();
- set_has_file_by_filename();
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
-}
-inline void ServerReflectionRequest::set_file_by_filename(const char* value, size_t size) {
- if (!has_file_by_filename()) {
- clear_message_request();
- set_has_file_by_filename();
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
-}
-inline ::std::string* ServerReflectionRequest::mutable_file_by_filename() {
- if (!has_file_by_filename()) {
- clear_message_request();
- set_has_file_by_filename();
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
- return message_request_.file_by_filename_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServerReflectionRequest::release_file_by_filename() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
- if (has_file_by_filename()) {
- clear_has_message_request();
- return message_request_.file_by_filename_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionRequest::set_allocated_file_by_filename(::std::string* file_by_filename) {
- if (!has_file_by_filename()) {
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_message_request();
- if (file_by_filename != NULL) {
- set_has_file_by_filename();
- message_request_.file_by_filename_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- file_by_filename);
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
-}
-
-// optional string file_containing_symbol = 4;
-inline bool ServerReflectionRequest::has_file_containing_symbol() const {
- return message_request_case() == kFileContainingSymbol;
-}
-inline void ServerReflectionRequest::set_has_file_containing_symbol() {
- _oneof_case_[0] = kFileContainingSymbol;
-}
-inline void ServerReflectionRequest::clear_file_containing_symbol() {
- if (has_file_containing_symbol()) {
- message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_message_request();
- }
-}
-inline const ::std::string& ServerReflectionRequest::file_containing_symbol() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
- if (has_file_containing_symbol()) {
- return message_request_.file_containing_symbol_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-inline void ServerReflectionRequest::set_file_containing_symbol(const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
- if (!has_file_containing_symbol()) {
- clear_message_request();
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
-}
-inline void ServerReflectionRequest::set_file_containing_symbol(const char* value) {
- if (!has_file_containing_symbol()) {
- clear_message_request();
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
-}
-inline void ServerReflectionRequest::set_file_containing_symbol(const char* value, size_t size) {
- if (!has_file_containing_symbol()) {
- clear_message_request();
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
-}
-inline ::std::string* ServerReflectionRequest::mutable_file_containing_symbol() {
- if (!has_file_containing_symbol()) {
- clear_message_request();
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
- return message_request_.file_containing_symbol_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServerReflectionRequest::release_file_containing_symbol() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
- if (has_file_containing_symbol()) {
- clear_has_message_request();
- return message_request_.file_containing_symbol_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionRequest::set_allocated_file_containing_symbol(::std::string* file_containing_symbol) {
- if (!has_file_containing_symbol()) {
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_message_request();
- if (file_containing_symbol != NULL) {
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- file_containing_symbol);
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
-}
-
-// optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5;
-inline bool ServerReflectionRequest::has_file_containing_extension() const {
- return message_request_case() == kFileContainingExtension;
-}
-inline void ServerReflectionRequest::set_has_file_containing_extension() {
- _oneof_case_[0] = kFileContainingExtension;
-}
-inline void ServerReflectionRequest::clear_file_containing_extension() {
- if (has_file_containing_extension()) {
- delete message_request_.file_containing_extension_;
- clear_has_message_request();
- }
-}
-inline const ::grpc::reflection::v1alpha::ExtensionRequest& ServerReflectionRequest::file_containing_extension() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension)
- return has_file_containing_extension()
- ? *message_request_.file_containing_extension_
- : ::grpc::reflection::v1alpha::ExtensionRequest::default_instance();
-}
-inline ::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::mutable_file_containing_extension() {
- if (!has_file_containing_extension()) {
- clear_message_request();
- set_has_file_containing_extension();
- message_request_.file_containing_extension_ = new ::grpc::reflection::v1alpha::ExtensionRequest;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension)
- return message_request_.file_containing_extension_;
-}
-inline ::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::release_file_containing_extension() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension)
- if (has_file_containing_extension()) {
- clear_has_message_request();
- ::grpc::reflection::v1alpha::ExtensionRequest* temp = message_request_.file_containing_extension_;
- message_request_.file_containing_extension_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionRequest::set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension) {
- clear_message_request();
- if (file_containing_extension) {
- set_has_file_containing_extension();
- message_request_.file_containing_extension_ = file_containing_extension;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension)
-}
-
-// optional string all_extension_numbers_of_type = 6;
-inline bool ServerReflectionRequest::has_all_extension_numbers_of_type() const {
- return message_request_case() == kAllExtensionNumbersOfType;
-}
-inline void ServerReflectionRequest::set_has_all_extension_numbers_of_type() {
- _oneof_case_[0] = kAllExtensionNumbersOfType;
-}
-inline void ServerReflectionRequest::clear_all_extension_numbers_of_type() {
- if (has_all_extension_numbers_of_type()) {
- message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_message_request();
- }
-}
-inline const ::std::string& ServerReflectionRequest::all_extension_numbers_of_type() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
- if (has_all_extension_numbers_of_type()) {
- return message_request_.all_extension_numbers_of_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-inline void ServerReflectionRequest::set_all_extension_numbers_of_type(const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
- if (!has_all_extension_numbers_of_type()) {
- clear_message_request();
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
-}
-inline void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value) {
- if (!has_all_extension_numbers_of_type()) {
- clear_message_request();
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
-}
-inline void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value, size_t size) {
- if (!has_all_extension_numbers_of_type()) {
- clear_message_request();
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
-}
-inline ::std::string* ServerReflectionRequest::mutable_all_extension_numbers_of_type() {
- if (!has_all_extension_numbers_of_type()) {
- clear_message_request();
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
- return message_request_.all_extension_numbers_of_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServerReflectionRequest::release_all_extension_numbers_of_type() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
- if (has_all_extension_numbers_of_type()) {
- clear_has_message_request();
- return message_request_.all_extension_numbers_of_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionRequest::set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type) {
- if (!has_all_extension_numbers_of_type()) {
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_message_request();
- if (all_extension_numbers_of_type != NULL) {
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- all_extension_numbers_of_type);
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
-}
-
-// optional string list_services = 7;
-inline bool ServerReflectionRequest::has_list_services() const {
- return message_request_case() == kListServices;
-}
-inline void ServerReflectionRequest::set_has_list_services() {
- _oneof_case_[0] = kListServices;
-}
-inline void ServerReflectionRequest::clear_list_services() {
- if (has_list_services()) {
- message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_message_request();
- }
-}
-inline const ::std::string& ServerReflectionRequest::list_services() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
- if (has_list_services()) {
- return message_request_.list_services_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-inline void ServerReflectionRequest::set_list_services(const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
- if (!has_list_services()) {
- clear_message_request();
- set_has_list_services();
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
-}
-inline void ServerReflectionRequest::set_list_services(const char* value) {
- if (!has_list_services()) {
- clear_message_request();
- set_has_list_services();
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
-}
-inline void ServerReflectionRequest::set_list_services(const char* value, size_t size) {
- if (!has_list_services()) {
- clear_message_request();
- set_has_list_services();
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
-}
-inline ::std::string* ServerReflectionRequest::mutable_list_services() {
- if (!has_list_services()) {
- clear_message_request();
- set_has_list_services();
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
- return message_request_.list_services_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServerReflectionRequest::release_list_services() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
- if (has_list_services()) {
- clear_has_message_request();
- return message_request_.list_services_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionRequest::set_allocated_list_services(::std::string* list_services) {
- if (!has_list_services()) {
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_message_request();
- if (list_services != NULL) {
- set_has_list_services();
- message_request_.list_services_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- list_services);
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
-}
-
-inline bool ServerReflectionRequest::has_message_request() const {
- return message_request_case() != MESSAGE_REQUEST_NOT_SET;
-}
-inline void ServerReflectionRequest::clear_has_message_request() {
- _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET;
-}
-inline ServerReflectionRequest::MessageRequestCase ServerReflectionRequest::message_request_case() const {
- return ServerReflectionRequest::MessageRequestCase(_oneof_case_[0]);
-}
-inline const ServerReflectionRequest* ServerReflectionRequest::internal_default_instance() {
- return &ServerReflectionRequest_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// ExtensionRequest
-
-// optional string containing_type = 1;
-inline void ExtensionRequest::clear_containing_type() {
- containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& ExtensionRequest::containing_type() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
- return containing_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ExtensionRequest::set_containing_type(const ::std::string& value) {
-
- containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-}
-inline void ExtensionRequest::set_containing_type(const char* value) {
-
- containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-}
-inline void ExtensionRequest::set_containing_type(const char* value, size_t size) {
-
- containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-}
-inline ::std::string* ExtensionRequest::mutable_containing_type() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
- return containing_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ExtensionRequest::release_containing_type() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-
- return containing_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ExtensionRequest::set_allocated_containing_type(::std::string* containing_type) {
- if (containing_type != NULL) {
-
- } else {
-
- }
- containing_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), containing_type);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-}
-
-// optional int32 extension_number = 2;
-inline void ExtensionRequest::clear_extension_number() {
- extension_number_ = 0;
-}
-inline ::google::protobuf::int32 ExtensionRequest::extension_number() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.extension_number)
- return extension_number_;
-}
-inline void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) {
-
- extension_number_ = value;
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number)
-}
-
-inline const ExtensionRequest* ExtensionRequest::internal_default_instance() {
- return &ExtensionRequest_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// ServerReflectionResponse
-
-// optional string valid_host = 1;
-inline void ServerReflectionResponse::clear_valid_host() {
- valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& ServerReflectionResponse::valid_host() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
- return valid_host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ServerReflectionResponse::set_valid_host(const ::std::string& value) {
-
- valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-}
-inline void ServerReflectionResponse::set_valid_host(const char* value) {
-
- valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-}
-inline void ServerReflectionResponse::set_valid_host(const char* value, size_t size) {
-
- valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-}
-inline ::std::string* ServerReflectionResponse::mutable_valid_host() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
- return valid_host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServerReflectionResponse::release_valid_host() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-
- return valid_host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ServerReflectionResponse::set_allocated_valid_host(::std::string* valid_host) {
- if (valid_host != NULL) {
-
- } else {
-
- }
- valid_host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), valid_host);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-}
-
-// optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;
-inline bool ServerReflectionResponse::has_original_request() const {
- return this != internal_default_instance() && original_request_ != NULL;
-}
-inline void ServerReflectionResponse::clear_original_request() {
- if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_;
- original_request_ = NULL;
-}
-inline const ::grpc::reflection::v1alpha::ServerReflectionRequest& ServerReflectionResponse::original_request() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
- return original_request_ != NULL ? *original_request_
- : *::grpc::reflection::v1alpha::ServerReflectionRequest::internal_default_instance();
-}
-inline ::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::mutable_original_request() {
-
- if (original_request_ == NULL) {
- original_request_ = new ::grpc::reflection::v1alpha::ServerReflectionRequest;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
- return original_request_;
-}
-inline ::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::release_original_request() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
-
- ::grpc::reflection::v1alpha::ServerReflectionRequest* temp = original_request_;
- original_request_ = NULL;
- return temp;
-}
-inline void ServerReflectionResponse::set_allocated_original_request(::grpc::reflection::v1alpha::ServerReflectionRequest* original_request) {
- delete original_request_;
- original_request_ = original_request;
- if (original_request) {
-
- } else {
-
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
-}
-
-// optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4;
-inline bool ServerReflectionResponse::has_file_descriptor_response() const {
- return message_response_case() == kFileDescriptorResponse;
-}
-inline void ServerReflectionResponse::set_has_file_descriptor_response() {
- _oneof_case_[0] = kFileDescriptorResponse;
-}
-inline void ServerReflectionResponse::clear_file_descriptor_response() {
- if (has_file_descriptor_response()) {
- delete message_response_.file_descriptor_response_;
- clear_has_message_response();
- }
-}
-inline const ::grpc::reflection::v1alpha::FileDescriptorResponse& ServerReflectionResponse::file_descriptor_response() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response)
- return has_file_descriptor_response()
- ? *message_response_.file_descriptor_response_
- : ::grpc::reflection::v1alpha::FileDescriptorResponse::default_instance();
-}
-inline ::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::mutable_file_descriptor_response() {
- if (!has_file_descriptor_response()) {
- clear_message_response();
- set_has_file_descriptor_response();
- message_response_.file_descriptor_response_ = new ::grpc::reflection::v1alpha::FileDescriptorResponse;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response)
- return message_response_.file_descriptor_response_;
-}
-inline ::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::release_file_descriptor_response() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response)
- if (has_file_descriptor_response()) {
- clear_has_message_response();
- ::grpc::reflection::v1alpha::FileDescriptorResponse* temp = message_response_.file_descriptor_response_;
- message_response_.file_descriptor_response_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionResponse::set_allocated_file_descriptor_response(::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response) {
- clear_message_response();
- if (file_descriptor_response) {
- set_has_file_descriptor_response();
- message_response_.file_descriptor_response_ = file_descriptor_response;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response)
-}
-
-// optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5;
-inline bool ServerReflectionResponse::has_all_extension_numbers_response() const {
- return message_response_case() == kAllExtensionNumbersResponse;
-}
-inline void ServerReflectionResponse::set_has_all_extension_numbers_response() {
- _oneof_case_[0] = kAllExtensionNumbersResponse;
-}
-inline void ServerReflectionResponse::clear_all_extension_numbers_response() {
- if (has_all_extension_numbers_response()) {
- delete message_response_.all_extension_numbers_response_;
- clear_has_message_response();
- }
-}
-inline const ::grpc::reflection::v1alpha::ExtensionNumberResponse& ServerReflectionResponse::all_extension_numbers_response() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response)
- return has_all_extension_numbers_response()
- ? *message_response_.all_extension_numbers_response_
- : ::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance();
-}
-inline ::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::mutable_all_extension_numbers_response() {
- if (!has_all_extension_numbers_response()) {
- clear_message_response();
- set_has_all_extension_numbers_response();
- message_response_.all_extension_numbers_response_ = new ::grpc::reflection::v1alpha::ExtensionNumberResponse;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response)
- return message_response_.all_extension_numbers_response_;
-}
-inline ::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::release_all_extension_numbers_response() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response)
- if (has_all_extension_numbers_response()) {
- clear_has_message_response();
- ::grpc::reflection::v1alpha::ExtensionNumberResponse* temp = message_response_.all_extension_numbers_response_;
- message_response_.all_extension_numbers_response_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionResponse::set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response) {
- clear_message_response();
- if (all_extension_numbers_response) {
- set_has_all_extension_numbers_response();
- message_response_.all_extension_numbers_response_ = all_extension_numbers_response;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response)
-}
-
-// optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6;
-inline bool ServerReflectionResponse::has_list_services_response() const {
- return message_response_case() == kListServicesResponse;
-}
-inline void ServerReflectionResponse::set_has_list_services_response() {
- _oneof_case_[0] = kListServicesResponse;
-}
-inline void ServerReflectionResponse::clear_list_services_response() {
- if (has_list_services_response()) {
- delete message_response_.list_services_response_;
- clear_has_message_response();
- }
-}
-inline const ::grpc::reflection::v1alpha::ListServiceResponse& ServerReflectionResponse::list_services_response() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response)
- return has_list_services_response()
- ? *message_response_.list_services_response_
- : ::grpc::reflection::v1alpha::ListServiceResponse::default_instance();
-}
-inline ::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::mutable_list_services_response() {
- if (!has_list_services_response()) {
- clear_message_response();
- set_has_list_services_response();
- message_response_.list_services_response_ = new ::grpc::reflection::v1alpha::ListServiceResponse;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response)
- return message_response_.list_services_response_;
-}
-inline ::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::release_list_services_response() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response)
- if (has_list_services_response()) {
- clear_has_message_response();
- ::grpc::reflection::v1alpha::ListServiceResponse* temp = message_response_.list_services_response_;
- message_response_.list_services_response_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionResponse::set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response) {
- clear_message_response();
- if (list_services_response) {
- set_has_list_services_response();
- message_response_.list_services_response_ = list_services_response;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response)
-}
-
-// optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7;
-inline bool ServerReflectionResponse::has_error_response() const {
- return message_response_case() == kErrorResponse;
-}
-inline void ServerReflectionResponse::set_has_error_response() {
- _oneof_case_[0] = kErrorResponse;
-}
-inline void ServerReflectionResponse::clear_error_response() {
- if (has_error_response()) {
- delete message_response_.error_response_;
- clear_has_message_response();
- }
-}
-inline const ::grpc::reflection::v1alpha::ErrorResponse& ServerReflectionResponse::error_response() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.error_response)
- return has_error_response()
- ? *message_response_.error_response_
- : ::grpc::reflection::v1alpha::ErrorResponse::default_instance();
-}
-inline ::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::mutable_error_response() {
- if (!has_error_response()) {
- clear_message_response();
- set_has_error_response();
- message_response_.error_response_ = new ::grpc::reflection::v1alpha::ErrorResponse;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.error_response)
- return message_response_.error_response_;
-}
-inline ::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::release_error_response() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.error_response)
- if (has_error_response()) {
- clear_has_message_response();
- ::grpc::reflection::v1alpha::ErrorResponse* temp = message_response_.error_response_;
- message_response_.error_response_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionResponse::set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response) {
- clear_message_response();
- if (error_response) {
- set_has_error_response();
- message_response_.error_response_ = error_response;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.error_response)
-}
-
-inline bool ServerReflectionResponse::has_message_response() const {
- return message_response_case() != MESSAGE_RESPONSE_NOT_SET;
-}
-inline void ServerReflectionResponse::clear_has_message_response() {
- _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET;
-}
-inline ServerReflectionResponse::MessageResponseCase ServerReflectionResponse::message_response_case() const {
- return ServerReflectionResponse::MessageResponseCase(_oneof_case_[0]);
-}
-inline const ServerReflectionResponse* ServerReflectionResponse::internal_default_instance() {
- return &ServerReflectionResponse_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// FileDescriptorResponse
-
-// repeated bytes file_descriptor_proto = 1;
-inline int FileDescriptorResponse::file_descriptor_proto_size() const {
- return file_descriptor_proto_.size();
-}
-inline void FileDescriptorResponse::clear_file_descriptor_proto() {
- file_descriptor_proto_.Clear();
-}
-inline const ::std::string& FileDescriptorResponse::file_descriptor_proto(int index) const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return file_descriptor_proto_.Get(index);
-}
-inline ::std::string* FileDescriptorResponse::mutable_file_descriptor_proto(int index) {
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return file_descriptor_proto_.Mutable(index);
-}
-inline void FileDescriptorResponse::set_file_descriptor_proto(int index, const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- file_descriptor_proto_.Mutable(index)->assign(value);
-}
-inline void FileDescriptorResponse::set_file_descriptor_proto(int index, const char* value) {
- file_descriptor_proto_.Mutable(index)->assign(value);
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-inline void FileDescriptorResponse::set_file_descriptor_proto(int index, const void* value, size_t size) {
- file_descriptor_proto_.Mutable(index)->assign(
- reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-inline ::std::string* FileDescriptorResponse::add_file_descriptor_proto() {
- // @@protoc_insertion_point(field_add_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return file_descriptor_proto_.Add();
-}
-inline void FileDescriptorResponse::add_file_descriptor_proto(const ::std::string& value) {
- file_descriptor_proto_.Add()->assign(value);
- // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-inline void FileDescriptorResponse::add_file_descriptor_proto(const char* value) {
- file_descriptor_proto_.Add()->assign(value);
- // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-inline void FileDescriptorResponse::add_file_descriptor_proto(const void* value, size_t size) {
- file_descriptor_proto_.Add()->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
-FileDescriptorResponse::file_descriptor_proto() const {
- // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return file_descriptor_proto_;
-}
-inline ::google::protobuf::RepeatedPtrField< ::std::string>*
-FileDescriptorResponse::mutable_file_descriptor_proto() {
- // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return &file_descriptor_proto_;
-}
-
-inline const FileDescriptorResponse* FileDescriptorResponse::internal_default_instance() {
- return &FileDescriptorResponse_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// ExtensionNumberResponse
-
-// optional string base_type_name = 1;
-inline void ExtensionNumberResponse::clear_base_type_name() {
- base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& ExtensionNumberResponse::base_type_name() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
- return base_type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ExtensionNumberResponse::set_base_type_name(const ::std::string& value) {
-
- base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-}
-inline void ExtensionNumberResponse::set_base_type_name(const char* value) {
-
- base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-}
-inline void ExtensionNumberResponse::set_base_type_name(const char* value, size_t size) {
-
- base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-}
-inline ::std::string* ExtensionNumberResponse::mutable_base_type_name() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
- return base_type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ExtensionNumberResponse::release_base_type_name() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-
- return base_type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ExtensionNumberResponse::set_allocated_base_type_name(::std::string* base_type_name) {
- if (base_type_name != NULL) {
-
- } else {
-
- }
- base_type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), base_type_name);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-}
-
-// repeated int32 extension_number = 2;
-inline int ExtensionNumberResponse::extension_number_size() const {
- return extension_number_.size();
-}
-inline void ExtensionNumberResponse::clear_extension_number() {
- extension_number_.Clear();
-}
-inline ::google::protobuf::int32 ExtensionNumberResponse::extension_number(int index) const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
- return extension_number_.Get(index);
-}
-inline void ExtensionNumberResponse::set_extension_number(int index, ::google::protobuf::int32 value) {
- extension_number_.Set(index, value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
-}
-inline void ExtensionNumberResponse::add_extension_number(::google::protobuf::int32 value) {
- extension_number_.Add(value);
- // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
-ExtensionNumberResponse::extension_number() const {
- // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
- return extension_number_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
-ExtensionNumberResponse::mutable_extension_number() {
- // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
- return &extension_number_;
-}
-
-inline const ExtensionNumberResponse* ExtensionNumberResponse::internal_default_instance() {
- return &ExtensionNumberResponse_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// ListServiceResponse
-
-// repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;
-inline int ListServiceResponse::service_size() const {
- return service_.size();
-}
-inline void ListServiceResponse::clear_service() {
- service_.Clear();
-}
-inline const ::grpc::reflection::v1alpha::ServiceResponse& ListServiceResponse::service(int index) const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.service)
- return service_.Get(index);
-}
-inline ::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::mutable_service(int index) {
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.service)
- return service_.Mutable(index);
-}
-inline ::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::add_service() {
- // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.service)
- return service_.Add();
-}
-inline ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >*
-ListServiceResponse::mutable_service() {
- // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.service)
- return &service_;
-}
-inline const ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >&
-ListServiceResponse::service() const {
- // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.service)
- return service_;
-}
-
-inline const ListServiceResponse* ListServiceResponse::internal_default_instance() {
- return &ListServiceResponse_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// ServiceResponse
-
-// optional string name = 1;
-inline void ServiceResponse::clear_name() {
- name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& ServiceResponse::name() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServiceResponse.name)
- return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ServiceResponse::set_name(const ::std::string& value) {
-
- name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServiceResponse.name)
-}
-inline void ServiceResponse::set_name(const char* value) {
-
- name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServiceResponse.name)
-}
-inline void ServiceResponse::set_name(const char* value, size_t size) {
-
- name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServiceResponse.name)
-}
-inline ::std::string* ServiceResponse::mutable_name() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServiceResponse.name)
- return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServiceResponse::release_name() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServiceResponse.name)
-
- return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ServiceResponse::set_allocated_name(::std::string* name) {
- if (name != NULL) {
-
- } else {
-
- }
- name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServiceResponse.name)
-}
-
-inline const ServiceResponse* ServiceResponse::internal_default_instance() {
- return &ServiceResponse_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// ErrorResponse
-
-// optional int32 error_code = 1;
-inline void ErrorResponse::clear_error_code() {
- error_code_ = 0;
-}
-inline ::google::protobuf::int32 ErrorResponse::error_code() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_code)
- return error_code_;
-}
-inline void ErrorResponse::set_error_code(::google::protobuf::int32 value) {
-
- error_code_ = value;
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_code)
-}
-
-// optional string error_message = 2;
-inline void ErrorResponse::clear_error_message() {
- error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& ErrorResponse::error_message() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_message)
- return error_message_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ErrorResponse::set_error_message(const ::std::string& value) {
-
- error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_message)
-}
-inline void ErrorResponse::set_error_message(const char* value) {
-
- error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ErrorResponse.error_message)
-}
-inline void ErrorResponse::set_error_message(const char* value, size_t size) {
-
- error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ErrorResponse.error_message)
-}
-inline ::std::string* ErrorResponse::mutable_error_message() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ErrorResponse.error_message)
- return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ErrorResponse::release_error_message() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ErrorResponse.error_message)
-
- return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ErrorResponse::set_allocated_error_message(::std::string* error_message) {
- if (error_message != NULL) {
-
- } else {
-
- }
- error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message)
-}
-
-inline const ErrorResponse* ErrorResponse::internal_default_instance() {
- return &ErrorResponse_default_instance_.get();
-}
-#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace v1alpha
-} // namespace reflection
-} // namespace grpc
-
-// @@protoc_insertion_point(global_scope)
-
-#endif // PROTOBUF_reflection_2eproto__INCLUDED
diff --git a/include/grpc++/generic/async_generic_service.h b/include/grpc++/generic/async_generic_service.h
index 24bae52145..66a5d01d96 100644
--- a/include/grpc++/generic/async_generic_service.h
+++ b/include/grpc++/generic/async_generic_service.h
@@ -44,7 +44,7 @@ namespace grpc {
typedef ServerAsyncReaderWriter<ByteBuffer, ByteBuffer>
GenericServerAsyncReaderWriter;
-class GenericServerContext GRPC_FINAL : public ServerContext {
+class GenericServerContext final : public ServerContext {
public:
const grpc::string& method() const { return method_; }
const grpc::string& host() const { return host_; }
@@ -57,7 +57,7 @@ class GenericServerContext GRPC_FINAL : public ServerContext {
grpc::string host_;
};
-class AsyncGenericService GRPC_FINAL {
+class AsyncGenericService final {
public:
AsyncGenericService() : server_(nullptr) {}
diff --git a/include/grpc++/generic/generic_stub.h b/include/grpc++/generic/generic_stub.h
index d27deae33a..02c00d0d45 100644
--- a/include/grpc++/generic/generic_stub.h
+++ b/include/grpc++/generic/generic_stub.h
@@ -45,7 +45,7 @@ typedef ClientAsyncReaderWriter<ByteBuffer, ByteBuffer>
// Generic stubs provide a type-unsafe interface to call gRPC methods
// by name.
-class GenericStub GRPC_FINAL {
+class GenericStub final {
public:
explicit GenericStub(std::shared_ptr<ChannelInterface> channel)
: channel_(channel) {}
diff --git a/include/grpc++/grpc++.h b/include/grpc++/grpc++.h
index afb1c555bb..36d65d6ee1 100644
--- a/include/grpc++/grpc++.h
+++ b/include/grpc++/grpc++.h
@@ -67,4 +67,8 @@
#include <grpc++/server_posix.h>
// IWYU pragma: end_exports
+namespace grpc {
+grpc::string Version();
+} // namespace grpc
+
#endif // GRPCXX_GRPCXX_H
diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h
index 70533aa4d9..1a5cbbd45d 100644
--- a/include/grpc++/impl/codegen/async_stream.h
+++ b/include/grpc++/impl/codegen/async_stream.h
@@ -108,7 +108,7 @@ class ClientAsyncReaderInterface : public ClientAsyncStreamingInterface,
public AsyncReaderInterface<R> {};
template <class R>
-class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface<R> {
+class ClientAsyncReader final : public ClientAsyncReaderInterface<R> {
public:
/// Create a stream and write the first request out.
template <class W>
@@ -125,7 +125,7 @@ class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface<R> {
call_.PerformOps(&init_ops_);
}
- void ReadInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void ReadInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
meta_ops_.set_output_tag(tag);
@@ -133,7 +133,7 @@ class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface<R> {
call_.PerformOps(&meta_ops_);
}
- void Read(R* msg, void* tag) GRPC_OVERRIDE {
+ void Read(R* msg, void* tag) override {
read_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
read_ops_.RecvInitialMetadata(context_);
@@ -142,7 +142,7 @@ class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface<R> {
call_.PerformOps(&read_ops_);
}
- void Finish(Status* status, void* tag) GRPC_OVERRIDE {
+ void Finish(Status* status, void* tag) override {
finish_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
finish_ops_.RecvInitialMetadata(context_);
@@ -174,7 +174,7 @@ class ClientAsyncWriterInterface : public ClientAsyncStreamingInterface,
};
template <class W>
-class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface<W> {
+class ClientAsyncWriter final : public ClientAsyncWriterInterface<W> {
public:
template <class R>
ClientAsyncWriter(ChannelInterface* channel, CompletionQueue* cq,
@@ -190,7 +190,7 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface<W> {
call_.PerformOps(&init_ops_);
}
- void ReadInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void ReadInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
meta_ops_.set_output_tag(tag);
@@ -198,20 +198,20 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface<W> {
call_.PerformOps(&meta_ops_);
}
- void Write(const W& msg, void* tag) GRPC_OVERRIDE {
+ void Write(const W& msg, void* tag) override {
write_ops_.set_output_tag(tag);
// TODO(ctiller): don't assert
GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok());
call_.PerformOps(&write_ops_);
}
- void WritesDone(void* tag) GRPC_OVERRIDE {
+ void WritesDone(void* tag) override {
writes_done_ops_.set_output_tag(tag);
writes_done_ops_.ClientSendClose();
call_.PerformOps(&writes_done_ops_);
}
- void Finish(Status* status, void* tag) GRPC_OVERRIDE {
+ void Finish(Status* status, void* tag) override {
finish_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
finish_ops_.RecvInitialMetadata(context_);
@@ -246,7 +246,7 @@ class ClientAsyncReaderWriterInterface : public ClientAsyncStreamingInterface,
};
template <class W, class R>
-class ClientAsyncReaderWriter GRPC_FINAL
+class ClientAsyncReaderWriter final
: public ClientAsyncReaderWriterInterface<W, R> {
public:
ClientAsyncReaderWriter(ChannelInterface* channel, CompletionQueue* cq,
@@ -259,7 +259,7 @@ class ClientAsyncReaderWriter GRPC_FINAL
call_.PerformOps(&init_ops_);
}
- void ReadInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void ReadInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
meta_ops_.set_output_tag(tag);
@@ -267,7 +267,7 @@ class ClientAsyncReaderWriter GRPC_FINAL
call_.PerformOps(&meta_ops_);
}
- void Read(R* msg, void* tag) GRPC_OVERRIDE {
+ void Read(R* msg, void* tag) override {
read_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
read_ops_.RecvInitialMetadata(context_);
@@ -276,20 +276,20 @@ class ClientAsyncReaderWriter GRPC_FINAL
call_.PerformOps(&read_ops_);
}
- void Write(const W& msg, void* tag) GRPC_OVERRIDE {
+ void Write(const W& msg, void* tag) override {
write_ops_.set_output_tag(tag);
// TODO(ctiller): don't assert
GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok());
call_.PerformOps(&write_ops_);
}
- void WritesDone(void* tag) GRPC_OVERRIDE {
+ void WritesDone(void* tag) override {
writes_done_ops_.set_output_tag(tag);
writes_done_ops_.ClientSendClose();
call_.PerformOps(&writes_done_ops_);
}
- void Finish(Status* status, void* tag) GRPC_OVERRIDE {
+ void Finish(Status* status, void* tag) override {
finish_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
finish_ops_.RecvInitialMetadata(context_);
@@ -319,12 +319,12 @@ class ServerAsyncReaderInterface : public ServerAsyncStreamingInterface,
};
template <class W, class R>
-class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface<W, R> {
+class ServerAsyncReader final : public ServerAsyncReaderInterface<W, R> {
public:
explicit ServerAsyncReader(ServerContext* ctx)
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {}
- void SendInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void SendInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
meta_ops_.set_output_tag(tag);
@@ -337,13 +337,13 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface<W, R> {
call_.PerformOps(&meta_ops_);
}
- void Read(R* msg, void* tag) GRPC_OVERRIDE {
+ void Read(R* msg, void* tag) override {
read_ops_.set_output_tag(tag);
read_ops_.RecvMessage(msg);
call_.PerformOps(&read_ops_);
}
- void Finish(const W& msg, const Status& status, void* tag) GRPC_OVERRIDE {
+ void Finish(const W& msg, const Status& status, void* tag) override {
finish_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_,
@@ -363,7 +363,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface<W, R> {
call_.PerformOps(&finish_ops_);
}
- void FinishWithError(const Status& status, void* tag) GRPC_OVERRIDE {
+ void FinishWithError(const Status& status, void* tag) override {
GPR_CODEGEN_ASSERT(!status.ok());
finish_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
@@ -379,7 +379,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface<W, R> {
}
private:
- void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; }
+ void BindCall(Call* call) override { call_ = *call; }
Call call_;
ServerContext* ctx_;
@@ -398,12 +398,12 @@ class ServerAsyncWriterInterface : public ServerAsyncStreamingInterface,
};
template <class W>
-class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface<W> {
+class ServerAsyncWriter final : public ServerAsyncWriterInterface<W> {
public:
explicit ServerAsyncWriter(ServerContext* ctx)
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {}
- void SendInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void SendInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
meta_ops_.set_output_tag(tag);
@@ -416,7 +416,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface<W> {
call_.PerformOps(&meta_ops_);
}
- void Write(const W& msg, void* tag) GRPC_OVERRIDE {
+ void Write(const W& msg, void* tag) override {
write_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
write_ops_.SendInitialMetadata(ctx_->initial_metadata_,
@@ -431,7 +431,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface<W> {
call_.PerformOps(&write_ops_);
}
- void Finish(const Status& status, void* tag) GRPC_OVERRIDE {
+ void Finish(const Status& status, void* tag) override {
finish_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_,
@@ -446,7 +446,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface<W> {
}
private:
- void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; }
+ void BindCall(Call* call) override { call_ = *call; }
Call call_;
ServerContext* ctx_;
@@ -465,13 +465,13 @@ class ServerAsyncReaderWriterInterface : public ServerAsyncStreamingInterface,
};
template <class W, class R>
-class ServerAsyncReaderWriter GRPC_FINAL
+class ServerAsyncReaderWriter final
: public ServerAsyncReaderWriterInterface<W, R> {
public:
explicit ServerAsyncReaderWriter(ServerContext* ctx)
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {}
- void SendInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void SendInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
meta_ops_.set_output_tag(tag);
@@ -484,13 +484,13 @@ class ServerAsyncReaderWriter GRPC_FINAL
call_.PerformOps(&meta_ops_);
}
- void Read(R* msg, void* tag) GRPC_OVERRIDE {
+ void Read(R* msg, void* tag) override {
read_ops_.set_output_tag(tag);
read_ops_.RecvMessage(msg);
call_.PerformOps(&read_ops_);
}
- void Write(const W& msg, void* tag) GRPC_OVERRIDE {
+ void Write(const W& msg, void* tag) override {
write_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
write_ops_.SendInitialMetadata(ctx_->initial_metadata_,
@@ -505,7 +505,7 @@ class ServerAsyncReaderWriter GRPC_FINAL
call_.PerformOps(&write_ops_);
}
- void Finish(const Status& status, void* tag) GRPC_OVERRIDE {
+ void Finish(const Status& status, void* tag) override {
finish_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_,
@@ -522,7 +522,7 @@ class ServerAsyncReaderWriter GRPC_FINAL
private:
friend class ::grpc::Server;
- void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; }
+ void BindCall(Call* call) override { call_ = *call; }
Call call_;
ServerContext* ctx_;
diff --git a/include/grpc++/impl/codegen/async_unary_call.h b/include/grpc++/impl/codegen/async_unary_call.h
index 87c94d6507..b77a16b699 100644
--- a/include/grpc++/impl/codegen/async_unary_call.h
+++ b/include/grpc++/impl/codegen/async_unary_call.h
@@ -55,7 +55,7 @@ class ClientAsyncResponseReaderInterface {
};
template <class R>
-class ClientAsyncResponseReader GRPC_FINAL
+class ClientAsyncResponseReader final
: public ClientAsyncResponseReaderInterface<R> {
public:
template <class W>
@@ -113,13 +113,12 @@ class ClientAsyncResponseReader GRPC_FINAL
};
template <class W>
-class ServerAsyncResponseWriter GRPC_FINAL
- : public ServerAsyncStreamingInterface {
+class ServerAsyncResponseWriter final : public ServerAsyncStreamingInterface {
public:
explicit ServerAsyncResponseWriter(ServerContext* ctx)
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {}
- void SendInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void SendInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
meta_buf_.set_output_tag(tag);
@@ -168,7 +167,7 @@ class ServerAsyncResponseWriter GRPC_FINAL
}
private:
- void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; }
+ void BindCall(Call* call) override { call_ = *call; }
Call call_;
ServerContext* ctx_;
diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h
index e211373e7d..6ab00612f6 100644
--- a/include/grpc++/impl/codegen/call.h
+++ b/include/grpc++/impl/codegen/call.h
@@ -337,16 +337,16 @@ class DeserializeFunc {
};
template <class R>
-class DeserializeFuncType GRPC_FINAL : public DeserializeFunc {
+class DeserializeFuncType final : public DeserializeFunc {
public:
DeserializeFuncType(R* message) : message_(message) {}
Status Deserialize(grpc_byte_buffer* buf,
- int max_receive_message_size) GRPC_OVERRIDE {
+ int max_receive_message_size) override {
return SerializationTraits<R>::Deserialize(buf, message_,
max_receive_message_size);
}
- ~DeserializeFuncType() GRPC_OVERRIDE {}
+ ~DeserializeFuncType() override {}
private:
R* message_; // Not a managed pointer because management is external to this
@@ -603,7 +603,7 @@ class CallOpSet : public CallOpSetInterface,
public Op6 {
public:
CallOpSet() : return_tag_(this) {}
- void FillOps(grpc_op* ops, size_t* nops) GRPC_OVERRIDE {
+ void FillOps(grpc_op* ops, size_t* nops) override {
this->Op1::AddOp(ops, nops);
this->Op2::AddOp(ops, nops);
this->Op3::AddOp(ops, nops);
@@ -612,7 +612,7 @@ class CallOpSet : public CallOpSetInterface,
this->Op6::AddOp(ops, nops);
}
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE {
+ bool FinalizeResult(void** tag, bool* status) override {
this->Op1::FinishOp(status, max_receive_message_size_);
this->Op2::FinishOp(status, max_receive_message_size_);
this->Op3::FinishOp(status, max_receive_message_size_);
@@ -639,14 +639,14 @@ template <class Op1 = CallNoOp<1>, class Op2 = CallNoOp<2>,
class Op5 = CallNoOp<5>, class Op6 = CallNoOp<6>>
class SneakyCallOpSet : public CallOpSet<Op1, Op2, Op3, Op4, Op5, Op6> {
public:
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE {
+ bool FinalizeResult(void** tag, bool* status) override {
typedef CallOpSet<Op1, Op2, Op3, Op4, Op5, Op6> Base;
return Base::FinalizeResult(tag, status) && false;
}
};
// Straightforward wrapping of the C call object
-class Call GRPC_FINAL {
+class Call final {
public:
/* call is owned by the caller */
Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq)
diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h
index a330ed06bb..777b2f8847 100644
--- a/include/grpc++/impl/codegen/client_context.h
+++ b/include/grpc++/impl/codegen/client_context.h
@@ -51,6 +51,7 @@
#include <map>
#include <memory>
+#include <mutex>
#include <string>
#include <grpc++/impl/codegen/config.h>
@@ -59,7 +60,6 @@
#include <grpc++/impl/codegen/security/auth_context.h>
#include <grpc++/impl/codegen/status.h>
#include <grpc++/impl/codegen/string_ref.h>
-#include <grpc++/impl/codegen/sync.h>
#include <grpc++/impl/codegen/time.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/propagation_bits.h>
@@ -235,12 +235,10 @@ class ClientContext {
/// DEPRECATED: Use set_wait_for_ready() instead.
void set_fail_fast(bool fail_fast) { set_wait_for_ready(!fail_fast); }
-#ifndef GRPC_CXX0X_NO_CHRONO
/// Return the deadline for the client call.
std::chrono::system_clock::time_point deadline() const {
return Timespec2Timepoint(deadline_);
}
-#endif // !GRPC_CXX0X_NO_CHRONO
/// Return a \a gpr_timespec representation of the client call's deadline.
gpr_timespec raw_deadline() const { return deadline_; }
@@ -368,7 +366,7 @@ class ClientContext {
bool idempotent_;
bool cacheable_;
std::shared_ptr<Channel> channel_;
- grpc::mutex mu_;
+ std::mutex mu_;
grpc_call* call_;
bool call_canceled_;
gpr_timespec deadline_;
diff --git a/include/grpc++/impl/codegen/config.h b/include/grpc++/impl/codegen/config.h
index 0c75438868..af3ee5a4cf 100644
--- a/include/grpc++/impl/codegen/config.h
+++ b/include/grpc++/impl/codegen/config.h
@@ -34,80 +34,6 @@
#ifndef GRPCXX_IMPL_CODEGEN_CONFIG_H
#define GRPCXX_IMPL_CODEGEN_CONFIG_H
-#if !defined(GRPC_NO_AUTODETECT_PLATFORM)
-
-#ifdef _MSC_VER
-// Visual Studio 2010 is 1600.
-#if _MSC_VER < 1600
-#error "gRPC is only supported with Visual Studio starting at 2010"
-// Visual Studio 2013 is 1800.
-#elif _MSC_VER < 1800
-#define GRPC_CXX0X_NO_FINAL 1
-#define GRPC_CXX0X_NO_OVERRIDE 1
-#define GRPC_CXX0X_NO_CHRONO 1
-#define GRPC_CXX0X_NO_THREAD 1
-#endif
-#endif // Visual Studio
-
-#ifndef __clang__
-#ifdef __GNUC__
-// nullptr was added in gcc 4.6
-#if (__GNUC__ * 100 + __GNUC_MINOR__ < 406)
-#define GRPC_CXX0X_NO_NULLPTR 1
-#define GRPC_CXX0X_LIMITED_TOSTRING 1
-#endif
-// final and override were added in gcc 4.7
-#if (__GNUC__ * 100 + __GNUC_MINOR__ < 407)
-#define GRPC_CXX0X_NO_FINAL 1
-#define GRPC_CXX0X_NO_OVERRIDE 1
-#endif
-#endif
-#endif
-
-#endif
-
-#ifdef GRPC_CXX0X_NO_FINAL
-#define GRPC_FINAL
-#else
-#define GRPC_FINAL final
-#endif
-
-#ifdef GRPC_CXX0X_NO_OVERRIDE
-#define GRPC_OVERRIDE
-#else
-#define GRPC_OVERRIDE override
-#endif
-
-#ifdef GRPC_CXX0X_NO_NULLPTR
-#include <functional>
-#include <memory>
-namespace grpc {
-const class {
- public:
- template <class T>
- operator T *() const {
- return static_cast<T *>(0);
- }
- template <class T>
- operator std::unique_ptr<T>() const {
- return std::unique_ptr<T>(static_cast<T *>(0));
- }
- template <class T>
- operator std::shared_ptr<T>() const {
- return std::shared_ptr<T>(static_cast<T *>(0));
- }
- operator bool() const { return false; }
- template <class F>
- operator std::function<F>() const {
- return std::function<F>();
- }
-
- private:
- void operator&() const = delete;
-} nullptr = {};
-}
-#endif
-
#ifndef GRPC_CUSTOM_STRING
#include <string>
#define GRPC_CUSTOM_STRING std::string
@@ -117,16 +43,7 @@ namespace grpc {
typedef GRPC_CUSTOM_STRING string;
-#ifdef GRPC_CXX0X_LIMITED_TOSTRING
-inline grpc::string to_string(const int x) {
- return std::to_string(static_cast<const long long int>(x));
-}
-inline grpc::string to_string(const unsigned int x) {
- return std::to_string(static_cast<const long long unsigned int>(x));
-}
-#else
using std::to_string;
-#endif
} // namespace grpc
diff --git a/include/grpc++/impl/codegen/core_codegen.h b/include/grpc++/impl/codegen/core_codegen.h
index 0ce009e69d..aff88ffa07 100644
--- a/include/grpc++/impl/codegen/core_codegen.h
+++ b/include/grpc++/impl/codegen/core_codegen.h
@@ -45,56 +45,53 @@ namespace grpc {
/// Implementation of the core codegen interface.
class CoreCodegen : public CoreCodegenInterface {
private:
- grpc_completion_queue* grpc_completion_queue_create(void* reserved)
- GRPC_OVERRIDE;
- void grpc_completion_queue_destroy(grpc_completion_queue* cq) GRPC_OVERRIDE;
+ grpc_completion_queue* grpc_completion_queue_create(void* reserved) override;
+ void grpc_completion_queue_destroy(grpc_completion_queue* cq) override;
grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag,
gpr_timespec deadline,
- void* reserved) GRPC_OVERRIDE;
+ void* reserved) override;
- void* gpr_malloc(size_t size) GRPC_OVERRIDE;
- void gpr_free(void* p) GRPC_OVERRIDE;
+ void* gpr_malloc(size_t size) override;
+ void gpr_free(void* p) override;
- void gpr_mu_init(gpr_mu* mu) GRPC_OVERRIDE;
- void gpr_mu_destroy(gpr_mu* mu) GRPC_OVERRIDE;
- void gpr_mu_lock(gpr_mu* mu) GRPC_OVERRIDE;
- void gpr_mu_unlock(gpr_mu* mu) GRPC_OVERRIDE;
- void gpr_cv_init(gpr_cv* cv) GRPC_OVERRIDE;
- void gpr_cv_destroy(gpr_cv* cv) GRPC_OVERRIDE;
- int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu,
- gpr_timespec abs_deadline) GRPC_OVERRIDE;
- void gpr_cv_signal(gpr_cv* cv) GRPC_OVERRIDE;
- void gpr_cv_broadcast(gpr_cv* cv) GRPC_OVERRIDE;
+ void gpr_mu_init(gpr_mu* mu) override;
+ void gpr_mu_destroy(gpr_mu* mu) override;
+ void gpr_mu_lock(gpr_mu* mu) override;
+ void gpr_mu_unlock(gpr_mu* mu) override;
+ void gpr_cv_init(gpr_cv* cv) override;
+ void gpr_cv_destroy(gpr_cv* cv) override;
+ int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu, gpr_timespec abs_deadline) override;
+ void gpr_cv_signal(gpr_cv* cv) override;
+ void gpr_cv_broadcast(gpr_cv* cv) override;
- void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) GRPC_OVERRIDE;
+ void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override;
int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
- grpc_byte_buffer* buffer) GRPC_OVERRIDE;
- void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader* reader)
- GRPC_OVERRIDE;
+ grpc_byte_buffer* buffer) override;
+ void grpc_byte_buffer_reader_destroy(
+ grpc_byte_buffer_reader* reader) override;
int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader,
- gpr_slice* slice) GRPC_OVERRIDE;
+ gpr_slice* slice) override;
grpc_byte_buffer* grpc_raw_byte_buffer_create(gpr_slice* slice,
- size_t nslices) GRPC_OVERRIDE;
+ size_t nslices) override;
- gpr_slice gpr_slice_malloc(size_t length) GRPC_OVERRIDE;
- void gpr_slice_unref(gpr_slice slice) GRPC_OVERRIDE;
- gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) GRPC_OVERRIDE;
- void gpr_slice_buffer_add(gpr_slice_buffer* sb,
- gpr_slice slice) GRPC_OVERRIDE;
- void gpr_slice_buffer_pop(gpr_slice_buffer* sb) GRPC_OVERRIDE;
+ gpr_slice gpr_slice_malloc(size_t length) override;
+ void gpr_slice_unref(gpr_slice slice) override;
+ gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) override;
+ void gpr_slice_buffer_add(gpr_slice_buffer* sb, gpr_slice slice) override;
+ void gpr_slice_buffer_pop(gpr_slice_buffer* sb) override;
- void grpc_metadata_array_init(grpc_metadata_array* array) GRPC_OVERRIDE;
- void grpc_metadata_array_destroy(grpc_metadata_array* array) GRPC_OVERRIDE;
+ void grpc_metadata_array_init(grpc_metadata_array* array) override;
+ void grpc_metadata_array_destroy(grpc_metadata_array* array) override;
- gpr_timespec gpr_inf_future(gpr_clock_type type) GRPC_OVERRIDE;
- gpr_timespec gpr_time_0(gpr_clock_type type) GRPC_OVERRIDE;
+ gpr_timespec gpr_inf_future(gpr_clock_type type) override;
+ gpr_timespec gpr_time_0(gpr_clock_type type) override;
- virtual const Status& ok() GRPC_OVERRIDE;
- virtual const Status& cancelled() GRPC_OVERRIDE;
+ virtual const Status& ok() override;
+ virtual const Status& cancelled() override;
- void assert_fail(const char* failed_assertion) GRPC_OVERRIDE;
+ void assert_fail(const char* failed_assertion) override;
};
} // namespace grpc
diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h
index bb992f0e18..d5d27e15cd 100644
--- a/include/grpc++/impl/codegen/method_handler_impl.h
+++ b/include/grpc++/impl/codegen/method_handler_impl.h
@@ -50,7 +50,7 @@ class RpcMethodHandler : public MethodHandler {
ServiceType* service)
: func_(func), service_(service) {}
- void RunHandler(const HandlerParameter& param) GRPC_FINAL {
+ void RunHandler(const HandlerParameter& param) final {
RequestType req;
Status status = SerializationTraits<RequestType>::Deserialize(
param.request, &req, param.max_receive_message_size);
@@ -96,7 +96,7 @@ class ClientStreamingHandler : public MethodHandler {
ServiceType* service)
: func_(func), service_(service) {}
- void RunHandler(const HandlerParameter& param) GRPC_FINAL {
+ void RunHandler(const HandlerParameter& param) final {
ServerReader<RequestType> reader(param.call, param.server_context);
ResponseType rsp;
Status status = func_(service_, param.server_context, &reader, &rsp);
@@ -136,7 +136,7 @@ class ServerStreamingHandler : public MethodHandler {
ServiceType* service)
: func_(func), service_(service) {}
- void RunHandler(const HandlerParameter& param) GRPC_FINAL {
+ void RunHandler(const HandlerParameter& param) final {
RequestType req;
Status status = SerializationTraits<RequestType>::Deserialize(
param.request, &req, param.max_receive_message_size);
@@ -180,7 +180,7 @@ class TemplatedBidiStreamingHandler : public MethodHandler {
std::function<Status(ServerContext*, Streamer*)> func)
: func_(func), write_needed_(WriteNeeded) {}
- void RunHandler(const HandlerParameter& param) GRPC_FINAL {
+ void RunHandler(const HandlerParameter& param) final {
Streamer stream(param.call, param.server_context);
Status status = func_(param.server_context, &stream);
@@ -266,7 +266,7 @@ class UnknownMethodHandler : public MethodHandler {
ops->ServerSendStatus(context->trailing_metadata_, status);
}
- void RunHandler(const HandlerParameter& param) GRPC_FINAL {
+ void RunHandler(const HandlerParameter& param) final {
CallOpSet<CallOpSendInitialMetadata, CallOpServerSendStatus> ops;
FillOps(param.server_context, &ops);
param.call->PerformOps(&ops);
diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h
index 6f4786b87b..cbaa3e7bf2 100644
--- a/include/grpc++/impl/codegen/proto_utils.h
+++ b/include/grpc++/impl/codegen/proto_utils.h
@@ -52,7 +52,7 @@ namespace internal {
const int kGrpcBufferWriterMaxBufferLength = 8192;
-class GrpcBufferWriter GRPC_FINAL
+class GrpcBufferWriter final
: public ::grpc::protobuf::io::ZeroCopyOutputStream {
public:
explicit GrpcBufferWriter(grpc_byte_buffer** bp, int block_size)
@@ -61,13 +61,13 @@ class GrpcBufferWriter GRPC_FINAL
slice_buffer_ = &(*bp)->data.raw.slice_buffer;
}
- ~GrpcBufferWriter() GRPC_OVERRIDE {
+ ~GrpcBufferWriter() override {
if (have_backup_) {
g_core_codegen_interface->gpr_slice_unref(backup_slice_);
}
}
- bool Next(void** data, int* size) GRPC_OVERRIDE {
+ bool Next(void** data, int* size) override {
if (have_backup_) {
slice_ = backup_slice_;
have_backup_ = false;
@@ -82,7 +82,7 @@ class GrpcBufferWriter GRPC_FINAL
return true;
}
- void BackUp(int count) GRPC_OVERRIDE {
+ void BackUp(int count) override {
g_core_codegen_interface->gpr_slice_buffer_pop(slice_buffer_);
if (count == block_size_) {
backup_slice_ = slice_;
@@ -95,7 +95,7 @@ class GrpcBufferWriter GRPC_FINAL
byte_count_ -= count;
}
- grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { return byte_count_; }
+ grpc::protobuf::int64 ByteCount() const override { return byte_count_; }
private:
const int block_size_;
@@ -106,7 +106,7 @@ class GrpcBufferWriter GRPC_FINAL
gpr_slice slice_;
};
-class GrpcBufferReader GRPC_FINAL
+class GrpcBufferReader final
: public ::grpc::protobuf::io::ZeroCopyInputStream {
public:
explicit GrpcBufferReader(grpc_byte_buffer* buffer)
@@ -117,11 +117,11 @@ class GrpcBufferReader GRPC_FINAL
"Couldn't initialize byte buffer reader");
}
}
- ~GrpcBufferReader() GRPC_OVERRIDE {
+ ~GrpcBufferReader() override {
g_core_codegen_interface->grpc_byte_buffer_reader_destroy(&reader_);
}
- bool Next(const void** data, int* size) GRPC_OVERRIDE {
+ bool Next(const void** data, int* size) override {
if (!status_.ok()) {
return false;
}
@@ -147,9 +147,9 @@ class GrpcBufferReader GRPC_FINAL
Status status() const { return status_; }
- void BackUp(int count) GRPC_OVERRIDE { backup_count_ = count; }
+ void BackUp(int count) override { backup_count_ = count; }
- bool Skip(int count) GRPC_OVERRIDE {
+ bool Skip(int count) override {
const void* data;
int size;
while (Next(&data, &size)) {
@@ -164,7 +164,7 @@ class GrpcBufferReader GRPC_FINAL
return false;
}
- grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE {
+ grpc::protobuf::int64 ByteCount() const override {
return byte_count_ - backup_count_;
}
diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h
index ddf50b019d..dd30576379 100644
--- a/include/grpc++/impl/codegen/server_context.h
+++ b/include/grpc++/impl/codegen/server_context.h
@@ -94,11 +94,9 @@ class ServerContext {
ServerContext(); // for async calls
~ServerContext();
-#ifndef GRPC_CXX0X_NO_CHRONO
std::chrono::system_clock::time_point deadline() const {
return Timespec2Timepoint(deadline_);
}
-#endif // !GRPC_CXX0X_NO_CHRONO
gpr_timespec raw_deadline() const { return deadline_; }
diff --git a/include/grpc++/impl/codegen/server_interface.h b/include/grpc++/impl/codegen/server_interface.h
index 5c41ca51b4..41a64bead0 100644
--- a/include/grpc++/impl/codegen/server_interface.h
+++ b/include/grpc++/impl/codegen/server_interface.h
@@ -142,7 +142,7 @@ class ServerInterface : public CallHook {
bool delete_on_finalize);
virtual ~BaseAsyncRequest() {}
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE;
+ bool FinalizeResult(void** tag, bool* status) override;
protected:
ServerInterface* const server_;
@@ -168,7 +168,7 @@ class ServerInterface : public CallHook {
ServerCompletionQueue* notification_cq);
};
- class NoPayloadAsyncRequest GRPC_FINAL : public RegisteredAsyncRequest {
+ class NoPayloadAsyncRequest final : public RegisteredAsyncRequest {
public:
NoPayloadAsyncRequest(void* registered_method, ServerInterface* server,
ServerContext* context,
@@ -183,7 +183,7 @@ class ServerInterface : public CallHook {
};
template <class Message>
- class PayloadAsyncRequest GRPC_FINAL : public RegisteredAsyncRequest {
+ class PayloadAsyncRequest final : public RegisteredAsyncRequest {
public:
PayloadAsyncRequest(void* registered_method, ServerInterface* server,
ServerContext* context,
@@ -196,7 +196,7 @@ class ServerInterface : public CallHook {
IssueRequest(registered_method, &payload_, notification_cq);
}
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE {
+ bool FinalizeResult(void** tag, bool* status) override {
bool serialization_status =
*status && payload_ &&
SerializationTraits<Message>::Deserialize(
@@ -220,7 +220,7 @@ class ServerInterface : public CallHook {
ServerCompletionQueue* notification_cq, void* tag,
bool delete_on_finalize);
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE;
+ bool FinalizeResult(void** tag, bool* status) override;
private:
grpc_call_details call_details_;
diff --git a/include/grpc++/impl/codegen/sync_no_cxx11.h b/include/grpc++/impl/codegen/sync_no_cxx11.h
deleted file mode 100644
index 87a6594f7d..0000000000
--- a/include/grpc++/impl/codegen/sync_no_cxx11.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *
- * 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.
- *
- */
-
-#ifndef GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H
-#define GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H
-
-#include <grpc++/impl/codegen/core_codegen_interface.h>
-
-namespace grpc {
-
-extern CoreCodegenInterface *g_core_codegen_interface;
-
-template <class mutex>
-class lock_guard;
-class condition_variable;
-
-class mutex {
- public:
- mutex() { g_core_codegen_interface->gpr_mu_init(&mu_); }
- ~mutex() { g_core_codegen_interface->gpr_mu_destroy(&mu_); }
-
- private:
- ::gpr_mu mu_;
- template <class mutex>
- friend class lock_guard;
- friend class condition_variable;
-};
-
-template <class mutex>
-class lock_guard {
- public:
- lock_guard(mutex &mu) : mu_(mu), locked(true) {
- g_core_codegen_interface->gpr_mu_lock(&mu.mu_);
- }
- ~lock_guard() { unlock_internal(); }
-
- protected:
- void lock_internal() {
- if (!locked) g_core_codegen_interface->gpr_mu_lock(&mu_.mu_);
- locked = true;
- }
- void unlock_internal() {
- if (locked) g_core_codegen_interface->gpr_mu_unlock(&mu_.mu_);
- locked = false;
- }
-
- private:
- mutex &mu_;
- bool locked;
- friend class condition_variable;
-};
-
-template <class mutex>
-class unique_lock : public lock_guard<mutex> {
- public:
- unique_lock(mutex &mu) : lock_guard<mutex>(mu) {}
- void lock() { this->lock_internal(); }
- void unlock() { this->unlock_internal(); }
-};
-
-class condition_variable {
- public:
- condition_variable() { g_core_codegen_interface->gpr_cv_init(&cv_); }
- ~condition_variable() { g_core_codegen_interface->gpr_cv_destroy(&cv_); }
- void wait(lock_guard<mutex> &mu) {
- mu.locked = false;
- g_core_codegen_interface->gpr_cv_wait(
- &cv_, &mu.mu_.mu_,
- g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_REALTIME));
- mu.locked = true;
- }
- void notify_one() { g_core_codegen_interface->gpr_cv_signal(&cv_); }
- void notify_all() { g_core_codegen_interface->gpr_cv_broadcast(&cv_); }
-
- private:
- gpr_cv cv_;
-};
-
-} // namespace grpc
-
-#endif // GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H
diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h
index 9a3efb5119..4d9b074e95 100644
--- a/include/grpc++/impl/codegen/sync_stream.h
+++ b/include/grpc++/impl/codegen/sync_stream.h
@@ -131,7 +131,7 @@ class ClientReaderInterface : public ClientStreamingInterface,
};
template <class R>
-class ClientReader GRPC_FINAL : public ClientReaderInterface<R> {
+class ClientReader final : public ClientReaderInterface<R> {
public:
/// Blocking create a stream and write the first request out.
template <class W>
@@ -150,7 +150,7 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface<R> {
cq_.Pluck(&ops);
}
- void WaitForInitialMetadata() GRPC_OVERRIDE {
+ void WaitForInitialMetadata() override {
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
CallOpSet<CallOpRecvInitialMetadata> ops;
@@ -159,12 +159,12 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface<R> {
cq_.Pluck(&ops); /// status ignored
}
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ bool NextMessageSize(uint32_t* sz) override {
*sz = call_.max_receive_message_size();
return true;
}
- bool Read(R* msg) GRPC_OVERRIDE {
+ bool Read(R* msg) override {
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops;
if (!context_->initial_metadata_received_) {
ops.RecvInitialMetadata(context_);
@@ -174,7 +174,7 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface<R> {
return cq_.Pluck(&ops) && ops.got_message;
}
- Status Finish() GRPC_OVERRIDE {
+ Status Finish() override {
CallOpSet<CallOpClientRecvStatus> ops;
Status status;
ops.ClientRecvStatus(context_, &status);
@@ -230,7 +230,7 @@ class ClientWriter : public ClientWriterInterface<W> {
}
using WriterInterface<W>::Write;
- bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE {
+ bool Write(const W& msg, const WriteOptions& options) override {
CallOpSet<CallOpSendMessage> ops;
if (!ops.SendMessage(msg, options).ok()) {
return false;
@@ -239,7 +239,7 @@ class ClientWriter : public ClientWriterInterface<W> {
return cq_.Pluck(&ops);
}
- bool WritesDone() GRPC_OVERRIDE {
+ bool WritesDone() override {
CallOpSet<CallOpClientSendClose> ops;
ops.ClientSendClose();
call_.PerformOps(&ops);
@@ -247,7 +247,7 @@ class ClientWriter : public ClientWriterInterface<W> {
}
/// Read the final response and wait for the final status.
- Status Finish() GRPC_OVERRIDE {
+ Status Finish() override {
Status status;
if (!context_->initial_metadata_received_) {
finish_ops_.RecvInitialMetadata(context_);
@@ -287,7 +287,7 @@ class ClientReaderWriterInterface : public ClientStreamingInterface,
};
template <class W, class R>
-class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> {
+class ClientReaderWriter final : public ClientReaderWriterInterface<W, R> {
public:
/// Blocking create a stream.
ClientReaderWriter(ChannelInterface* channel, const RpcMethod& method,
@@ -300,7 +300,7 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> {
cq_.Pluck(&ops);
}
- void WaitForInitialMetadata() GRPC_OVERRIDE {
+ void WaitForInitialMetadata() override {
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
CallOpSet<CallOpRecvInitialMetadata> ops;
@@ -309,12 +309,12 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> {
cq_.Pluck(&ops); // status ignored
}
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ bool NextMessageSize(uint32_t* sz) override {
*sz = call_.max_receive_message_size();
return true;
}
- bool Read(R* msg) GRPC_OVERRIDE {
+ bool Read(R* msg) override {
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops;
if (!context_->initial_metadata_received_) {
ops.RecvInitialMetadata(context_);
@@ -325,21 +325,21 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> {
}
using WriterInterface<W>::Write;
- bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE {
+ bool Write(const W& msg, const WriteOptions& options) override {
CallOpSet<CallOpSendMessage> ops;
if (!ops.SendMessage(msg, options).ok()) return false;
call_.PerformOps(&ops);
return cq_.Pluck(&ops);
}
- bool WritesDone() GRPC_OVERRIDE {
+ bool WritesDone() override {
CallOpSet<CallOpClientSendClose> ops;
ops.ClientSendClose();
call_.PerformOps(&ops);
return cq_.Pluck(&ops);
}
- Status Finish() GRPC_OVERRIDE {
+ Status Finish() override {
CallOpSet<CallOpRecvInitialMetadata, CallOpClientRecvStatus> ops;
if (!context_->initial_metadata_received_) {
ops.RecvInitialMetadata(context_);
@@ -363,11 +363,11 @@ class ServerReaderInterface : public ServerStreamingInterface,
public ReaderInterface<R> {};
template <class R>
-class ServerReader GRPC_FINAL : public ServerReaderInterface<R> {
+class ServerReader final : public ServerReaderInterface<R> {
public:
ServerReader(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {}
- void SendInitialMetadata() GRPC_OVERRIDE {
+ void SendInitialMetadata() override {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
CallOpSet<CallOpSendInitialMetadata> ops;
@@ -381,12 +381,12 @@ class ServerReader GRPC_FINAL : public ServerReaderInterface<R> {
call_->cq()->Pluck(&ops);
}
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ bool NextMessageSize(uint32_t* sz) override {
*sz = call_->max_receive_message_size();
return true;
}
- bool Read(R* msg) GRPC_OVERRIDE {
+ bool Read(R* msg) override {
CallOpSet<CallOpRecvMessage<R>> ops;
ops.RecvMessage(msg);
call_->PerformOps(&ops);
@@ -404,11 +404,11 @@ class ServerWriterInterface : public ServerStreamingInterface,
public WriterInterface<W> {};
template <class W>
-class ServerWriter GRPC_FINAL : public ServerWriterInterface<W> {
+class ServerWriter final : public ServerWriterInterface<W> {
public:
ServerWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {}
- void SendInitialMetadata() GRPC_OVERRIDE {
+ void SendInitialMetadata() override {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
CallOpSet<CallOpSendInitialMetadata> ops;
@@ -423,7 +423,7 @@ class ServerWriter GRPC_FINAL : public ServerWriterInterface<W> {
}
using WriterInterface<W>::Write;
- bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE {
+ bool Write(const W& msg, const WriteOptions& options) override {
CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> ops;
if (!ops.SendMessage(msg, options).ok()) {
return false;
@@ -454,7 +454,7 @@ class ServerReaderWriterInterface : public ServerStreamingInterface,
// Actual implementation of bi-directional streaming
namespace internal {
template <class W, class R>
-class ServerReaderWriterBody GRPC_FINAL {
+class ServerReaderWriterBody final {
public:
ServerReaderWriterBody(Call* call, ServerContext* ctx)
: call_(call), ctx_(ctx) {}
@@ -510,20 +510,20 @@ class ServerReaderWriterBody GRPC_FINAL {
// class to represent the user API for a bidirectional streaming call
template <class W, class R>
-class ServerReaderWriter GRPC_FINAL : public ServerReaderWriterInterface<W, R> {
+class ServerReaderWriter final : public ServerReaderWriterInterface<W, R> {
public:
ServerReaderWriter(Call* call, ServerContext* ctx) : body_(call, ctx) {}
- void SendInitialMetadata() GRPC_OVERRIDE { body_.SendInitialMetadata(); }
+ void SendInitialMetadata() override { body_.SendInitialMetadata(); }
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ bool NextMessageSize(uint32_t* sz) override {
return body_.NextMessageSize(sz);
}
- bool Read(R* msg) GRPC_OVERRIDE { return body_.Read(msg); }
+ bool Read(R* msg) override { return body_.Read(msg); }
using WriterInterface<W>::Write;
- bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE {
+ bool Write(const W& msg, const WriteOptions& options) override {
return body_.Write(msg, options);
}
@@ -541,19 +541,19 @@ class ServerReaderWriter GRPC_FINAL : public ServerReaderWriterInterface<W, R> {
/// must have exactly 1 Read and exactly 1 Write, in that order, to function
/// correctly. Otherwise, the RPC is in error.
template <class RequestType, class ResponseType>
-class ServerUnaryStreamer GRPC_FINAL
+class ServerUnaryStreamer final
: public ServerReaderWriterInterface<ResponseType, RequestType> {
public:
ServerUnaryStreamer(Call* call, ServerContext* ctx)
: body_(call, ctx), read_done_(false), write_done_(false) {}
- void SendInitialMetadata() GRPC_OVERRIDE { body_.SendInitialMetadata(); }
+ void SendInitialMetadata() override { body_.SendInitialMetadata(); }
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ bool NextMessageSize(uint32_t* sz) override {
return body_.NextMessageSize(sz);
}
- bool Read(RequestType* request) GRPC_OVERRIDE {
+ bool Read(RequestType* request) override {
if (read_done_) {
return false;
}
@@ -563,7 +563,7 @@ class ServerUnaryStreamer GRPC_FINAL
using WriterInterface<ResponseType>::Write;
bool Write(const ResponseType& response,
- const WriteOptions& options) GRPC_OVERRIDE {
+ const WriteOptions& options) override {
if (write_done_ || !read_done_) {
return false;
}
@@ -583,19 +583,19 @@ class ServerUnaryStreamer GRPC_FINAL
/// but the server responds to it as though it were a bidi streaming call that
/// must first have exactly 1 Read and then any number of Writes.
template <class RequestType, class ResponseType>
-class ServerSplitStreamer GRPC_FINAL
+class ServerSplitStreamer final
: public ServerReaderWriterInterface<ResponseType, RequestType> {
public:
ServerSplitStreamer(Call* call, ServerContext* ctx)
: body_(call, ctx), read_done_(false) {}
- void SendInitialMetadata() GRPC_OVERRIDE { body_.SendInitialMetadata(); }
+ void SendInitialMetadata() override { body_.SendInitialMetadata(); }
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ bool NextMessageSize(uint32_t* sz) override {
return body_.NextMessageSize(sz);
}
- bool Read(RequestType* request) GRPC_OVERRIDE {
+ bool Read(RequestType* request) override {
if (read_done_) {
return false;
}
@@ -605,7 +605,7 @@ class ServerSplitStreamer GRPC_FINAL
using WriterInterface<ResponseType>::Write;
bool Write(const ResponseType& response,
- const WriteOptions& options) GRPC_OVERRIDE {
+ const WriteOptions& options) override {
return read_done_ && body_.Write(response, options);
}
diff --git a/include/grpc++/impl/codegen/time.h b/include/grpc++/impl/codegen/time.h
index 87c5112d0d..e090ece756 100644
--- a/include/grpc++/impl/codegen/time.h
+++ b/include/grpc++/impl/codegen/time.h
@@ -75,8 +75,6 @@ class TimePoint<gpr_timespec> {
} // namespace grpc
-#ifndef GRPC_CXX0X_NO_CHRONO
-
#include <chrono>
#include <grpc/impl/codegen/grpc_types.h>
@@ -106,6 +104,4 @@ class TimePoint<std::chrono::system_clock::time_point> {
} // namespace grpc
-#endif // !GRPC_CXX0X_NO_CHRONO
-
#endif // GRPCXX_IMPL_CODEGEN_TIME_H
diff --git a/include/grpc++/impl/grpc_library.h b/include/grpc++/impl/grpc_library.h
index 1184d1bf09..ee1d0a9750 100644
--- a/include/grpc++/impl/grpc_library.h
+++ b/include/grpc++/impl/grpc_library.h
@@ -44,17 +44,17 @@
namespace grpc {
namespace internal {
-class GrpcLibrary GRPC_FINAL : public GrpcLibraryInterface {
+class GrpcLibrary final : public GrpcLibraryInterface {
public:
- void init() GRPC_OVERRIDE { grpc_init(); }
- void shutdown() GRPC_OVERRIDE { grpc_shutdown(); }
+ void init() override { grpc_init(); }
+ void shutdown() override { grpc_shutdown(); }
};
static GrpcLibrary g_gli;
static CoreCodegen g_core_codegen;
/// Instantiating this class ensures the proper initialization of gRPC.
-class GrpcLibraryInitializer GRPC_FINAL {
+class GrpcLibraryInitializer final {
public:
GrpcLibraryInitializer() {
if (grpc::g_glip == nullptr) {
diff --git a/include/grpc++/impl/sync.h b/include/grpc++/impl/sync.h
deleted file mode 100644
index 3339cddba4..0000000000
--- a/include/grpc++/impl/sync.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * 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.
- *
- */
-
-#ifndef GRPCXX_IMPL_SYNC_H
-#define GRPCXX_IMPL_SYNC_H
-
-#include <grpc++/impl/codegen/sync.h>
-
-#endif // GRPCXX_IMPL_SYNC_H
diff --git a/include/grpc++/impl/thd_no_cxx11.h b/include/grpc++/impl/thd_no_cxx11.h
deleted file mode 100644
index 3f981d3770..0000000000
--- a/include/grpc++/impl/thd_no_cxx11.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- *
- * 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.
- *
- */
-
-#ifndef GRPCXX_IMPL_THD_NO_CXX11_H
-#define GRPCXX_IMPL_THD_NO_CXX11_H
-
-#include <grpc/support/thd.h>
-
-namespace grpc {
-
-class thread {
- public:
- template <class T>
- thread(void (T::*fptr)(), T *obj) {
- func_ = new thread_function<T>(fptr, obj);
- joined_ = false;
- start();
- }
- template <class T, class U>
- thread(void (T::*fptr)(U arg), T *obj, U arg) {
- func_ = new thread_function_arg<T, U>(fptr, obj, arg);
- joined_ = false;
- start();
- }
- ~thread() {
- if (!joined_) std::terminate();
- delete func_;
- }
- thread(thread &&other)
- : func_(other.func_), thd_(other.thd_), joined_(other.joined_) {
- other.joined_ = true;
- other.func_ = NULL;
- }
- void join() {
- gpr_thd_join(thd_);
- joined_ = true;
- }
-
- private:
- void start() {
- gpr_thd_options options = gpr_thd_options_default();
- gpr_thd_options_set_joinable(&options);
- gpr_thd_new(&thd_, thread_func, (void *)func_, &options);
- }
- static void thread_func(void *arg) {
- thread_function_base *func = (thread_function_base *)arg;
- func->call();
- }
- class thread_function_base {
- public:
- virtual ~thread_function_base() {}
- virtual void call() = 0;
- };
- template <class T>
- class thread_function : public thread_function_base {
- public:
- thread_function(void (T::*fptr)(), T *obj) : fptr_(fptr), obj_(obj) {}
- virtual void call() { (obj_->*fptr_)(); }
-
- private:
- void (T::*fptr_)();
- T *obj_;
- };
- template <class T, class U>
- class thread_function_arg : public thread_function_base {
- public:
- thread_function_arg(void (T::*fptr)(U arg), T *obj, U arg)
- : fptr_(fptr), obj_(obj), arg_(arg) {}
- virtual void call() { (obj_->*fptr_)(arg_); }
-
- private:
- void (T::*fptr_)(U arg);
- T *obj_;
- U arg_;
- };
- thread_function_base *func_;
- gpr_thd_id thd_;
- bool joined_;
-
- // Disallow copy and assign.
- thread(const thread &);
- void operator=(const thread &);
-};
-
-} // namespace grpc
-
-#endif // GRPCXX_IMPL_THD_NO_CXX11_H
diff --git a/include/grpc++/resource_quota.h b/include/grpc++/resource_quota.h
index db5bc8e7be..75e04d4e2f 100644
--- a/include/grpc++/resource_quota.h
+++ b/include/grpc++/resource_quota.h
@@ -44,7 +44,7 @@ namespace grpc {
/// A ResourceQuota can be attached to a server (via ServerBuilder), or a client
/// channel (via ChannelArguments). gRPC will attempt to keep memory used by
/// all attached entities below the ResourceQuota bound.
-class ResourceQuota GRPC_FINAL {
+class ResourceQuota final {
public:
explicit ResourceQuota(const grpc::string& name);
ResourceQuota();
diff --git a/include/grpc++/server.h b/include/grpc++/server.h
index a6d70c7577..fba9952e6e 100644
--- a/include/grpc++/server.h
+++ b/include/grpc++/server.h
@@ -34,8 +34,10 @@
#ifndef GRPCXX_SERVER_H
#define GRPCXX_SERVER_H
+#include <condition_variable>
#include <list>
#include <memory>
+#include <mutex>
#include <vector>
#include <grpc++/completion_queue.h>
@@ -43,7 +45,6 @@
#include <grpc++/impl/codegen/grpc_library.h>
#include <grpc++/impl/codegen/server_interface.h>
#include <grpc++/impl/rpc_service_method.h>
-#include <grpc++/impl/sync.h>
#include <grpc++/security/server_credentials.h>
#include <grpc++/support/channel_arguments.h>
#include <grpc++/support/config.h>
@@ -64,7 +65,7 @@ class ThreadPoolInterface;
/// Models a gRPC server.
///
/// Servers are configured and started via \a grpc::ServerBuilder.
-class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
+class Server final : public ServerInterface, private GrpcLibraryCodegen {
public:
~Server();
@@ -72,7 +73,7 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
///
/// \warning The server must be either shutting down or some other thread must
/// call \a Shutdown for this function to ever return.
- void Wait() GRPC_OVERRIDE;
+ void Wait() override;
/// Global Callbacks
///
@@ -143,12 +144,11 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
/// Register a service. This call does not take ownership of the service.
/// The service must exist for the lifetime of the Server instance.
- bool RegisterService(const grpc::string* host,
- Service* service) GRPC_OVERRIDE;
+ bool RegisterService(const grpc::string* host, Service* service) override;
/// Register a generic service. This call does not take ownership of the
/// service. The service must exist for the lifetime of the Server instance.
- void RegisterAsyncGenericService(AsyncGenericService* service) GRPC_OVERRIDE;
+ void RegisterAsyncGenericService(AsyncGenericService* service) override;
/// Tries to bind \a server to the given \a addr.
///
@@ -162,7 +162,7 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
///
/// \warning It's an error to call this method on an already started server.
int AddListeningPort(const grpc::string& addr,
- ServerCredentials* creds) GRPC_OVERRIDE;
+ ServerCredentials* creds) override;
/// Start the server.
///
@@ -172,17 +172,17 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
/// \param num_cqs How many completion queues does \a cqs hold.
///
/// \return true on a successful shutdown.
- bool Start(ServerCompletionQueue** cqs, size_t num_cqs) GRPC_OVERRIDE;
+ bool Start(ServerCompletionQueue** cqs, size_t num_cqs) override;
- void PerformOpsOnCall(CallOpSetInterface* ops, Call* call) GRPC_OVERRIDE;
+ void PerformOpsOnCall(CallOpSetInterface* ops, Call* call) override;
- void ShutdownInternal(gpr_timespec deadline) GRPC_OVERRIDE;
+ void ShutdownInternal(gpr_timespec deadline) override;
- int max_receive_message_size() const GRPC_OVERRIDE {
+ int max_receive_message_size() const override {
return max_receive_message_size_;
};
- grpc_server* server() GRPC_OVERRIDE { return server_; };
+ grpc_server* server() override { return server_; };
ServerInitializer* initializer();
@@ -198,12 +198,12 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
std::vector<std::unique_ptr<SyncRequestThreadManager>> sync_req_mgrs_;
// Sever status
- grpc::mutex mu_;
+ std::mutex mu_;
bool started_;
bool shutdown_;
bool shutdown_notified_; // Was notify called on the shutdown_cv_
- grpc::condition_variable shutdown_cv_;
+ std::condition_variable shutdown_cv_;
std::shared_ptr<GlobalCallbacks> global_callbacks_;
diff --git a/include/grpc++/support/byte_buffer.h b/include/grpc++/support/byte_buffer.h
index 06f8969b70..1f317df663 100644
--- a/include/grpc++/support/byte_buffer.h
+++ b/include/grpc++/support/byte_buffer.h
@@ -47,7 +47,7 @@
namespace grpc {
/// A sequence of bytes.
-class ByteBuffer GRPC_FINAL {
+class ByteBuffer final {
public:
/// Constuct an empty buffer.
ByteBuffer() : buffer_(nullptr) {}
diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h
index ba203f85bd..49a3e9461c 100644
--- a/include/grpc++/support/channel_arguments.h
+++ b/include/grpc++/support/channel_arguments.h
@@ -85,6 +85,11 @@ class ChannelArguments {
/// The given buffer pool will be attached to the constructed channel
void SetResourceQuota(const ResourceQuota& resource_quota);
+ /// Set LB policy name.
+ /// Note that if the name resolver returns only balancer addresses, the
+ /// grpclb LB policy will be used, regardless of what is specified here.
+ void SetLoadBalancingPolicyName(const grpc::string& lb_policy_name);
+
// Generic channel argument setters. Only for advanced use cases.
/// Set an integer argument \a value under \a key.
void SetInt(const grpc::string& key, int value);
diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h
index 5874b4f5ae..85561f7f33 100644
--- a/include/grpc++/support/slice.h
+++ b/include/grpc++/support/slice.h
@@ -44,7 +44,7 @@ namespace grpc {
/// A slice represents a contiguous reference counted array of bytes.
/// It is cheap to take references to a slice, and it is cheap to create a
/// slice pointing to a subset of another slice.
-class Slice GRPC_FINAL {
+class Slice final {
public:
/// Construct an empty slice.
Slice();
diff --git a/package.xml b/package.xml
index a60eac6820..169553efb3 100644
--- a/package.xml
+++ b/package.xml
@@ -266,6 +266,7 @@
<file baseinstalldir="/" name="src/core/lib/transport/metadata.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/metadata_batch.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/method_config.h" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/pid_controller.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/static_metadata.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/timeout_encoding.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/transport.h" role="src" />
@@ -454,6 +455,7 @@
<file baseinstalldir="/" name="src/core/lib/transport/metadata.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/metadata_batch.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/method_config.c" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/pid_controller.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/static_metadata.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/timeout_encoding.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/transport.c" role="src" />
diff --git a/setup.py b/setup.py
index cdd3bb3f0d..559a75f674 100644
--- a/setup.py
+++ b/setup.py
@@ -52,6 +52,7 @@ PYTHON_STEM = os.path.join('src', 'python', 'grpcio')
CORE_INCLUDE = ('include', '.',)
BORINGSSL_INCLUDE = (os.path.join('third_party', 'boringssl', 'include'),)
ZLIB_INCLUDE = (os.path.join('third_party', 'zlib'),)
+README = os.path.join(PYTHON_STEM, 'README.rst')
# Ensure we're in the proper directory whether or not we're being used by pip.
os.chdir(os.path.dirname(os.path.abspath(__file__)))
@@ -259,6 +260,7 @@ setuptools.setup(
name='grpcio',
version=grpc_version.VERSION,
license=LICENSE,
+ long_description=open(README).read(),
ext_modules=CYTHON_EXTENSION_MODULES,
packages=list(PACKAGES),
package_dir=PACKAGE_DIRECTORIES,
diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc
index fa72f9b0d9..a26eeb46b9 100644
--- a/src/compiler/cpp_generator.cc
+++ b/src/compiler/cpp_generator.cc
@@ -322,7 +322,7 @@ void PrintHeaderClientMethod(Printer *printer, const Method *method,
printer->Print(
*vars,
"::grpc::Status $Method$(::grpc::ClientContext* context, "
- "const $Request$& request, $Response$* response) GRPC_OVERRIDE;\n");
+ "const $Request$& request, $Response$* response) override;\n");
printer->Print(
*vars,
"std::unique_ptr< ::grpc::ClientAsyncResponseReader< $Response$>> "
@@ -417,37 +417,34 @@ void PrintHeaderClientMethod(Printer *printer, const Method *method,
"::grpc::ClientAsyncResponseReader< $Response$>* "
"Async$Method$Raw(::grpc::ClientContext* context, "
"const $Request$& request, "
- "::grpc::CompletionQueue* cq) GRPC_OVERRIDE;\n");
+ "::grpc::CompletionQueue* cq) override;\n");
} else if (method->ClientOnlyStreaming()) {
printer->Print(*vars,
"::grpc::ClientWriter< $Request$>* $Method$Raw("
"::grpc::ClientContext* context, $Response$* response) "
- "GRPC_OVERRIDE;\n");
- printer->Print(
- *vars,
- "::grpc::ClientAsyncWriter< $Request$>* Async$Method$Raw("
- "::grpc::ClientContext* context, $Response$* response, "
- "::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE;\n");
+ "override;\n");
+ printer->Print(*vars,
+ "::grpc::ClientAsyncWriter< $Request$>* Async$Method$Raw("
+ "::grpc::ClientContext* context, $Response$* response, "
+ "::grpc::CompletionQueue* cq, void* tag) override;\n");
} else if (method->ServerOnlyStreaming()) {
printer->Print(*vars,
"::grpc::ClientReader< $Response$>* $Method$Raw("
"::grpc::ClientContext* context, const $Request$& request)"
- " GRPC_OVERRIDE;\n");
+ " override;\n");
printer->Print(
*vars,
"::grpc::ClientAsyncReader< $Response$>* Async$Method$Raw("
"::grpc::ClientContext* context, const $Request$& request, "
- "::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE;\n");
+ "::grpc::CompletionQueue* cq, void* tag) override;\n");
} else if (method->BidiStreaming()) {
- printer->Print(
- *vars,
- "::grpc::ClientReaderWriter< $Request$, $Response$>* "
- "$Method$Raw(::grpc::ClientContext* context) GRPC_OVERRIDE;\n");
- printer->Print(
- *vars,
- "::grpc::ClientAsyncReaderWriter< $Request$, $Response$>* "
- "Async$Method$Raw(::grpc::ClientContext* context, "
- "::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE;\n");
+ printer->Print(*vars,
+ "::grpc::ClientReaderWriter< $Request$, $Response$>* "
+ "$Method$Raw(::grpc::ClientContext* context) override;\n");
+ printer->Print(*vars,
+ "::grpc::ClientAsyncReaderWriter< $Request$, $Response$>* "
+ "Async$Method$Raw(::grpc::ClientContext* context, "
+ "::grpc::CompletionQueue* cq, void* tag) override;\n");
}
}
}
@@ -509,7 +506,7 @@ void PrintHeaderServerMethodAsync(Printer *printer, const Method *method,
" ::grpc::Service::MarkMethodAsync($Idx$);\n"
"}\n");
printer->Print(*vars,
- "~WithAsyncMethod_$Method$() GRPC_OVERRIDE {\n"
+ "~WithAsyncMethod_$Method$() override {\n"
" BaseClassMustBeDerivedFromService(this);\n"
"}\n");
if (method->NoStreaming()) {
@@ -518,7 +515,7 @@ void PrintHeaderServerMethodAsync(Printer *printer, const Method *method,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
- "$Response$* response) GRPC_FINAL GRPC_OVERRIDE {\n"
+ "$Response$* response) final override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@@ -540,7 +537,7 @@ void PrintHeaderServerMethodAsync(Printer *printer, const Method *method,
"::grpc::Status $Method$("
"::grpc::ServerContext* context, "
"::grpc::ServerReader< $Request$>* reader, "
- "$Response$* response) GRPC_FINAL GRPC_OVERRIDE {\n"
+ "$Response$* response) final override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@@ -561,7 +558,7 @@ void PrintHeaderServerMethodAsync(Printer *printer, const Method *method,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
- "::grpc::ServerWriter< $Response$>* writer) GRPC_FINAL GRPC_OVERRIDE "
+ "::grpc::ServerWriter< $Response$>* writer) final override "
"{\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
@@ -585,7 +582,7 @@ void PrintHeaderServerMethodAsync(Printer *printer, const Method *method,
"::grpc::Status $Method$("
"::grpc::ServerContext* context, "
"::grpc::ServerReaderWriter< $Response$, $Request$>* stream) "
- "GRPC_FINAL GRPC_OVERRIDE {\n"
+ "final override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@@ -632,7 +629,7 @@ void PrintHeaderServerMethodStreamedUnary(
"std::placeholders::_2)));\n"
"}\n");
printer->Print(*vars,
- "~WithStreamedUnaryMethod_$Method$() GRPC_OVERRIDE {\n"
+ "~WithStreamedUnaryMethod_$Method$() override {\n"
" BaseClassMustBeDerivedFromService(this);\n"
"}\n");
printer->Print(
@@ -640,7 +637,7 @@ void PrintHeaderServerMethodStreamedUnary(
"// disable regular version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
- "$Response$* response) GRPC_FINAL GRPC_OVERRIDE {\n"
+ "$Response$* response) final override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@@ -683,7 +680,7 @@ void PrintHeaderServerMethodSplitStreaming(
"std::placeholders::_2)));\n"
"}\n");
printer->Print(*vars,
- "~WithSplitStreamingMethod_$Method$() GRPC_OVERRIDE {\n"
+ "~WithSplitStreamingMethod_$Method$() override {\n"
" BaseClassMustBeDerivedFromService(this);\n"
"}\n");
printer->Print(
@@ -691,7 +688,7 @@ void PrintHeaderServerMethodSplitStreaming(
"// disable regular version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
- "::grpc::ServerWriter< $Response$>* writer) GRPC_FINAL GRPC_OVERRIDE "
+ "::grpc::ServerWriter< $Response$>* writer) final override "
"{\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
@@ -727,7 +724,7 @@ void PrintHeaderServerMethodGeneric(
" ::grpc::Service::MarkMethodGeneric($Idx$);\n"
"}\n");
printer->Print(*vars,
- "~WithGenericMethod_$Method$() GRPC_OVERRIDE {\n"
+ "~WithGenericMethod_$Method$() override {\n"
" BaseClassMustBeDerivedFromService(this);\n"
"}\n");
if (method->NoStreaming()) {
@@ -736,7 +733,7 @@ void PrintHeaderServerMethodGeneric(
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
- "$Response$* response) GRPC_FINAL GRPC_OVERRIDE {\n"
+ "$Response$* response) final override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@@ -747,7 +744,7 @@ void PrintHeaderServerMethodGeneric(
"::grpc::Status $Method$("
"::grpc::ServerContext* context, "
"::grpc::ServerReader< $Request$>* reader, "
- "$Response$* response) GRPC_FINAL GRPC_OVERRIDE {\n"
+ "$Response$* response) final override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@@ -757,7 +754,7 @@ void PrintHeaderServerMethodGeneric(
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
- "::grpc::ServerWriter< $Response$>* writer) GRPC_FINAL GRPC_OVERRIDE "
+ "::grpc::ServerWriter< $Response$>* writer) final override "
"{\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
@@ -769,7 +766,7 @@ void PrintHeaderServerMethodGeneric(
"::grpc::Status $Method$("
"::grpc::ServerContext* context, "
"::grpc::ServerReaderWriter< $Response$, $Request$>* stream) "
- "GRPC_FINAL GRPC_OVERRIDE {\n"
+ "final override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@@ -784,7 +781,7 @@ void PrintHeaderService(Printer *printer, const Service *service,
printer->Print(service->GetLeadingComments().c_str());
printer->Print(*vars,
- "class $Service$ GRPC_FINAL {\n"
+ "class $Service$ final {\n"
" public:\n");
printer->Indent();
@@ -810,7 +807,7 @@ void PrintHeaderService(Printer *printer, const Service *service,
printer->Outdent();
printer->Print("};\n");
printer->Print(
- "class Stub GRPC_FINAL : public StubInterface"
+ "class Stub final : public StubInterface"
" {\n public:\n");
printer->Indent();
printer->Print(
diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc
index 6830f49931..febaf135b6 100644
--- a/src/compiler/python_generator.cc
+++ b/src/compiler/python_generator.cc
@@ -35,6 +35,8 @@
#include <cassert>
#include <cctype>
#include <cstring>
+#include <fstream>
+#include <iostream>
#include <map>
#include <memory>
#include <ostream>
@@ -66,66 +68,11 @@ using std::vector;
namespace grpc_python_generator {
-GeneratorConfiguration::GeneratorConfiguration()
- : grpc_package_root("grpc"), beta_package_root("grpc.beta") {}
-
-PythonGrpcGenerator::PythonGrpcGenerator(const GeneratorConfiguration& config)
- : config_(config) {}
-
-PythonGrpcGenerator::~PythonGrpcGenerator() {}
-
-bool PythonGrpcGenerator::Generate(const FileDescriptor* file,
- const grpc::string& parameter,
- GeneratorContext* context,
- grpc::string* error) const {
- // Get output file name.
- grpc::string file_name;
- static const int proto_suffix_length = strlen(".proto");
- if (file->name().size() > static_cast<size_t>(proto_suffix_length) &&
- file->name().find_last_of(".proto") == file->name().size() - 1) {
- file_name =
- file->name().substr(0, file->name().size() - proto_suffix_length) +
- "_pb2.py";
- } else {
- *error = "Invalid proto file name. Proto file must end with .proto";
- return false;
- }
-
- std::unique_ptr<ZeroCopyOutputStream> output(
- context->OpenForInsert(file_name, "module_scope"));
- CodedOutputStream coded_out(output.get());
- bool success = false;
- grpc::string code = "";
- tie(success, code) = grpc_python_generator::GetServices(file, config_);
- if (success) {
- coded_out.WriteRaw(code.data(), code.size());
- return true;
- } else {
- return false;
- }
-}
-
namespace {
-//////////////////////////////////
-// BEGIN FORMATTING BOILERPLATE //
-//////////////////////////////////
-
-// Converts an initializer list of the form { key0, value0, key1, value1, ... }
-// into a map of key* to value*. Is merely a readability helper for later code.
-map<grpc::string, grpc::string> ListToDict(
- const initializer_list<grpc::string>& values) {
- assert(values.size() % 2 == 0);
- map<grpc::string, grpc::string> value_map;
- auto value_iter = values.begin();
- for (unsigned i = 0; i < values.size() / 2; ++i) {
- grpc::string key = *value_iter;
- ++value_iter;
- grpc::string value = *value_iter;
- value_map[key] = value;
- ++value_iter;
- }
- return value_map;
-}
+
+typedef vector<const Descriptor*> DescriptorVector;
+typedef map<grpc::string, grpc::string> StringMap;
+typedef vector<grpc::string> StringVector;
// Provides RAII indentation handling. Use as:
// {
@@ -146,10 +93,6 @@ class IndentScope {
Printer* printer_;
};
-////////////////////////////////
-// END FORMATTING BOILERPLATE //
-////////////////////////////////
-
// TODO(https://github.com/google/protobuf/issues/888):
// Export `ModuleName` from protobuf's
// `src/google/protobuf/compiler/python/python_generator.cc` file.
@@ -173,11 +116,61 @@ grpc::string ModuleAlias(const grpc::string& filename) {
return module_name;
}
-bool GetModuleAndMessagePath(const Descriptor* type,
- const ServiceDescriptor* service,
- grpc::string* out) {
+// Tucks all generator state in an anonymous namespace away from
+// PythonGrpcGenerator and the header file, mostly to encourage future changes
+// to not require updates to the grpcio-tools C++ code part. Assumes that it is
+// only ever used from a single thread.
+struct PrivateGenerator {
+ const GeneratorConfiguration& config;
+ const FileDescriptor* file;
+
+ bool generate_in_pb2_grpc;
+
+ Printer* out;
+
+ PrivateGenerator(const GeneratorConfiguration& config,
+ const FileDescriptor* file);
+
+ std::pair<bool, grpc::string> GetGrpcServices();
+
+ private:
+ bool PrintPreamble();
+ bool PrintBetaPreamble();
+ bool PrintGAServices();
+ bool PrintBetaServices();
+
+ bool PrintAddServicerToServer(
+ const grpc::string& package_qualified_service_name,
+ const ServiceDescriptor* service);
+ bool PrintServicer(const ServiceDescriptor* service);
+ bool PrintStub(const grpc::string& package_qualified_service_name,
+ const ServiceDescriptor* service);
+
+ bool PrintBetaServicer(const ServiceDescriptor* service);
+ bool PrintBetaServerFactory(
+ const grpc::string& package_qualified_service_name,
+ const ServiceDescriptor* service);
+ bool PrintBetaStub(const ServiceDescriptor* service);
+ bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name,
+ const ServiceDescriptor* service);
+
+ // Get all comments (leading, leading_detached, trailing) and print them as a
+ // docstring. Any leading space of a line will be removed, but the line
+ // wrapping will not be changed.
+ template <typename DescriptorType>
+ void PrintAllComments(const DescriptorType* descriptor);
+
+ bool GetModuleAndMessagePath(const Descriptor* type, grpc::string* out);
+};
+
+PrivateGenerator::PrivateGenerator(const GeneratorConfiguration& config,
+ const FileDescriptor* file)
+ : config(config), file(file) {}
+
+bool PrivateGenerator::GetModuleAndMessagePath(const Descriptor* type,
+ grpc::string* out) {
const Descriptor* path_elem_type = type;
- vector<const Descriptor*> message_path;
+ DescriptorVector message_path;
do {
message_path.push_back(path_elem_type);
path_elem_type = path_elem_type->containing_type();
@@ -188,12 +181,16 @@ bool GetModuleAndMessagePath(const Descriptor* type,
file_name.find_last_of(".proto") == file_name.size() - 1)) {
return false;
}
- grpc::string service_file_name = service->file()->name();
- grpc::string module =
- service_file_name == file_name ? "" : ModuleAlias(file_name) + ".";
+ grpc::string generator_file_name = file->name();
+ grpc::string module;
+ if (generator_file_name != file_name || generate_in_pb2_grpc) {
+ module = ModuleAlias(file_name) + ".";
+ } else {
+ module = "";
+ }
grpc::string message_type;
- for (auto path_iter = message_path.rbegin(); path_iter != message_path.rend();
- ++path_iter) {
+ for (DescriptorVector::reverse_iterator path_iter = message_path.rbegin();
+ path_iter != message_path.rend(); ++path_iter) {
message_type += (*path_iter)->name() + ".";
}
// no pop_back prior to C++11
@@ -202,33 +199,31 @@ bool GetModuleAndMessagePath(const Descriptor* type,
return true;
}
-// Get all comments (leading, leading_detached, trailing) and print them as a
-// docstring. Any leading space of a line will be removed, but the line wrapping
-// will not be changed.
template <typename DescriptorType>
-static void PrintAllComments(const DescriptorType* desc, Printer* printer) {
- std::vector<grpc::string> comments;
- grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_LEADING_DETACHED,
- &comments);
- grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_LEADING,
+void PrivateGenerator::PrintAllComments(const DescriptorType* descriptor) {
+ StringVector comments;
+ grpc_generator::GetComment(
+ descriptor, grpc_generator::COMMENTTYPE_LEADING_DETACHED, &comments);
+ grpc_generator::GetComment(descriptor, grpc_generator::COMMENTTYPE_LEADING,
&comments);
- grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_TRAILING,
+ grpc_generator::GetComment(descriptor, grpc_generator::COMMENTTYPE_TRAILING,
&comments);
if (comments.empty()) {
return;
}
- printer->Print("\"\"\"");
- for (auto it = comments.begin(); it != comments.end(); ++it) {
+ out->Print("\"\"\"");
+ for (StringVector::iterator it = comments.begin(); it != comments.end();
+ ++it) {
size_t start_pos = it->find_first_not_of(' ');
if (start_pos != grpc::string::npos) {
- printer->Print(it->c_str() + start_pos);
+ out->Print(it->c_str() + start_pos);
}
- printer->Print("\n");
+ out->Print("\n");
}
- printer->Print("\"\"\"\n");
+ out->Print("\"\"\"\n");
}
-bool PrintBetaServicer(const ServiceDescriptor* service, Printer* out) {
+bool PrivateGenerator::PrintBetaServicer(const ServiceDescriptor* service) {
out->Print("\n\n");
out->Print("class Beta$Service$Servicer(object):\n", "Service",
service->name());
@@ -241,16 +236,16 @@ bool PrintBetaServicer(const ServiceDescriptor* service, Printer* out) {
"generated\n"
"only to ease transition from grpcio<0.15.0 to "
"grpcio>=0.15.0.\"\"\"\n");
- PrintAllComments(service, out);
+ PrintAllComments(service);
for (int i = 0; i < service->method_count(); ++i) {
- auto meth = service->method(i);
+ const MethodDescriptor* method = service->method(i);
grpc::string arg_name =
- meth->client_streaming() ? "request_iterator" : "request";
+ method->client_streaming() ? "request_iterator" : "request";
out->Print("def $Method$(self, $ArgName$, context):\n", "Method",
- meth->name(), "ArgName", arg_name);
+ method->name(), "ArgName", arg_name);
{
IndentScope raii_method_indent(out);
- PrintAllComments(meth, out);
+ PrintAllComments(method);
out->Print("context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)\n");
}
}
@@ -258,7 +253,7 @@ bool PrintBetaServicer(const ServiceDescriptor* service, Printer* out) {
return true;
}
-bool PrintBetaStub(const ServiceDescriptor* service, Printer* out) {
+bool PrivateGenerator::PrintBetaStub(const ServiceDescriptor* service) {
out->Print("\n\n");
out->Print("class Beta$Service$Stub(object):\n", "Service", service->name());
{
@@ -270,30 +265,33 @@ bool PrintBetaStub(const ServiceDescriptor* service, Printer* out) {
"generated\n"
"only to ease transition from grpcio<0.15.0 to "
"grpcio>=0.15.0.\"\"\"\n");
- PrintAllComments(service, out);
+ PrintAllComments(service);
for (int i = 0; i < service->method_count(); ++i) {
- const MethodDescriptor* meth = service->method(i);
+ const MethodDescriptor* method = service->method(i);
grpc::string arg_name =
- meth->client_streaming() ? "request_iterator" : "request";
- auto methdict = ListToDict({"Method", meth->name(), "ArgName", arg_name});
- out->Print(methdict,
+ method->client_streaming() ? "request_iterator" : "request";
+ StringMap method_dict;
+ method_dict["Method"] = method->name();
+ method_dict["ArgName"] = arg_name;
+ out->Print(method_dict,
"def $Method$(self, $ArgName$, timeout, metadata=None, "
"with_call=False, protocol_options=None):\n");
{
IndentScope raii_method_indent(out);
- PrintAllComments(meth, out);
+ PrintAllComments(method);
out->Print("raise NotImplementedError()\n");
}
- if (!meth->server_streaming()) {
- out->Print(methdict, "$Method$.future = None\n");
+ if (!method->server_streaming()) {
+ out->Print(method_dict, "$Method$.future = None\n");
}
}
}
return true;
}
-bool PrintBetaServerFactory(const grpc::string& package_qualified_service_name,
- const ServiceDescriptor* service, Printer* out) {
+bool PrivateGenerator::PrintBetaServerFactory(
+ const grpc::string& package_qualified_service_name,
+ const ServiceDescriptor* service) {
out->Print("\n\n");
out->Print(
"def beta_create_$Service$_server(servicer, pool=None, "
@@ -307,9 +305,9 @@ bool PrintBetaServerFactory(const grpc::string& package_qualified_service_name,
"file not marked beta) for all further purposes. This function was\n"
"generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"
"\"\"\"\n");
- map<grpc::string, grpc::string> method_implementation_constructors;
- map<grpc::string, grpc::string> input_message_modules_and_classes;
- map<grpc::string, grpc::string> output_message_modules_and_classes;
+ StringMap method_implementation_constructors;
+ StringMap input_message_modules_and_classes;
+ StringMap output_message_modules_and_classes;
for (int i = 0; i < service->method_count(); ++i) {
const MethodDescriptor* method = service->method(i);
const grpc::string method_implementation_constructor =
@@ -317,12 +315,12 @@ bool PrintBetaServerFactory(const grpc::string& package_qualified_service_name,
grpc::string(method->server_streaming() ? "stream_" : "unary_") +
"inline";
grpc::string input_message_module_and_class;
- if (!GetModuleAndMessagePath(method->input_type(), service,
+ if (!GetModuleAndMessagePath(method->input_type(),
&input_message_module_and_class)) {
return false;
}
grpc::string output_message_module_and_class;
- if (!GetModuleAndMessagePath(method->output_type(), service,
+ if (!GetModuleAndMessagePath(method->output_type(),
&output_message_module_and_class)) {
return false;
}
@@ -334,7 +332,7 @@ bool PrintBetaServerFactory(const grpc::string& package_qualified_service_name,
make_pair(method->name(), output_message_module_and_class));
}
out->Print("request_deserializers = {\n");
- for (auto name_and_input_module_class_pair =
+ for (StringMap::iterator name_and_input_module_class_pair =
input_message_modules_and_classes.begin();
name_and_input_module_class_pair !=
input_message_modules_and_classes.end();
@@ -349,7 +347,7 @@ bool PrintBetaServerFactory(const grpc::string& package_qualified_service_name,
}
out->Print("}\n");
out->Print("response_serializers = {\n");
- for (auto name_and_output_module_class_pair =
+ for (StringMap::iterator name_and_output_module_class_pair =
output_message_modules_and_classes.begin();
name_and_output_module_class_pair !=
output_message_modules_and_classes.end();
@@ -365,7 +363,7 @@ bool PrintBetaServerFactory(const grpc::string& package_qualified_service_name,
}
out->Print("}\n");
out->Print("method_implementations = {\n");
- for (auto name_and_implementation_constructor =
+ for (StringMap::iterator name_and_implementation_constructor =
method_implementation_constructors.begin();
name_and_implementation_constructor !=
method_implementation_constructors.end();
@@ -395,11 +393,11 @@ bool PrintBetaServerFactory(const grpc::string& package_qualified_service_name,
return true;
}
-bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name,
- const ServiceDescriptor* service, Printer* out) {
- map<grpc::string, grpc::string> dict = ListToDict({
- "Service", service->name(),
- });
+bool PrivateGenerator::PrintBetaStubFactory(
+ const grpc::string& package_qualified_service_name,
+ const ServiceDescriptor* service) {
+ StringMap dict;
+ dict["Service"] = service->name();
out->Print("\n\n");
out->Print(dict,
"def beta_create_$Service$_stub(channel, host=None,"
@@ -412,21 +410,21 @@ bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name,
"file not marked beta) for all further purposes. This function was\n"
"generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"
"\"\"\"\n");
- map<grpc::string, grpc::string> method_cardinalities;
- map<grpc::string, grpc::string> input_message_modules_and_classes;
- map<grpc::string, grpc::string> output_message_modules_and_classes;
+ StringMap method_cardinalities;
+ StringMap input_message_modules_and_classes;
+ StringMap output_message_modules_and_classes;
for (int i = 0; i < service->method_count(); ++i) {
const MethodDescriptor* method = service->method(i);
const grpc::string method_cardinality =
grpc::string(method->client_streaming() ? "STREAM" : "UNARY") + "_" +
grpc::string(method->server_streaming() ? "STREAM" : "UNARY");
grpc::string input_message_module_and_class;
- if (!GetModuleAndMessagePath(method->input_type(), service,
+ if (!GetModuleAndMessagePath(method->input_type(),
&input_message_module_and_class)) {
return false;
}
grpc::string output_message_module_and_class;
- if (!GetModuleAndMessagePath(method->output_type(), service,
+ if (!GetModuleAndMessagePath(method->output_type(),
&output_message_module_and_class)) {
return false;
}
@@ -438,7 +436,7 @@ bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name,
make_pair(method->name(), output_message_module_and_class));
}
out->Print("request_serializers = {\n");
- for (auto name_and_input_module_class_pair =
+ for (StringMap::iterator name_and_input_module_class_pair =
input_message_modules_and_classes.begin();
name_and_input_module_class_pair !=
input_message_modules_and_classes.end();
@@ -453,7 +451,7 @@ bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name,
}
out->Print("}\n");
out->Print("response_deserializers = {\n");
- for (auto name_and_output_module_class_pair =
+ for (StringMap::iterator name_and_output_module_class_pair =
output_message_modules_and_classes.begin();
name_and_output_module_class_pair !=
output_message_modules_and_classes.end();
@@ -469,7 +467,8 @@ bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name,
}
out->Print("}\n");
out->Print("cardinalities = {\n");
- for (auto name_and_cardinality = method_cardinalities.begin();
+ for (StringMap::iterator name_and_cardinality =
+ method_cardinalities.begin();
name_and_cardinality != method_cardinalities.end();
name_and_cardinality++) {
IndentScope raii_descriptions_indent(out);
@@ -493,13 +492,14 @@ bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name,
return true;
}
-bool PrintStub(const grpc::string& package_qualified_service_name,
- const ServiceDescriptor* service, Printer* out) {
+bool PrivateGenerator::PrintStub(
+ const grpc::string& package_qualified_service_name,
+ const ServiceDescriptor* service) {
out->Print("\n\n");
out->Print("class $Service$Stub(object):\n", "Service", service->name());
{
IndentScope raii_class_indent(out);
- PrintAllComments(service, out);
+ PrintAllComments(service);
out->Print("\n");
out->Print("def __init__(self, channel):\n");
{
@@ -513,17 +513,17 @@ bool PrintStub(const grpc::string& package_qualified_service_name,
}
out->Print("\"\"\"\n");
for (int i = 0; i < service->method_count(); ++i) {
- auto method = service->method(i);
- auto multi_callable_constructor =
+ const MethodDescriptor* method = service->method(i);
+ grpc::string multi_callable_constructor =
grpc::string(method->client_streaming() ? "stream" : "unary") +
"_" + grpc::string(method->server_streaming() ? "stream" : "unary");
grpc::string request_module_and_class;
- if (!GetModuleAndMessagePath(method->input_type(), service,
+ if (!GetModuleAndMessagePath(method->input_type(),
&request_module_and_class)) {
return false;
}
grpc::string response_module_and_class;
- if (!GetModuleAndMessagePath(method->output_type(), service,
+ if (!GetModuleAndMessagePath(method->output_type(),
&response_module_and_class)) {
return false;
}
@@ -550,14 +550,14 @@ bool PrintStub(const grpc::string& package_qualified_service_name,
return true;
}
-bool PrintServicer(const ServiceDescriptor* service, Printer* out) {
+bool PrivateGenerator::PrintServicer(const ServiceDescriptor* service) {
out->Print("\n\n");
out->Print("class $Service$Servicer(object):\n", "Service", service->name());
{
IndentScope raii_class_indent(out);
- PrintAllComments(service, out);
+ PrintAllComments(service);
for (int i = 0; i < service->method_count(); ++i) {
- auto method = service->method(i);
+ const MethodDescriptor* method = service->method(i);
grpc::string arg_name =
method->client_streaming() ? "request_iterator" : "request";
out->Print("\n");
@@ -565,7 +565,7 @@ bool PrintServicer(const ServiceDescriptor* service, Printer* out) {
method->name(), "ArgName", arg_name);
{
IndentScope raii_method_indent(out);
- PrintAllComments(method, out);
+ PrintAllComments(method);
out->Print("context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n");
out->Print("context.set_details('Method not implemented!')\n");
out->Print("raise NotImplementedError('Method not implemented!')\n");
@@ -575,9 +575,9 @@ bool PrintServicer(const ServiceDescriptor* service, Printer* out) {
return true;
}
-bool PrintAddServicerToServer(
+bool PrivateGenerator::PrintAddServicerToServer(
const grpc::string& package_qualified_service_name,
- const ServiceDescriptor* service, Printer* out) {
+ const ServiceDescriptor* service) {
out->Print("\n\n");
out->Print("def add_$Service$Servicer_to_server(servicer, server):\n",
"Service", service->name());
@@ -588,19 +588,19 @@ bool PrintAddServicerToServer(
IndentScope raii_dict_first_indent(out);
IndentScope raii_dict_second_indent(out);
for (int i = 0; i < service->method_count(); ++i) {
- auto method = service->method(i);
- auto method_handler_constructor =
+ const MethodDescriptor* method = service->method(i);
+ grpc::string method_handler_constructor =
grpc::string(method->client_streaming() ? "stream" : "unary") +
"_" +
grpc::string(method->server_streaming() ? "stream" : "unary") +
"_rpc_method_handler";
grpc::string request_module_and_class;
- if (!GetModuleAndMessagePath(method->input_type(), service,
+ if (!GetModuleAndMessagePath(method->input_type(),
&request_module_and_class)) {
return false;
}
grpc::string response_module_and_class;
- if (!GetModuleAndMessagePath(method->output_type(), service,
+ if (!GetModuleAndMessagePath(method->output_type(),
&response_module_and_class)) {
return false;
}
@@ -635,53 +635,173 @@ bool PrintAddServicerToServer(
return true;
}
-bool PrintPreamble(const FileDescriptor* file,
- const GeneratorConfiguration& config, Printer* out) {
- out->Print("import $Package$\n", "Package", config.grpc_package_root);
+bool PrivateGenerator::PrintBetaPreamble() {
out->Print("from $Package$ import implementations as beta_implementations\n",
"Package", config.beta_package_root);
out->Print("from $Package$ import interfaces as beta_interfaces\n", "Package",
config.beta_package_root);
+ return true;
+}
+
+bool PrivateGenerator::PrintPreamble() {
+ out->Print("import $Package$\n", "Package", config.grpc_package_root);
out->Print("from grpc.framework.common import cardinality\n");
out->Print(
"from grpc.framework.interfaces.face import utilities as "
"face_utilities\n");
+ if (generate_in_pb2_grpc) {
+ out->Print("\n");
+ for (int i = 0; i < file->service_count(); ++i) {
+ const ServiceDescriptor* service = file->service(i);
+ for (int j = 0; j < service->method_count(); ++j) {
+ const MethodDescriptor* method = service->method(j);
+ const Descriptor* types[2] = {method->input_type(),
+ method->output_type()};
+ for (int k = 0; k < 2; ++k) {
+ const Descriptor* type = types[k];
+ grpc::string type_file_name = type->file()->name();
+ grpc::string module_name = ModuleName(type_file_name);
+ grpc::string module_alias = ModuleAlias(type_file_name);
+ out->Print("import $ModuleName$ as $ModuleAlias$\n", "ModuleName",
+ module_name, "ModuleAlias", module_alias);
+ }
+ }
+ }
+ }
return true;
}
-} // namespace
+bool PrivateGenerator::PrintGAServices() {
+ grpc::string package = file->package();
+ if (!package.empty()) {
+ package = package.append(".");
+ }
+ for (int i = 0; i < file->service_count(); ++i) {
+ const ServiceDescriptor* service = file->service(i);
+ grpc::string package_qualified_service_name = package + service->name();
+ if (!(PrintStub(package_qualified_service_name, service) &&
+ PrintServicer(service) &&
+ PrintAddServicerToServer(package_qualified_service_name, service))) {
+ return false;
+ }
+ }
+ return true;
+}
-pair<bool, grpc::string> GetServices(const FileDescriptor* file,
- const GeneratorConfiguration& config) {
+bool PrivateGenerator::PrintBetaServices() {
+ grpc::string package = file->package();
+ if (!package.empty()) {
+ package = package.append(".");
+ }
+ for (int i = 0; i < file->service_count(); ++i) {
+ const ServiceDescriptor* service = file->service(i);
+ grpc::string package_qualified_service_name = package + service->name();
+ if (!(PrintBetaServicer(service) && PrintBetaStub(service) &&
+ PrintBetaServerFactory(package_qualified_service_name, service) &&
+ PrintBetaStubFactory(package_qualified_service_name, service))) {
+ return false;
+ }
+ }
+ return true;
+}
+
+pair<bool, grpc::string> PrivateGenerator::GetGrpcServices() {
grpc::string output;
{
// Scope the output stream so it closes and finalizes output to the string.
StringOutputStream output_stream(&output);
- Printer out(&output_stream, '$');
- if (!PrintPreamble(file, config, &out)) {
- return make_pair(false, "");
- }
- auto package = file->package();
- if (!package.empty()) {
- package = package.append(".");
- }
- for (int i = 0; i < file->service_count(); ++i) {
- auto service = file->service(i);
- auto package_qualified_service_name = package + service->name();
- if (!(PrintStub(package_qualified_service_name, service, &out) &&
- PrintServicer(service, &out) &&
- PrintAddServicerToServer(package_qualified_service_name, service,
- &out) &&
- PrintBetaServicer(service, &out) && PrintBetaStub(service, &out) &&
- PrintBetaServerFactory(package_qualified_service_name, service,
- &out) &&
- PrintBetaStubFactory(package_qualified_service_name, service,
- &out))) {
+ Printer out_printer(&output_stream, '$');
+ out = &out_printer;
+
+ if (generate_in_pb2_grpc) {
+ if (!PrintPreamble()) {
+ return make_pair(false, "");
+ }
+ if (!PrintGAServices()) {
return make_pair(false, "");
}
+ } else {
+ out->Print("try:\n");
+ {
+ IndentScope raii_dict_try_indent(out);
+ out->Print(
+ "# THESE ELEMENTS WILL BE DEPRECATED.\n"
+ "# Please use the generated *_pb2_grpc.py files instead.\n");
+ if (!PrintPreamble()) {
+ return make_pair(false, "");
+ }
+ if (!PrintBetaPreamble()) {
+ return make_pair(false, "");
+ }
+ if (!PrintGAServices()) {
+ return make_pair(false, "");
+ }
+ if (!PrintBetaServices()) {
+ return make_pair(false, "");
+ }
+ }
+ out->Print("except ImportError:\n");
+ {
+ IndentScope raii_dict_except_indent(out);
+ out->Print("pass");
+ }
}
}
return make_pair(true, std::move(output));
}
+} // namespace
+
+GeneratorConfiguration::GeneratorConfiguration()
+ : grpc_package_root("grpc"), beta_package_root("grpc.beta") {}
+
+PythonGrpcGenerator::PythonGrpcGenerator(const GeneratorConfiguration& config)
+ : config_(config) {}
+
+PythonGrpcGenerator::~PythonGrpcGenerator() {}
+
+bool PythonGrpcGenerator::Generate(const FileDescriptor* file,
+ const grpc::string& parameter,
+ GeneratorContext* context,
+ grpc::string* error) const {
+ // Get output file name.
+ grpc::string pb2_file_name;
+ grpc::string pb2_grpc_file_name;
+ static const int proto_suffix_length = strlen(".proto");
+ if (file->name().size() > static_cast<size_t>(proto_suffix_length) &&
+ file->name().find_last_of(".proto") == file->name().size() - 1) {
+ grpc::string base =
+ file->name().substr(0, file->name().size() - proto_suffix_length);
+ pb2_file_name = base + "_pb2.py";
+ pb2_grpc_file_name = base + "_pb2_grpc.py";
+ } else {
+ *error = "Invalid proto file name. Proto file must end with .proto";
+ return false;
+ }
+
+ PrivateGenerator generator(config_, file);
+
+ std::unique_ptr<ZeroCopyOutputStream> pb2_output(
+ context->OpenForAppend(pb2_file_name));
+ std::unique_ptr<ZeroCopyOutputStream> grpc_output(
+ context->Open(pb2_grpc_file_name));
+ CodedOutputStream pb2_coded_out(pb2_output.get());
+ CodedOutputStream grpc_coded_out(grpc_output.get());
+ bool success = false;
+ grpc::string pb2_code;
+ grpc::string grpc_code;
+ generator.generate_in_pb2_grpc = false;
+ tie(success, pb2_code) = generator.GetGrpcServices();
+ if (success) {
+ generator.generate_in_pb2_grpc = true;
+ tie(success, grpc_code) = generator.GetGrpcServices();
+ if (success) {
+ pb2_coded_out.WriteRaw(pb2_code.data(), pb2_code.size());
+ grpc_coded_out.WriteRaw(grpc_code.data(), grpc_code.size());
+ return true;
+ }
+ }
+ return false;
+}
+
} // namespace grpc_python_generator
diff --git a/src/compiler/python_generator.h b/src/compiler/python_generator.h
index 9bbb83bca6..6a95255d40 100644
--- a/src/compiler/python_generator.h
+++ b/src/compiler/python_generator.h
@@ -62,10 +62,6 @@ class PythonGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
GeneratorConfiguration config_;
};
-std::pair<bool, grpc::string> GetServices(
- const grpc::protobuf::FileDescriptor* file,
- const GeneratorConfiguration& config);
-
} // namespace grpc_python_generator
#endif // GRPC_INTERNAL_COMPILER_PYTHON_GENERATOR_H
diff --git a/src/core/ext/client_channel/lb_policy.h b/src/core/ext/client_channel/lb_policy.h
index 54ad779792..120c641edc 100644
--- a/src/core/ext/client_channel/lb_policy.h
+++ b/src/core/ext/client_channel/lb_policy.h
@@ -109,10 +109,16 @@ struct grpc_lb_policy_vtable {
/*#define GRPC_LB_POLICY_REFCOUNT_DEBUG*/
#ifdef GRPC_LB_POLICY_REFCOUNT_DEBUG
+
+/* Strong references: the policy will shutdown when they reach zero */
#define GRPC_LB_POLICY_REF(p, r) \
grpc_lb_policy_ref((p), __FILE__, __LINE__, (r))
#define GRPC_LB_POLICY_UNREF(exec_ctx, p, r) \
grpc_lb_policy_unref((exec_ctx), (p), __FILE__, __LINE__, (r))
+
+/* Weak references: they don't prevent the shutdown of the LB policy. When no
+ * strong references are left but there are still weak ones, shutdown is called.
+ * Once the weak reference also reaches zero, the LB policy is destroyed. */
#define GRPC_LB_POLICY_WEAK_REF(p, r) \
grpc_lb_policy_weak_ref((p), __FILE__, __LINE__, (r))
#define GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, p, r) \
diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c
index 6da4febf26..6249f8b80f 100644
--- a/src/core/ext/lb_policy/grpclb/grpclb.c
+++ b/src/core/ext/lb_policy/grpclb/grpclb.c
@@ -43,30 +43,23 @@
* policy to select from this list of LB server backends.
*
* The first time the policy gets a request for a pick, a ping, or to exit the
- * idle state, \a query_for_backends() is called. It creates an instance of \a
- * lb_client_data, an internal struct meant to contain the data associated with
- * the internal communication with the LB server. This instance is created via
- * \a lb_client_data_create(). There, the call over lb_channel to pick-first
- * from {a1..an} is created, the \a LoadBalancingRequest message is assembled
- * and all necessary callbacks for the progress of the internal call configured.
+ * idle state, \a query_for_backends_locked() is called. This function sets up
+ * and initiates the internal communication with the LB server. In particular,
+ * it's responsible for instantiating the internal *streaming* call to the LB
+ * server (whichever address from {a1..an} pick-first chose). This call is
+ * serviced by two callbacks, \a lb_on_server_status_received and \a
+ * lb_on_response_received. The former will be called when the call to the LB
+ * server completes. This can happen if the LB server closes the connection or
+ * if this policy itself cancels the call (for example because it's shutting
+ * down). If the internal call times out, the usual behavior of pick-first
+ * applies, continuing to pick from the list {a1..an}.
*
- * Back in \a query_for_backends(), the internal *streaming* call to the LB
- * server (whichever address from {a1..an} pick-first chose) is kicked off.
- * It'll progress over the callbacks configured in \a lb_client_data_create()
- * (see the field docstrings of \a lb_client_data for more details).
- *
- * If the call fails with UNIMPLEMENTED, the original call will also fail.
- * There's a misconfiguration somewhere: at least one of {a1..an} isn't a LB
- * server, which contradicts the LB bit being set. If the internal call times
- * out, the usual behavior of pick-first applies, continuing to pick from the
- * list {a1..an}.
- *
- * Upon sucesss, a \a LoadBalancingResponse is expected in \a res_recv_cb. An
- * invalid one results in the termination of the streaming call. A new streaming
- * call should be created if possible, failing the original call otherwise.
- * For a valid \a LoadBalancingResponse, the server list of actual backends is
- * extracted. A Round Robin policy will be created from this list. There are two
- * possible scenarios:
+ * Upon sucesss, the incoming \a LoadBalancingResponse is processed by \a
+ * res_recv. An invalid one results in the termination of the streaming call. A
+ * new streaming call should be created if possible, failing the original call
+ * otherwise. For a valid \a LoadBalancingResponse, the server list of actual
+ * backends is extracted. A Round Robin policy will be created from this list.
+ * There are two possible scenarios:
*
* 1. This is the first server list received. There was no previous instance of
* the Round Robin policy. \a rr_handover_locked() will instantiate the RR
@@ -84,10 +77,10 @@
* Once a RR policy instance is in place (and getting updated as described),
* calls to for a pick, a ping or a cancellation will be serviced right away by
* forwarding them to the RR instance. Any time there's no RR policy available
- * (ie, right after the creation of the gRPCLB policy, if an empty serverlist
- * is received, etc), pick/ping requests are added to a list of pending
- * picks/pings to be flushed and serviced as part of \a rr_handover_locked() the
- * moment the RR policy instance becomes available.
+ * (ie, right after the creation of the gRPCLB policy, if an empty serverlist is
+ * received, etc), pick/ping requests are added to a list of pending picks/pings
+ * to be flushed and serviced as part of \a rr_handover_locked() the moment the
+ * RR policy instance becomes available.
*
* \see https://github.com/grpc/grpc/blob/master/doc/load-balancing.md for the
* high level design and details. */
@@ -120,12 +113,20 @@
#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"
+#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"
+#include "src/core/lib/iomgr/timer.h"
+#include "src/core/lib/support/backoff.h"
#include "src/core/lib/support/string.h"
#include "src/core/lib/surface/call.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/transport/static_metadata.h"
+#define BACKOFF_MULTIPLIER 1.6
+#define BACKOFF_JITTER 0.2
+#define BACKOFF_MIN_SECONDS 10
+#define BACKOFF_MAX_SECONDS 60
+
int grpc_lb_glb_trace = 0;
/* add lb_token of selected subchannel (address) to the call's initial
@@ -174,13 +175,12 @@ typedef struct wrapped_rr_closure_arg {
static void wrapped_rr_closure(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
wrapped_rr_closure_arg *wc_arg = arg;
- if (wc_arg->rr_policy != NULL) {
- if (grpc_lb_glb_trace) {
- gpr_log(GPR_INFO, "Unreffing RR (0x%" PRIxPTR ")",
- (intptr_t)wc_arg->rr_policy);
- }
- GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "wrapped_rr_closure");
+ GPR_ASSERT(wc_arg->wrapped_closure != NULL);
+ grpc_exec_ctx_sched(exec_ctx, wc_arg->wrapped_closure, GRPC_ERROR_REF(error),
+ NULL);
+
+ if (wc_arg->rr_policy != NULL) {
/* if target is NULL, no pick has been made by the RR policy (eg, all
* addresses failed to connect). There won't be any user_data/token
* available */
@@ -189,10 +189,12 @@ static void wrapped_rr_closure(grpc_exec_ctx *exec_ctx, void *arg,
wc_arg->lb_token_mdelem_storage,
GRPC_MDELEM_REF(wc_arg->lb_token));
}
+ if (grpc_lb_glb_trace) {
+ gpr_log(GPR_INFO, "Unreffing RR (0x%" PRIxPTR ")",
+ (intptr_t)wc_arg->rr_policy);
+ }
+ GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "wrapped_rr_closure");
}
- GPR_ASSERT(wc_arg->wrapped_closure != NULL);
- grpc_exec_ctx_sched(exec_ctx, wc_arg->wrapped_closure, GRPC_ERROR_REF(error),
- NULL);
GPR_ASSERT(wc_arg->free_when_done != NULL);
gpr_free(wc_arg->free_when_done);
}
@@ -264,7 +266,6 @@ static void add_pending_ping(pending_ping **root, grpc_closure *notify) {
* glb_lb_policy
*/
typedef struct rr_connectivity_data rr_connectivity_data;
-struct lb_client_data;
static const grpc_lb_policy_vtable glb_lb_policy_vtable;
typedef struct glb_lb_policy {
/** base policy: must be first */
@@ -296,20 +297,47 @@ typedef struct glb_lb_policy {
* response has arrived. */
grpc_grpclb_serverlist *serverlist;
- /** addresses from \a serverlist */
- grpc_lb_addresses *addresses;
-
/** list of picks that are waiting on RR's policy connectivity */
pending_pick *pending_picks;
/** list of pings that are waiting on RR's policy connectivity */
pending_ping *pending_pings;
- /** client data associated with the LB server communication */
- struct lb_client_data *lb_client;
+ bool shutting_down;
+
+ /************************************************************/
+ /* client data associated with the LB server communication */
+ /************************************************************/
+ /* Status from the LB server has been received. This signals the end of the LB
+ * call. */
+ grpc_closure lb_on_server_status_received;
+
+ /* A response from the LB server has been received. Process it */
+ grpc_closure lb_on_response_received;
+
+ grpc_call *lb_call; /* streaming call to the LB server, */
+
+ grpc_metadata_array lb_initial_metadata_recv; /* initial MD from LB server */
+ grpc_metadata_array
+ lb_trailing_metadata_recv; /* trailing MD from LB server */
+
+ /* what's being sent to the LB server. Note that its value may vary if the LB
+ * server indicates a redirect. */
+ grpc_byte_buffer *lb_request_payload;
+
+ /* response the LB server, if any. Processed in lb_on_response_received() */
+ grpc_byte_buffer *lb_response_payload;
+
+ /* call status code and details, set in lb_on_server_status_received() */
+ grpc_status_code lb_call_status;
+ char *lb_call_status_details;
+ size_t lb_call_status_details_capacity;
+
+ /** LB call retry backoff state */
+ gpr_backoff lb_call_backoff_state;
- /** for tracking of the RR connectivity */
- rr_connectivity_data *rr_connectivity;
+ /** LB call retry timer */
+ grpc_timer lb_call_retry_timer;
} glb_lb_policy;
/* Keeps track and reacts to changes in connectivity of the RR instance */
@@ -358,6 +386,28 @@ static int lb_token_cmp(void *token1, void *token2) {
static const grpc_lb_user_data_vtable lb_token_vtable = {
lb_token_copy, lb_token_destroy, lb_token_cmp};
+static void parse_server(const grpc_grpclb_server *server,
+ grpc_resolved_address *addr) {
+ const uint16_t netorder_port = htons((uint16_t)server->port);
+ /* the addresses are given in binary format (a in(6)_addr struct) in
+ * server->ip_address.bytes. */
+ const grpc_grpclb_ip_address *ip = &server->ip_address;
+ memset(addr, 0, sizeof(*addr));
+ if (ip->size == 4) {
+ addr->len = sizeof(struct sockaddr_in);
+ struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr->addr;
+ addr4->sin_family = AF_INET;
+ memcpy(&addr4->sin_addr, ip->bytes, ip->size);
+ addr4->sin_port = netorder_port;
+ } else if (ip->size == 16) {
+ addr->len = sizeof(struct sockaddr_in6);
+ struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&addr->addr;
+ addr6->sin6_family = AF_INET6;
+ memcpy(&addr6->sin6_addr, ip->bytes, ip->size);
+ addr6->sin6_port = netorder_port;
+ }
+}
+
/* Returns addresses extracted from \a serverlist. */
static grpc_lb_addresses *process_serverlist(
const grpc_grpclb_serverlist *serverlist) {
@@ -384,33 +434,18 @@ static grpc_lb_addresses *process_serverlist(
if (!is_server_valid(serverlist->servers[sl_idx], sl_idx, false)) continue;
/* address processing */
- const uint16_t netorder_port = htons((uint16_t)server->port);
- /* the addresses are given in binary format (a in(6)_addr struct) in
- * server->ip_address.bytes. */
- const grpc_grpclb_ip_address *ip = &server->ip_address;
grpc_resolved_address addr;
- memset(&addr, 0, sizeof(addr));
- if (ip->size == 4) {
- addr.len = sizeof(struct sockaddr_in);
- struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr.addr;
- addr4->sin_family = AF_INET;
- memcpy(&addr4->sin_addr, ip->bytes, ip->size);
- addr4->sin_port = netorder_port;
- } else if (ip->size == 16) {
- addr.len = sizeof(struct sockaddr_in6);
- struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&addr.addr;
- addr6->sin6_family = AF_INET;
- memcpy(&addr6->sin6_addr, ip->bytes, ip->size);
- addr6->sin6_port = netorder_port;
- }
+ parse_server(server, &addr);
/* lb token processing */
void *user_data;
if (server->has_load_balance_token) {
- const size_t lb_token_size =
- GPR_ARRAY_SIZE(server->load_balance_token) - 1;
+ const size_t lb_token_max_length =
+ GPR_ARRAY_SIZE(server->load_balance_token);
+ const size_t lb_token_length =
+ strnlen(server->load_balance_token, lb_token_max_length);
grpc_mdstr *lb_token_mdstr = grpc_mdstr_from_buffer(
- (uint8_t *)server->load_balance_token, lb_token_size);
+ (uint8_t *)server->load_balance_token, lb_token_length);
user_data = grpc_mdelem_from_metadata_strings(GRPC_MDSTR_LB_TOKEN,
lb_token_mdstr);
} else {
@@ -427,7 +462,6 @@ static grpc_lb_addresses *process_serverlist(
++addr_idx;
}
GPR_ASSERT(addr_idx == num_valid);
-
return lb_addresses;
}
@@ -448,7 +482,7 @@ static bool pick_from_internal_rr_locked(
gpr_log(GPR_INFO, "Unreffing RR (0x%" PRIxPTR ")",
(intptr_t)wc_arg->rr_policy);
}
- GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "glb_pick");
+ GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "glb_pick_sync");
/* add the load reporting initial metadata */
initial_metadata_add_lb_token(pick_args->initial_metadata,
@@ -461,7 +495,6 @@ static bool pick_from_internal_rr_locked(
* pending pick list inside the RR policy (glb_policy->rr_policy).
* Eventually, wrapped_on_complete will be called, which will -among other
* things- add the LB token to the call's initial metadata */
-
return pick_done;
}
@@ -470,54 +503,70 @@ static grpc_lb_policy *create_rr_locked(
glb_lb_policy *glb_policy) {
GPR_ASSERT(serverlist != NULL && serverlist->num_servers > 0);
- if (glb_policy->addresses != NULL) {
- /* dispose of the previous version */
- grpc_lb_addresses_destroy(glb_policy->addresses);
- }
- glb_policy->addresses = process_serverlist(serverlist);
-
grpc_lb_policy_args args;
memset(&args, 0, sizeof(args));
args.client_channel_factory = glb_policy->cc_factory;
+ grpc_lb_addresses *addresses = process_serverlist(serverlist);
// Replace the LB addresses in the channel args that we pass down to
// the subchannel.
static const char *keys_to_remove[] = {GRPC_ARG_LB_ADDRESSES};
- const grpc_arg arg =
- grpc_lb_addresses_create_channel_arg(glb_policy->addresses);
+ const grpc_arg arg = grpc_lb_addresses_create_channel_arg(addresses);
args.args = grpc_channel_args_copy_and_add_and_remove(
glb_policy->args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove), &arg,
1);
grpc_lb_policy *rr = grpc_lb_policy_create(exec_ctx, "round_robin", &args);
+ GPR_ASSERT(rr != NULL);
+ grpc_lb_addresses_destroy(addresses);
grpc_channel_args_destroy(args.args);
-
return rr;
}
+static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error);
+/* glb_policy->rr_policy may be NULL (initial handover) */
static void rr_handover_locked(grpc_exec_ctx *exec_ctx,
glb_lb_policy *glb_policy, grpc_error *error) {
GPR_ASSERT(glb_policy->serverlist != NULL &&
glb_policy->serverlist->num_servers > 0);
+
+ if (grpc_lb_glb_trace) {
+ gpr_log(GPR_INFO, "RR handover. Old RR: %p", (void *)glb_policy->rr_policy);
+ }
+ if (glb_policy->rr_policy != NULL) {
+ /* if we are phasing out an existing RR instance, unref it. */
+ GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "rr_handover");
+ }
+
glb_policy->rr_policy =
create_rr_locked(exec_ctx, glb_policy->serverlist, glb_policy);
-
if (grpc_lb_glb_trace) {
- gpr_log(GPR_INFO, "Created RR policy (0x%" PRIxPTR ")",
- (intptr_t)glb_policy->rr_policy);
+ gpr_log(GPR_INFO, "Created RR policy (%p)", (void *)glb_policy->rr_policy);
}
+
GPR_ASSERT(glb_policy->rr_policy != NULL);
grpc_pollset_set_add_pollset_set(exec_ctx,
glb_policy->rr_policy->interested_parties,
glb_policy->base.interested_parties);
- glb_policy->rr_connectivity->state = grpc_lb_policy_check_connectivity(
+
+ rr_connectivity_data *rr_connectivity =
+ gpr_malloc(sizeof(rr_connectivity_data));
+ memset(rr_connectivity, 0, sizeof(rr_connectivity_data));
+ grpc_closure_init(&rr_connectivity->on_change, glb_rr_connectivity_changed,
+ rr_connectivity);
+ rr_connectivity->glb_policy = glb_policy;
+ rr_connectivity->state = grpc_lb_policy_check_connectivity(
exec_ctx, glb_policy->rr_policy, &error);
- grpc_lb_policy_notify_on_state_change(
- exec_ctx, glb_policy->rr_policy, &glb_policy->rr_connectivity->state,
- &glb_policy->rr_connectivity->on_change);
+
grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker,
- glb_policy->rr_connectivity->state,
- GRPC_ERROR_REF(error), "rr_handover");
+ rr_connectivity->state, GRPC_ERROR_REF(error),
+ "rr_handover");
+ /* subscribe */
+ GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "rr_connectivity_cb");
+ grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy,
+ &rr_connectivity->state,
+ &rr_connectivity->on_change);
grpc_lb_policy_exit_idle(exec_ctx, glb_policy->rr_policy);
/* flush pending ops */
@@ -551,35 +600,27 @@ static void rr_handover_locked(grpc_exec_ctx *exec_ctx,
static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
+ /* If shutdown or error free the arg. Rely on the rest of the code to set the
+ * right grpclb status. */
rr_connectivity_data *rr_conn_data = arg;
glb_lb_policy *glb_policy = rr_conn_data->glb_policy;
- if (rr_conn_data->state == GRPC_CHANNEL_SHUTDOWN) {
- if (glb_policy->serverlist != NULL) {
- /* a RR policy is shutting down but there's a serverlist available ->
- * perform a handover */
- gpr_mu_lock(&glb_policy->mu);
- rr_handover_locked(exec_ctx, glb_policy, error);
- gpr_mu_unlock(&glb_policy->mu);
- } else {
- /* shutting down and no new serverlist available. Bail out. */
- gpr_free(rr_conn_data);
- }
+ if (rr_conn_data->state != GRPC_CHANNEL_SHUTDOWN &&
+ !glb_policy->shutting_down) {
+ gpr_mu_lock(&glb_policy->mu);
+ /* RR not shutting down. Mimic the RR's policy state */
+ grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker,
+ rr_conn_data->state, GRPC_ERROR_REF(error),
+ "rr_connectivity_cb");
+ /* resubscribe. Reuse the "rr_connectivity_cb" weak ref. */
+ grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy,
+ &rr_conn_data->state,
+ &rr_conn_data->on_change);
+ gpr_mu_unlock(&glb_policy->mu);
} else {
- if (error == GRPC_ERROR_NONE) {
- gpr_mu_lock(&glb_policy->mu);
- /* RR not shutting down. Mimic the RR's policy state */
- grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker,
- rr_conn_data->state, GRPC_ERROR_REF(error),
- "glb_rr_connectivity_changed");
- /* resubscribe */
- grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy,
- &rr_conn_data->state,
- &rr_conn_data->on_change);
- gpr_mu_unlock(&glb_policy->mu);
- } else { /* error */
- gpr_free(rr_conn_data);
- }
+ GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base,
+ "rr_connectivity_cb");
+ gpr_free(rr_conn_data);
}
}
@@ -682,18 +723,11 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx,
return NULL;
}
- rr_connectivity_data *rr_connectivity =
- gpr_malloc(sizeof(rr_connectivity_data));
- memset(rr_connectivity, 0, sizeof(rr_connectivity_data));
- grpc_closure_init(&rr_connectivity->on_change, glb_rr_connectivity_changed,
- rr_connectivity);
- rr_connectivity->glb_policy = glb_policy;
- glb_policy->rr_connectivity = rr_connectivity;
-
grpc_lb_policy_init(&glb_policy->base, &glb_lb_policy_vtable);
gpr_mu_init(&glb_policy->mu);
grpc_connectivity_state_init(&glb_policy->state_tracker, GRPC_CHANNEL_IDLE,
"grpclb");
+
return &glb_policy->base;
}
@@ -710,19 +744,30 @@ static void glb_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
grpc_grpclb_destroy_serverlist(glb_policy->serverlist);
}
gpr_mu_destroy(&glb_policy->mu);
- grpc_lb_addresses_destroy(glb_policy->addresses);
gpr_free(glb_policy);
}
-static void lb_client_data_destroy(struct lb_client_data *lb_client);
static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
glb_lb_policy *glb_policy = (glb_lb_policy *)pol;
gpr_mu_lock(&glb_policy->mu);
+ glb_policy->shutting_down = true;
pending_pick *pp = glb_policy->pending_picks;
glb_policy->pending_picks = NULL;
pending_ping *pping = glb_policy->pending_pings;
glb_policy->pending_pings = NULL;
+ if (glb_policy->rr_policy) {
+ GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "glb_shutdown");
+ }
+ if (glb_policy->started_picking) {
+ if (glb_policy->lb_call != NULL) {
+ grpc_call_cancel(glb_policy->lb_call, NULL);
+ /* lb_on_server_status_received will pick up the cancel and clean up */
+ }
+ }
+ grpc_connectivity_state_set(
+ exec_ctx, &glb_policy->state_tracker, GRPC_CHANNEL_SHUTDOWN,
+ GRPC_ERROR_CREATE("Channel Shutdown"), "glb_shutdown");
gpr_mu_unlock(&glb_policy->mu);
while (pp != NULL) {
@@ -739,21 +784,6 @@ static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
GRPC_ERROR_NONE, NULL);
pping = next;
}
-
- if (glb_policy->rr_policy) {
- /* unsubscribe */
- grpc_lb_policy_notify_on_state_change(
- exec_ctx, glb_policy->rr_policy, NULL,
- &glb_policy->rr_connectivity->on_change);
- GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "glb_shutdown");
- }
-
- lb_client_data_destroy(glb_policy->lb_client);
- glb_policy->lb_client = NULL;
-
- grpc_connectivity_state_set(
- exec_ctx, &glb_policy->state_tracker, GRPC_CHANNEL_SHUTDOWN,
- GRPC_ERROR_CREATE("Channel Shutdown"), "glb_shutdown");
}
static void glb_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
@@ -780,17 +810,12 @@ static void glb_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
GRPC_ERROR_UNREF(error);
}
-static grpc_call *lb_client_data_get_call(struct lb_client_data *lb_client);
static void glb_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
uint32_t initial_metadata_flags_mask,
uint32_t initial_metadata_flags_eq,
grpc_error *error) {
glb_lb_policy *glb_policy = (glb_lb_policy *)pol;
gpr_mu_lock(&glb_policy->mu);
- if (glb_policy->lb_client != NULL) {
- /* cancel the call to the load balancer service, if any */
- grpc_call_cancel(lb_client_data_get_call(glb_policy->lb_client), NULL);
- }
pending_pick *pp = glb_policy->pending_picks;
glb_policy->pending_picks = NULL;
while (pp != NULL) {
@@ -810,18 +835,20 @@ static void glb_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
GRPC_ERROR_UNREF(error);
}
-static void query_for_backends(grpc_exec_ctx *exec_ctx,
- glb_lb_policy *glb_policy);
-static void start_picking(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy) {
+static void query_for_backends_locked(grpc_exec_ctx *exec_ctx,
+ glb_lb_policy *glb_policy);
+static void start_picking_locked(grpc_exec_ctx *exec_ctx,
+ glb_lb_policy *glb_policy) {
glb_policy->started_picking = true;
- query_for_backends(exec_ctx, glb_policy);
+ gpr_backoff_reset(&glb_policy->lb_call_backoff_state);
+ query_for_backends_locked(exec_ctx, glb_policy);
}
static void glb_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
glb_lb_policy *glb_policy = (glb_lb_policy *)pol;
gpr_mu_lock(&glb_policy->mu);
if (!glb_policy->started_picking) {
- start_picking(exec_ctx, glb_policy);
+ start_picking_locked(exec_ctx, glb_policy);
}
gpr_mu_unlock(&glb_policy->mu);
}
@@ -847,8 +874,8 @@ static int glb_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
if (glb_policy->rr_policy != NULL) {
if (grpc_lb_glb_trace) {
- gpr_log(GPR_INFO, "about to PICK from 0x%" PRIxPTR "",
- (intptr_t)glb_policy->rr_policy);
+ gpr_log(GPR_INFO, "grpclb %p about to PICK from RR %p",
+ (void *)glb_policy, (void *)glb_policy->rr_policy);
}
GRPC_LB_POLICY_REF(glb_policy->rr_policy, "glb_pick");
@@ -865,11 +892,17 @@ static int glb_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
pick_done = pick_from_internal_rr_locked(exec_ctx, glb_policy->rr_policy,
pick_args, target, wc_arg);
} else {
+ if (grpc_lb_glb_trace) {
+ gpr_log(GPR_DEBUG,
+ "No RR policy in grpclb instance %p. Adding to grpclb's pending "
+ "picks",
+ (void *)(glb_policy));
+ }
add_pending_pick(&glb_policy->pending_picks, pick_args, target,
on_complete);
if (!glb_policy->started_picking) {
- start_picking(exec_ctx, glb_policy);
+ start_picking_locked(exec_ctx, glb_policy);
}
pick_done = false;
}
@@ -898,7 +931,7 @@ static void glb_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
} else {
add_pending_ping(&glb_policy->pending_pings, closure);
if (!glb_policy->started_picking) {
- start_picking(exec_ctx, glb_policy);
+ start_picking_locked(exec_ctx, glb_policy);
}
}
gpr_mu_unlock(&glb_policy->mu);
@@ -916,250 +949,182 @@ static void glb_notify_on_state_change(grpc_exec_ctx *exec_ctx,
gpr_mu_unlock(&glb_policy->mu);
}
-/*
- * lb_client_data
- *
- * Used internally for the client call to the LB */
-typedef struct lb_client_data {
- gpr_mu mu;
-
- /* called once initial metadata's been sent */
- grpc_closure md_sent;
-
- /* called once the LoadBalanceRequest has been sent to the LB server. See
- * src/proto/grpc/.../load_balancer.proto */
- grpc_closure req_sent;
-
- /* A response from the LB server has been received (or error). Process it */
- grpc_closure res_rcvd;
-
- /* After the client has sent a close to the LB server */
- grpc_closure close_sent;
-
- /* ... and the status from the LB server has been received */
- grpc_closure srv_status_rcvd;
-
- grpc_call *lb_call; /* streaming call to the LB server, */
- gpr_timespec deadline; /* for the streaming call to the LB server */
-
- grpc_metadata_array initial_metadata_recv; /* initial MD from LB server */
- grpc_metadata_array trailing_metadata_recv; /* trailing MD from LB server */
-
- /* what's being sent to the LB server. Note that its value may vary if the LB
- * server indicates a redirect. */
- grpc_byte_buffer *request_payload;
-
- /* response from the LB server, if any. Processed in res_recv_cb() */
- grpc_byte_buffer *response_payload;
-
- /* the call's status and status detailset in srv_status_rcvd_cb() */
- grpc_status_code status;
- char *status_details;
- size_t status_details_capacity;
-
- /* pointer back to the enclosing policy */
- glb_lb_policy *glb_policy;
-} lb_client_data;
-
-static void md_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error);
-static void req_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error);
-static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error);
-static void close_sent_cb(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_error *error);
-static void srv_status_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_error *error);
-
-static lb_client_data *lb_client_data_create(glb_lb_policy *glb_policy) {
+static void lb_on_server_status_received(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error);
+static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error);
+static void lb_call_init(glb_lb_policy *glb_policy) {
GPR_ASSERT(glb_policy->server_name != NULL);
GPR_ASSERT(glb_policy->server_name[0] != '\0');
- lb_client_data *lb_client = gpr_malloc(sizeof(lb_client_data));
- memset(lb_client, 0, sizeof(lb_client_data));
-
- gpr_mu_init(&lb_client->mu);
- grpc_closure_init(&lb_client->md_sent, md_sent_cb, lb_client);
-
- grpc_closure_init(&lb_client->req_sent, req_sent_cb, lb_client);
- grpc_closure_init(&lb_client->res_rcvd, res_recv_cb, lb_client);
- grpc_closure_init(&lb_client->close_sent, close_sent_cb, lb_client);
- grpc_closure_init(&lb_client->srv_status_rcvd, srv_status_rcvd_cb, lb_client);
-
- lb_client->deadline = glb_policy->deadline;
-
/* Note the following LB call progresses every time there's activity in \a
* glb_policy->base.interested_parties, which is comprised of the polling
* entities from \a client_channel. */
- lb_client->lb_call = grpc_channel_create_pollset_set_call(
+ glb_policy->lb_call = grpc_channel_create_pollset_set_call(
glb_policy->lb_channel, NULL, GRPC_PROPAGATE_DEFAULTS,
glb_policy->base.interested_parties,
"/grpc.lb.v1.LoadBalancer/BalanceLoad", glb_policy->server_name,
- lb_client->deadline, NULL);
+ glb_policy->deadline, NULL);
- grpc_metadata_array_init(&lb_client->initial_metadata_recv);
- grpc_metadata_array_init(&lb_client->trailing_metadata_recv);
+ grpc_metadata_array_init(&glb_policy->lb_initial_metadata_recv);
+ grpc_metadata_array_init(&glb_policy->lb_trailing_metadata_recv);
grpc_grpclb_request *request =
grpc_grpclb_request_create(glb_policy->server_name);
gpr_slice request_payload_slice = grpc_grpclb_request_encode(request);
- lb_client->request_payload =
+ glb_policy->lb_request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
gpr_slice_unref(request_payload_slice);
grpc_grpclb_request_destroy(request);
- lb_client->status_details = NULL;
- lb_client->status_details_capacity = 0;
- lb_client->glb_policy = glb_policy;
- return lb_client;
+ glb_policy->lb_call_status_details = NULL;
+ glb_policy->lb_call_status_details_capacity = 0;
+
+ grpc_closure_init(&glb_policy->lb_on_server_status_received,
+ lb_on_server_status_received, glb_policy);
+ grpc_closure_init(&glb_policy->lb_on_response_received,
+ lb_on_response_received, glb_policy);
+
+ gpr_backoff_init(&glb_policy->lb_call_backoff_state, BACKOFF_MULTIPLIER,
+ BACKOFF_JITTER, BACKOFF_MIN_SECONDS * 1000,
+ BACKOFF_MAX_SECONDS * 1000);
}
-static void lb_client_data_destroy(lb_client_data *lb_client) {
- grpc_call_destroy(lb_client->lb_call);
- grpc_metadata_array_destroy(&lb_client->initial_metadata_recv);
- grpc_metadata_array_destroy(&lb_client->trailing_metadata_recv);
+static void lb_call_destroy_locked(glb_lb_policy *glb_policy) {
+ GPR_ASSERT(glb_policy->lb_call != NULL);
+ grpc_call_destroy(glb_policy->lb_call);
+ glb_policy->lb_call = NULL;
- grpc_byte_buffer_destroy(lb_client->request_payload);
+ grpc_metadata_array_destroy(&glb_policy->lb_initial_metadata_recv);
+ grpc_metadata_array_destroy(&glb_policy->lb_trailing_metadata_recv);
- gpr_free(lb_client->status_details);
- gpr_mu_destroy(&lb_client->mu);
- gpr_free(lb_client);
-}
-static grpc_call *lb_client_data_get_call(lb_client_data *lb_client) {
- return lb_client->lb_call;
+ grpc_byte_buffer_destroy(glb_policy->lb_request_payload);
+ gpr_free(glb_policy->lb_call_status_details);
}
/*
* Auxiliary functions and LB client callbacks.
*/
-static void query_for_backends(grpc_exec_ctx *exec_ctx,
- glb_lb_policy *glb_policy) {
+static void query_for_backends_locked(grpc_exec_ctx *exec_ctx,
+ glb_lb_policy *glb_policy) {
GPR_ASSERT(glb_policy->lb_channel != NULL);
+ lb_call_init(glb_policy);
+
+ if (grpc_lb_glb_trace) {
+ gpr_log(GPR_INFO, "Query for backends (grpclb: %p, lb_call: %p)",
+ (void *)glb_policy, (void *)glb_policy->lb_call);
+ }
+ GPR_ASSERT(glb_policy->lb_call != NULL);
- glb_policy->lb_client = lb_client_data_create(glb_policy);
grpc_call_error call_error;
- grpc_op ops[1];
+ grpc_op ops[4];
memset(ops, 0, sizeof(ops));
+
grpc_op *op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
op->flags = 0;
op->reserved = NULL;
op++;
- call_error = grpc_call_start_batch_and_execute(
- exec_ctx, glb_policy->lb_client->lb_call, ops, (size_t)(op - ops),
- &glb_policy->lb_client->md_sent);
- GPR_ASSERT(GRPC_CALL_OK == call_error);
- op = ops;
- op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
- op->data.recv_status_on_client.trailing_metadata =
- &glb_policy->lb_client->trailing_metadata_recv;
- op->data.recv_status_on_client.status = &glb_policy->lb_client->status;
- op->data.recv_status_on_client.status_details =
- &glb_policy->lb_client->status_details;
- op->data.recv_status_on_client.status_details_capacity =
- &glb_policy->lb_client->status_details_capacity;
+ op->op = GRPC_OP_RECV_INITIAL_METADATA;
+ op->data.recv_initial_metadata = &glb_policy->lb_initial_metadata_recv;
op->flags = 0;
op->reserved = NULL;
op++;
- call_error = grpc_call_start_batch_and_execute(
- exec_ctx, glb_policy->lb_client->lb_call, ops, (size_t)(op - ops),
- &glb_policy->lb_client->srv_status_rcvd);
- GPR_ASSERT(GRPC_CALL_OK == call_error);
-}
-
-static void md_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
- lb_client_data *lb_client = arg;
- GPR_ASSERT(lb_client->lb_call);
- grpc_op ops[1];
- memset(ops, 0, sizeof(ops));
- grpc_op *op = ops;
+ GPR_ASSERT(glb_policy->lb_request_payload != NULL);
op->op = GRPC_OP_SEND_MESSAGE;
- op->data.send_message = lb_client->request_payload;
+ op->data.send_message = glb_policy->lb_request_payload;
op->flags = 0;
op->reserved = NULL;
op++;
- grpc_call_error call_error = grpc_call_start_batch_and_execute(
- exec_ctx, lb_client->lb_call, ops, (size_t)(op - ops),
- &lb_client->req_sent);
- GPR_ASSERT(GRPC_CALL_OK == call_error);
-}
-
-static void req_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
- lb_client_data *lb_client = arg;
- GPR_ASSERT(lb_client->lb_call);
- grpc_op ops[2];
- memset(ops, 0, sizeof(ops));
- grpc_op *op = ops;
-
- op->op = GRPC_OP_RECV_INITIAL_METADATA;
- op->data.recv_initial_metadata = &lb_client->initial_metadata_recv;
+ op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
+ op->data.recv_status_on_client.trailing_metadata =
+ &glb_policy->lb_trailing_metadata_recv;
+ op->data.recv_status_on_client.status = &glb_policy->lb_call_status;
+ op->data.recv_status_on_client.status_details =
+ &glb_policy->lb_call_status_details;
+ op->data.recv_status_on_client.status_details_capacity =
+ &glb_policy->lb_call_status_details_capacity;
op->flags = 0;
op->reserved = NULL;
op++;
+ /* take a weak ref (won't prevent calling of \a glb_shutdown if the strong ref
+ * count goes to zero) to be unref'd in lb_on_server_status_received */
+ GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "lb_on_server_status_received");
+ call_error = grpc_call_start_batch_and_execute(
+ exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops),
+ &glb_policy->lb_on_server_status_received);
+ GPR_ASSERT(GRPC_CALL_OK == call_error);
+ op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
- op->data.recv_message = &lb_client->response_payload;
+ op->data.recv_message = &glb_policy->lb_response_payload;
op->flags = 0;
op->reserved = NULL;
op++;
- grpc_call_error call_error = grpc_call_start_batch_and_execute(
- exec_ctx, lb_client->lb_call, ops, (size_t)(op - ops),
- &lb_client->res_rcvd);
+ /* take another weak ref to be unref'd in lb_on_response_received */
+ GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "lb_on_response_received");
+ call_error = grpc_call_start_batch_and_execute(
+ exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops),
+ &glb_policy->lb_on_response_received);
GPR_ASSERT(GRPC_CALL_OK == call_error);
}
-static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
- lb_client_data *lb_client = arg;
+static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error) {
+ glb_lb_policy *glb_policy = arg;
+
grpc_op ops[2];
memset(ops, 0, sizeof(ops));
grpc_op *op = ops;
- if (lb_client->response_payload != NULL) {
+ if (glb_policy->lb_response_payload != NULL) {
+ gpr_backoff_reset(&glb_policy->lb_call_backoff_state);
/* Received data from the LB server. Look inside
- * lb_client->response_payload, for a serverlist. */
+ * glb_policy->lb_response_payload, for a serverlist. */
grpc_byte_buffer_reader bbr;
- grpc_byte_buffer_reader_init(&bbr, lb_client->response_payload);
+ grpc_byte_buffer_reader_init(&bbr, glb_policy->lb_response_payload);
gpr_slice response_slice = grpc_byte_buffer_reader_readall(&bbr);
- grpc_byte_buffer_destroy(lb_client->response_payload);
+ grpc_byte_buffer_destroy(glb_policy->lb_response_payload);
grpc_grpclb_serverlist *serverlist =
grpc_grpclb_response_parse_serverlist(response_slice);
if (serverlist != NULL) {
+ GPR_ASSERT(glb_policy->lb_call != NULL);
gpr_slice_unref(response_slice);
if (grpc_lb_glb_trace) {
gpr_log(GPR_INFO, "Serverlist with %lu servers received",
(unsigned long)serverlist->num_servers);
+ for (size_t i = 0; i < serverlist->num_servers; ++i) {
+ grpc_resolved_address addr;
+ parse_server(serverlist->servers[i], &addr);
+ char *ipport;
+ grpc_sockaddr_to_string(&ipport, &addr, false);
+ gpr_log(GPR_INFO, "Serverlist[%lu]: %s", (unsigned long)i, ipport);
+ gpr_free(ipport);
+ }
}
/* update serverlist */
if (serverlist->num_servers > 0) {
- gpr_mu_lock(&lb_client->glb_policy->mu);
- if (grpc_grpclb_serverlist_equals(lb_client->glb_policy->serverlist,
- serverlist)) {
+ gpr_mu_lock(&glb_policy->mu);
+ if (grpc_grpclb_serverlist_equals(glb_policy->serverlist, serverlist)) {
if (grpc_lb_glb_trace) {
gpr_log(GPR_INFO,
"Incoming server list identical to current, ignoring.");
}
} else { /* new serverlist */
- if (lb_client->glb_policy->serverlist != NULL) {
+ if (glb_policy->serverlist != NULL) {
/* dispose of the old serverlist */
- grpc_grpclb_destroy_serverlist(lb_client->glb_policy->serverlist);
+ grpc_grpclb_destroy_serverlist(glb_policy->serverlist);
}
/* and update the copy in the glb_lb_policy instance */
- lb_client->glb_policy->serverlist = serverlist;
- }
- if (lb_client->glb_policy->rr_policy == NULL) {
- /* initial "handover", in this case from a null RR policy, meaning
- * it'll just create the first RR policy instance */
- rr_handover_locked(exec_ctx, lb_client->glb_policy, error);
- } else {
- /* unref the RR policy, eventually leading to its substitution with a
- * new one constructed from the received serverlist (see
- * glb_rr_connectivity_changed) */
- GRPC_LB_POLICY_UNREF(exec_ctx, lb_client->glb_policy->rr_policy,
- "serverlist_received");
+ glb_policy->serverlist = serverlist;
+
+ rr_handover_locked(exec_ctx, glb_policy, error);
}
- gpr_mu_unlock(&lb_client->glb_policy->mu);
+ gpr_mu_unlock(&glb_policy->mu);
} else {
if (grpc_lb_glb_trace) {
gpr_log(GPR_INFO,
@@ -1167,60 +1132,94 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
"response with > 0 servers is received");
}
}
+ } else { /* serverlist == NULL */
+ gpr_log(GPR_ERROR, "Invalid LB response received: '%s'. Ignoring.",
+ gpr_dump_slice(response_slice, GPR_DUMP_ASCII | GPR_DUMP_HEX));
+ gpr_slice_unref(response_slice);
+ }
+ if (!glb_policy->shutting_down) {
/* keep listening for serverlist updates */
op->op = GRPC_OP_RECV_MESSAGE;
- op->data.recv_message = &lb_client->response_payload;
+ op->data.recv_message = &glb_policy->lb_response_payload;
op->flags = 0;
op->reserved = NULL;
op++;
+ /* reuse the "lb_on_response_received" weak ref taken in
+ * query_for_backends_locked() */
const grpc_call_error call_error = grpc_call_start_batch_and_execute(
- exec_ctx, lb_client->lb_call, ops, (size_t)(op - ops),
- &lb_client->res_rcvd); /* loop */
+ exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops),
+ &glb_policy->lb_on_response_received); /* loop */
GPR_ASSERT(GRPC_CALL_OK == call_error);
- return;
}
-
- GPR_ASSERT(serverlist == NULL);
- gpr_log(GPR_ERROR, "Invalid LB response received: '%s'",
- gpr_dump_slice(response_slice, GPR_DUMP_ASCII));
- gpr_slice_unref(response_slice);
-
- /* Disconnect from server returning invalid response. */
- op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
- op->flags = 0;
- op->reserved = NULL;
- op++;
- grpc_call_error call_error = grpc_call_start_batch_and_execute(
- exec_ctx, lb_client->lb_call, ops, (size_t)(op - ops),
- &lb_client->close_sent);
- GPR_ASSERT(GRPC_CALL_OK == call_error);
+ } else { /* empty payload: call cancelled. */
+ /* dispose of the "lb_on_response_received" weak ref taken in
+ * query_for_backends_locked() and reused in every reception loop */
+ GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base,
+ "lb_on_response_received_empty_payload");
}
- /* empty payload: call cancelled by server. Cleanups happening in
- * srv_status_rcvd_cb */
}
-static void close_sent_cb(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_error *error) {
- if (grpc_lb_glb_trace) {
- gpr_log(GPR_INFO,
- "Close from LB client sent. Waiting from server status now");
+static void lb_call_on_retry_timer(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error) {
+ glb_lb_policy *glb_policy = arg;
+ gpr_mu_lock(&glb_policy->mu);
+
+ if (!glb_policy->shutting_down) {
+ if (grpc_lb_glb_trace) {
+ gpr_log(GPR_INFO, "Restaring call to LB server (grpclb %p)",
+ (void *)glb_policy);
+ }
+ GPR_ASSERT(glb_policy->lb_call == NULL);
+ query_for_backends_locked(exec_ctx, glb_policy);
}
+ gpr_mu_unlock(&glb_policy->mu);
+
+ GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base,
+ "grpclb_on_retry_timer");
}
-static void srv_status_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_error *error) {
- lb_client_data *lb_client = arg;
+static void lb_on_server_status_received(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error) {
+ glb_lb_policy *glb_policy = arg;
+ gpr_mu_lock(&glb_policy->mu);
+
+ GPR_ASSERT(glb_policy->lb_call != NULL);
+
if (grpc_lb_glb_trace) {
- gpr_log(GPR_INFO,
- "status from lb server received. Status = %d, Details = '%s', "
- "Capacity "
- "= %lu",
- lb_client->status, lb_client->status_details,
- (unsigned long)lb_client->status_details_capacity);
+ gpr_log(GPR_DEBUG,
+ "Status from LB server received. Status = %d, Details = '%s', "
+ "(call: %p)",
+ glb_policy->lb_call_status, glb_policy->lb_call_status_details,
+ (void *)glb_policy->lb_call);
}
- /* TODO(dgq): deal with stream termination properly (fire up another one?
- * fail the original call?) */
+
+ /* We need to performe cleanups no matter what. */
+ lb_call_destroy_locked(glb_policy);
+
+ if (!glb_policy->shutting_down) {
+ /* if we aren't shutting down, restart the LB client call after some time */
+ gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
+ gpr_timespec next_try =
+ gpr_backoff_step(&glb_policy->lb_call_backoff_state, now);
+ if (grpc_lb_glb_trace) {
+ gpr_log(GPR_DEBUG, "Connection to LB server lost (grpclb: %p)...",
+ (void *)glb_policy);
+ gpr_timespec timeout = gpr_time_sub(next_try, now);
+ if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) > 0) {
+ gpr_log(GPR_DEBUG, "... retrying in %" PRId64 ".%09d seconds.",
+ timeout.tv_sec, timeout.tv_nsec);
+ } else {
+ gpr_log(GPR_DEBUG, "... retrying immediately.");
+ }
+ }
+ GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "grpclb_retry_timer");
+ grpc_timer_init(exec_ctx, &glb_policy->lb_call_retry_timer, next_try,
+ lb_call_on_retry_timer, glb_policy, now);
+ }
+ gpr_mu_unlock(&glb_policy->mu);
+ GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base,
+ "lb_on_server_status_received");
}
/* Code wiring the policy with the rest of the core */
diff --git a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h
index 53fed22bae..e36d0966f8 100644
--- a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h
+++ b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h
@@ -77,7 +77,7 @@ typedef struct _grpc_lb_v1_Server {
bool has_port;
int32_t port;
bool has_load_balance_token;
- char load_balance_token[65];
+ char load_balance_token[50];
bool has_drop_request;
bool drop_request;
/* @@protoc_insertion_point(struct:grpc_lb_v1_Server) */
@@ -172,7 +172,7 @@ extern const pb_field_t grpc_lb_v1_Server_fields[5];
#define grpc_lb_v1_LoadBalanceResponse_size (98 + grpc_lb_v1_ServerList_size)
#define grpc_lb_v1_InitialLoadBalanceResponse_size 90
/* grpc_lb_v1_ServerList_size depends on runtime parameters */
-#define grpc_lb_v1_Server_size 98
+#define grpc_lb_v1_Server_size 83
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
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 37a9b18b97..0fd3abe099 100644
--- a/src/core/ext/lb_policy/round_robin/round_robin.c
+++ b/src/core/ext/lb_policy/round_robin/round_robin.c
@@ -120,6 +120,8 @@ typedef struct {
grpc_connectivity_state connectivity_state;
/** the subchannel's target user data */
void *user_data;
+ /** vtable to operate over \a user_data */
+ const grpc_lb_user_data_vtable *user_data_vtable;
} subchannel_data;
struct round_robin_lb_policy {
@@ -186,9 +188,13 @@ static void advance_last_picked_locked(round_robin_lb_policy *p) {
}
if (grpc_lb_round_robin_trace) {
- gpr_log(GPR_DEBUG, "[READYLIST] ADVANCED LAST PICK. NOW AT NODE %p (SC %p)",
- (void *)p->ready_list_last_pick,
- (void *)p->ready_list_last_pick->subchannel);
+ gpr_log(GPR_DEBUG,
+ "[READYLIST, RR: %p] ADVANCED LAST PICK. NOW AT NODE %p (SC %p, "
+ "CSC %p)",
+ (void *)p, (void *)p->ready_list_last_pick,
+ (void *)p->ready_list_last_pick->subchannel,
+ (void *)grpc_subchannel_get_connected_subchannel(
+ p->ready_list_last_pick->subchannel));
}
}
@@ -255,9 +261,18 @@ static void remove_disconnected_sc_locked(round_robin_lb_policy *p,
static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
round_robin_lb_policy *p = (round_robin_lb_policy *)pol;
ready_list *elem;
+
+ if (grpc_lb_round_robin_trace) {
+ gpr_log(GPR_DEBUG, "Destroying Round Robin policy at %p", (void *)pol);
+ }
+
for (size_t i = 0; i < p->num_subchannels; i++) {
subchannel_data *sd = p->subchannels[i];
- GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "round_robin");
+ GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "round_robin_destroy");
+ if (sd->user_data != NULL) {
+ GPR_ASSERT(sd->user_data_vtable != NULL);
+ sd->user_data_vtable->destroy(sd->user_data);
+ }
gpr_free(sd);
}
@@ -285,6 +300,9 @@ static void rr_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
size_t i;
gpr_mu_lock(&p->mu);
+ if (grpc_lb_round_robin_trace) {
+ gpr_log(GPR_DEBUG, "Shutting down Round Robin policy at %p", (void *)pol);
+ }
p->shutdown = 1;
while ((pp = p->pending_picks)) {
@@ -296,7 +314,7 @@ static void rr_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
}
grpc_connectivity_state_set(
exec_ctx, &p->state_tracker, GRPC_CHANNEL_SHUTDOWN,
- GRPC_ERROR_CREATE("Channel Shutdown"), "shutdown");
+ GRPC_ERROR_CREATE("Channel Shutdown"), "rr_shutdown");
for (i = 0; i < p->num_subchannels; i++) {
subchannel_data *sd = p->subchannels[i];
grpc_subchannel_notify_on_state_change(exec_ctx, sd->subchannel, NULL, NULL,
@@ -395,6 +413,11 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
pending_pick *pp;
ready_list *selected;
gpr_mu_lock(&p->mu);
+
+ if (grpc_lb_round_robin_trace) {
+ gpr_log(GPR_INFO, "Round Robin %p trying to pick", (void *)pol);
+ }
+
if ((selected = peek_next_connected_locked(p))) {
/* readily available, report right away */
*target = GRPC_CONNECTED_SUBCHANNEL_REF(
@@ -435,7 +458,6 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
subchannel_data *sd = arg;
round_robin_lb_policy *p = sd->policy;
pending_pick *pp;
- ready_list *selected;
int unref = 0;
@@ -456,12 +478,14 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
/* at this point we know there's at least one suitable subchannel. Go
* ahead and pick one and notify the pending suitors in
* p->pending_picks. This preemtively replicates rr_pick()'s actions. */
- selected = peek_next_connected_locked(p);
+ ready_list *selected = peek_next_connected_locked(p);
+ GPR_ASSERT(selected != NULL);
if (p->pending_picks != NULL) {
/* if the selected subchannel is going to be used for the pending
* picks, update the last picked pointer */
advance_last_picked_locked(p);
}
+
while ((pp = p->pending_picks)) {
p->pending_picks = pp->next;
@@ -585,6 +609,7 @@ static void rr_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
grpc_subchannel_get_connected_subchannel(selected->subchannel),
"picked");
grpc_connected_subchannel_ping(exec_ctx, target, closure);
+ GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, target, "picked");
} else {
gpr_mu_unlock(&p->mu);
grpc_exec_ctx_sched(exec_ctx, closure,
@@ -653,7 +678,11 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx,
sd->policy = p;
sd->index = subchannel_idx;
sd->subchannel = subchannel;
- sd->user_data = addresses->addresses[i].user_data;
+ sd->user_data_vtable = addresses->user_data_vtable;
+ if (sd->user_data_vtable != NULL) {
+ sd->user_data =
+ sd->user_data_vtable->copy(addresses->addresses[i].user_data);
+ }
++subchannel_idx;
grpc_closure_init(&sd->connectivity_changed_closure,
rr_connectivity_changed, sd);
diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c
index 958b8af8b2..665439f360 100644
--- a/src/core/ext/resolver/dns/native/dns_resolver.c
+++ b/src/core/ext/resolver/dns/native/dns_resolver.c
@@ -190,7 +190,7 @@ static void dns_on_resolved(grpc_exec_ctx *exec_ctx, void *arg,
GPR_ASSERT(!r->have_retry_timer);
r->have_retry_timer = true;
GRPC_RESOLVER_REF(&r->base, "retry-timer");
- if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) <= 0) {
+ if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) > 0) {
gpr_log(GPR_DEBUG, "retrying in %" PRId64 ".%09d seconds", timeout.tv_sec,
timeout.tv_nsec);
} else {
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 57e1a8ec01..d0ac72a011 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
@@ -347,7 +347,7 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds,
&exec_ctx, &f->base, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, new_args);
// Clean up.
GRPC_SECURITY_CONNECTOR_UNREF(&f->security_connector->base,
- "client_channel_factory_create_channel");
+ "secure_client_channel_factory_create_channel");
grpc_channel_args_destroy(new_args);
grpc_client_channel_factory_unref(&exec_ctx, &f->base);
grpc_exec_ctx_finish(&exec_ctx);
diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c
index 8180f78fc0..9702cb2c81 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_parser.c
+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c
@@ -50,6 +50,7 @@
#include <grpc/support/useful.h>
#include "src/core/ext/transport/chttp2/transport/bin_encoder.h"
+#include "src/core/ext/transport/chttp2/transport/http2_errors.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/support/string.h"
@@ -1578,6 +1579,20 @@ static const maybe_complete_func_type maybe_complete_funcs[] = {
grpc_chttp2_maybe_complete_recv_initial_metadata,
grpc_chttp2_maybe_complete_recv_trailing_metadata};
+static void force_client_rst_stream(grpc_exec_ctx *exec_ctx, void *sp,
+ grpc_error *error) {
+ grpc_chttp2_stream *s = sp;
+ grpc_chttp2_transport *t = s->t;
+ if (!s->write_closed) {
+ gpr_slice_buffer_add(
+ &t->qbuf, grpc_chttp2_rst_stream_create(s->id, GRPC_CHTTP2_NO_ERROR,
+ &s->stats.outgoing));
+ grpc_chttp2_initiate_write(exec_ctx, t, false, "force_rst_stream");
+ grpc_chttp2_mark_stream_closed(exec_ctx, t, s, true, true, GRPC_ERROR_NONE);
+ }
+ GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "final_rst");
+}
+
grpc_error *grpc_chttp2_header_parser_parse(grpc_exec_ctx *exec_ctx,
void *hpack_parser,
grpc_chttp2_transport *t,
@@ -1613,6 +1628,17 @@ grpc_error *grpc_chttp2_header_parser_parse(grpc_exec_ctx *exec_ctx,
s->header_frames_received++;
}
if (parser->is_eof) {
+ if (t->is_client && !s->write_closed) {
+ /* server eof ==> complete closure; we may need to forcefully close
+ the stream. Wait until the combiner lock is ready to be released
+ however -- it might be that we receive a RST_STREAM following this
+ and can avoid the extra write */
+ GRPC_CHTTP2_STREAM_REF(s, "final_rst");
+ grpc_combiner_execute_finally(
+ exec_ctx, t->combiner,
+ grpc_closure_create(force_client_rst_stream, s), GRPC_ERROR_NONE,
+ false);
+ }
grpc_chttp2_mark_stream_closed(exec_ctx, t, s, true, false,
GRPC_ERROR_NONE);
}
diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c
index 0981d59f63..23b7dfb8fd 100644
--- a/src/core/lib/channel/compress_filter.c
+++ b/src/core/lib/channel/compress_filter.c
@@ -111,9 +111,13 @@ static grpc_mdelem *compression_md_filter(void *user_data, grpc_mdelem *md) {
return md;
}
-static int skip_compression(grpc_call_element *elem) {
+static int skip_compression(grpc_call_element *elem, uint32_t flags) {
call_data *calld = elem->call_data;
channel_data *channeld = elem->channel_data;
+
+ if (flags & (GRPC_WRITE_NO_COMPRESS | GRPC_WRITE_INTERNAL_COMPRESS)) {
+ return 1;
+ }
if (calld->has_compression_algorithm) {
if (calld->compression_algorithm == GRPC_COMPRESS_NONE) {
return 1;
@@ -241,8 +245,8 @@ static void compress_start_transport_stream_op(grpc_exec_ctx *exec_ctx,
if (op->send_initial_metadata) {
process_send_initial_metadata(elem, op->send_initial_metadata);
}
- if (op->send_message != NULL && !skip_compression(elem) &&
- 0 == (op->send_message->flags & GRPC_WRITE_NO_COMPRESS)) {
+ if (op->send_message != NULL &&
+ !skip_compression(elem, op->send_message->flags)) {
calld->send_op = op;
calld->send_length = op->send_message->length;
calld->send_flags = op->send_message->flags;
diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c
index 8340b5cd0f..04670ff233 100644
--- a/src/core/lib/channel/http_server_filter.c
+++ b/src/core/lib/channel/http_server_filter.c
@@ -162,7 +162,6 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) {
/* Retrieve the payload from the value of the 'grpc-internal-payload-bin'
header field */
calld->seen_payload_bin = 1;
- gpr_slice_buffer_init(&calld->read_slice_buffer);
gpr_slice_buffer_add(&calld->read_slice_buffer,
gpr_slice_ref(md->value->slice));
grpc_slice_buffer_stream_init(&calld->read_stream,
diff --git a/src/core/lib/iomgr/endpoint_pair_uv.c b/src/core/lib/iomgr/endpoint_pair_uv.c
index 7941e20388..ff24894c6d 100644
--- a/src/core/lib/iomgr/endpoint_pair_uv.c
+++ b/src/core/lib/iomgr/endpoint_pair_uv.c
@@ -41,8 +41,9 @@
#include "src/core/lib/iomgr/endpoint_pair.h"
-grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name,
- size_t read_slice_size) {
+grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(
+ const char *name, grpc_resource_quota *resource_quota,
+ size_t read_slice_size) {
grpc_endpoint_pair endpoint_pair;
// TODO(mlumish): implement this properly under libuv
GPR_ASSERT(false &&
diff --git a/src/core/lib/iomgr/network_status_tracker.c b/src/core/lib/iomgr/network_status_tracker.c
index b4bb7e3cf7..a5ca9ed2c3 100644
--- a/src/core/lib/iomgr/network_status_tracker.c
+++ b/src/core/lib/iomgr/network_status_tracker.c
@@ -46,7 +46,7 @@ static gpr_mu g_endpoint_mutex;
void grpc_network_status_shutdown(void) {
if (head != NULL) {
gpr_log(GPR_ERROR,
- "Memory leaked as all network endpoints were not shut down");
+ "Memory leaked as not all network endpoints were shut down");
}
gpr_mu_destroy(&g_endpoint_mutex);
}
diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c
index e39cf28e35..1770d72268 100644
--- a/src/core/lib/iomgr/resource_quota.c
+++ b/src/core/lib/iomgr/resource_quota.c
@@ -44,6 +44,81 @@
int grpc_resource_quota_trace = 0;
+/* Internal linked list pointers for a resource user */
+typedef struct {
+ grpc_resource_user *next;
+ grpc_resource_user *prev;
+} grpc_resource_user_link;
+
+/* Resource users are kept in (potentially) several intrusive linked lists
+ at once. These are the list names. */
+typedef enum {
+ /* Resource users that are waiting for an allocation */
+ GRPC_RULIST_AWAITING_ALLOCATION,
+ /* Resource users that have free memory available for internal reclamation */
+ GRPC_RULIST_NON_EMPTY_FREE_POOL,
+ /* Resource users that have published a benign reclamation is available */
+ GRPC_RULIST_RECLAIMER_BENIGN,
+ /* Resource users that have published a destructive reclamation is
+ available */
+ GRPC_RULIST_RECLAIMER_DESTRUCTIVE,
+ /* Number of lists: must be last */
+ GRPC_RULIST_COUNT
+} grpc_rulist;
+
+struct grpc_resource_user {
+ /* The quota this resource user consumes from */
+ grpc_resource_quota *resource_quota;
+
+ /* Closure to schedule an allocation under the resource quota combiner lock */
+ grpc_closure allocate_closure;
+ /* Closure to publish a non empty free pool under the resource quota combiner
+ lock */
+ grpc_closure add_to_free_pool_closure;
+
+ /* one ref for each ref call (released by grpc_resource_user_unref), and one
+ ref for each byte allocated (released by grpc_resource_user_free) */
+ gpr_atm refs;
+ /* is this resource user unlocked? starts at 0, increases for each shutdown
+ call */
+ gpr_atm shutdown;
+
+ gpr_mu mu;
+ /* The amount of memory (in bytes) this user has cached for its own use: to
+ avoid quota contention, each resource user can keep some memory in
+ addition to what it is immediately using (e.g., for caching), and the quota
+ can pull it back under memory pressure.
+ This value can become negative if more memory has been requested than
+ existed in the free pool, at which point the quota is consulted to bring
+ this value non-negative (asynchronously). */
+ int64_t free_pool;
+ /* A list of closures to call once free_pool becomes non-negative - ie when
+ all outstanding allocations have been granted. */
+ grpc_closure_list on_allocated;
+ /* True if we are currently trying to allocate from the quota, false if not */
+ bool allocating;
+ /* True if we are currently trying to add ourselves to the non-free quota
+ list, false otherwise */
+ bool added_to_free_pool;
+
+ /* Reclaimers: index 0 is the benign reclaimer, 1 is the destructive reclaimer
+ */
+ grpc_closure *reclaimers[2];
+ /* Trampoline closures to finish reclamation and re-enter the quota combiner
+ lock */
+ grpc_closure post_reclaimer_closure[2];
+
+ /* Closure to execute under the quota combiner to de-register and shutdown the
+ resource user */
+ grpc_closure destroy_closure;
+
+ /* Links in the various grpc_rulist lists */
+ grpc_resource_user_link links[GRPC_RULIST_COUNT];
+
+ /* The name of this resource user, for debugging/tracing */
+ char *name;
+};
+
struct grpc_resource_quota {
/* refcount */
gpr_refcount refs;
@@ -373,9 +448,19 @@ static void ru_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *ru,
rulist_add_tail(resource_user, GRPC_RULIST_RECLAIMER_DESTRUCTIVE);
}
+static void ru_shutdown(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) {
+ grpc_resource_user *resource_user = ru;
+ grpc_exec_ctx_sched(exec_ctx, resource_user->reclaimers[0],
+ GRPC_ERROR_CANCELLED, NULL);
+ grpc_exec_ctx_sched(exec_ctx, resource_user->reclaimers[1],
+ GRPC_ERROR_CANCELLED, NULL);
+ resource_user->reclaimers[0] = NULL;
+ resource_user->reclaimers[1] = NULL;
+}
+
static void ru_destroy(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) {
grpc_resource_user *resource_user = ru;
- GPR_ASSERT(resource_user->allocated == 0);
+ GPR_ASSERT(gpr_atm_no_barrier_load(&resource_user->refs) == 0);
for (int i = 0; i < GRPC_RULIST_COUNT; i++) {
rulist_remove(resource_user, (grpc_rulist)i);
}
@@ -383,13 +468,14 @@ static void ru_destroy(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) {
GRPC_ERROR_CANCELLED, NULL);
grpc_exec_ctx_sched(exec_ctx, resource_user->reclaimers[1],
GRPC_ERROR_CANCELLED, NULL);
- grpc_exec_ctx_sched(exec_ctx, (grpc_closure *)gpr_atm_no_barrier_load(
- &resource_user->on_done_destroy_closure),
- GRPC_ERROR_NONE, NULL);
if (resource_user->free_pool != 0) {
resource_user->resource_quota->free_pool += resource_user->free_pool;
rq_step_sched(exec_ctx, resource_user->resource_quota);
}
+ grpc_resource_quota_internal_unref(exec_ctx, resource_user->resource_quota);
+ gpr_mu_destroy(&resource_user->mu);
+ gpr_free(resource_user->name);
+ gpr_free(resource_user);
}
static void ru_allocated_slices(grpc_exec_ctx *exec_ctx, void *arg,
@@ -539,9 +625,9 @@ const grpc_arg_pointer_vtable *grpc_resource_quota_arg_vtable(void) {
* grpc_resource_user api
*/
-void grpc_resource_user_init(grpc_resource_user *resource_user,
- grpc_resource_quota *resource_quota,
- const char *name) {
+grpc_resource_user *grpc_resource_user_create(
+ grpc_resource_quota *resource_quota, const char *name) {
+ grpc_resource_user *resource_user = gpr_malloc(sizeof(*resource_user));
resource_user->resource_quota =
grpc_resource_quota_internal_ref(resource_quota);
grpc_closure_init(&resource_user->allocate_closure, &ru_allocate,
@@ -555,12 +641,12 @@ void grpc_resource_user_init(grpc_resource_user *resource_user,
grpc_closure_init(&resource_user->destroy_closure, &ru_destroy,
resource_user);
gpr_mu_init(&resource_user->mu);
- resource_user->allocated = 0;
+ gpr_atm_rel_store(&resource_user->refs, 1);
+ gpr_atm_rel_store(&resource_user->shutdown, 0);
resource_user->free_pool = 0;
grpc_closure_list_init(&resource_user->on_allocated);
resource_user->allocating = false;
resource_user->added_to_free_pool = false;
- gpr_atm_no_barrier_store(&resource_user->on_done_destroy_closure, 0);
resource_user->reclaimers[0] = NULL;
resource_user->reclaimers[1] = NULL;
for (int i = 0; i < GRPC_RULIST_COUNT; i++) {
@@ -572,56 +658,54 @@ void grpc_resource_user_init(grpc_resource_user *resource_user,
gpr_asprintf(&resource_user->name, "anonymous_resource_user_%" PRIxPTR,
(intptr_t)resource_user);
}
+ return resource_user;
}
-void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx,
- grpc_resource_user *resource_user,
- grpc_closure *on_done) {
- gpr_mu_lock(&resource_user->mu);
- GPR_ASSERT(gpr_atm_no_barrier_load(&resource_user->on_done_destroy_closure) ==
- 0);
- gpr_atm_no_barrier_store(&resource_user->on_done_destroy_closure,
- (gpr_atm)on_done);
- if (resource_user->allocated == 0) {
+static void ru_ref_by(grpc_resource_user *resource_user, gpr_atm amount) {
+ GPR_ASSERT(amount > 0);
+ GPR_ASSERT(gpr_atm_no_barrier_fetch_add(&resource_user->refs, amount) != 0);
+}
+
+static void ru_unref_by(grpc_exec_ctx *exec_ctx,
+ grpc_resource_user *resource_user, gpr_atm amount) {
+ GPR_ASSERT(amount > 0);
+ gpr_atm old = gpr_atm_full_fetch_add(&resource_user->refs, -amount);
+ GPR_ASSERT(old >= amount);
+ if (old == amount) {
grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner,
&resource_user->destroy_closure, GRPC_ERROR_NONE,
false);
}
- gpr_mu_unlock(&resource_user->mu);
}
-void grpc_resource_user_destroy(grpc_exec_ctx *exec_ctx,
- grpc_resource_user *resource_user) {
- grpc_resource_quota_internal_unref(exec_ctx, resource_user->resource_quota);
- gpr_mu_destroy(&resource_user->mu);
- gpr_free(resource_user->name);
+void grpc_resource_user_ref(grpc_resource_user *resource_user) {
+ ru_ref_by(resource_user, 1);
+}
+
+void grpc_resource_user_unref(grpc_exec_ctx *exec_ctx,
+ grpc_resource_user *resource_user) {
+ ru_unref_by(exec_ctx, resource_user, 1);
+}
+
+void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx,
+ grpc_resource_user *resource_user) {
+ if (gpr_atm_full_fetch_add(&resource_user->shutdown, 1) == 0) {
+ grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner,
+ grpc_closure_create(ru_shutdown, resource_user),
+ GRPC_ERROR_NONE, false);
+ }
}
void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx,
grpc_resource_user *resource_user, size_t size,
grpc_closure *optional_on_done) {
gpr_mu_lock(&resource_user->mu);
- grpc_closure *on_done_destroy = (grpc_closure *)gpr_atm_no_barrier_load(
- &resource_user->on_done_destroy_closure);
- if (on_done_destroy != NULL) {
- /* already shutdown */
- if (grpc_resource_quota_trace) {
- gpr_log(GPR_DEBUG, "RQ %s %s: alloc %" PRIdPTR " after shutdown",
- resource_user->resource_quota->name, resource_user->name, size);
- }
- grpc_exec_ctx_sched(
- exec_ctx, optional_on_done,
- GRPC_ERROR_CREATE("Buffer pool user is already shutdown"), NULL);
- gpr_mu_unlock(&resource_user->mu);
- return;
- }
- resource_user->allocated += (int64_t)size;
+ ru_ref_by(resource_user, (gpr_atm)size);
resource_user->free_pool -= (int64_t)size;
if (grpc_resource_quota_trace) {
- gpr_log(GPR_DEBUG, "RQ %s %s: alloc %" PRIdPTR "; allocated -> %" PRId64
- ", free_pool -> %" PRId64,
+ gpr_log(GPR_DEBUG, "RQ %s %s: alloc %" PRIdPTR "; free_pool -> %" PRId64,
resource_user->resource_quota->name, resource_user->name, size,
- resource_user->allocated, resource_user->free_pool);
+ resource_user->free_pool);
}
if (resource_user->free_pool < 0) {
grpc_closure_list_append(&resource_user->on_allocated, optional_on_done,
@@ -641,15 +725,12 @@ void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx,
void grpc_resource_user_free(grpc_exec_ctx *exec_ctx,
grpc_resource_user *resource_user, size_t size) {
gpr_mu_lock(&resource_user->mu);
- GPR_ASSERT(resource_user->allocated >= (int64_t)size);
bool was_zero_or_negative = resource_user->free_pool <= 0;
resource_user->free_pool += (int64_t)size;
- resource_user->allocated -= (int64_t)size;
if (grpc_resource_quota_trace) {
- gpr_log(GPR_DEBUG, "RQ %s %s: free %" PRIdPTR "; allocated -> %" PRId64
- ", free_pool -> %" PRId64,
+ gpr_log(GPR_DEBUG, "RQ %s %s: free %" PRIdPTR "; free_pool -> %" PRId64,
resource_user->resource_quota->name, resource_user->name, size,
- resource_user->allocated, resource_user->free_pool);
+ resource_user->free_pool);
}
bool is_bigger_than_zero = resource_user->free_pool > 0;
if (is_bigger_than_zero && was_zero_or_negative &&
@@ -659,29 +740,23 @@ void grpc_resource_user_free(grpc_exec_ctx *exec_ctx,
&resource_user->add_to_free_pool_closure,
GRPC_ERROR_NONE, false);
}
- grpc_closure *on_done_destroy = (grpc_closure *)gpr_atm_no_barrier_load(
- &resource_user->on_done_destroy_closure);
- if (on_done_destroy != NULL && resource_user->allocated == 0) {
- grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner,
- &resource_user->destroy_closure, GRPC_ERROR_NONE,
- false);
- }
gpr_mu_unlock(&resource_user->mu);
+ ru_unref_by(exec_ctx, resource_user, (gpr_atm)size);
}
void grpc_resource_user_post_reclaimer(grpc_exec_ctx *exec_ctx,
grpc_resource_user *resource_user,
bool destructive,
grpc_closure *closure) {
- if (gpr_atm_acq_load(&resource_user->on_done_destroy_closure) == 0) {
- GPR_ASSERT(resource_user->reclaimers[destructive] == NULL);
- resource_user->reclaimers[destructive] = closure;
- grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner,
- &resource_user->post_reclaimer_closure[destructive],
- GRPC_ERROR_NONE, false);
- } else {
+ GPR_ASSERT(resource_user->reclaimers[destructive] == NULL);
+ if (gpr_atm_acq_load(&resource_user->shutdown) > 0) {
grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_CANCELLED, NULL);
+ return;
}
+ resource_user->reclaimers[destructive] = closure;
+ grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner,
+ &resource_user->post_reclaimer_closure[destructive],
+ GRPC_ERROR_NONE, false);
}
void grpc_resource_user_finish_reclamation(grpc_exec_ctx *exec_ctx,
@@ -715,3 +790,10 @@ void grpc_resource_user_alloc_slices(
grpc_resource_user_alloc(exec_ctx, slice_allocator->resource_user,
count * length, &slice_allocator->on_allocated);
}
+
+gpr_slice grpc_resource_user_slice_malloc(grpc_exec_ctx *exec_ctx,
+ grpc_resource_user *resource_user,
+ size_t size) {
+ grpc_resource_user_alloc(exec_ctx, resource_user, size, NULL);
+ return ru_slice_create(resource_user, size);
+}
diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h
index 6dfac55f88..bbe0af1a14 100644
--- a/src/core/lib/iomgr/resource_quota.h
+++ b/src/core/lib/iomgr/resource_quota.h
@@ -84,91 +84,15 @@ void grpc_resource_quota_internal_unref(grpc_exec_ctx *exec_ctx,
grpc_resource_quota *grpc_resource_quota_from_channel_args(
const grpc_channel_args *channel_args);
-/* Resource users are kept in (potentially) several intrusive linked lists
- at once. These are the list names. */
-typedef enum {
- /* Resource users that are waiting for an allocation */
- GRPC_RULIST_AWAITING_ALLOCATION,
- /* Resource users that have free memory available for internal reclamation */
- GRPC_RULIST_NON_EMPTY_FREE_POOL,
- /* Resource users that have published a benign reclamation is available */
- GRPC_RULIST_RECLAIMER_BENIGN,
- /* Resource users that have published a destructive reclamation is
- available */
- GRPC_RULIST_RECLAIMER_DESTRUCTIVE,
- /* Number of lists: must be last */
- GRPC_RULIST_COUNT
-} grpc_rulist;
-
typedef struct grpc_resource_user grpc_resource_user;
-/* Internal linked list pointers for a resource user */
-typedef struct {
- grpc_resource_user *next;
- grpc_resource_user *prev;
-} grpc_resource_user_link;
-
-struct grpc_resource_user {
- /* The quota this resource user consumes from */
- grpc_resource_quota *resource_quota;
-
- /* Closure to schedule an allocation under the resource quota combiner lock */
- grpc_closure allocate_closure;
- /* Closure to publish a non empty free pool under the resource quota combiner
- lock */
- grpc_closure add_to_free_pool_closure;
-
- gpr_mu mu;
- /* Total allocated memory outstanding by this resource user in bytes;
- always positive */
- int64_t allocated;
- /* The amount of memory (in bytes) this user has cached for its own use: to
- avoid quota contention, each resource user can keep some memory in
- addition to what it is immediately using (e.g., for caching), and the quota
- can pull it back under memory pressure.
- This value can become negative if more memory has been requested than
- existed in the free pool, at which point the quota is consulted to bring
- this value non-negative (asynchronously). */
- int64_t free_pool;
- /* A list of closures to call once free_pool becomes non-negative - ie when
- all outstanding allocations have been granted. */
- grpc_closure_list on_allocated;
- /* True if we are currently trying to allocate from the quota, false if not */
- bool allocating;
- /* True if we are currently trying to add ourselves to the non-free quota
- list, false otherwise */
- bool added_to_free_pool;
-
- /* Reclaimers: index 0 is the benign reclaimer, 1 is the destructive reclaimer
- */
- grpc_closure *reclaimers[2];
- /* Trampoline closures to finish reclamation and re-enter the quota combiner
- lock */
- grpc_closure post_reclaimer_closure[2];
-
- /* Closure to execute under the quota combiner to de-register and shutdown the
- resource user */
- grpc_closure destroy_closure;
- /* User supplied closure to call once the user has finished shutting down AND
- all outstanding allocations have been freed. Real type is grpc_closure*,
- but it's stored as an atomic to avoid a mutex on some fast paths. */
- gpr_atm on_done_destroy_closure;
-
- /* Links in the various grpc_rulist lists */
- grpc_resource_user_link links[GRPC_RULIST_COUNT];
-
- /* The name of this resource user, for debugging/tracing */
- char *name;
-};
-
-void grpc_resource_user_init(grpc_resource_user *resource_user,
- grpc_resource_quota *resource_quota,
- const char *name);
+grpc_resource_user *grpc_resource_user_create(
+ grpc_resource_quota *resource_quota, const char *name);
+void grpc_resource_user_ref(grpc_resource_user *resource_user);
+void grpc_resource_user_unref(grpc_exec_ctx *exec_ctx,
+ grpc_resource_user *resource_user);
void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx,
- grpc_resource_user *resource_user,
- grpc_closure *on_done);
-void grpc_resource_user_destroy(grpc_exec_ctx *exec_ctx,
- grpc_resource_user *resource_user);
+ grpc_resource_user *resource_user);
/* Allocate from the resource user (and its quota).
If optional_on_done is NULL, then allocate immediately. This may push the
@@ -221,4 +145,9 @@ void grpc_resource_user_alloc_slices(
grpc_resource_user_slice_allocator *slice_allocator, size_t length,
size_t count, gpr_slice_buffer *dest);
+/* Allocate one slice of length \a size synchronously. */
+gpr_slice grpc_resource_user_slice_malloc(grpc_exec_ctx *exec_ctx,
+ grpc_resource_user *resource_user,
+ size_t size);
+
#endif /* GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H */
diff --git a/src/core/lib/iomgr/tcp_client_uv.c b/src/core/lib/iomgr/tcp_client_uv.c
index 6274667042..b07f9ceffa 100644
--- a/src/core/lib/iomgr/tcp_client_uv.c
+++ b/src/core/lib/iomgr/tcp_client_uv.c
@@ -54,9 +54,12 @@ typedef struct grpc_uv_tcp_connect {
grpc_endpoint **endpoint;
int refs;
char *addr_name;
+ grpc_resource_quota *resource_quota;
} grpc_uv_tcp_connect;
-static void uv_tcp_connect_cleanup(grpc_uv_tcp_connect *connect) {
+static void uv_tcp_connect_cleanup(grpc_exec_ctx *exec_ctx,
+ grpc_uv_tcp_connect *connect) {
+ grpc_resource_quota_internal_unref(exec_ctx, connect->resource_quota);
gpr_free(connect);
}
@@ -74,7 +77,7 @@ static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp,
}
done = (--connect->refs == 0);
if (done) {
- uv_tcp_connect_cleanup(connect);
+ uv_tcp_connect_cleanup(exec_ctx, connect);
}
}
@@ -86,8 +89,8 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) {
grpc_closure *closure = connect->closure;
grpc_timer_cancel(&exec_ctx, &connect->alarm);
if (status == 0) {
- *connect->endpoint =
- grpc_tcp_create(connect->tcp_handle, connect->addr_name);
+ *connect->endpoint = grpc_tcp_create(
+ connect->tcp_handle, connect->resource_quota, connect->addr_name);
} else {
error = GRPC_ERROR_CREATE("Failed to connect to remote host");
error = grpc_error_set_int(error, GRPC_ERROR_INT_ERRNO, -status);
@@ -105,7 +108,7 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) {
}
done = (--connect->refs == 0);
if (done) {
- uv_tcp_connect_cleanup(connect);
+ uv_tcp_connect_cleanup(&exec_ctx, connect);
}
grpc_exec_ctx_sched(&exec_ctx, closure, error, NULL);
grpc_exec_ctx_finish(&exec_ctx);
@@ -114,16 +117,31 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) {
static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx,
grpc_closure *closure, grpc_endpoint **ep,
grpc_pollset_set *interested_parties,
+ const grpc_channel_args *channel_args,
const grpc_resolved_address *resolved_addr,
gpr_timespec deadline) {
grpc_uv_tcp_connect *connect;
+ grpc_resource_quota *resource_quota = grpc_resource_quota_create(NULL);
+ (void)channel_args;
(void)interested_parties;
+
+ if (channel_args != NULL) {
+ for (size_t i = 0; i < channel_args->num_args; i++) {
+ if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) {
+ grpc_resource_quota_internal_unref(exec_ctx, resource_quota);
+ resource_quota = grpc_resource_quota_internal_ref(
+ channel_args->args[i].value.pointer.p);
+ }
+ }
+ }
+
connect = gpr_malloc(sizeof(grpc_uv_tcp_connect));
memset(connect, 0, sizeof(grpc_uv_tcp_connect));
connect->closure = closure;
connect->endpoint = ep;
connect->tcp_handle = gpr_malloc(sizeof(uv_tcp_t));
connect->addr_name = grpc_sockaddr_to_uri(resolved_addr);
+ connect->resource_quota = resource_quota;
uv_tcp_init(uv_default_loop(), connect->tcp_handle);
connect->connect_req.data = connect;
// TODO(murgatroid99): figure out what the return value here means
@@ -138,16 +156,18 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx,
// overridden by api_fuzzer.c
void (*grpc_tcp_client_connect_impl)(
grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep,
- grpc_pollset_set *interested_parties, const grpc_resolved_address *addr,
+ grpc_pollset_set *interested_parties, const grpc_channel_args *channel_args,
+ const grpc_resolved_address *addr,
gpr_timespec deadline) = tcp_client_connect_impl;
void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
grpc_endpoint **ep,
grpc_pollset_set *interested_parties,
+ const grpc_channel_args *channel_args,
const grpc_resolved_address *addr,
gpr_timespec deadline) {
- grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties, addr,
- deadline);
+ grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties,
+ channel_args, addr, deadline);
}
#endif /* GRPC_UV */
diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c
index 880af93ee1..70416c6eef 100644
--- a/src/core/lib/iomgr/tcp_posix.c
+++ b/src/core/lib/iomgr/tcp_posix.c
@@ -102,7 +102,7 @@ typedef struct {
char *peer_string;
- grpc_resource_user resource_user;
+ grpc_resource_user *resource_user;
grpc_resource_user_slice_allocator slice_allocator;
} grpc_tcp;
@@ -110,28 +110,18 @@ static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */,
grpc_error *error);
static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */,
grpc_error *error);
-static void tcp_unref_closure(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */,
- grpc_error *error);
-
-static void tcp_maybe_shutdown_resource_user(grpc_exec_ctx *exec_ctx,
- grpc_tcp *tcp) {
- if (gpr_atm_full_fetch_add(&tcp->shutdown_count, 1) == 0) {
- grpc_resource_user_shutdown(exec_ctx, &tcp->resource_user,
- grpc_closure_create(tcp_unref_closure, tcp));
- }
-}
static void tcp_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) {
grpc_tcp *tcp = (grpc_tcp *)ep;
- tcp_maybe_shutdown_resource_user(exec_ctx, tcp);
grpc_fd_shutdown(exec_ctx, tcp->em_fd);
+ grpc_resource_user_shutdown(exec_ctx, tcp->resource_user);
}
static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) {
grpc_fd_orphan(exec_ctx, tcp->em_fd, tcp->release_fd_cb, tcp->release_fd,
"tcp_unref_orphan");
gpr_slice_buffer_destroy(&tcp->last_read_buffer);
- grpc_resource_user_destroy(exec_ctx, &tcp->resource_user);
+ grpc_resource_user_unref(exec_ctx, tcp->resource_user);
gpr_free(tcp->peer_string);
gpr_free(tcp);
}
@@ -168,15 +158,9 @@ static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) {
static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); }
#endif
-static void tcp_unref_closure(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_error *error) {
- TCP_UNREF(exec_ctx, arg, "resource_user");
-}
-
static void tcp_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) {
grpc_network_status_unregister_endpoint(ep);
grpc_tcp *tcp = (grpc_tcp *)ep;
- tcp_maybe_shutdown_resource_user(exec_ctx, tcp);
gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer);
TCP_UNREF(exec_ctx, tcp, "destroy");
}
@@ -515,7 +499,7 @@ static grpc_workqueue *tcp_get_workqueue(grpc_endpoint *ep) {
static grpc_resource_user *tcp_get_resource_user(grpc_endpoint *ep) {
grpc_tcp *tcp = (grpc_tcp *)ep;
- return &tcp->resource_user;
+ return tcp->resource_user;
}
static const grpc_endpoint_vtable vtable = {tcp_read,
@@ -543,9 +527,8 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd,
tcp->slice_size = slice_size;
tcp->iov_size = 1;
tcp->finished_edge = true;
- /* paired with unref in grpc_tcp_destroy, and with the shutdown for our
- * resource_user */
- gpr_ref_init(&tcp->refcount, 2);
+ /* paired with unref in grpc_tcp_destroy */
+ gpr_ref_init(&tcp->refcount, 1);
gpr_atm_no_barrier_store(&tcp->shutdown_count, 0);
tcp->em_fd = em_fd;
tcp->read_closure.cb = tcp_handle_read;
@@ -553,10 +536,9 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd,
tcp->write_closure.cb = tcp_handle_write;
tcp->write_closure.cb_arg = tcp;
gpr_slice_buffer_init(&tcp->last_read_buffer);
- grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string);
- grpc_resource_user_slice_allocator_init(&tcp->slice_allocator,
- &tcp->resource_user,
- tcp_read_allocation_done, tcp);
+ tcp->resource_user = grpc_resource_user_create(resource_quota, peer_string);
+ grpc_resource_user_slice_allocator_init(
+ &tcp->slice_allocator, tcp->resource_user, tcp_read_allocation_done, tcp);
/* Tell network status tracker about new endpoint */
grpc_network_status_register_endpoint(&tcp->base);
@@ -576,7 +558,6 @@ void grpc_tcp_destroy_and_release_fd(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
GPR_ASSERT(ep->vtable == &vtable);
tcp->release_fd = fd;
tcp->release_fd_cb = done;
- tcp_maybe_shutdown_resource_user(exec_ctx, tcp);
gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer);
TCP_UNREF(exec_ctx, tcp, "destroy");
}
diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c
index b6fc1e4ca2..7e2fb0f1f9 100644
--- a/src/core/lib/iomgr/tcp_server_posix.c
+++ b/src/core/lib/iomgr/tcp_server_posix.c
@@ -657,41 +657,46 @@ done:
}
}
+/* Return listener at port_index or NULL. Should only be called with s->mu
+ locked. */
+static grpc_tcp_listener *get_port_index(grpc_tcp_server *s,
+ unsigned port_index) {
+ unsigned num_ports = 0;
+ grpc_tcp_listener *sp;
+ for (sp = s->head; sp; sp = sp->next) {
+ if (!sp->is_sibling) {
+ if (++num_ports > port_index) {
+ return sp;
+ }
+ }
+ }
+ return NULL;
+}
+
unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server *s,
unsigned port_index) {
unsigned num_fds = 0;
- grpc_tcp_listener *sp;
gpr_mu_lock(&s->mu);
- for (sp = s->head; sp && port_index != 0; sp = sp->next) {
- if (!sp->is_sibling) {
- --port_index;
- }
+ grpc_tcp_listener *sp = get_port_index(s, port_index);
+ for (; sp; sp = sp->sibling) {
+ ++num_fds;
}
- for (; sp; sp = sp->sibling, ++num_fds)
- ;
gpr_mu_unlock(&s->mu);
return num_fds;
}
int grpc_tcp_server_port_fd(grpc_tcp_server *s, unsigned port_index,
unsigned fd_index) {
- grpc_tcp_listener *sp;
- int fd;
gpr_mu_lock(&s->mu);
- for (sp = s->head; sp && port_index != 0; sp = sp->next) {
- if (!sp->is_sibling) {
- --port_index;
+ grpc_tcp_listener *sp = get_port_index(s, port_index);
+ for (; sp; sp = sp->sibling, --fd_index) {
+ if (fd_index == 0) {
+ gpr_mu_unlock(&s->mu);
+ return sp->fd;
}
}
- for (; sp && fd_index != 0; sp = sp->sibling, --fd_index)
- ;
- if (sp) {
- fd = sp->fd;
- } else {
- fd = -1;
- }
gpr_mu_unlock(&s->mu);
- return fd;
+ return -1;
}
void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s,
diff --git a/src/core/lib/iomgr/tcp_server_uv.c b/src/core/lib/iomgr/tcp_server_uv.c
index 73e4db3d65..b5b9b92a20 100644
--- a/src/core/lib/iomgr/tcp_server_uv.c
+++ b/src/core/lib/iomgr/tcp_server_uv.c
@@ -76,13 +76,30 @@ struct grpc_tcp_server {
/* shutdown callback */
grpc_closure *shutdown_complete;
+
+ grpc_resource_quota *resource_quota;
};
-grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete,
+grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx,
+ grpc_closure *shutdown_complete,
const grpc_channel_args *args,
grpc_tcp_server **server) {
grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server));
- (void)args;
+ s->resource_quota = grpc_resource_quota_create(NULL);
+ for (size_t i = 0; i < (args == NULL ? 0 : args->num_args); i++) {
+ if (0 == strcmp(GRPC_ARG_RESOURCE_QUOTA, args->args[i].key)) {
+ if (args->args[i].type == GRPC_ARG_POINTER) {
+ grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota);
+ s->resource_quota =
+ grpc_resource_quota_internal_ref(args->args[i].value.pointer.p);
+ } else {
+ grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota);
+ gpr_free(s);
+ return GRPC_ERROR_CREATE(GRPC_ARG_RESOURCE_QUOTA
+ " must be a pointer to a buffer pool");
+ }
+ }
+ }
gpr_ref_init(&s->refs, 1);
s->on_accept_cb = NULL;
s->on_accept_cb_arg = NULL;
@@ -119,6 +136,7 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) {
gpr_free(sp->handle);
gpr_free(sp);
}
+ grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota);
gpr_free(s);
}
@@ -201,7 +219,7 @@ static void on_connect(uv_stream_t *server, int status) {
} else {
gpr_log(GPR_INFO, "uv_tcp_getpeername error: %s", uv_strerror(status));
}
- ep = grpc_tcp_create(client, peer_name_string);
+ ep = grpc_tcp_create(client, sp->server->resource_quota, peer_name_string);
sp->server->on_accept_cb(&exec_ctx, sp->server->on_accept_cb_arg, ep, NULL,
&acceptor);
grpc_exec_ctx_finish(&exec_ctx);
diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c
index 3860fe3e9b..8e74c9e863 100644
--- a/src/core/lib/iomgr/tcp_uv.c
+++ b/src/core/lib/iomgr/tcp_uv.c
@@ -54,6 +54,9 @@ typedef struct {
grpc_endpoint base;
gpr_refcount refcount;
+ uv_write_t write_req;
+ uv_shutdown_t shutdown_req;
+
uv_tcp_t *handle;
grpc_closure *read_cb;
@@ -64,14 +67,23 @@ typedef struct {
gpr_slice_buffer *write_slices;
uv_buf_t *write_buffers;
+ grpc_resource_user resource_user;
+
bool shutting_down;
+ bool resource_user_shutting_down;
+
char *peer_string;
grpc_pollset *pollset;
} grpc_tcp;
static void uv_close_callback(uv_handle_t *handle) { gpr_free(handle); }
-static void tcp_free(grpc_tcp *tcp) { gpr_free(tcp); }
+static void tcp_free(grpc_tcp *tcp) {
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_resource_user_destroy(&exec_ctx, &tcp->resource_user);
+ gpr_free(tcp);
+ grpc_exec_ctx_finish(&exec_ctx);
+}
/*#define GRPC_TCP_REFCOUNT_DEBUG*/
#ifdef GRPC_TCP_REFCOUNT_DEBUG
@@ -106,11 +118,14 @@ static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); }
static void alloc_uv_buf(uv_handle_t *handle, size_t suggested_size,
uv_buf_t *buf) {
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_tcp *tcp = handle->data;
(void)suggested_size;
- tcp->read_slice = gpr_slice_malloc(GRPC_TCP_DEFAULT_READ_SLICE_SIZE);
+ tcp->read_slice = grpc_resource_user_slice_malloc(
+ &exec_ctx, &tcp->resource_user, GRPC_TCP_DEFAULT_READ_SLICE_SIZE);
buf->base = (char *)GPR_SLICE_START_PTR(tcp->read_slice);
buf->len = GPR_SLICE_LENGTH(tcp->read_slice);
+ grpc_exec_ctx_finish(&exec_ctx);
}
static void read_callback(uv_stream_t *stream, ssize_t nread,
@@ -198,7 +213,8 @@ static void write_callback(uv_write_t *req, int status) {
gpr_log(GPR_DEBUG, "write complete on %p: error=%s", tcp, str);
}
gpr_free(tcp->write_buffers);
- gpr_free(req);
+ grpc_resource_user_free(&exec_ctx, &tcp->resource_user,
+ sizeof(uv_buf_t) * tcp->write_slices->count);
grpc_exec_ctx_sched(&exec_ctx, cb, error, NULL);
grpc_exec_ctx_finish(&exec_ctx);
}
@@ -243,12 +259,15 @@ static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
tcp->write_cb = cb;
buffer_count = (unsigned int)tcp->write_slices->count;
buffers = gpr_malloc(sizeof(uv_buf_t) * buffer_count);
+ grpc_resource_user_alloc(exec_ctx, &tcp->resource_user,
+ sizeof(uv_buf_t) * buffer_count, NULL);
for (i = 0; i < buffer_count; i++) {
slice = &tcp->write_slices->slices[i];
buffers[i].base = (char *)GPR_SLICE_START_PTR(*slice);
buffers[i].len = GPR_SLICE_LENGTH(*slice);
}
- write_req = gpr_malloc(sizeof(uv_write_t));
+ tcp->write_buffers = buffers;
+ write_req = &tcp->write_req;
write_req->data = tcp;
TCP_REF(tcp, "write");
// TODO(murgatroid99): figure out what the return value here means
@@ -274,13 +293,29 @@ static void uv_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
(void)pollset;
}
-static void shutdown_callback(uv_shutdown_t *req, int status) { gpr_free(req); }
+static void shutdown_callback(uv_shutdown_t *req, int status) {}
+
+static void resource_user_shutdown_done(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error) {
+ TCP_UNREF(arg, "resource_user");
+}
+
+static void uv_resource_user_maybe_shutdown(grpc_exec_ctx *exec_ctx,
+ grpc_tcp *tcp) {
+ if (!tcp->resource_user_shutting_down) {
+ tcp->resource_user_shutting_down = true;
+ TCP_REF(tcp, "resource_user");
+ grpc_resource_user_shutdown(
+ exec_ctx, &tcp->resource_user,
+ grpc_closure_create(resource_user_shutdown_done, tcp));
+ }
+}
static void uv_endpoint_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) {
grpc_tcp *tcp = (grpc_tcp *)ep;
if (!tcp->shutting_down) {
tcp->shutting_down = true;
- uv_shutdown_t *req = gpr_malloc(sizeof(uv_shutdown_t));
+ uv_shutdown_t *req = &tcp->shutdown_req;
uv_shutdown(req, (uv_stream_t *)tcp->handle, shutdown_callback);
}
}
@@ -289,6 +324,7 @@ static void uv_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) {
grpc_network_status_unregister_endpoint(ep);
grpc_tcp *tcp = (grpc_tcp *)ep;
uv_close((uv_handle_t *)tcp->handle, uv_close_callback);
+ uv_resource_user_maybe_shutdown(exec_ctx, tcp);
TCP_UNREF(tcp, "destroy");
}
@@ -297,18 +333,21 @@ static char *uv_get_peer(grpc_endpoint *ep) {
return gpr_strdup(tcp->peer_string);
}
+static grpc_resource_user *uv_get_resource_user(grpc_endpoint *ep) {
+ grpc_tcp *tcp = (grpc_tcp *)ep;
+ return &tcp->resource_user;
+}
+
static grpc_workqueue *uv_get_workqueue(grpc_endpoint *ep) { return NULL; }
-static grpc_endpoint_vtable vtable = {uv_endpoint_read,
- uv_endpoint_write,
- uv_get_workqueue,
- uv_add_to_pollset,
- uv_add_to_pollset_set,
- uv_endpoint_shutdown,
- uv_destroy,
- uv_get_peer};
+static grpc_endpoint_vtable vtable = {
+ uv_endpoint_read, uv_endpoint_write, uv_get_workqueue,
+ uv_add_to_pollset, uv_add_to_pollset_set, uv_endpoint_shutdown,
+ uv_destroy, uv_get_resource_user, uv_get_peer};
-grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string) {
+grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle,
+ grpc_resource_quota *resource_quota,
+ char *peer_string) {
grpc_tcp *tcp = (grpc_tcp *)gpr_malloc(sizeof(grpc_tcp));
if (grpc_tcp_trace) {
@@ -325,6 +364,8 @@ grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string) {
gpr_ref_init(&tcp->refcount, 1);
tcp->peer_string = gpr_strdup(peer_string);
tcp->shutting_down = false;
+ tcp->resource_user_shutting_down = false;
+ grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string);
/* Tell network status tracking code about the new endpoint */
grpc_network_status_register_endpoint(&tcp->base);
diff --git a/src/core/lib/iomgr/tcp_uv.h b/src/core/lib/iomgr/tcp_uv.h
index eed41151ea..970fcafe4a 100644
--- a/src/core/lib/iomgr/tcp_uv.h
+++ b/src/core/lib/iomgr/tcp_uv.h
@@ -52,6 +52,8 @@ extern int grpc_tcp_trace;
#define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192
-grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string);
+grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle,
+ grpc_resource_quota *resource_quota,
+ char *peer_string);
#endif /* GRPC_CORE_LIB_IOMGR_TCP_UV_H */
diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c
index 46f0491d10..e7abf2971f 100644
--- a/src/core/lib/iomgr/tcp_windows.c
+++ b/src/core/lib/iomgr/tcp_windows.c
@@ -109,46 +109,35 @@ typedef struct grpc_tcp {
gpr_slice_buffer *write_slices;
gpr_slice_buffer *read_slices;
- grpc_resource_user resource_user;
+ grpc_resource_user *resource_user;
/* The IO Completion Port runs from another thread. We need some mechanism
to protect ourselves when requesting a shutdown. */
gpr_mu mu;
int shutting_down;
- gpr_atm resource_user_shutdown_count;
-
char *peer_string;
} grpc_tcp;
-static void win_unref_closure(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */,
- grpc_error *error);
-
-static void win_maybe_shutdown_resource_user(grpc_exec_ctx *exec_ctx,
- grpc_tcp *tcp) {
- if (gpr_atm_full_fetch_add(&tcp->resource_user_shutdown_count, 1) == 0) {
- grpc_resource_user_shutdown(exec_ctx, &tcp->resource_user,
- grpc_closure_create(win_unref_closure, tcp));
- }
-}
-
-static void tcp_free(grpc_tcp *tcp) {
+static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) {
grpc_winsocket_destroy(tcp->socket);
gpr_mu_destroy(&tcp->mu);
gpr_free(tcp->peer_string);
+ grpc_resource_user_unref(exec_ctx, tcp->resource_user);
gpr_free(tcp);
}
/*#define GRPC_TCP_REFCOUNT_DEBUG*/
#ifdef GRPC_TCP_REFCOUNT_DEBUG
-#define TCP_UNREF(tcp, reason) tcp_unref((tcp), (reason), __FILE__, __LINE__)
+#define TCP_UNREF(exec_ctx, tcp, reason) \
+ tcp_unref((exec_ctx), (tcp), (reason), __FILE__, __LINE__)
#define TCP_REF(tcp, reason) tcp_ref((tcp), (reason), __FILE__, __LINE__)
-static void tcp_unref(grpc_tcp *tcp, const char *reason, const char *file,
- int line) {
+static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp,
+ const char *reason, const char *file, int line) {
gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %d -> %d", tcp,
reason, tcp->refcount.count, tcp->refcount.count - 1);
if (gpr_unref(&tcp->refcount)) {
- tcp_free(tcp);
+ tcp_free(exec_ctx, tcp);
}
}
@@ -159,22 +148,17 @@ static void tcp_ref(grpc_tcp *tcp, const char *reason, const char *file,
gpr_ref(&tcp->refcount);
}
#else
-#define TCP_UNREF(tcp, reason) tcp_unref((tcp))
+#define TCP_UNREF(exec_ctx, tcp, reason) tcp_unref((exec_ctx), (tcp))
#define TCP_REF(tcp, reason) tcp_ref((tcp))
-static void tcp_unref(grpc_tcp *tcp) {
+static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) {
if (gpr_unref(&tcp->refcount)) {
- tcp_free(tcp);
+ tcp_free(exec_ctx, tcp);
}
}
static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); }
#endif
-static void win_unref_closure(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_error *error) {
- TCP_UNREF(arg, "resource_user");
-}
-
/* Asynchronous callback from the IOCP, or the background thread. */
static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) {
grpc_tcp *tcp = tcpp;
@@ -203,7 +187,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) {
}
tcp->read_cb = NULL;
- TCP_UNREF(tcp, "read");
+ TCP_UNREF(exec_ctx, tcp, "read");
grpc_exec_ctx_sched(exec_ctx, cb, error, NULL);
}
@@ -287,7 +271,7 @@ static void on_write(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) {
}
}
- TCP_UNREF(tcp, "write");
+ TCP_UNREF(exec_ctx, tcp, "write");
grpc_exec_ctx_sched(exec_ctx, cb, error, NULL);
}
@@ -355,7 +339,7 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
if (status != 0) {
int wsa_error = WSAGetLastError();
if (wsa_error != WSA_IO_PENDING) {
- TCP_UNREF(tcp, "write");
+ TCP_UNREF(exec_ctx, tcp, "write");
grpc_exec_ctx_sched(exec_ctx, cb, GRPC_WSA_ERROR(wsa_error, "WSASend"),
NULL);
return;
@@ -396,15 +380,14 @@ static void win_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) {
callback. See the comments in on_read and on_write. */
tcp->shutting_down = 1;
grpc_winsocket_shutdown(tcp->socket);
- win_maybe_shutdown_resource_user(exec_ctx, tcp);
gpr_mu_unlock(&tcp->mu);
+ grpc_resource_user_shutdown(exec_ctx, tcp->resource_user);
}
static void win_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) {
grpc_network_status_unregister_endpoint(ep);
grpc_tcp *tcp = (grpc_tcp *)ep;
- win_maybe_shutdown_resource_user(exec_ctx, tcp);
- TCP_UNREF(tcp, "destroy");
+ TCP_UNREF(exec_ctx, tcp, "destroy");
}
static char *win_get_peer(grpc_endpoint *ep) {
@@ -416,7 +399,7 @@ static grpc_workqueue *win_get_workqueue(grpc_endpoint *ep) { return NULL; }
static grpc_resource_user *win_get_resource_user(grpc_endpoint *ep) {
grpc_tcp *tcp = (grpc_tcp *)ep;
- return &tcp->resource_user;
+ return tcp->resource_user;
}
static grpc_endpoint_vtable vtable = {win_read,
@@ -441,7 +424,7 @@ grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket,
grpc_closure_init(&tcp->on_read, on_read, tcp);
grpc_closure_init(&tcp->on_write, on_write, tcp);
tcp->peer_string = gpr_strdup(peer_string);
- grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string);
+ tcp->resource_user = grpc_resource_user_create(resource_quota, peer_string);
/* Tell network status tracking code about the new endpoint */
grpc_network_status_register_endpoint(&tcp->base);
diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c
index 0eca46eb52..ebf72a3abb 100644
--- a/src/core/lib/security/transport/security_connector.c
+++ b/src/core/lib/security/transport/security_connector.c
@@ -210,11 +210,11 @@ void grpc_security_connector_unref(grpc_security_connector *sc) {
}
static void connector_pointer_arg_destroy(void *p) {
- GRPC_SECURITY_CONNECTOR_UNREF(p, "connector_pointer_arg");
+ GRPC_SECURITY_CONNECTOR_UNREF(p, "connector_pointer_arg_destroy");
}
static void *connector_pointer_arg_copy(void *p) {
- return GRPC_SECURITY_CONNECTOR_REF(p, "connector_pointer_arg");
+ return GRPC_SECURITY_CONNECTOR_REF(p, "connector_pointer_arg_copy");
}
static int connector_pointer_cmp(void *a, void *b) { return GPR_ICMP(a, b); }
diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c
index 6c25952c0a..e3b088f663 100644
--- a/src/core/lib/surface/call.c
+++ b/src/core/lib/surface/call.c
@@ -1461,6 +1461,12 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
grpc_slice_buffer_stream_init(
&call->sending_stream,
&op->data.send_message->data.raw.slice_buffer, op->flags);
+ /* If the outgoing buffer is already compressed, mark it as so in the
+ flags. These will be picked up by the compression filter and further
+ (wasteful) attempts at compression skipped. */
+ if (op->data.send_message->data.raw.compression > GRPC_COMPRESS_NONE) {
+ call->sending_stream.base.flags |= GRPC_WRITE_INTERNAL_COMPRESS;
+ }
stream_op->send_message = &call->sending_stream.base;
break;
case GRPC_OP_SEND_CLOSE_FROM_CLIENT:
diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c
index 41242684da..0db8b41aa9 100644
--- a/src/core/lib/surface/version.c
+++ b/src/core/lib/surface/version.c
@@ -36,6 +36,6 @@
#include <grpc/grpc.h>
-const char *grpc_version_string(void) { return "1.1.0-dev"; }
+const char *grpc_version_string(void) { return "2.0.0-dev"; }
const char *grpc_g_stands_for(void) { return "good"; }
diff --git a/include/grpc++/impl/codegen/impl/sync.h b/src/core/lib/transport/pid_controller.c
index 88951de6d0..3cef225d4b 100644
--- a/include/grpc++/impl/codegen/impl/sync.h
+++ b/src/core/lib/transport/pid_controller.c
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,15 +31,27 @@
*
*/
-#ifndef GRPCXX_IMPL_CODEGEN_IMPL_SYNC_H
-#define GRPCXX_IMPL_CODEGEN_IMPL_SYNC_H
+#include "src/core/lib/transport/pid_controller.h"
-#include <grpc++/impl/codegen/config.h>
+void grpc_pid_controller_init(grpc_pid_controller *pid_controller,
+ double gain_p, double gain_i, double gain_d) {
+ pid_controller->gain_p = gain_p;
+ pid_controller->gain_i = gain_i;
+ pid_controller->gain_d = gain_d;
+ grpc_pid_controller_reset(pid_controller);
+}
-#ifdef GRPC_CXX0X_NO_THREAD
-#include <grpc++/impl/codegen/sync_no_cxx11.h>
-#else
-#include <grpc++/impl/codegen/sync_cxx11.h>
-#endif
+void grpc_pid_controller_reset(grpc_pid_controller *pid_controller) {
+ pid_controller->last_error = 0.0;
+ pid_controller->error_integral = 0.0;
+}
-#endif // GRPCXX_IMPL_CODEGEN_IMPL_SYNC_H
+double grpc_pid_controller_update(grpc_pid_controller *pid_controller,
+ double error, double dt) {
+ pid_controller->error_integral += error * dt;
+ double diff_error = (error - pid_controller->last_error) / dt;
+ pid_controller->last_error = error;
+ return dt * (pid_controller->gain_p * error +
+ pid_controller->gain_i * pid_controller->error_integral +
+ pid_controller->gain_d * diff_error);
+}
diff --git a/include/grpc++/impl/codegen/sync.h b/src/core/lib/transport/pid_controller.h
index 62194c7708..059b5b0834 100644
--- a/include/grpc++/impl/codegen/sync.h
+++ b/src/core/lib/transport/pid_controller.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,15 +31,34 @@
*
*/
-#ifndef GRPCXX_IMPL_CODEGEN_SYNC_H
-#define GRPCXX_IMPL_CODEGEN_SYNC_H
+#ifndef GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H
+#define GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H
-#include <grpc++/impl/codegen/config.h>
+/* \file Simple PID controller.
+ Implements a proportional-integral-derivative controller.
+ Used when we want to iteratively control a variable to converge some other
+ observed value to a 'set-point'.
+ Gains can be set to adjust sensitivity to current error (p), the integral
+ of error (i), and the derivative of error (d). */
-#ifdef GRPC_CXX0X_NO_THREAD
-#include <grpc++/impl/codegen/sync_no_cxx11.h>
-#else
-#include <grpc++/impl/codegen/sync_cxx11.h>
-#endif
+typedef struct {
+ double gain_p;
+ double gain_i;
+ double gain_d;
+ double last_error;
+ double error_integral;
+} grpc_pid_controller;
+
+/** Initialize the controller */
+void grpc_pid_controller_init(grpc_pid_controller *pid_controller,
+ double gain_p, double gain_i, double gain_d);
+
+/** Reset the controller: useful when things have changed significantly */
+void grpc_pid_controller_reset(grpc_pid_controller *pid_controller);
-#endif // GRPCXX_IMPL_CODEGEN_SYNC_H
+/** Update the controller: given a current error estimate, and the time since
+ the last update, returns a delta to the control value */
+double grpc_pid_controller_update(grpc_pid_controller *pid_controller,
+ double error, double dt);
+
+#endif
diff --git a/src/core/lib/tsi/ssl_transport_security.c b/src/core/lib/tsi/ssl_transport_security.c
index 749b46e19f..366dca9507 100644
--- a/src/core/lib/tsi/ssl_transport_security.c
+++ b/src/core/lib/tsi/ssl_transport_security.c
@@ -31,9 +31,6 @@
*
*/
-#include "src/core/lib/iomgr/sockaddr.h"
-
-#include "src/core/lib/iomgr/socket_utils.h"
#include "src/core/lib/tsi/ssl_transport_security.h"
#include <grpc/support/port_platform.h>
@@ -41,6 +38,15 @@
#include <limits.h>
#include <string.h>
+/* TODO(jboeuf): refactor inet_ntop into a portability header. */
+/* Note: for whomever reads this and tries to refactor this, this
+ can't be in grpc, it has to be in gpr. */
+#ifdef GPR_WINDOWS
+#include <ws2tcpip.h>
+#else
+#include <arpa/inet.h>
+#endif
+
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
@@ -349,8 +355,8 @@ static tsi_result add_subject_alt_names_properties_to_peer(
result = TSI_INTERNAL_ERROR;
break;
}
- const char *name = grpc_inet_ntop(af, subject_alt_name->d.iPAddress->data,
- ntop_buf, INET6_ADDRSTRLEN);
+ const char *name = inet_ntop(af, subject_alt_name->d.iPAddress->data,
+ ntop_buf, INET6_ADDRSTRLEN);
if (name == NULL) {
gpr_log(GPR_ERROR, "Could not get IP string from asn1 octet.");
result = TSI_INTERNAL_ERROR;
diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc
index 43b3875cb3..847c8c7dc0 100644
--- a/src/cpp/client/channel_cc.cc
+++ b/src/cpp/client/channel_cc.cc
@@ -106,11 +106,11 @@ grpc_connectivity_state Channel::GetState(bool try_to_connect) {
}
namespace {
-class TagSaver GRPC_FINAL : public CompletionQueueTag {
+class TagSaver final : public CompletionQueueTag {
public:
explicit TagSaver(void* tag) : tag_(tag) {}
- ~TagSaver() GRPC_OVERRIDE {}
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE {
+ ~TagSaver() override {}
+ bool FinalizeResult(void** tag, bool* status) override {
*tag = tag_;
delete this;
return true;
diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc
index b6008f47b1..c073741dac 100644
--- a/src/cpp/client/client_context.cc
+++ b/src/cpp/client/client_context.cc
@@ -45,12 +45,12 @@
namespace grpc {
-class DefaultGlobalClientCallbacks GRPC_FINAL
+class DefaultGlobalClientCallbacks final
: public ClientContext::GlobalCallbacks {
public:
- ~DefaultGlobalClientCallbacks() GRPC_OVERRIDE {}
- void DefaultConstructor(ClientContext* context) GRPC_OVERRIDE {}
- void Destructor(ClientContext* context) GRPC_OVERRIDE {}
+ ~DefaultGlobalClientCallbacks() override {}
+ void DefaultConstructor(ClientContext* context) override {}
+ void Destructor(ClientContext* context) override {}
};
static DefaultGlobalClientCallbacks g_default_client_callbacks;
@@ -93,7 +93,7 @@ void ClientContext::AddMetadata(const grpc::string& meta_key,
void ClientContext::set_call(grpc_call* call,
const std::shared_ptr<Channel>& channel) {
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
GPR_ASSERT(call_ == nullptr);
call_ = call;
channel_ = channel;
@@ -119,7 +119,7 @@ void ClientContext::set_compression_algorithm(
}
void ClientContext::TryCancel() {
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
if (call_) {
grpc_call_cancel(call_, nullptr);
} else {
diff --git a/src/cpp/client/cronet_credentials.cc b/src/cpp/client/cronet_credentials.cc
index 60cad097db..8e94cf0ad7 100644
--- a/src/cpp/client/cronet_credentials.cc
+++ b/src/cpp/client/cronet_credentials.cc
@@ -40,12 +40,12 @@
namespace grpc {
-class CronetChannelCredentialsImpl GRPC_FINAL : public ChannelCredentials {
+class CronetChannelCredentialsImpl final : public ChannelCredentials {
public:
CronetChannelCredentialsImpl(void* engine) : engine_(engine) {}
std::shared_ptr<grpc::Channel> CreateChannel(
- const string& target, const grpc::ChannelArguments& args) GRPC_OVERRIDE {
+ const string& target, const grpc::ChannelArguments& args) override {
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
return CreateChannelInternal(
@@ -53,9 +53,7 @@ class CronetChannelCredentialsImpl GRPC_FINAL : public ChannelCredentials {
&channel_args, nullptr));
}
- SecureChannelCredentials* AsSecureCredentials() GRPC_OVERRIDE {
- return nullptr;
- }
+ SecureChannelCredentials* AsSecureCredentials() override { return nullptr; }
private:
void* engine_;
diff --git a/src/cpp/client/insecure_credentials.cc b/src/cpp/client/insecure_credentials.cc
index 13019a7117..116f1dd4ad 100644
--- a/src/cpp/client/insecure_credentials.cc
+++ b/src/cpp/client/insecure_credentials.cc
@@ -43,10 +43,10 @@
namespace grpc {
namespace {
-class InsecureChannelCredentialsImpl GRPC_FINAL : public ChannelCredentials {
+class InsecureChannelCredentialsImpl final : public ChannelCredentials {
public:
std::shared_ptr<grpc::Channel> CreateChannel(
- const string& target, const grpc::ChannelArguments& args) GRPC_OVERRIDE {
+ const string& target, const grpc::ChannelArguments& args) override {
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
return CreateChannelInternal(
@@ -54,9 +54,7 @@ class InsecureChannelCredentialsImpl GRPC_FINAL : public ChannelCredentials {
grpc_insecure_channel_create(target.c_str(), &channel_args, nullptr));
}
- SecureChannelCredentials* AsSecureCredentials() GRPC_OVERRIDE {
- return nullptr;
- }
+ SecureChannelCredentials* AsSecureCredentials() override { return nullptr; }
};
} // namespace
diff --git a/src/cpp/client/secure_credentials.h b/src/cpp/client/secure_credentials.h
index ae41ef8007..281db17e98 100644
--- a/src/cpp/client/secure_credentials.h
+++ b/src/cpp/client/secure_credentials.h
@@ -43,34 +43,34 @@
namespace grpc {
-class SecureChannelCredentials GRPC_FINAL : public ChannelCredentials {
+class SecureChannelCredentials final : public ChannelCredentials {
public:
explicit SecureChannelCredentials(grpc_channel_credentials* c_creds);
~SecureChannelCredentials() { grpc_channel_credentials_release(c_creds_); }
grpc_channel_credentials* GetRawCreds() { return c_creds_; }
std::shared_ptr<grpc::Channel> CreateChannel(
- const string& target, const grpc::ChannelArguments& args) GRPC_OVERRIDE;
- SecureChannelCredentials* AsSecureCredentials() GRPC_OVERRIDE { return this; }
+ const string& target, const grpc::ChannelArguments& args) override;
+ SecureChannelCredentials* AsSecureCredentials() override { return this; }
private:
grpc_channel_credentials* const c_creds_;
};
-class SecureCallCredentials GRPC_FINAL : public CallCredentials {
+class SecureCallCredentials final : public CallCredentials {
public:
explicit SecureCallCredentials(grpc_call_credentials* c_creds);
~SecureCallCredentials() { grpc_call_credentials_release(c_creds_); }
grpc_call_credentials* GetRawCreds() { return c_creds_; }
- bool ApplyToCall(grpc_call* call) GRPC_OVERRIDE;
- SecureCallCredentials* AsSecureCredentials() GRPC_OVERRIDE { return this; }
+ bool ApplyToCall(grpc_call* call) override;
+ SecureCallCredentials* AsSecureCredentials() override { return this; }
private:
grpc_call_credentials* const c_creds_;
};
-class MetadataCredentialsPluginWrapper GRPC_FINAL {
+class MetadataCredentialsPluginWrapper final {
public:
static void Destroy(void* wrapper);
static void GetMetadata(void* wrapper, grpc_auth_metadata_context context,
diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc
index d136d49c89..d86ba9dd4e 100644
--- a/src/cpp/common/channel_arguments.cc
+++ b/src/cpp/common/channel_arguments.cc
@@ -34,6 +34,7 @@
#include <sstream>
+#include <grpc++/grpc++.h>
#include <grpc++/resource_quota.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/support/log.h>
@@ -42,10 +43,8 @@
namespace grpc {
ChannelArguments::ChannelArguments() {
- std::ostringstream user_agent_prefix;
- user_agent_prefix << "grpc-c++/" << grpc_version_string();
// This will be ignored if used on the server side.
- SetString(GRPC_ARG_PRIMARY_USER_AGENT_STRING, user_agent_prefix.str());
+ SetString(GRPC_ARG_PRIMARY_USER_AGENT_STRING, "grpc-c++/" + Version());
}
ChannelArguments::ChannelArguments(const ChannelArguments& other)
@@ -121,6 +120,11 @@ void ChannelArguments::SetResourceQuota(
grpc_resource_quota_arg_vtable());
}
+void ChannelArguments::SetLoadBalancingPolicyName(
+ const grpc::string& lb_policy_name) {
+ SetString(GRPC_ARG_LB_POLICY_NAME, lb_policy_name);
+}
+
void ChannelArguments::SetInt(const grpc::string& key, int value) {
grpc_arg arg;
arg.type = GRPC_ARG_INTEGER;
diff --git a/src/cpp/common/channel_filter.h b/src/cpp/common/channel_filter.h
index ae32e02f69..fc0deff3b3 100644
--- a/src/cpp/common/channel_filter.h
+++ b/src/cpp/common/channel_filter.h
@@ -268,7 +268,7 @@ namespace internal {
// Members of this class correspond to the members of the C
// grpc_channel_filter struct.
template <typename ChannelDataType, typename CallDataType>
-class ChannelFilter GRPC_FINAL {
+class ChannelFilter final {
public:
static const size_t channel_data_size = sizeof(ChannelDataType);
diff --git a/src/cpp/common/secure_auth_context.h b/src/cpp/common/secure_auth_context.h
index c9f1dad131..98f5f09e27 100644
--- a/src/cpp/common/secure_auth_context.h
+++ b/src/cpp/common/secure_auth_context.h
@@ -40,30 +40,29 @@ struct grpc_auth_context;
namespace grpc {
-class SecureAuthContext GRPC_FINAL : public AuthContext {
+class SecureAuthContext final : public AuthContext {
public:
SecureAuthContext(grpc_auth_context* ctx, bool take_ownership);
- ~SecureAuthContext() GRPC_OVERRIDE;
+ ~SecureAuthContext() override;
- bool IsPeerAuthenticated() const GRPC_OVERRIDE;
+ bool IsPeerAuthenticated() const override;
- std::vector<grpc::string_ref> GetPeerIdentity() const GRPC_OVERRIDE;
+ std::vector<grpc::string_ref> GetPeerIdentity() const override;
- grpc::string GetPeerIdentityPropertyName() const GRPC_OVERRIDE;
+ grpc::string GetPeerIdentityPropertyName() const override;
std::vector<grpc::string_ref> FindPropertyValues(
- const grpc::string& name) const GRPC_OVERRIDE;
+ const grpc::string& name) const override;
- AuthPropertyIterator begin() const GRPC_OVERRIDE;
+ AuthPropertyIterator begin() const override;
- AuthPropertyIterator end() const GRPC_OVERRIDE;
+ AuthPropertyIterator end() const override;
void AddProperty(const grpc::string& key,
- const grpc::string_ref& value) GRPC_OVERRIDE;
+ const grpc::string_ref& value) override;
- virtual bool SetPeerIdentityPropertyName(const grpc::string& name)
- GRPC_OVERRIDE;
+ virtual bool SetPeerIdentityPropertyName(const grpc::string& name) override;
private:
grpc_auth_context* ctx_;
diff --git a/include/grpc++/impl/thd_cxx11.h b/src/cpp/common/version_cc.cc
index 2055b1d538..7be338417f 100644
--- a/include/grpc++/impl/thd_cxx11.h
+++ b/src/cpp/common/version_cc.cc
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,15 +31,11 @@
*
*/
-#ifndef GRPCXX_IMPL_THD_CXX11_H
-#define GRPCXX_IMPL_THD_CXX11_H
+/* This file is autogenerated from:
+ templates/src/core/surface/version.c.template */
-#include <thread>
+#include <grpc++/grpc++.h>
namespace grpc {
-
-using std::thread;
-
-} // namespace grpc
-
-#endif // GRPCXX_IMPL_THD_CXX11_H
+grpc::string Version() { return "1.1.0-dev"; }
+}
diff --git a/src/cpp/ext/proto_server_reflection.h b/src/cpp/ext/proto_server_reflection.h
index f66f3c2c9a..ca0ba97d88 100644
--- a/src/cpp/ext/proto_server_reflection.h
+++ b/src/cpp/ext/proto_server_reflection.h
@@ -31,35 +31,18 @@
*
*/
-/*
- - If the generated header `grpc++/ext/reflection.grpc.pb.h` needs to be
- installed, target `grpc++_reflection` in `build.yaml` should use the
- filegroup `grpc++_reflection_proto`, and GRPC_NO_GENERATED_CODE should not
- be defined.
- - If the server reflection library needs to generate `reflection.grpc.pb.h`
- from `reflection.proto` at compile time, the generated header
- `grpc++/ext/reflection.grpc.pb.h` should not be installed. In this case,
- target `grpc++_reflection` should depend on `grpc++_reflection_codegen`, and
- GRPC_NO_GENERATED_CODE should be defined.
-*/
-
#ifndef GRPC_INTERNAL_CPP_EXT_PROTO_SERVER_REFLECTION_H
#define GRPC_INTERNAL_CPP_EXT_PROTO_SERVER_REFLECTION_H
#include <unordered_set>
#include <vector>
-// GRPC_NO_GENERATED_CODE indicates generated pb files should not be used
-#ifdef GRPC_NO_GENERATED_CODE
-#include "src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h"
-#else
-#include <grpc++/ext/reflection.grpc.pb.h>
-#endif // GRPC_NO_GENERATED_CODE
#include <grpc++/grpc++.h>
+#include "src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h"
namespace grpc {
-class ProtoServerReflection GRPC_FINAL
+class ProtoServerReflection final
: public reflection::v1alpha::ServerReflection::Service {
public:
ProtoServerReflection();
@@ -73,7 +56,7 @@ class ProtoServerReflection GRPC_FINAL
ServerContext* context,
ServerReaderWriter<reflection::v1alpha::ServerReflectionResponse,
reflection::v1alpha::ServerReflectionRequest>* stream)
- GRPC_OVERRIDE;
+ override;
private:
Status ListService(ServerContext* context,
diff --git a/src/cpp/ext/reflection.grpc.pb.cc b/src/cpp/ext/reflection.grpc.pb.cc
deleted file mode 100644
index 8139c8ea16..0000000000
--- a/src/cpp/ext/reflection.grpc.pb.cc
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- *
- * 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.
- *
- */
-
-
-// Generated by tools/codegen/extensions/gen_reflection_proto.sh
-// If you make any local change, they will be lost.
-// source: reflection.proto
-
-#include <grpc++/ext/reflection.pb.h>
-#include <grpc++/ext/reflection.grpc.pb.h>
-
-#include <grpc++/impl/codegen/async_stream.h>
-#include <grpc++/impl/codegen/async_unary_call.h>
-#include <grpc++/impl/codegen/channel_interface.h>
-#include <grpc++/impl/codegen/client_unary_call.h>
-#include <grpc++/impl/codegen/method_handler_impl.h>
-#include <grpc++/impl/codegen/rpc_service_method.h>
-#include <grpc++/impl/codegen/service_type.h>
-#include <grpc++/impl/codegen/sync_stream.h>
-namespace grpc {
-namespace reflection {
-namespace v1alpha {
-
-static const char* ServerReflection_method_names[] = {
- "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo",
-};
-
-std::unique_ptr< ServerReflection::Stub> ServerReflection::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
- std::unique_ptr< ServerReflection::Stub> stub(new ServerReflection::Stub(channel));
- return stub;
-}
-
-ServerReflection::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
- : channel_(channel), rpcmethod_ServerReflectionInfo_(ServerReflection_method_names[0], ::grpc::RpcMethod::BIDI_STREAMING, channel)
- {}
-
-::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflection::Stub::ServerReflectionInfoRaw(::grpc::ClientContext* context) {
- return new ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>(channel_.get(), rpcmethod_ServerReflectionInfo_, context);
-}
-
-::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflection::Stub::AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
- return new ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>(channel_.get(), cq, rpcmethod_ServerReflectionInfo_, context, tag);
-}
-
-ServerReflection::Service::Service() {
- (void)ServerReflection_method_names;
- AddMethod(new ::grpc::RpcServiceMethod(
- ServerReflection_method_names[0],
- ::grpc::RpcMethod::BIDI_STREAMING,
- new ::grpc::BidiStreamingHandler< ServerReflection::Service, ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>(
- std::mem_fn(&ServerReflection::Service::ServerReflectionInfo), this)));
-}
-
-ServerReflection::Service::~Service() {
-}
-
-::grpc::Status ServerReflection::Service::ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) {
- (void) context;
- (void) stream;
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
-}
-
-
-} // namespace grpc
-} // namespace reflection
-} // namespace v1alpha
-
diff --git a/src/cpp/ext/reflection.pb.cc b/src/cpp/ext/reflection.pb.cc
deleted file mode 100644
index d75503b3ce..0000000000
--- a/src/cpp/ext/reflection.pb.cc
+++ /dev/null
@@ -1,4045 +0,0 @@
-/*
- *
- * 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.
- *
- */
-
-
-// Generated by tools/codegen/extensions/gen_reflection_proto.sh
-// source: reflection.proto
-
-#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
-#include <grpc++/ext/reflection.pb.h>
-
-#include <algorithm>
-
-#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/stubs/port.h>
-#include <google/protobuf/stubs/once.h>
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/wire_format_lite_inl.h>
-#include <google/protobuf/descriptor.h>
-#include <google/protobuf/generated_message_reflection.h>
-#include <google/protobuf/reflection_ops.h>
-#include <google/protobuf/wire_format.h>
-// @@protoc_insertion_point(includes)
-
-namespace grpc {
-namespace reflection {
-namespace v1alpha {
-
-namespace {
-
-const ::google::protobuf::Descriptor* ServerReflectionRequest_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- ServerReflectionRequest_reflection_ = NULL;
-struct ServerReflectionRequestOneofInstance {
- ::google::protobuf::internal::ArenaStringPtr file_by_filename_;
- ::google::protobuf::internal::ArenaStringPtr file_containing_symbol_;
- const ::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension_;
- ::google::protobuf::internal::ArenaStringPtr all_extension_numbers_of_type_;
- ::google::protobuf::internal::ArenaStringPtr list_services_;
-}* ServerReflectionRequest_default_oneof_instance_ = NULL;
-const ::google::protobuf::Descriptor* ExtensionRequest_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- ExtensionRequest_reflection_ = NULL;
-const ::google::protobuf::Descriptor* ServerReflectionResponse_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- ServerReflectionResponse_reflection_ = NULL;
-struct ServerReflectionResponseOneofInstance {
- const ::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response_;
- const ::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response_;
- const ::grpc::reflection::v1alpha::ListServiceResponse* list_services_response_;
- const ::grpc::reflection::v1alpha::ErrorResponse* error_response_;
-}* ServerReflectionResponse_default_oneof_instance_ = NULL;
-const ::google::protobuf::Descriptor* FileDescriptorResponse_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- FileDescriptorResponse_reflection_ = NULL;
-const ::google::protobuf::Descriptor* ExtensionNumberResponse_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- ExtensionNumberResponse_reflection_ = NULL;
-const ::google::protobuf::Descriptor* ListServiceResponse_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- ListServiceResponse_reflection_ = NULL;
-const ::google::protobuf::Descriptor* ServiceResponse_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- ServiceResponse_reflection_ = NULL;
-const ::google::protobuf::Descriptor* ErrorResponse_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- ErrorResponse_reflection_ = NULL;
-
-} // namespace
-
-
-void protobuf_AssignDesc_reflection_2eproto() GOOGLE_ATTRIBUTE_COLD;
-void protobuf_AssignDesc_reflection_2eproto() {
- protobuf_AddDesc_reflection_2eproto();
- const ::google::protobuf::FileDescriptor* file =
- ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
- "reflection.proto");
- GOOGLE_CHECK(file != NULL);
- ServerReflectionRequest_descriptor_ = file->message_type(0);
- static const int ServerReflectionRequest_offsets_[7] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, host_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, file_by_filename_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, file_containing_symbol_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, file_containing_extension_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, all_extension_numbers_of_type_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, list_services_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, message_request_),
- };
- ServerReflectionRequest_reflection_ =
- ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
- ServerReflectionRequest_descriptor_,
- ServerReflectionRequest::internal_default_instance(),
- ServerReflectionRequest_offsets_,
- -1,
- -1,
- -1,
- ServerReflectionRequest_default_oneof_instance_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, _oneof_case_[0]),
- sizeof(ServerReflectionRequest),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, _internal_metadata_));
- ExtensionRequest_descriptor_ = file->message_type(1);
- static const int ExtensionRequest_offsets_[2] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, containing_type_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, extension_number_),
- };
- ExtensionRequest_reflection_ =
- ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
- ExtensionRequest_descriptor_,
- ExtensionRequest::internal_default_instance(),
- ExtensionRequest_offsets_,
- -1,
- -1,
- -1,
- sizeof(ExtensionRequest),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, _internal_metadata_));
- ServerReflectionResponse_descriptor_ = file->message_type(2);
- static const int ServerReflectionResponse_offsets_[7] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, valid_host_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, original_request_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionResponse_default_oneof_instance_, file_descriptor_response_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionResponse_default_oneof_instance_, all_extension_numbers_response_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionResponse_default_oneof_instance_, list_services_response_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionResponse_default_oneof_instance_, error_response_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, message_response_),
- };
- ServerReflectionResponse_reflection_ =
- ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
- ServerReflectionResponse_descriptor_,
- ServerReflectionResponse::internal_default_instance(),
- ServerReflectionResponse_offsets_,
- -1,
- -1,
- -1,
- ServerReflectionResponse_default_oneof_instance_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, _oneof_case_[0]),
- sizeof(ServerReflectionResponse),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, _internal_metadata_));
- FileDescriptorResponse_descriptor_ = file->message_type(3);
- static const int FileDescriptorResponse_offsets_[1] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorResponse, file_descriptor_proto_),
- };
- FileDescriptorResponse_reflection_ =
- ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
- FileDescriptorResponse_descriptor_,
- FileDescriptorResponse::internal_default_instance(),
- FileDescriptorResponse_offsets_,
- -1,
- -1,
- -1,
- sizeof(FileDescriptorResponse),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorResponse, _internal_metadata_));
- ExtensionNumberResponse_descriptor_ = file->message_type(4);
- static const int ExtensionNumberResponse_offsets_[2] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, base_type_name_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, extension_number_),
- };
- ExtensionNumberResponse_reflection_ =
- ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
- ExtensionNumberResponse_descriptor_,
- ExtensionNumberResponse::internal_default_instance(),
- ExtensionNumberResponse_offsets_,
- -1,
- -1,
- -1,
- sizeof(ExtensionNumberResponse),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, _internal_metadata_));
- ListServiceResponse_descriptor_ = file->message_type(5);
- static const int ListServiceResponse_offsets_[1] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, service_),
- };
- ListServiceResponse_reflection_ =
- ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
- ListServiceResponse_descriptor_,
- ListServiceResponse::internal_default_instance(),
- ListServiceResponse_offsets_,
- -1,
- -1,
- -1,
- sizeof(ListServiceResponse),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, _internal_metadata_));
- ServiceResponse_descriptor_ = file->message_type(6);
- static const int ServiceResponse_offsets_[1] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceResponse, name_),
- };
- ServiceResponse_reflection_ =
- ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
- ServiceResponse_descriptor_,
- ServiceResponse::internal_default_instance(),
- ServiceResponse_offsets_,
- -1,
- -1,
- -1,
- sizeof(ServiceResponse),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceResponse, _internal_metadata_));
- ErrorResponse_descriptor_ = file->message_type(7);
- static const int ErrorResponse_offsets_[2] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, error_code_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, error_message_),
- };
- ErrorResponse_reflection_ =
- ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
- ErrorResponse_descriptor_,
- ErrorResponse::internal_default_instance(),
- ErrorResponse_offsets_,
- -1,
- -1,
- -1,
- sizeof(ErrorResponse),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, _internal_metadata_));
-}
-
-namespace {
-
-GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
-void protobuf_AssignDescriptorsOnce() {
- ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
- &protobuf_AssignDesc_reflection_2eproto);
-}
-
-void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
-void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- ServerReflectionRequest_descriptor_, ServerReflectionRequest::internal_default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- ExtensionRequest_descriptor_, ExtensionRequest::internal_default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- ServerReflectionResponse_descriptor_, ServerReflectionResponse::internal_default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- FileDescriptorResponse_descriptor_, FileDescriptorResponse::internal_default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- ExtensionNumberResponse_descriptor_, ExtensionNumberResponse::internal_default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- ListServiceResponse_descriptor_, ListServiceResponse::internal_default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- ServiceResponse_descriptor_, ServiceResponse::internal_default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- ErrorResponse_descriptor_, ErrorResponse::internal_default_instance());
-}
-
-} // namespace
-
-void protobuf_ShutdownFile_reflection_2eproto() {
- ServerReflectionRequest_default_instance_.Shutdown();
- delete ServerReflectionRequest_default_oneof_instance_;
- delete ServerReflectionRequest_reflection_;
- ExtensionRequest_default_instance_.Shutdown();
- delete ExtensionRequest_reflection_;
- ServerReflectionResponse_default_instance_.Shutdown();
- delete ServerReflectionResponse_default_oneof_instance_;
- delete ServerReflectionResponse_reflection_;
- FileDescriptorResponse_default_instance_.Shutdown();
- delete FileDescriptorResponse_reflection_;
- ExtensionNumberResponse_default_instance_.Shutdown();
- delete ExtensionNumberResponse_reflection_;
- ListServiceResponse_default_instance_.Shutdown();
- delete ListServiceResponse_reflection_;
- ServiceResponse_default_instance_.Shutdown();
- delete ServiceResponse_reflection_;
- ErrorResponse_default_instance_.Shutdown();
- delete ErrorResponse_reflection_;
-}
-
-void protobuf_InitDefaults_reflection_2eproto_impl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- ::google::protobuf::internal::GetEmptyString();
- ServerReflectionRequest_default_instance_.DefaultConstruct();
- ServerReflectionRequest_default_oneof_instance_ = new ServerReflectionRequestOneofInstance();
- ::google::protobuf::internal::GetEmptyString();
- ExtensionRequest_default_instance_.DefaultConstruct();
- ::google::protobuf::internal::GetEmptyString();
- ServerReflectionResponse_default_instance_.DefaultConstruct();
- ServerReflectionResponse_default_oneof_instance_ = new ServerReflectionResponseOneofInstance();
- ::google::protobuf::internal::GetEmptyString();
- FileDescriptorResponse_default_instance_.DefaultConstruct();
- ::google::protobuf::internal::GetEmptyString();
- ExtensionNumberResponse_default_instance_.DefaultConstruct();
- ListServiceResponse_default_instance_.DefaultConstruct();
- ::google::protobuf::internal::GetEmptyString();
- ServiceResponse_default_instance_.DefaultConstruct();
- ::google::protobuf::internal::GetEmptyString();
- ErrorResponse_default_instance_.DefaultConstruct();
- ServerReflectionRequest_default_instance_.get_mutable()->InitAsDefaultInstance();
- ExtensionRequest_default_instance_.get_mutable()->InitAsDefaultInstance();
- ServerReflectionResponse_default_instance_.get_mutable()->InitAsDefaultInstance();
- FileDescriptorResponse_default_instance_.get_mutable()->InitAsDefaultInstance();
- ExtensionNumberResponse_default_instance_.get_mutable()->InitAsDefaultInstance();
- ListServiceResponse_default_instance_.get_mutable()->InitAsDefaultInstance();
- ServiceResponse_default_instance_.get_mutable()->InitAsDefaultInstance();
- ErrorResponse_default_instance_.get_mutable()->InitAsDefaultInstance();
-}
-
-GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_reflection_2eproto_once_);
-void protobuf_InitDefaults_reflection_2eproto() {
- ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_reflection_2eproto_once_,
- &protobuf_InitDefaults_reflection_2eproto_impl);
-}
-void protobuf_AddDesc_reflection_2eproto_impl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- protobuf_InitDefaults_reflection_2eproto();
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- "\n\020reflection.proto\022\027grpc.reflection.v1al"
- "pha\"\212\002\n\027ServerReflectionRequest\022\014\n\004host\030"
- "\001 \001(\t\022\032\n\020file_by_filename\030\003 \001(\tH\000\022 \n\026fil"
- "e_containing_symbol\030\004 \001(\tH\000\022N\n\031file_cont"
- "aining_extension\030\005 \001(\0132).grpc.reflection"
- ".v1alpha.ExtensionRequestH\000\022\'\n\035all_exten"
- "sion_numbers_of_type\030\006 \001(\tH\000\022\027\n\rlist_ser"
- "vices\030\007 \001(\tH\000B\021\n\017message_request\"E\n\020Exte"
- "nsionRequest\022\027\n\017containing_type\030\001 \001(\t\022\030\n"
- "\020extension_number\030\002 \001(\005\"\321\003\n\030ServerReflec"
- "tionResponse\022\022\n\nvalid_host\030\001 \001(\t\022J\n\020orig"
- "inal_request\030\002 \001(\01320.grpc.reflection.v1a"
- "lpha.ServerReflectionRequest\022S\n\030file_des"
- "criptor_response\030\004 \001(\0132/.grpc.reflection"
- ".v1alpha.FileDescriptorResponseH\000\022Z\n\036all"
- "_extension_numbers_response\030\005 \001(\01320.grpc"
- ".reflection.v1alpha.ExtensionNumberRespo"
- "nseH\000\022N\n\026list_services_response\030\006 \001(\0132,."
- "grpc.reflection.v1alpha.ListServiceRespo"
- "nseH\000\022@\n\016error_response\030\007 \001(\0132&.grpc.ref"
- "lection.v1alpha.ErrorResponseH\000B\022\n\020messa"
- "ge_response\"7\n\026FileDescriptorResponse\022\035\n"
- "\025file_descriptor_proto\030\001 \003(\014\"K\n\027Extensio"
- "nNumberResponse\022\026\n\016base_type_name\030\001 \001(\t\022"
- "\030\n\020extension_number\030\002 \003(\005\"P\n\023ListService"
- "Response\0229\n\007service\030\001 \003(\0132(.grpc.reflect"
- "ion.v1alpha.ServiceResponse\"\037\n\017ServiceRe"
- "sponse\022\014\n\004name\030\001 \001(\t\":\n\rErrorResponse\022\022\n"
- "\nerror_code\030\001 \001(\005\022\025\n\rerror_message\030\002 \001(\t"
- "2\223\001\n\020ServerReflection\022\177\n\024ServerReflectio"
- "nInfo\0220.grpc.reflection.v1alpha.ServerRe"
- "flectionRequest\0321.grpc.reflection.v1alph"
- "a.ServerReflectionResponse(\0010\001b\006proto3", 1318);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "reflection.proto", &protobuf_RegisterTypes);
- ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_reflection_2eproto);
-}
-
-GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_reflection_2eproto_once_);
-void protobuf_AddDesc_reflection_2eproto() {
- ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_reflection_2eproto_once_,
- &protobuf_AddDesc_reflection_2eproto_impl);
-}
-// Force AddDescriptors() to be called at static initialization time.
-struct StaticDescriptorInitializer_reflection_2eproto {
- StaticDescriptorInitializer_reflection_2eproto() {
- protobuf_AddDesc_reflection_2eproto();
- }
-} static_descriptor_initializer_reflection_2eproto_;
-
-namespace {
-
-static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN;
-static void MergeFromFail(int line) {
- ::google::protobuf::internal::MergeFromFail(__FILE__, line);
-}
-
-} // namespace
-
-
-// ===================================================================
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int ServerReflectionRequest::kHostFieldNumber;
-const int ServerReflectionRequest::kFileByFilenameFieldNumber;
-const int ServerReflectionRequest::kFileContainingSymbolFieldNumber;
-const int ServerReflectionRequest::kFileContainingExtensionFieldNumber;
-const int ServerReflectionRequest::kAllExtensionNumbersOfTypeFieldNumber;
-const int ServerReflectionRequest::kListServicesFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-ServerReflectionRequest::ServerReflectionRequest()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (this != internal_default_instance()) protobuf_InitDefaults_reflection_2eproto();
- SharedCtor();
- // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ServerReflectionRequest)
-}
-
-void ServerReflectionRequest::InitAsDefaultInstance() {
- ServerReflectionRequest_default_oneof_instance_->file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ServerReflectionRequest_default_oneof_instance_->file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ServerReflectionRequest_default_oneof_instance_->file_containing_extension_ = const_cast< ::grpc::reflection::v1alpha::ExtensionRequest*>(
- ::grpc::reflection::v1alpha::ExtensionRequest::internal_default_instance());
- ServerReflectionRequest_default_oneof_instance_->all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ServerReflectionRequest_default_oneof_instance_->list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-ServerReflectionRequest::ServerReflectionRequest(const ServerReflectionRequest& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- SharedCtor();
- UnsafeMergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ServerReflectionRequest)
-}
-
-void ServerReflectionRequest::SharedCtor() {
- host_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_message_request();
- _cached_size_ = 0;
-}
-
-ServerReflectionRequest::~ServerReflectionRequest() {
- // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ServerReflectionRequest)
- SharedDtor();
-}
-
-void ServerReflectionRequest::SharedDtor() {
- host_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (has_message_request()) {
- clear_message_request();
- }
-}
-
-void ServerReflectionRequest::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* ServerReflectionRequest::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return ServerReflectionRequest_descriptor_;
-}
-
-const ServerReflectionRequest& ServerReflectionRequest::default_instance() {
- protobuf_InitDefaults_reflection_2eproto();
- return *internal_default_instance();
-}
-
-::google::protobuf::internal::ExplicitlyConstructed<ServerReflectionRequest> ServerReflectionRequest_default_instance_;
-
-ServerReflectionRequest* ServerReflectionRequest::New(::google::protobuf::Arena* arena) const {
- ServerReflectionRequest* n = new ServerReflectionRequest;
- if (arena != NULL) {
- arena->Own(n);
- }
- return n;
-}
-
-void ServerReflectionRequest::clear_message_request() {
-// @@protoc_insertion_point(one_of_clear_start:grpc.reflection.v1alpha.ServerReflectionRequest)
- switch (message_request_case()) {
- case kFileByFilename: {
- message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- break;
- }
- case kFileContainingSymbol: {
- message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- break;
- }
- case kFileContainingExtension: {
- delete message_request_.file_containing_extension_;
- break;
- }
- case kAllExtensionNumbersOfType: {
- message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- break;
- }
- case kListServices: {
- message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- break;
- }
- case MESSAGE_REQUEST_NOT_SET: {
- break;
- }
- }
- _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET;
-}
-
-
-void ServerReflectionRequest::Clear() {
-// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ServerReflectionRequest)
- host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_message_request();
-}
-
-bool ServerReflectionRequest::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ServerReflectionRequest)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional string host = 1;
- case 1: {
- if (tag == 10) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_host()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->host().data(), this->host().length(),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.host"));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(26)) goto parse_file_by_filename;
- break;
- }
-
- // optional string file_by_filename = 3;
- case 3: {
- if (tag == 26) {
- parse_file_by_filename:
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_file_by_filename()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->file_by_filename().data(), this->file_by_filename().length(),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename"));
- } else {
- goto handle_unusual;
- }
- goto after_list_services;
- break;
- }
-
- // optional string file_containing_symbol = 4;
- case 4: {
- if (tag == 34) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_file_containing_symbol()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->file_containing_symbol().data(), this->file_containing_symbol().length(),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol"));
- } else {
- goto handle_unusual;
- }
- goto after_list_services;
- break;
- }
-
- // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5;
- case 5: {
- if (tag == 42) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_file_containing_extension()));
- } else {
- goto handle_unusual;
- }
- goto after_list_services;
- break;
- }
-
- // optional string all_extension_numbers_of_type = 6;
- case 6: {
- if (tag == 50) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_all_extension_numbers_of_type()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type"));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(58)) goto parse_list_services;
- break;
- }
-
- // optional string list_services = 7;
- case 7: {
- if (tag == 58) {
- parse_list_services:
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_list_services()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->list_services().data(), this->list_services().length(),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.list_services"));
- } else {
- goto handle_unusual;
- }
- after_list_services:
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ServerReflectionRequest)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ServerReflectionRequest)
- return false;
-#undef DO_
-}
-
-void ServerReflectionRequest::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ServerReflectionRequest)
- // optional string host = 1;
- if (this->host().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->host().data(), this->host().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.host");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->host(), output);
- }
-
- // optional string file_by_filename = 3;
- if (has_file_by_filename()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->file_by_filename().data(), this->file_by_filename().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 3, this->file_by_filename(), output);
- }
-
- // optional string file_containing_symbol = 4;
- if (has_file_containing_symbol()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->file_containing_symbol().data(), this->file_containing_symbol().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 4, this->file_containing_symbol(), output);
- }
-
- // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5;
- if (has_file_containing_extension()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, *message_request_.file_containing_extension_, output);
- }
-
- // optional string all_extension_numbers_of_type = 6;
- if (has_all_extension_numbers_of_type()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 6, this->all_extension_numbers_of_type(), output);
- }
-
- // optional string list_services = 7;
- if (has_list_services()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->list_services().data(), this->list_services().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.list_services");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 7, this->list_services(), output);
- }
-
- // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ServerReflectionRequest)
-}
-
-::google::protobuf::uint8* ServerReflectionRequest::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ServerReflectionRequest)
- // optional string host = 1;
- if (this->host().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->host().data(), this->host().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.host");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->host(), target);
- }
-
- // optional string file_by_filename = 3;
- if (has_file_by_filename()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->file_by_filename().data(), this->file_by_filename().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 3, this->file_by_filename(), target);
- }
-
- // optional string file_containing_symbol = 4;
- if (has_file_containing_symbol()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->file_containing_symbol().data(), this->file_containing_symbol().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 4, this->file_containing_symbol(), target);
- }
-
- // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5;
- if (has_file_containing_extension()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 5, *message_request_.file_containing_extension_, false, target);
- }
-
- // optional string all_extension_numbers_of_type = 6;
- if (has_all_extension_numbers_of_type()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 6, this->all_extension_numbers_of_type(), target);
- }
-
- // optional string list_services = 7;
- if (has_list_services()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->list_services().data(), this->list_services().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServerReflectionRequest.list_services");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 7, this->list_services(), target);
- }
-
- // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ServerReflectionRequest)
- return target;
-}
-
-size_t ServerReflectionRequest::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ServerReflectionRequest)
- size_t total_size = 0;
-
- // optional string host = 1;
- if (this->host().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->host());
- }
-
- switch (message_request_case()) {
- // optional string file_by_filename = 3;
- case kFileByFilename: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->file_by_filename());
- break;
- }
- // optional string file_containing_symbol = 4;
- case kFileContainingSymbol: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->file_containing_symbol());
- break;
- }
- // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5;
- case kFileContainingExtension: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- *message_request_.file_containing_extension_);
- break;
- }
- // optional string all_extension_numbers_of_type = 6;
- case kAllExtensionNumbersOfType: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->all_extension_numbers_of_type());
- break;
- }
- // optional string list_services = 7;
- case kListServices: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->list_services());
- break;
- }
- case MESSAGE_REQUEST_NOT_SET: {
- break;
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void ServerReflectionRequest::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ServerReflectionRequest)
- if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
- const ServerReflectionRequest* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const ServerReflectionRequest>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ServerReflectionRequest)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ServerReflectionRequest)
- UnsafeMergeFrom(*source);
- }
-}
-
-void ServerReflectionRequest::MergeFrom(const ServerReflectionRequest& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ServerReflectionRequest)
- if (GOOGLE_PREDICT_TRUE(&from != this)) {
- UnsafeMergeFrom(from);
- } else {
- MergeFromFail(__LINE__);
- }
-}
-
-void ServerReflectionRequest::UnsafeMergeFrom(const ServerReflectionRequest& from) {
- GOOGLE_DCHECK(&from != this);
- switch (from.message_request_case()) {
- case kFileByFilename: {
- set_file_by_filename(from.file_by_filename());
- break;
- }
- case kFileContainingSymbol: {
- set_file_containing_symbol(from.file_containing_symbol());
- break;
- }
- case kFileContainingExtension: {
- mutable_file_containing_extension()->::grpc::reflection::v1alpha::ExtensionRequest::MergeFrom(from.file_containing_extension());
- break;
- }
- case kAllExtensionNumbersOfType: {
- set_all_extension_numbers_of_type(from.all_extension_numbers_of_type());
- break;
- }
- case kListServices: {
- set_list_services(from.list_services());
- break;
- }
- case MESSAGE_REQUEST_NOT_SET: {
- break;
- }
- }
- if (from.host().size() > 0) {
-
- host_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.host_);
- }
-}
-
-void ServerReflectionRequest::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ServerReflectionRequest)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void ServerReflectionRequest::CopyFrom(const ServerReflectionRequest& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ServerReflectionRequest)
- if (&from == this) return;
- Clear();
- UnsafeMergeFrom(from);
-}
-
-bool ServerReflectionRequest::IsInitialized() const {
-
- return true;
-}
-
-void ServerReflectionRequest::Swap(ServerReflectionRequest* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void ServerReflectionRequest::InternalSwap(ServerReflectionRequest* other) {
- host_.Swap(&other->host_);
- std::swap(message_request_, other->message_request_);
- std::swap(_oneof_case_[0], other->_oneof_case_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- std::swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata ServerReflectionRequest::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = ServerReflectionRequest_descriptor_;
- metadata.reflection = ServerReflectionRequest_reflection_;
- return metadata;
-}
-
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-// ServerReflectionRequest
-
-// optional string host = 1;
-void ServerReflectionRequest::clear_host() {
- host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-const ::std::string& ServerReflectionRequest::host() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.host)
- return host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void ServerReflectionRequest::set_host(const ::std::string& value) {
-
- host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-}
-void ServerReflectionRequest::set_host(const char* value) {
-
- host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-}
-void ServerReflectionRequest::set_host(const char* value, size_t size) {
-
- host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-}
-::std::string* ServerReflectionRequest::mutable_host() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.host)
- return host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-::std::string* ServerReflectionRequest::release_host() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-
- return host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void ServerReflectionRequest::set_allocated_host(::std::string* host) {
- if (host != NULL) {
-
- } else {
-
- }
- host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), host);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-}
-
-// optional string file_by_filename = 3;
-bool ServerReflectionRequest::has_file_by_filename() const {
- return message_request_case() == kFileByFilename;
-}
-void ServerReflectionRequest::set_has_file_by_filename() {
- _oneof_case_[0] = kFileByFilename;
-}
-void ServerReflectionRequest::clear_file_by_filename() {
- if (has_file_by_filename()) {
- message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_message_request();
- }
-}
-const ::std::string& ServerReflectionRequest::file_by_filename() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
- if (has_file_by_filename()) {
- return message_request_.file_by_filename_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-void ServerReflectionRequest::set_file_by_filename(const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
- if (!has_file_by_filename()) {
- clear_message_request();
- set_has_file_by_filename();
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
-}
-void ServerReflectionRequest::set_file_by_filename(const char* value) {
- if (!has_file_by_filename()) {
- clear_message_request();
- set_has_file_by_filename();
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
-}
-void ServerReflectionRequest::set_file_by_filename(const char* value, size_t size) {
- if (!has_file_by_filename()) {
- clear_message_request();
- set_has_file_by_filename();
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
-}
-::std::string* ServerReflectionRequest::mutable_file_by_filename() {
- if (!has_file_by_filename()) {
- clear_message_request();
- set_has_file_by_filename();
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
- return message_request_.file_by_filename_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-::std::string* ServerReflectionRequest::release_file_by_filename() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
- if (has_file_by_filename()) {
- clear_has_message_request();
- return message_request_.file_by_filename_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- } else {
- return NULL;
- }
-}
-void ServerReflectionRequest::set_allocated_file_by_filename(::std::string* file_by_filename) {
- if (!has_file_by_filename()) {
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_message_request();
- if (file_by_filename != NULL) {
- set_has_file_by_filename();
- message_request_.file_by_filename_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- file_by_filename);
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
-}
-
-// optional string file_containing_symbol = 4;
-bool ServerReflectionRequest::has_file_containing_symbol() const {
- return message_request_case() == kFileContainingSymbol;
-}
-void ServerReflectionRequest::set_has_file_containing_symbol() {
- _oneof_case_[0] = kFileContainingSymbol;
-}
-void ServerReflectionRequest::clear_file_containing_symbol() {
- if (has_file_containing_symbol()) {
- message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_message_request();
- }
-}
-const ::std::string& ServerReflectionRequest::file_containing_symbol() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
- if (has_file_containing_symbol()) {
- return message_request_.file_containing_symbol_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-void ServerReflectionRequest::set_file_containing_symbol(const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
- if (!has_file_containing_symbol()) {
- clear_message_request();
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
-}
-void ServerReflectionRequest::set_file_containing_symbol(const char* value) {
- if (!has_file_containing_symbol()) {
- clear_message_request();
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
-}
-void ServerReflectionRequest::set_file_containing_symbol(const char* value, size_t size) {
- if (!has_file_containing_symbol()) {
- clear_message_request();
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
-}
-::std::string* ServerReflectionRequest::mutable_file_containing_symbol() {
- if (!has_file_containing_symbol()) {
- clear_message_request();
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
- return message_request_.file_containing_symbol_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-::std::string* ServerReflectionRequest::release_file_containing_symbol() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
- if (has_file_containing_symbol()) {
- clear_has_message_request();
- return message_request_.file_containing_symbol_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- } else {
- return NULL;
- }
-}
-void ServerReflectionRequest::set_allocated_file_containing_symbol(::std::string* file_containing_symbol) {
- if (!has_file_containing_symbol()) {
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_message_request();
- if (file_containing_symbol != NULL) {
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- file_containing_symbol);
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
-}
-
-// optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5;
-bool ServerReflectionRequest::has_file_containing_extension() const {
- return message_request_case() == kFileContainingExtension;
-}
-void ServerReflectionRequest::set_has_file_containing_extension() {
- _oneof_case_[0] = kFileContainingExtension;
-}
-void ServerReflectionRequest::clear_file_containing_extension() {
- if (has_file_containing_extension()) {
- delete message_request_.file_containing_extension_;
- clear_has_message_request();
- }
-}
- const ::grpc::reflection::v1alpha::ExtensionRequest& ServerReflectionRequest::file_containing_extension() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension)
- return has_file_containing_extension()
- ? *message_request_.file_containing_extension_
- : ::grpc::reflection::v1alpha::ExtensionRequest::default_instance();
-}
-::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::mutable_file_containing_extension() {
- if (!has_file_containing_extension()) {
- clear_message_request();
- set_has_file_containing_extension();
- message_request_.file_containing_extension_ = new ::grpc::reflection::v1alpha::ExtensionRequest;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension)
- return message_request_.file_containing_extension_;
-}
-::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::release_file_containing_extension() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension)
- if (has_file_containing_extension()) {
- clear_has_message_request();
- ::grpc::reflection::v1alpha::ExtensionRequest* temp = message_request_.file_containing_extension_;
- message_request_.file_containing_extension_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-void ServerReflectionRequest::set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension) {
- clear_message_request();
- if (file_containing_extension) {
- set_has_file_containing_extension();
- message_request_.file_containing_extension_ = file_containing_extension;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension)
-}
-
-// optional string all_extension_numbers_of_type = 6;
-bool ServerReflectionRequest::has_all_extension_numbers_of_type() const {
- return message_request_case() == kAllExtensionNumbersOfType;
-}
-void ServerReflectionRequest::set_has_all_extension_numbers_of_type() {
- _oneof_case_[0] = kAllExtensionNumbersOfType;
-}
-void ServerReflectionRequest::clear_all_extension_numbers_of_type() {
- if (has_all_extension_numbers_of_type()) {
- message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_message_request();
- }
-}
-const ::std::string& ServerReflectionRequest::all_extension_numbers_of_type() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
- if (has_all_extension_numbers_of_type()) {
- return message_request_.all_extension_numbers_of_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-void ServerReflectionRequest::set_all_extension_numbers_of_type(const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
- if (!has_all_extension_numbers_of_type()) {
- clear_message_request();
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
-}
-void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value) {
- if (!has_all_extension_numbers_of_type()) {
- clear_message_request();
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
-}
-void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value, size_t size) {
- if (!has_all_extension_numbers_of_type()) {
- clear_message_request();
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
-}
-::std::string* ServerReflectionRequest::mutable_all_extension_numbers_of_type() {
- if (!has_all_extension_numbers_of_type()) {
- clear_message_request();
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
- return message_request_.all_extension_numbers_of_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-::std::string* ServerReflectionRequest::release_all_extension_numbers_of_type() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
- if (has_all_extension_numbers_of_type()) {
- clear_has_message_request();
- return message_request_.all_extension_numbers_of_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- } else {
- return NULL;
- }
-}
-void ServerReflectionRequest::set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type) {
- if (!has_all_extension_numbers_of_type()) {
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_message_request();
- if (all_extension_numbers_of_type != NULL) {
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- all_extension_numbers_of_type);
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
-}
-
-// optional string list_services = 7;
-bool ServerReflectionRequest::has_list_services() const {
- return message_request_case() == kListServices;
-}
-void ServerReflectionRequest::set_has_list_services() {
- _oneof_case_[0] = kListServices;
-}
-void ServerReflectionRequest::clear_list_services() {
- if (has_list_services()) {
- message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_message_request();
- }
-}
-const ::std::string& ServerReflectionRequest::list_services() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
- if (has_list_services()) {
- return message_request_.list_services_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-void ServerReflectionRequest::set_list_services(const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
- if (!has_list_services()) {
- clear_message_request();
- set_has_list_services();
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
-}
-void ServerReflectionRequest::set_list_services(const char* value) {
- if (!has_list_services()) {
- clear_message_request();
- set_has_list_services();
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
-}
-void ServerReflectionRequest::set_list_services(const char* value, size_t size) {
- if (!has_list_services()) {
- clear_message_request();
- set_has_list_services();
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
-}
-::std::string* ServerReflectionRequest::mutable_list_services() {
- if (!has_list_services()) {
- clear_message_request();
- set_has_list_services();
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
- return message_request_.list_services_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-::std::string* ServerReflectionRequest::release_list_services() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
- if (has_list_services()) {
- clear_has_message_request();
- return message_request_.list_services_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- } else {
- return NULL;
- }
-}
-void ServerReflectionRequest::set_allocated_list_services(::std::string* list_services) {
- if (!has_list_services()) {
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_message_request();
- if (list_services != NULL) {
- set_has_list_services();
- message_request_.list_services_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- list_services);
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
-}
-
-bool ServerReflectionRequest::has_message_request() const {
- return message_request_case() != MESSAGE_REQUEST_NOT_SET;
-}
-void ServerReflectionRequest::clear_has_message_request() {
- _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET;
-}
-ServerReflectionRequest::MessageRequestCase ServerReflectionRequest::message_request_case() const {
- return ServerReflectionRequest::MessageRequestCase(_oneof_case_[0]);
-}
-inline const ServerReflectionRequest* ServerReflectionRequest::internal_default_instance() {
- return &ServerReflectionRequest_default_instance_.get();
-}
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
-
-// ===================================================================
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int ExtensionRequest::kContainingTypeFieldNumber;
-const int ExtensionRequest::kExtensionNumberFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-ExtensionRequest::ExtensionRequest()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (this != internal_default_instance()) protobuf_InitDefaults_reflection_2eproto();
- SharedCtor();
- // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionRequest)
-}
-
-void ExtensionRequest::InitAsDefaultInstance() {
-}
-
-ExtensionRequest::ExtensionRequest(const ExtensionRequest& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- SharedCtor();
- UnsafeMergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionRequest)
-}
-
-void ExtensionRequest::SharedCtor() {
- containing_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- extension_number_ = 0;
- _cached_size_ = 0;
-}
-
-ExtensionRequest::~ExtensionRequest() {
- // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ExtensionRequest)
- SharedDtor();
-}
-
-void ExtensionRequest::SharedDtor() {
- containing_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-void ExtensionRequest::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* ExtensionRequest::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return ExtensionRequest_descriptor_;
-}
-
-const ExtensionRequest& ExtensionRequest::default_instance() {
- protobuf_InitDefaults_reflection_2eproto();
- return *internal_default_instance();
-}
-
-::google::protobuf::internal::ExplicitlyConstructed<ExtensionRequest> ExtensionRequest_default_instance_;
-
-ExtensionRequest* ExtensionRequest::New(::google::protobuf::Arena* arena) const {
- ExtensionRequest* n = new ExtensionRequest;
- if (arena != NULL) {
- arena->Own(n);
- }
- return n;
-}
-
-void ExtensionRequest::Clear() {
-// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ExtensionRequest)
- containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- extension_number_ = 0;
-}
-
-bool ExtensionRequest::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionRequest)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional string containing_type = 1;
- case 1: {
- if (tag == 10) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_containing_type()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->containing_type().data(), this->containing_type().length(),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "grpc.reflection.v1alpha.ExtensionRequest.containing_type"));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(16)) goto parse_extension_number;
- break;
- }
-
- // optional int32 extension_number = 2;
- case 2: {
- if (tag == 16) {
- parse_extension_number:
-
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &extension_number_)));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ExtensionRequest)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ExtensionRequest)
- return false;
-#undef DO_
-}
-
-void ExtensionRequest::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ExtensionRequest)
- // optional string containing_type = 1;
- if (this->containing_type().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->containing_type().data(), this->containing_type().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ExtensionRequest.containing_type");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->containing_type(), output);
- }
-
- // optional int32 extension_number = 2;
- if (this->extension_number() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->extension_number(), output);
- }
-
- // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionRequest)
-}
-
-::google::protobuf::uint8* ExtensionRequest::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ExtensionRequest)
- // optional string containing_type = 1;
- if (this->containing_type().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->containing_type().data(), this->containing_type().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ExtensionRequest.containing_type");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->containing_type(), target);
- }
-
- // optional int32 extension_number = 2;
- if (this->extension_number() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->extension_number(), target);
- }
-
- // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionRequest)
- return target;
-}
-
-size_t ExtensionRequest::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ExtensionRequest)
- size_t total_size = 0;
-
- // optional string containing_type = 1;
- if (this->containing_type().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->containing_type());
- }
-
- // optional int32 extension_number = 2;
- if (this->extension_number() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->extension_number());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void ExtensionRequest::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ExtensionRequest)
- if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
- const ExtensionRequest* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const ExtensionRequest>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ExtensionRequest)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ExtensionRequest)
- UnsafeMergeFrom(*source);
- }
-}
-
-void ExtensionRequest::MergeFrom(const ExtensionRequest& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ExtensionRequest)
- if (GOOGLE_PREDICT_TRUE(&from != this)) {
- UnsafeMergeFrom(from);
- } else {
- MergeFromFail(__LINE__);
- }
-}
-
-void ExtensionRequest::UnsafeMergeFrom(const ExtensionRequest& from) {
- GOOGLE_DCHECK(&from != this);
- if (from.containing_type().size() > 0) {
-
- containing_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.containing_type_);
- }
- if (from.extension_number() != 0) {
- set_extension_number(from.extension_number());
- }
-}
-
-void ExtensionRequest::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ExtensionRequest)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void ExtensionRequest::CopyFrom(const ExtensionRequest& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ExtensionRequest)
- if (&from == this) return;
- Clear();
- UnsafeMergeFrom(from);
-}
-
-bool ExtensionRequest::IsInitialized() const {
-
- return true;
-}
-
-void ExtensionRequest::Swap(ExtensionRequest* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void ExtensionRequest::InternalSwap(ExtensionRequest* other) {
- containing_type_.Swap(&other->containing_type_);
- std::swap(extension_number_, other->extension_number_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- std::swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata ExtensionRequest::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = ExtensionRequest_descriptor_;
- metadata.reflection = ExtensionRequest_reflection_;
- return metadata;
-}
-
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-// ExtensionRequest
-
-// optional string containing_type = 1;
-void ExtensionRequest::clear_containing_type() {
- containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-const ::std::string& ExtensionRequest::containing_type() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
- return containing_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void ExtensionRequest::set_containing_type(const ::std::string& value) {
-
- containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-}
-void ExtensionRequest::set_containing_type(const char* value) {
-
- containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-}
-void ExtensionRequest::set_containing_type(const char* value, size_t size) {
-
- containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-}
-::std::string* ExtensionRequest::mutable_containing_type() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
- return containing_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-::std::string* ExtensionRequest::release_containing_type() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-
- return containing_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void ExtensionRequest::set_allocated_containing_type(::std::string* containing_type) {
- if (containing_type != NULL) {
-
- } else {
-
- }
- containing_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), containing_type);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-}
-
-// optional int32 extension_number = 2;
-void ExtensionRequest::clear_extension_number() {
- extension_number_ = 0;
-}
-::google::protobuf::int32 ExtensionRequest::extension_number() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.extension_number)
- return extension_number_;
-}
-void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) {
-
- extension_number_ = value;
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number)
-}
-
-inline const ExtensionRequest* ExtensionRequest::internal_default_instance() {
- return &ExtensionRequest_default_instance_.get();
-}
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
-
-// ===================================================================
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int ServerReflectionResponse::kValidHostFieldNumber;
-const int ServerReflectionResponse::kOriginalRequestFieldNumber;
-const int ServerReflectionResponse::kFileDescriptorResponseFieldNumber;
-const int ServerReflectionResponse::kAllExtensionNumbersResponseFieldNumber;
-const int ServerReflectionResponse::kListServicesResponseFieldNumber;
-const int ServerReflectionResponse::kErrorResponseFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-ServerReflectionResponse::ServerReflectionResponse()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (this != internal_default_instance()) protobuf_InitDefaults_reflection_2eproto();
- SharedCtor();
- // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ServerReflectionResponse)
-}
-
-void ServerReflectionResponse::InitAsDefaultInstance() {
- original_request_ = const_cast< ::grpc::reflection::v1alpha::ServerReflectionRequest*>(
- ::grpc::reflection::v1alpha::ServerReflectionRequest::internal_default_instance());
- ServerReflectionResponse_default_oneof_instance_->file_descriptor_response_ = const_cast< ::grpc::reflection::v1alpha::FileDescriptorResponse*>(
- ::grpc::reflection::v1alpha::FileDescriptorResponse::internal_default_instance());
- ServerReflectionResponse_default_oneof_instance_->all_extension_numbers_response_ = const_cast< ::grpc::reflection::v1alpha::ExtensionNumberResponse*>(
- ::grpc::reflection::v1alpha::ExtensionNumberResponse::internal_default_instance());
- ServerReflectionResponse_default_oneof_instance_->list_services_response_ = const_cast< ::grpc::reflection::v1alpha::ListServiceResponse*>(
- ::grpc::reflection::v1alpha::ListServiceResponse::internal_default_instance());
- ServerReflectionResponse_default_oneof_instance_->error_response_ = const_cast< ::grpc::reflection::v1alpha::ErrorResponse*>(
- ::grpc::reflection::v1alpha::ErrorResponse::internal_default_instance());
-}
-
-ServerReflectionResponse::ServerReflectionResponse(const ServerReflectionResponse& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- SharedCtor();
- UnsafeMergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ServerReflectionResponse)
-}
-
-void ServerReflectionResponse::SharedCtor() {
- valid_host_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- original_request_ = NULL;
- clear_has_message_response();
- _cached_size_ = 0;
-}
-
-ServerReflectionResponse::~ServerReflectionResponse() {
- // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ServerReflectionResponse)
- SharedDtor();
-}
-
-void ServerReflectionResponse::SharedDtor() {
- valid_host_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (has_message_response()) {
- clear_message_response();
- }
- if (this != &ServerReflectionResponse_default_instance_.get()) {
- delete original_request_;
- }
-}
-
-void ServerReflectionResponse::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* ServerReflectionResponse::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return ServerReflectionResponse_descriptor_;
-}
-
-const ServerReflectionResponse& ServerReflectionResponse::default_instance() {
- protobuf_InitDefaults_reflection_2eproto();
- return *internal_default_instance();
-}
-
-::google::protobuf::internal::ExplicitlyConstructed<ServerReflectionResponse> ServerReflectionResponse_default_instance_;
-
-ServerReflectionResponse* ServerReflectionResponse::New(::google::protobuf::Arena* arena) const {
- ServerReflectionResponse* n = new ServerReflectionResponse;
- if (arena != NULL) {
- arena->Own(n);
- }
- return n;
-}
-
-void ServerReflectionResponse::clear_message_response() {
-// @@protoc_insertion_point(one_of_clear_start:grpc.reflection.v1alpha.ServerReflectionResponse)
- switch (message_response_case()) {
- case kFileDescriptorResponse: {
- delete message_response_.file_descriptor_response_;
- break;
- }
- case kAllExtensionNumbersResponse: {
- delete message_response_.all_extension_numbers_response_;
- break;
- }
- case kListServicesResponse: {
- delete message_response_.list_services_response_;
- break;
- }
- case kErrorResponse: {
- delete message_response_.error_response_;
- break;
- }
- case MESSAGE_RESPONSE_NOT_SET: {
- break;
- }
- }
- _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET;
-}
-
-
-void ServerReflectionResponse::Clear() {
-// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ServerReflectionResponse)
- valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_;
- original_request_ = NULL;
- clear_message_response();
-}
-
-bool ServerReflectionResponse::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ServerReflectionResponse)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional string valid_host = 1;
- case 1: {
- if (tag == 10) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_valid_host()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->valid_host().data(), this->valid_host().length(),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "grpc.reflection.v1alpha.ServerReflectionResponse.valid_host"));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(18)) goto parse_original_request;
- break;
- }
-
- // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;
- case 2: {
- if (tag == 18) {
- parse_original_request:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_original_request()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(34)) goto parse_file_descriptor_response;
- break;
- }
-
- // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4;
- case 4: {
- if (tag == 34) {
- parse_file_descriptor_response:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_file_descriptor_response()));
- } else {
- goto handle_unusual;
- }
- goto after_error_response;
- break;
- }
-
- // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5;
- case 5: {
- if (tag == 42) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_all_extension_numbers_response()));
- } else {
- goto handle_unusual;
- }
- goto after_error_response;
- break;
- }
-
- // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6;
- case 6: {
- if (tag == 50) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_list_services_response()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(58)) goto parse_error_response;
- break;
- }
-
- // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7;
- case 7: {
- if (tag == 58) {
- parse_error_response:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_error_response()));
- } else {
- goto handle_unusual;
- }
- after_error_response:
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ServerReflectionResponse)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ServerReflectionResponse)
- return false;
-#undef DO_
-}
-
-void ServerReflectionResponse::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ServerReflectionResponse)
- // optional string valid_host = 1;
- if (this->valid_host().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->valid_host().data(), this->valid_host().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServerReflectionResponse.valid_host");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->valid_host(), output);
- }
-
- // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;
- if (this->has_original_request()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, *this->original_request_, output);
- }
-
- // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4;
- if (has_file_descriptor_response()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4, *message_response_.file_descriptor_response_, output);
- }
-
- // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5;
- if (has_all_extension_numbers_response()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, *message_response_.all_extension_numbers_response_, output);
- }
-
- // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6;
- if (has_list_services_response()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 6, *message_response_.list_services_response_, output);
- }
-
- // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7;
- if (has_error_response()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 7, *message_response_.error_response_, output);
- }
-
- // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ServerReflectionResponse)
-}
-
-::google::protobuf::uint8* ServerReflectionResponse::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ServerReflectionResponse)
- // optional string valid_host = 1;
- if (this->valid_host().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->valid_host().data(), this->valid_host().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServerReflectionResponse.valid_host");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->valid_host(), target);
- }
-
- // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;
- if (this->has_original_request()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 2, *this->original_request_, false, target);
- }
-
- // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4;
- if (has_file_descriptor_response()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 4, *message_response_.file_descriptor_response_, false, target);
- }
-
- // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5;
- if (has_all_extension_numbers_response()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 5, *message_response_.all_extension_numbers_response_, false, target);
- }
-
- // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6;
- if (has_list_services_response()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 6, *message_response_.list_services_response_, false, target);
- }
-
- // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7;
- if (has_error_response()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 7, *message_response_.error_response_, false, target);
- }
-
- // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ServerReflectionResponse)
- return target;
-}
-
-size_t ServerReflectionResponse::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ServerReflectionResponse)
- size_t total_size = 0;
-
- // optional string valid_host = 1;
- if (this->valid_host().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->valid_host());
- }
-
- // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;
- if (this->has_original_request()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- *this->original_request_);
- }
-
- switch (message_response_case()) {
- // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4;
- case kFileDescriptorResponse: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- *message_response_.file_descriptor_response_);
- break;
- }
- // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5;
- case kAllExtensionNumbersResponse: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- *message_response_.all_extension_numbers_response_);
- break;
- }
- // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6;
- case kListServicesResponse: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- *message_response_.list_services_response_);
- break;
- }
- // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7;
- case kErrorResponse: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- *message_response_.error_response_);
- break;
- }
- case MESSAGE_RESPONSE_NOT_SET: {
- break;
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void ServerReflectionResponse::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ServerReflectionResponse)
- if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
- const ServerReflectionResponse* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const ServerReflectionResponse>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ServerReflectionResponse)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ServerReflectionResponse)
- UnsafeMergeFrom(*source);
- }
-}
-
-void ServerReflectionResponse::MergeFrom(const ServerReflectionResponse& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ServerReflectionResponse)
- if (GOOGLE_PREDICT_TRUE(&from != this)) {
- UnsafeMergeFrom(from);
- } else {
- MergeFromFail(__LINE__);
- }
-}
-
-void ServerReflectionResponse::UnsafeMergeFrom(const ServerReflectionResponse& from) {
- GOOGLE_DCHECK(&from != this);
- switch (from.message_response_case()) {
- case kFileDescriptorResponse: {
- mutable_file_descriptor_response()->::grpc::reflection::v1alpha::FileDescriptorResponse::MergeFrom(from.file_descriptor_response());
- break;
- }
- case kAllExtensionNumbersResponse: {
- mutable_all_extension_numbers_response()->::grpc::reflection::v1alpha::ExtensionNumberResponse::MergeFrom(from.all_extension_numbers_response());
- break;
- }
- case kListServicesResponse: {
- mutable_list_services_response()->::grpc::reflection::v1alpha::ListServiceResponse::MergeFrom(from.list_services_response());
- break;
- }
- case kErrorResponse: {
- mutable_error_response()->::grpc::reflection::v1alpha::ErrorResponse::MergeFrom(from.error_response());
- break;
- }
- case MESSAGE_RESPONSE_NOT_SET: {
- break;
- }
- }
- if (from.valid_host().size() > 0) {
-
- valid_host_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.valid_host_);
- }
- if (from.has_original_request()) {
- mutable_original_request()->::grpc::reflection::v1alpha::ServerReflectionRequest::MergeFrom(from.original_request());
- }
-}
-
-void ServerReflectionResponse::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ServerReflectionResponse)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void ServerReflectionResponse::CopyFrom(const ServerReflectionResponse& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ServerReflectionResponse)
- if (&from == this) return;
- Clear();
- UnsafeMergeFrom(from);
-}
-
-bool ServerReflectionResponse::IsInitialized() const {
-
- return true;
-}
-
-void ServerReflectionResponse::Swap(ServerReflectionResponse* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void ServerReflectionResponse::InternalSwap(ServerReflectionResponse* other) {
- valid_host_.Swap(&other->valid_host_);
- std::swap(original_request_, other->original_request_);
- std::swap(message_response_, other->message_response_);
- std::swap(_oneof_case_[0], other->_oneof_case_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- std::swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata ServerReflectionResponse::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = ServerReflectionResponse_descriptor_;
- metadata.reflection = ServerReflectionResponse_reflection_;
- return metadata;
-}
-
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-// ServerReflectionResponse
-
-// optional string valid_host = 1;
-void ServerReflectionResponse::clear_valid_host() {
- valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-const ::std::string& ServerReflectionResponse::valid_host() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
- return valid_host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void ServerReflectionResponse::set_valid_host(const ::std::string& value) {
-
- valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-}
-void ServerReflectionResponse::set_valid_host(const char* value) {
-
- valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-}
-void ServerReflectionResponse::set_valid_host(const char* value, size_t size) {
-
- valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-}
-::std::string* ServerReflectionResponse::mutable_valid_host() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
- return valid_host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-::std::string* ServerReflectionResponse::release_valid_host() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-
- return valid_host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void ServerReflectionResponse::set_allocated_valid_host(::std::string* valid_host) {
- if (valid_host != NULL) {
-
- } else {
-
- }
- valid_host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), valid_host);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-}
-
-// optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;
-bool ServerReflectionResponse::has_original_request() const {
- return this != internal_default_instance() && original_request_ != NULL;
-}
-void ServerReflectionResponse::clear_original_request() {
- if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_;
- original_request_ = NULL;
-}
-const ::grpc::reflection::v1alpha::ServerReflectionRequest& ServerReflectionResponse::original_request() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
- return original_request_ != NULL ? *original_request_
- : *::grpc::reflection::v1alpha::ServerReflectionRequest::internal_default_instance();
-}
-::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::mutable_original_request() {
-
- if (original_request_ == NULL) {
- original_request_ = new ::grpc::reflection::v1alpha::ServerReflectionRequest;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
- return original_request_;
-}
-::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::release_original_request() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
-
- ::grpc::reflection::v1alpha::ServerReflectionRequest* temp = original_request_;
- original_request_ = NULL;
- return temp;
-}
-void ServerReflectionResponse::set_allocated_original_request(::grpc::reflection::v1alpha::ServerReflectionRequest* original_request) {
- delete original_request_;
- original_request_ = original_request;
- if (original_request) {
-
- } else {
-
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
-}
-
-// optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4;
-bool ServerReflectionResponse::has_file_descriptor_response() const {
- return message_response_case() == kFileDescriptorResponse;
-}
-void ServerReflectionResponse::set_has_file_descriptor_response() {
- _oneof_case_[0] = kFileDescriptorResponse;
-}
-void ServerReflectionResponse::clear_file_descriptor_response() {
- if (has_file_descriptor_response()) {
- delete message_response_.file_descriptor_response_;
- clear_has_message_response();
- }
-}
- const ::grpc::reflection::v1alpha::FileDescriptorResponse& ServerReflectionResponse::file_descriptor_response() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response)
- return has_file_descriptor_response()
- ? *message_response_.file_descriptor_response_
- : ::grpc::reflection::v1alpha::FileDescriptorResponse::default_instance();
-}
-::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::mutable_file_descriptor_response() {
- if (!has_file_descriptor_response()) {
- clear_message_response();
- set_has_file_descriptor_response();
- message_response_.file_descriptor_response_ = new ::grpc::reflection::v1alpha::FileDescriptorResponse;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response)
- return message_response_.file_descriptor_response_;
-}
-::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::release_file_descriptor_response() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response)
- if (has_file_descriptor_response()) {
- clear_has_message_response();
- ::grpc::reflection::v1alpha::FileDescriptorResponse* temp = message_response_.file_descriptor_response_;
- message_response_.file_descriptor_response_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-void ServerReflectionResponse::set_allocated_file_descriptor_response(::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response) {
- clear_message_response();
- if (file_descriptor_response) {
- set_has_file_descriptor_response();
- message_response_.file_descriptor_response_ = file_descriptor_response;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response)
-}
-
-// optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5;
-bool ServerReflectionResponse::has_all_extension_numbers_response() const {
- return message_response_case() == kAllExtensionNumbersResponse;
-}
-void ServerReflectionResponse::set_has_all_extension_numbers_response() {
- _oneof_case_[0] = kAllExtensionNumbersResponse;
-}
-void ServerReflectionResponse::clear_all_extension_numbers_response() {
- if (has_all_extension_numbers_response()) {
- delete message_response_.all_extension_numbers_response_;
- clear_has_message_response();
- }
-}
- const ::grpc::reflection::v1alpha::ExtensionNumberResponse& ServerReflectionResponse::all_extension_numbers_response() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response)
- return has_all_extension_numbers_response()
- ? *message_response_.all_extension_numbers_response_
- : ::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance();
-}
-::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::mutable_all_extension_numbers_response() {
- if (!has_all_extension_numbers_response()) {
- clear_message_response();
- set_has_all_extension_numbers_response();
- message_response_.all_extension_numbers_response_ = new ::grpc::reflection::v1alpha::ExtensionNumberResponse;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response)
- return message_response_.all_extension_numbers_response_;
-}
-::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::release_all_extension_numbers_response() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response)
- if (has_all_extension_numbers_response()) {
- clear_has_message_response();
- ::grpc::reflection::v1alpha::ExtensionNumberResponse* temp = message_response_.all_extension_numbers_response_;
- message_response_.all_extension_numbers_response_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-void ServerReflectionResponse::set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response) {
- clear_message_response();
- if (all_extension_numbers_response) {
- set_has_all_extension_numbers_response();
- message_response_.all_extension_numbers_response_ = all_extension_numbers_response;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response)
-}
-
-// optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6;
-bool ServerReflectionResponse::has_list_services_response() const {
- return message_response_case() == kListServicesResponse;
-}
-void ServerReflectionResponse::set_has_list_services_response() {
- _oneof_case_[0] = kListServicesResponse;
-}
-void ServerReflectionResponse::clear_list_services_response() {
- if (has_list_services_response()) {
- delete message_response_.list_services_response_;
- clear_has_message_response();
- }
-}
- const ::grpc::reflection::v1alpha::ListServiceResponse& ServerReflectionResponse::list_services_response() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response)
- return has_list_services_response()
- ? *message_response_.list_services_response_
- : ::grpc::reflection::v1alpha::ListServiceResponse::default_instance();
-}
-::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::mutable_list_services_response() {
- if (!has_list_services_response()) {
- clear_message_response();
- set_has_list_services_response();
- message_response_.list_services_response_ = new ::grpc::reflection::v1alpha::ListServiceResponse;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response)
- return message_response_.list_services_response_;
-}
-::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::release_list_services_response() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response)
- if (has_list_services_response()) {
- clear_has_message_response();
- ::grpc::reflection::v1alpha::ListServiceResponse* temp = message_response_.list_services_response_;
- message_response_.list_services_response_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-void ServerReflectionResponse::set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response) {
- clear_message_response();
- if (list_services_response) {
- set_has_list_services_response();
- message_response_.list_services_response_ = list_services_response;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response)
-}
-
-// optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7;
-bool ServerReflectionResponse::has_error_response() const {
- return message_response_case() == kErrorResponse;
-}
-void ServerReflectionResponse::set_has_error_response() {
- _oneof_case_[0] = kErrorResponse;
-}
-void ServerReflectionResponse::clear_error_response() {
- if (has_error_response()) {
- delete message_response_.error_response_;
- clear_has_message_response();
- }
-}
- const ::grpc::reflection::v1alpha::ErrorResponse& ServerReflectionResponse::error_response() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.error_response)
- return has_error_response()
- ? *message_response_.error_response_
- : ::grpc::reflection::v1alpha::ErrorResponse::default_instance();
-}
-::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::mutable_error_response() {
- if (!has_error_response()) {
- clear_message_response();
- set_has_error_response();
- message_response_.error_response_ = new ::grpc::reflection::v1alpha::ErrorResponse;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.error_response)
- return message_response_.error_response_;
-}
-::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::release_error_response() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.error_response)
- if (has_error_response()) {
- clear_has_message_response();
- ::grpc::reflection::v1alpha::ErrorResponse* temp = message_response_.error_response_;
- message_response_.error_response_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-void ServerReflectionResponse::set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response) {
- clear_message_response();
- if (error_response) {
- set_has_error_response();
- message_response_.error_response_ = error_response;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.error_response)
-}
-
-bool ServerReflectionResponse::has_message_response() const {
- return message_response_case() != MESSAGE_RESPONSE_NOT_SET;
-}
-void ServerReflectionResponse::clear_has_message_response() {
- _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET;
-}
-ServerReflectionResponse::MessageResponseCase ServerReflectionResponse::message_response_case() const {
- return ServerReflectionResponse::MessageResponseCase(_oneof_case_[0]);
-}
-inline const ServerReflectionResponse* ServerReflectionResponse::internal_default_instance() {
- return &ServerReflectionResponse_default_instance_.get();
-}
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
-
-// ===================================================================
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int FileDescriptorResponse::kFileDescriptorProtoFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-FileDescriptorResponse::FileDescriptorResponse()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (this != internal_default_instance()) protobuf_InitDefaults_reflection_2eproto();
- SharedCtor();
- // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.FileDescriptorResponse)
-}
-
-void FileDescriptorResponse::InitAsDefaultInstance() {
-}
-
-FileDescriptorResponse::FileDescriptorResponse(const FileDescriptorResponse& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- SharedCtor();
- UnsafeMergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.FileDescriptorResponse)
-}
-
-void FileDescriptorResponse::SharedCtor() {
- _cached_size_ = 0;
-}
-
-FileDescriptorResponse::~FileDescriptorResponse() {
- // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.FileDescriptorResponse)
- SharedDtor();
-}
-
-void FileDescriptorResponse::SharedDtor() {
-}
-
-void FileDescriptorResponse::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* FileDescriptorResponse::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return FileDescriptorResponse_descriptor_;
-}
-
-const FileDescriptorResponse& FileDescriptorResponse::default_instance() {
- protobuf_InitDefaults_reflection_2eproto();
- return *internal_default_instance();
-}
-
-::google::protobuf::internal::ExplicitlyConstructed<FileDescriptorResponse> FileDescriptorResponse_default_instance_;
-
-FileDescriptorResponse* FileDescriptorResponse::New(::google::protobuf::Arena* arena) const {
- FileDescriptorResponse* n = new FileDescriptorResponse;
- if (arena != NULL) {
- arena->Own(n);
- }
- return n;
-}
-
-void FileDescriptorResponse::Clear() {
-// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.FileDescriptorResponse)
- file_descriptor_proto_.Clear();
-}
-
-bool FileDescriptorResponse::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.FileDescriptorResponse)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // repeated bytes file_descriptor_proto = 1;
- case 1: {
- if (tag == 10) {
- parse_file_descriptor_proto:
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->add_file_descriptor_proto()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(10)) goto parse_file_descriptor_proto;
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.FileDescriptorResponse)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.FileDescriptorResponse)
- return false;
-#undef DO_
-}
-
-void FileDescriptorResponse::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.FileDescriptorResponse)
- // repeated bytes file_descriptor_proto = 1;
- for (int i = 0; i < this->file_descriptor_proto_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteBytes(
- 1, this->file_descriptor_proto(i), output);
- }
-
- // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.FileDescriptorResponse)
-}
-
-::google::protobuf::uint8* FileDescriptorResponse::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.FileDescriptorResponse)
- // repeated bytes file_descriptor_proto = 1;
- for (int i = 0; i < this->file_descriptor_proto_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteBytesToArray(1, this->file_descriptor_proto(i), target);
- }
-
- // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.FileDescriptorResponse)
- return target;
-}
-
-size_t FileDescriptorResponse::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.FileDescriptorResponse)
- size_t total_size = 0;
-
- // repeated bytes file_descriptor_proto = 1;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->file_descriptor_proto_size());
- for (int i = 0; i < this->file_descriptor_proto_size(); i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->file_descriptor_proto(i));
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void FileDescriptorResponse::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.FileDescriptorResponse)
- if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
- const FileDescriptorResponse* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const FileDescriptorResponse>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.FileDescriptorResponse)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.FileDescriptorResponse)
- UnsafeMergeFrom(*source);
- }
-}
-
-void FileDescriptorResponse::MergeFrom(const FileDescriptorResponse& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.FileDescriptorResponse)
- if (GOOGLE_PREDICT_TRUE(&from != this)) {
- UnsafeMergeFrom(from);
- } else {
- MergeFromFail(__LINE__);
- }
-}
-
-void FileDescriptorResponse::UnsafeMergeFrom(const FileDescriptorResponse& from) {
- GOOGLE_DCHECK(&from != this);
- file_descriptor_proto_.UnsafeMergeFrom(from.file_descriptor_proto_);
-}
-
-void FileDescriptorResponse::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.FileDescriptorResponse)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void FileDescriptorResponse::CopyFrom(const FileDescriptorResponse& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.FileDescriptorResponse)
- if (&from == this) return;
- Clear();
- UnsafeMergeFrom(from);
-}
-
-bool FileDescriptorResponse::IsInitialized() const {
-
- return true;
-}
-
-void FileDescriptorResponse::Swap(FileDescriptorResponse* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void FileDescriptorResponse::InternalSwap(FileDescriptorResponse* other) {
- file_descriptor_proto_.UnsafeArenaSwap(&other->file_descriptor_proto_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- std::swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata FileDescriptorResponse::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = FileDescriptorResponse_descriptor_;
- metadata.reflection = FileDescriptorResponse_reflection_;
- return metadata;
-}
-
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-// FileDescriptorResponse
-
-// repeated bytes file_descriptor_proto = 1;
-int FileDescriptorResponse::file_descriptor_proto_size() const {
- return file_descriptor_proto_.size();
-}
-void FileDescriptorResponse::clear_file_descriptor_proto() {
- file_descriptor_proto_.Clear();
-}
-const ::std::string& FileDescriptorResponse::file_descriptor_proto(int index) const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return file_descriptor_proto_.Get(index);
-}
-::std::string* FileDescriptorResponse::mutable_file_descriptor_proto(int index) {
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return file_descriptor_proto_.Mutable(index);
-}
-void FileDescriptorResponse::set_file_descriptor_proto(int index, const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- file_descriptor_proto_.Mutable(index)->assign(value);
-}
-void FileDescriptorResponse::set_file_descriptor_proto(int index, const char* value) {
- file_descriptor_proto_.Mutable(index)->assign(value);
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-void FileDescriptorResponse::set_file_descriptor_proto(int index, const void* value, size_t size) {
- file_descriptor_proto_.Mutable(index)->assign(
- reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-::std::string* FileDescriptorResponse::add_file_descriptor_proto() {
- // @@protoc_insertion_point(field_add_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return file_descriptor_proto_.Add();
-}
-void FileDescriptorResponse::add_file_descriptor_proto(const ::std::string& value) {
- file_descriptor_proto_.Add()->assign(value);
- // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-void FileDescriptorResponse::add_file_descriptor_proto(const char* value) {
- file_descriptor_proto_.Add()->assign(value);
- // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-void FileDescriptorResponse::add_file_descriptor_proto(const void* value, size_t size) {
- file_descriptor_proto_.Add()->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-const ::google::protobuf::RepeatedPtrField< ::std::string>&
-FileDescriptorResponse::file_descriptor_proto() const {
- // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return file_descriptor_proto_;
-}
-::google::protobuf::RepeatedPtrField< ::std::string>*
-FileDescriptorResponse::mutable_file_descriptor_proto() {
- // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return &file_descriptor_proto_;
-}
-
-inline const FileDescriptorResponse* FileDescriptorResponse::internal_default_instance() {
- return &FileDescriptorResponse_default_instance_.get();
-}
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
-
-// ===================================================================
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int ExtensionNumberResponse::kBaseTypeNameFieldNumber;
-const int ExtensionNumberResponse::kExtensionNumberFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-ExtensionNumberResponse::ExtensionNumberResponse()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (this != internal_default_instance()) protobuf_InitDefaults_reflection_2eproto();
- SharedCtor();
- // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionNumberResponse)
-}
-
-void ExtensionNumberResponse::InitAsDefaultInstance() {
-}
-
-ExtensionNumberResponse::ExtensionNumberResponse(const ExtensionNumberResponse& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- SharedCtor();
- UnsafeMergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionNumberResponse)
-}
-
-void ExtensionNumberResponse::SharedCtor() {
- base_type_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _cached_size_ = 0;
-}
-
-ExtensionNumberResponse::~ExtensionNumberResponse() {
- // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ExtensionNumberResponse)
- SharedDtor();
-}
-
-void ExtensionNumberResponse::SharedDtor() {
- base_type_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-void ExtensionNumberResponse::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* ExtensionNumberResponse::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return ExtensionNumberResponse_descriptor_;
-}
-
-const ExtensionNumberResponse& ExtensionNumberResponse::default_instance() {
- protobuf_InitDefaults_reflection_2eproto();
- return *internal_default_instance();
-}
-
-::google::protobuf::internal::ExplicitlyConstructed<ExtensionNumberResponse> ExtensionNumberResponse_default_instance_;
-
-ExtensionNumberResponse* ExtensionNumberResponse::New(::google::protobuf::Arena* arena) const {
- ExtensionNumberResponse* n = new ExtensionNumberResponse;
- if (arena != NULL) {
- arena->Own(n);
- }
- return n;
-}
-
-void ExtensionNumberResponse::Clear() {
-// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ExtensionNumberResponse)
- base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- extension_number_.Clear();
-}
-
-bool ExtensionNumberResponse::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionNumberResponse)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional string base_type_name = 1;
- case 1: {
- if (tag == 10) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_base_type_name()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->base_type_name().data(), this->base_type_name().length(),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name"));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(18)) goto parse_extension_number;
- break;
- }
-
- // repeated int32 extension_number = 2;
- case 2: {
- if (tag == 18) {
- parse_extension_number:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, this->mutable_extension_number())));
- } else if (tag == 16) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 1, 18, input, this->mutable_extension_number())));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ExtensionNumberResponse)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ExtensionNumberResponse)
- return false;
-#undef DO_
-}
-
-void ExtensionNumberResponse::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ExtensionNumberResponse)
- // optional string base_type_name = 1;
- if (this->base_type_name().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->base_type_name().data(), this->base_type_name().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->base_type_name(), output);
- }
-
- // repeated int32 extension_number = 2;
- if (this->extension_number_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(_extension_number_cached_byte_size_);
- }
- for (int i = 0; i < this->extension_number_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
- this->extension_number(i), output);
- }
-
- // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionNumberResponse)
-}
-
-::google::protobuf::uint8* ExtensionNumberResponse::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ExtensionNumberResponse)
- // optional string base_type_name = 1;
- if (this->base_type_name().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->base_type_name().data(), this->base_type_name().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->base_type_name(), target);
- }
-
- // repeated int32 extension_number = 2;
- if (this->extension_number_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 2,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- _extension_number_cached_byte_size_, target);
- }
- for (int i = 0; i < this->extension_number_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32NoTagToArray(this->extension_number(i), target);
- }
-
- // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionNumberResponse)
- return target;
-}
-
-size_t ExtensionNumberResponse::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ExtensionNumberResponse)
- size_t total_size = 0;
-
- // optional string base_type_name = 1;
- if (this->base_type_name().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->base_type_name());
- }
-
- // repeated int32 extension_number = 2;
- {
- size_t data_size = 0;
- unsigned int count = this->extension_number_size();
- for (unsigned int i = 0; i < count; i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::
- Int32Size(this->extension_number(i));
- }
- if (data_size > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _extension_number_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void ExtensionNumberResponse::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ExtensionNumberResponse)
- if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
- const ExtensionNumberResponse* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const ExtensionNumberResponse>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ExtensionNumberResponse)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ExtensionNumberResponse)
- UnsafeMergeFrom(*source);
- }
-}
-
-void ExtensionNumberResponse::MergeFrom(const ExtensionNumberResponse& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ExtensionNumberResponse)
- if (GOOGLE_PREDICT_TRUE(&from != this)) {
- UnsafeMergeFrom(from);
- } else {
- MergeFromFail(__LINE__);
- }
-}
-
-void ExtensionNumberResponse::UnsafeMergeFrom(const ExtensionNumberResponse& from) {
- GOOGLE_DCHECK(&from != this);
- extension_number_.UnsafeMergeFrom(from.extension_number_);
- if (from.base_type_name().size() > 0) {
-
- base_type_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.base_type_name_);
- }
-}
-
-void ExtensionNumberResponse::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ExtensionNumberResponse)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void ExtensionNumberResponse::CopyFrom(const ExtensionNumberResponse& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ExtensionNumberResponse)
- if (&from == this) return;
- Clear();
- UnsafeMergeFrom(from);
-}
-
-bool ExtensionNumberResponse::IsInitialized() const {
-
- return true;
-}
-
-void ExtensionNumberResponse::Swap(ExtensionNumberResponse* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void ExtensionNumberResponse::InternalSwap(ExtensionNumberResponse* other) {
- base_type_name_.Swap(&other->base_type_name_);
- extension_number_.UnsafeArenaSwap(&other->extension_number_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- std::swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata ExtensionNumberResponse::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = ExtensionNumberResponse_descriptor_;
- metadata.reflection = ExtensionNumberResponse_reflection_;
- return metadata;
-}
-
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-// ExtensionNumberResponse
-
-// optional string base_type_name = 1;
-void ExtensionNumberResponse::clear_base_type_name() {
- base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-const ::std::string& ExtensionNumberResponse::base_type_name() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
- return base_type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void ExtensionNumberResponse::set_base_type_name(const ::std::string& value) {
-
- base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-}
-void ExtensionNumberResponse::set_base_type_name(const char* value) {
-
- base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-}
-void ExtensionNumberResponse::set_base_type_name(const char* value, size_t size) {
-
- base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-}
-::std::string* ExtensionNumberResponse::mutable_base_type_name() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
- return base_type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-::std::string* ExtensionNumberResponse::release_base_type_name() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-
- return base_type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void ExtensionNumberResponse::set_allocated_base_type_name(::std::string* base_type_name) {
- if (base_type_name != NULL) {
-
- } else {
-
- }
- base_type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), base_type_name);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-}
-
-// repeated int32 extension_number = 2;
-int ExtensionNumberResponse::extension_number_size() const {
- return extension_number_.size();
-}
-void ExtensionNumberResponse::clear_extension_number() {
- extension_number_.Clear();
-}
-::google::protobuf::int32 ExtensionNumberResponse::extension_number(int index) const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
- return extension_number_.Get(index);
-}
-void ExtensionNumberResponse::set_extension_number(int index, ::google::protobuf::int32 value) {
- extension_number_.Set(index, value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
-}
-void ExtensionNumberResponse::add_extension_number(::google::protobuf::int32 value) {
- extension_number_.Add(value);
- // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
-}
-const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
-ExtensionNumberResponse::extension_number() const {
- // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
- return extension_number_;
-}
-::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
-ExtensionNumberResponse::mutable_extension_number() {
- // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
- return &extension_number_;
-}
-
-inline const ExtensionNumberResponse* ExtensionNumberResponse::internal_default_instance() {
- return &ExtensionNumberResponse_default_instance_.get();
-}
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
-
-// ===================================================================
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int ListServiceResponse::kServiceFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-ListServiceResponse::ListServiceResponse()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (this != internal_default_instance()) protobuf_InitDefaults_reflection_2eproto();
- SharedCtor();
- // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ListServiceResponse)
-}
-
-void ListServiceResponse::InitAsDefaultInstance() {
-}
-
-ListServiceResponse::ListServiceResponse(const ListServiceResponse& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- SharedCtor();
- UnsafeMergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ListServiceResponse)
-}
-
-void ListServiceResponse::SharedCtor() {
- _cached_size_ = 0;
-}
-
-ListServiceResponse::~ListServiceResponse() {
- // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ListServiceResponse)
- SharedDtor();
-}
-
-void ListServiceResponse::SharedDtor() {
-}
-
-void ListServiceResponse::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* ListServiceResponse::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return ListServiceResponse_descriptor_;
-}
-
-const ListServiceResponse& ListServiceResponse::default_instance() {
- protobuf_InitDefaults_reflection_2eproto();
- return *internal_default_instance();
-}
-
-::google::protobuf::internal::ExplicitlyConstructed<ListServiceResponse> ListServiceResponse_default_instance_;
-
-ListServiceResponse* ListServiceResponse::New(::google::protobuf::Arena* arena) const {
- ListServiceResponse* n = new ListServiceResponse;
- if (arena != NULL) {
- arena->Own(n);
- }
- return n;
-}
-
-void ListServiceResponse::Clear() {
-// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ListServiceResponse)
- service_.Clear();
-}
-
-bool ListServiceResponse::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ListServiceResponse)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;
- case 1: {
- if (tag == 10) {
- DO_(input->IncrementRecursionDepth());
- parse_loop_service:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
- input, add_service()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(10)) goto parse_loop_service;
- input->UnsafeDecrementRecursionDepth();
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ListServiceResponse)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ListServiceResponse)
- return false;
-#undef DO_
-}
-
-void ListServiceResponse::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ListServiceResponse)
- // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;
- for (unsigned int i = 0, n = this->service_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->service(i), output);
- }
-
- // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ListServiceResponse)
-}
-
-::google::protobuf::uint8* ListServiceResponse::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ListServiceResponse)
- // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;
- for (unsigned int i = 0, n = this->service_size(); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 1, this->service(i), false, target);
- }
-
- // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ListServiceResponse)
- return target;
-}
-
-size_t ListServiceResponse::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ListServiceResponse)
- size_t total_size = 0;
-
- // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;
- {
- unsigned int count = this->service_size();
- total_size += 1UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->service(i));
- }
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void ListServiceResponse::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ListServiceResponse)
- if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
- const ListServiceResponse* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const ListServiceResponse>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ListServiceResponse)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ListServiceResponse)
- UnsafeMergeFrom(*source);
- }
-}
-
-void ListServiceResponse::MergeFrom(const ListServiceResponse& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ListServiceResponse)
- if (GOOGLE_PREDICT_TRUE(&from != this)) {
- UnsafeMergeFrom(from);
- } else {
- MergeFromFail(__LINE__);
- }
-}
-
-void ListServiceResponse::UnsafeMergeFrom(const ListServiceResponse& from) {
- GOOGLE_DCHECK(&from != this);
- service_.MergeFrom(from.service_);
-}
-
-void ListServiceResponse::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ListServiceResponse)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void ListServiceResponse::CopyFrom(const ListServiceResponse& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ListServiceResponse)
- if (&from == this) return;
- Clear();
- UnsafeMergeFrom(from);
-}
-
-bool ListServiceResponse::IsInitialized() const {
-
- return true;
-}
-
-void ListServiceResponse::Swap(ListServiceResponse* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void ListServiceResponse::InternalSwap(ListServiceResponse* other) {
- service_.UnsafeArenaSwap(&other->service_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- std::swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata ListServiceResponse::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = ListServiceResponse_descriptor_;
- metadata.reflection = ListServiceResponse_reflection_;
- return metadata;
-}
-
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-// ListServiceResponse
-
-// repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;
-int ListServiceResponse::service_size() const {
- return service_.size();
-}
-void ListServiceResponse::clear_service() {
- service_.Clear();
-}
-const ::grpc::reflection::v1alpha::ServiceResponse& ListServiceResponse::service(int index) const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.service)
- return service_.Get(index);
-}
-::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::mutable_service(int index) {
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.service)
- return service_.Mutable(index);
-}
-::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::add_service() {
- // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.service)
- return service_.Add();
-}
-::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >*
-ListServiceResponse::mutable_service() {
- // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.service)
- return &service_;
-}
-const ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >&
-ListServiceResponse::service() const {
- // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.service)
- return service_;
-}
-
-inline const ListServiceResponse* ListServiceResponse::internal_default_instance() {
- return &ListServiceResponse_default_instance_.get();
-}
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
-
-// ===================================================================
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int ServiceResponse::kNameFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-ServiceResponse::ServiceResponse()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (this != internal_default_instance()) protobuf_InitDefaults_reflection_2eproto();
- SharedCtor();
- // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ServiceResponse)
-}
-
-void ServiceResponse::InitAsDefaultInstance() {
-}
-
-ServiceResponse::ServiceResponse(const ServiceResponse& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- SharedCtor();
- UnsafeMergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ServiceResponse)
-}
-
-void ServiceResponse::SharedCtor() {
- name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _cached_size_ = 0;
-}
-
-ServiceResponse::~ServiceResponse() {
- // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ServiceResponse)
- SharedDtor();
-}
-
-void ServiceResponse::SharedDtor() {
- name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-void ServiceResponse::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* ServiceResponse::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return ServiceResponse_descriptor_;
-}
-
-const ServiceResponse& ServiceResponse::default_instance() {
- protobuf_InitDefaults_reflection_2eproto();
- return *internal_default_instance();
-}
-
-::google::protobuf::internal::ExplicitlyConstructed<ServiceResponse> ServiceResponse_default_instance_;
-
-ServiceResponse* ServiceResponse::New(::google::protobuf::Arena* arena) const {
- ServiceResponse* n = new ServiceResponse;
- if (arena != NULL) {
- arena->Own(n);
- }
- return n;
-}
-
-void ServiceResponse::Clear() {
-// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ServiceResponse)
- name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-bool ServiceResponse::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ServiceResponse)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional string name = 1;
- case 1: {
- if (tag == 10) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_name()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "grpc.reflection.v1alpha.ServiceResponse.name"));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ServiceResponse)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ServiceResponse)
- return false;
-#undef DO_
-}
-
-void ServiceResponse::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ServiceResponse)
- // optional string name = 1;
- if (this->name().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServiceResponse.name");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->name(), output);
- }
-
- // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ServiceResponse)
-}
-
-::google::protobuf::uint8* ServiceResponse::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ServiceResponse)
- // optional string name = 1;
- if (this->name().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ServiceResponse.name");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->name(), target);
- }
-
- // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ServiceResponse)
- return target;
-}
-
-size_t ServiceResponse::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ServiceResponse)
- size_t total_size = 0;
-
- // optional string name = 1;
- if (this->name().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->name());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void ServiceResponse::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ServiceResponse)
- if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
- const ServiceResponse* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const ServiceResponse>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ServiceResponse)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ServiceResponse)
- UnsafeMergeFrom(*source);
- }
-}
-
-void ServiceResponse::MergeFrom(const ServiceResponse& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ServiceResponse)
- if (GOOGLE_PREDICT_TRUE(&from != this)) {
- UnsafeMergeFrom(from);
- } else {
- MergeFromFail(__LINE__);
- }
-}
-
-void ServiceResponse::UnsafeMergeFrom(const ServiceResponse& from) {
- GOOGLE_DCHECK(&from != this);
- if (from.name().size() > 0) {
-
- name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
- }
-}
-
-void ServiceResponse::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ServiceResponse)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void ServiceResponse::CopyFrom(const ServiceResponse& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ServiceResponse)
- if (&from == this) return;
- Clear();
- UnsafeMergeFrom(from);
-}
-
-bool ServiceResponse::IsInitialized() const {
-
- return true;
-}
-
-void ServiceResponse::Swap(ServiceResponse* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void ServiceResponse::InternalSwap(ServiceResponse* other) {
- name_.Swap(&other->name_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- std::swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata ServiceResponse::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = ServiceResponse_descriptor_;
- metadata.reflection = ServiceResponse_reflection_;
- return metadata;
-}
-
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-// ServiceResponse
-
-// optional string name = 1;
-void ServiceResponse::clear_name() {
- name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-const ::std::string& ServiceResponse::name() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServiceResponse.name)
- return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void ServiceResponse::set_name(const ::std::string& value) {
-
- name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServiceResponse.name)
-}
-void ServiceResponse::set_name(const char* value) {
-
- name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServiceResponse.name)
-}
-void ServiceResponse::set_name(const char* value, size_t size) {
-
- name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServiceResponse.name)
-}
-::std::string* ServiceResponse::mutable_name() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServiceResponse.name)
- return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-::std::string* ServiceResponse::release_name() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServiceResponse.name)
-
- return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void ServiceResponse::set_allocated_name(::std::string* name) {
- if (name != NULL) {
-
- } else {
-
- }
- name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServiceResponse.name)
-}
-
-inline const ServiceResponse* ServiceResponse::internal_default_instance() {
- return &ServiceResponse_default_instance_.get();
-}
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
-
-// ===================================================================
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int ErrorResponse::kErrorCodeFieldNumber;
-const int ErrorResponse::kErrorMessageFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-ErrorResponse::ErrorResponse()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (this != internal_default_instance()) protobuf_InitDefaults_reflection_2eproto();
- SharedCtor();
- // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ErrorResponse)
-}
-
-void ErrorResponse::InitAsDefaultInstance() {
-}
-
-ErrorResponse::ErrorResponse(const ErrorResponse& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- SharedCtor();
- UnsafeMergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ErrorResponse)
-}
-
-void ErrorResponse::SharedCtor() {
- error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- error_code_ = 0;
- _cached_size_ = 0;
-}
-
-ErrorResponse::~ErrorResponse() {
- // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ErrorResponse)
- SharedDtor();
-}
-
-void ErrorResponse::SharedDtor() {
- error_message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-void ErrorResponse::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* ErrorResponse::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return ErrorResponse_descriptor_;
-}
-
-const ErrorResponse& ErrorResponse::default_instance() {
- protobuf_InitDefaults_reflection_2eproto();
- return *internal_default_instance();
-}
-
-::google::protobuf::internal::ExplicitlyConstructed<ErrorResponse> ErrorResponse_default_instance_;
-
-ErrorResponse* ErrorResponse::New(::google::protobuf::Arena* arena) const {
- ErrorResponse* n = new ErrorResponse;
- if (arena != NULL) {
- arena->Own(n);
- }
- return n;
-}
-
-void ErrorResponse::Clear() {
-// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ErrorResponse)
- error_code_ = 0;
- error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-bool ErrorResponse::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ErrorResponse)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional int32 error_code = 1;
- case 1: {
- if (tag == 8) {
-
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &error_code_)));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(18)) goto parse_error_message;
- break;
- }
-
- // optional string error_message = 2;
- case 2: {
- if (tag == 18) {
- parse_error_message:
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_error_message()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->error_message().data(), this->error_message().length(),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "grpc.reflection.v1alpha.ErrorResponse.error_message"));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectAtEnd()) goto success;
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ErrorResponse)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ErrorResponse)
- return false;
-#undef DO_
-}
-
-void ErrorResponse::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ErrorResponse)
- // optional int32 error_code = 1;
- if (this->error_code() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->error_code(), output);
- }
-
- // optional string error_message = 2;
- if (this->error_message().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->error_message().data(), this->error_message().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ErrorResponse.error_message");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->error_message(), output);
- }
-
- // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ErrorResponse)
-}
-
-::google::protobuf::uint8* ErrorResponse::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ErrorResponse)
- // optional int32 error_code = 1;
- if (this->error_code() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->error_code(), target);
- }
-
- // optional string error_message = 2;
- if (this->error_message().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->error_message().data(), this->error_message().length(),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "grpc.reflection.v1alpha.ErrorResponse.error_message");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->error_message(), target);
- }
-
- // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ErrorResponse)
- return target;
-}
-
-size_t ErrorResponse::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ErrorResponse)
- size_t total_size = 0;
-
- // optional int32 error_code = 1;
- if (this->error_code() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->error_code());
- }
-
- // optional string error_message = 2;
- if (this->error_message().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->error_message());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void ErrorResponse::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ErrorResponse)
- if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
- const ErrorResponse* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const ErrorResponse>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ErrorResponse)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ErrorResponse)
- UnsafeMergeFrom(*source);
- }
-}
-
-void ErrorResponse::MergeFrom(const ErrorResponse& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ErrorResponse)
- if (GOOGLE_PREDICT_TRUE(&from != this)) {
- UnsafeMergeFrom(from);
- } else {
- MergeFromFail(__LINE__);
- }
-}
-
-void ErrorResponse::UnsafeMergeFrom(const ErrorResponse& from) {
- GOOGLE_DCHECK(&from != this);
- if (from.error_code() != 0) {
- set_error_code(from.error_code());
- }
- if (from.error_message().size() > 0) {
-
- error_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_message_);
- }
-}
-
-void ErrorResponse::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ErrorResponse)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void ErrorResponse::CopyFrom(const ErrorResponse& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ErrorResponse)
- if (&from == this) return;
- Clear();
- UnsafeMergeFrom(from);
-}
-
-bool ErrorResponse::IsInitialized() const {
-
- return true;
-}
-
-void ErrorResponse::Swap(ErrorResponse* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void ErrorResponse::InternalSwap(ErrorResponse* other) {
- std::swap(error_code_, other->error_code_);
- error_message_.Swap(&other->error_message_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- std::swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata ErrorResponse::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = ErrorResponse_descriptor_;
- metadata.reflection = ErrorResponse_reflection_;
- return metadata;
-}
-
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-// ErrorResponse
-
-// optional int32 error_code = 1;
-void ErrorResponse::clear_error_code() {
- error_code_ = 0;
-}
-::google::protobuf::int32 ErrorResponse::error_code() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_code)
- return error_code_;
-}
-void ErrorResponse::set_error_code(::google::protobuf::int32 value) {
-
- error_code_ = value;
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_code)
-}
-
-// optional string error_message = 2;
-void ErrorResponse::clear_error_message() {
- error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-const ::std::string& ErrorResponse::error_message() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_message)
- return error_message_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void ErrorResponse::set_error_message(const ::std::string& value) {
-
- error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_message)
-}
-void ErrorResponse::set_error_message(const char* value) {
-
- error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ErrorResponse.error_message)
-}
-void ErrorResponse::set_error_message(const char* value, size_t size) {
-
- error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ErrorResponse.error_message)
-}
-::std::string* ErrorResponse::mutable_error_message() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ErrorResponse.error_message)
- return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-::std::string* ErrorResponse::release_error_message() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ErrorResponse.error_message)
-
- return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void ErrorResponse::set_allocated_error_message(::std::string* error_message) {
- if (error_message != NULL) {
-
- } else {
-
- }
- error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message)
-}
-
-inline const ErrorResponse* ErrorResponse::internal_default_instance() {
- return &ErrorResponse_default_instance_.get();
-}
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace v1alpha
-} // namespace reflection
-} // namespace grpc
-
-// @@protoc_insertion_point(global_scope)
diff --git a/src/cpp/server/dynamic_thread_pool.cc b/src/cpp/server/dynamic_thread_pool.cc
index 4b226c2992..1fdc2edb25 100644
--- a/src/cpp/server/dynamic_thread_pool.cc
+++ b/src/cpp/server/dynamic_thread_pool.cc
@@ -31,16 +31,16 @@
*
*/
-#include <grpc++/impl/sync.h>
-#include <grpc++/impl/thd.h>
+#include <mutex>
+#include <thread>
#include "src/cpp/server/dynamic_thread_pool.h"
namespace grpc {
DynamicThreadPool::DynamicThread::DynamicThread(DynamicThreadPool* pool)
: pool_(pool),
- thd_(new grpc::thread(&DynamicThreadPool::DynamicThread::ThreadFunc,
- this)) {}
+ thd_(new std::thread(&DynamicThreadPool::DynamicThread::ThreadFunc,
+ this)) {}
DynamicThreadPool::DynamicThread::~DynamicThread() {
thd_->join();
thd_.reset();
@@ -49,7 +49,7 @@ DynamicThreadPool::DynamicThread::~DynamicThread() {
void DynamicThreadPool::DynamicThread::ThreadFunc() {
pool_->ThreadFunc();
// Now that we have killed ourselves, we should reduce the thread count
- grpc::unique_lock<grpc::mutex> lock(pool_->mu_);
+ std::unique_lock<std::mutex> lock(pool_->mu_);
pool_->nthreads_--;
// Move ourselves to dead list
pool_->dead_threads_.push_back(this);
@@ -62,7 +62,7 @@ void DynamicThreadPool::DynamicThread::ThreadFunc() {
void DynamicThreadPool::ThreadFunc() {
for (;;) {
// Wait until work is available or we are shutting down.
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
if (!shutdown_ && callbacks_.empty()) {
// If there are too many threads waiting, then quit this thread
if (threads_waiting_ >= reserve_threads_) {
@@ -91,7 +91,7 @@ DynamicThreadPool::DynamicThreadPool(int reserve_threads)
nthreads_(0),
threads_waiting_(0) {
for (int i = 0; i < reserve_threads_; i++) {
- grpc::lock_guard<grpc::mutex> lock(mu_);
+ std::lock_guard<std::mutex> lock(mu_);
nthreads_++;
new DynamicThread(this);
}
@@ -104,7 +104,7 @@ void DynamicThreadPool::ReapThreads(std::list<DynamicThread*>* tlist) {
}
DynamicThreadPool::~DynamicThreadPool() {
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
shutdown_ = true;
cv_.notify_all();
while (nthreads_ != 0) {
@@ -114,7 +114,7 @@ DynamicThreadPool::~DynamicThreadPool() {
}
void DynamicThreadPool::Add(const std::function<void()>& callback) {
- grpc::lock_guard<grpc::mutex> lock(mu_);
+ std::lock_guard<std::mutex> lock(mu_);
// Add works to the callbacks list
callbacks_.push(callback);
// Increase pool size or notify as needed
diff --git a/src/cpp/server/dynamic_thread_pool.h b/src/cpp/server/dynamic_thread_pool.h
index 5ba7533c05..4f8c4111cc 100644
--- a/src/cpp/server/dynamic_thread_pool.h
+++ b/src/cpp/server/dynamic_thread_pool.h
@@ -34,24 +34,25 @@
#ifndef GRPC_INTERNAL_CPP_DYNAMIC_THREAD_POOL_H
#define GRPC_INTERNAL_CPP_DYNAMIC_THREAD_POOL_H
+#include <condition_variable>
#include <list>
#include <memory>
+#include <mutex>
#include <queue>
+#include <thread>
-#include <grpc++/impl/sync.h>
-#include <grpc++/impl/thd.h>
#include <grpc++/support/config.h>
#include "src/cpp/server/thread_pool_interface.h"
namespace grpc {
-class DynamicThreadPool GRPC_FINAL : public ThreadPoolInterface {
+class DynamicThreadPool final : public ThreadPoolInterface {
public:
explicit DynamicThreadPool(int reserve_threads);
~DynamicThreadPool();
- void Add(const std::function<void()>& callback) GRPC_OVERRIDE;
+ void Add(const std::function<void()>& callback) override;
private:
class DynamicThread {
@@ -61,12 +62,12 @@ class DynamicThreadPool GRPC_FINAL : public ThreadPoolInterface {
private:
DynamicThreadPool* pool_;
- std::unique_ptr<grpc::thread> thd_;
+ std::unique_ptr<std::thread> thd_;
void ThreadFunc();
};
- grpc::mutex mu_;
- grpc::condition_variable cv_;
- grpc::condition_variable shutdown_cv_;
+ std::mutex mu_;
+ std::condition_variable cv_;
+ std::condition_variable shutdown_cv_;
bool shutdown_;
std::queue<std::function<void()>> callbacks_;
int reserve_threads_;
diff --git a/src/cpp/server/insecure_server_credentials.cc b/src/cpp/server/insecure_server_credentials.cc
index ef3cae5fd7..eb5931b7b0 100644
--- a/src/cpp/server/insecure_server_credentials.cc
+++ b/src/cpp/server/insecure_server_credentials.cc
@@ -38,14 +38,13 @@
namespace grpc {
namespace {
-class InsecureServerCredentialsImpl GRPC_FINAL : public ServerCredentials {
+class InsecureServerCredentialsImpl final : public ServerCredentials {
public:
- int AddPortToServer(const grpc::string& addr,
- grpc_server* server) GRPC_OVERRIDE {
+ int AddPortToServer(const grpc::string& addr, grpc_server* server) override {
return grpc_server_add_insecure_http2_port(server, addr.c_str());
}
void SetAuthMetadataProcessor(
- const std::shared_ptr<AuthMetadataProcessor>& processor) GRPC_OVERRIDE {
+ const std::shared_ptr<AuthMetadataProcessor>& processor) override {
(void)processor;
GPR_ASSERT(0); // Should not be called on InsecureServerCredentials.
}
diff --git a/src/cpp/server/secure_server_credentials.h b/src/cpp/server/secure_server_credentials.h
index 5460f4a02c..3a301e60c2 100644
--- a/src/cpp/server/secure_server_credentials.h
+++ b/src/cpp/server/secure_server_credentials.h
@@ -44,7 +44,7 @@
namespace grpc {
-class AuthMetadataProcessorAyncWrapper GRPC_FINAL {
+class AuthMetadataProcessorAyncWrapper final {
public:
static void Destroy(void* wrapper);
@@ -64,19 +64,18 @@ class AuthMetadataProcessorAyncWrapper GRPC_FINAL {
std::shared_ptr<AuthMetadataProcessor> processor_;
};
-class SecureServerCredentials GRPC_FINAL : public ServerCredentials {
+class SecureServerCredentials final : public ServerCredentials {
public:
explicit SecureServerCredentials(grpc_server_credentials* creds)
: creds_(creds) {}
- ~SecureServerCredentials() GRPC_OVERRIDE {
+ ~SecureServerCredentials() override {
grpc_server_credentials_release(creds_);
}
- int AddPortToServer(const grpc::string& addr,
- grpc_server* server) GRPC_OVERRIDE;
+ int AddPortToServer(const grpc::string& addr, grpc_server* server) override;
void SetAuthMetadataProcessor(
- const std::shared_ptr<AuthMetadataProcessor>& processor) GRPC_OVERRIDE;
+ const std::shared_ptr<AuthMetadataProcessor>& processor) override;
private:
grpc_server_credentials* creds_;
diff --git a/src/cpp/server/server_cc.cc b/src/cpp/server/server_cc.cc
index d46942d257..b7cfd6dbf1 100644
--- a/src/cpp/server/server_cc.cc
+++ b/src/cpp/server/server_cc.cc
@@ -55,11 +55,11 @@
namespace grpc {
-class DefaultGlobalCallbacks GRPC_FINAL : public Server::GlobalCallbacks {
+class DefaultGlobalCallbacks final : public Server::GlobalCallbacks {
public:
- ~DefaultGlobalCallbacks() GRPC_OVERRIDE {}
- void PreSynchronousRequest(ServerContext* context) GRPC_OVERRIDE {}
- void PostSynchronousRequest(ServerContext* context) GRPC_OVERRIDE {}
+ ~DefaultGlobalCallbacks() override {}
+ void PreSynchronousRequest(ServerContext* context) override {}
+ void PostSynchronousRequest(ServerContext* context) override {}
};
static std::shared_ptr<Server::GlobalCallbacks> g_callbacks = nullptr;
@@ -79,7 +79,7 @@ class Server::UnimplementedAsyncRequestContext {
GenericServerAsyncReaderWriter generic_stream_;
};
-class Server::UnimplementedAsyncRequest GRPC_FINAL
+class Server::UnimplementedAsyncRequest final
: public UnimplementedAsyncRequestContext,
public GenericAsyncRequest {
public:
@@ -89,7 +89,7 @@ class Server::UnimplementedAsyncRequest GRPC_FINAL
server_(server),
cq_(cq) {}
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE;
+ bool FinalizeResult(void** tag, bool* status) override;
ServerContext* context() { return &server_context_; }
GenericServerAsyncReaderWriter* stream() { return &generic_stream_; }
@@ -101,13 +101,13 @@ class Server::UnimplementedAsyncRequest GRPC_FINAL
typedef SneakyCallOpSet<CallOpSendInitialMetadata, CallOpServerSendStatus>
UnimplementedAsyncResponseOp;
-class Server::UnimplementedAsyncResponse GRPC_FINAL
+class Server::UnimplementedAsyncResponse final
: public UnimplementedAsyncResponseOp {
public:
UnimplementedAsyncResponse(UnimplementedAsyncRequest* request);
~UnimplementedAsyncResponse() { delete request_; }
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE {
+ bool FinalizeResult(void** tag, bool* status) override {
bool r = UnimplementedAsyncResponseOp::FinalizeResult(tag, status);
delete this;
return r;
@@ -122,7 +122,7 @@ class ShutdownTag : public CompletionQueueTag {
bool FinalizeResult(void** tag, bool* status) { return false; }
};
-class Server::SyncRequest GRPC_FINAL : public CompletionQueueTag {
+class Server::SyncRequest final : public CompletionQueueTag {
public:
SyncRequest(RpcServiceMethod* method, void* tag)
: method_(method),
@@ -170,7 +170,7 @@ class Server::SyncRequest GRPC_FINAL : public CompletionQueueTag {
}
}
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE {
+ bool FinalizeResult(void** tag, bool* status) override {
if (!*status) {
grpc_completion_queue_destroy(cq_);
}
@@ -182,7 +182,7 @@ class Server::SyncRequest GRPC_FINAL : public CompletionQueueTag {
return true;
}
- class CallData GRPC_FINAL {
+ class CallData final {
public:
explicit CallData(Server* server, SyncRequest* mrd)
: cq_(mrd->cq_),
@@ -255,7 +255,7 @@ class Server::SyncRequestThreadManager : public ThreadManager {
cq_timeout_msec_(cq_timeout_msec),
global_callbacks_(global_callbacks) {}
- WorkStatus PollForWork(void** tag, bool* ok) GRPC_OVERRIDE {
+ WorkStatus PollForWork(void** tag, bool* ok) override {
*tag = nullptr;
gpr_timespec deadline =
gpr_time_from_millis(cq_timeout_msec_, GPR_TIMESPAN);
@@ -272,7 +272,7 @@ class Server::SyncRequestThreadManager : public ThreadManager {
GPR_UNREACHABLE_CODE(return TIMEOUT);
}
- void DoWork(void* tag, bool ok) GRPC_OVERRIDE {
+ void DoWork(void* tag, bool ok) override {
SyncRequest* sync_req = static_cast<SyncRequest*>(tag);
if (!sync_req) {
@@ -379,7 +379,7 @@ Server::Server(
Server::~Server() {
{
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
if (started_ && !shutdown_) {
lock.unlock();
Shutdown();
@@ -501,7 +501,7 @@ bool Server::Start(ServerCompletionQueue** cqs, size_t num_cqs) {
}
void Server::ShutdownInternal(gpr_timespec deadline) {
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
if (started_ && !shutdown_) {
shutdown_ = true;
@@ -549,7 +549,7 @@ void Server::ShutdownInternal(gpr_timespec deadline) {
}
void Server::Wait() {
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
while (started_ && !shutdown_notified_) {
shutdown_cv_.wait(lock);
}
diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc
index 1ca6a2b906..a66ec4ac84 100644
--- a/src/cpp/server/server_context.cc
+++ b/src/cpp/server/server_context.cc
@@ -33,9 +33,10 @@
#include <grpc++/server_context.h>
+#include <mutex>
+
#include <grpc++/completion_queue.h>
#include <grpc++/impl/call.h>
-#include <grpc++/impl/sync.h>
#include <grpc++/support/time.h>
#include <grpc/compression.h>
#include <grpc/grpc.h>
@@ -48,7 +49,7 @@ namespace grpc {
// CompletionOp
-class ServerContext::CompletionOp GRPC_FINAL : public CallOpSetInterface {
+class ServerContext::CompletionOp final : public CallOpSetInterface {
public:
// initial refs: one in the server context, one in the cq
CompletionOp()
@@ -58,8 +59,8 @@ class ServerContext::CompletionOp GRPC_FINAL : public CallOpSetInterface {
finalized_(false),
cancelled_(0) {}
- void FillOps(grpc_op* ops, size_t* nops) GRPC_OVERRIDE;
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE;
+ void FillOps(grpc_op* ops, size_t* nops) override;
+ bool FinalizeResult(void** tag, bool* status) override;
bool CheckCancelled(CompletionQueue* cq) {
cq->TryPluck(this);
@@ -76,20 +77,20 @@ class ServerContext::CompletionOp GRPC_FINAL : public CallOpSetInterface {
private:
bool CheckCancelledNoPluck() {
- grpc::lock_guard<grpc::mutex> g(mu_);
+ std::lock_guard<std::mutex> g(mu_);
return finalized_ ? (cancelled_ != 0) : false;
}
bool has_tag_;
void* tag_;
- grpc::mutex mu_;
+ std::mutex mu_;
int refs_;
bool finalized_;
int cancelled_;
};
void ServerContext::CompletionOp::Unref() {
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
if (--refs_ == 0) {
lock.unlock();
delete this;
@@ -105,7 +106,7 @@ void ServerContext::CompletionOp::FillOps(grpc_op* ops, size_t* nops) {
}
bool ServerContext::CompletionOp::FinalizeResult(void** tag, bool* status) {
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
finalized_ = true;
bool ret = false;
if (has_tag_) {
diff --git a/src/cpp/thread_manager/thread_manager.cc b/src/cpp/thread_manager/thread_manager.cc
index caae4c457d..1450d009e4 100644
--- a/src/cpp/thread_manager/thread_manager.cc
+++ b/src/cpp/thread_manager/thread_manager.cc
@@ -31,12 +31,13 @@
*
*/
-#include <grpc++/impl/sync.h>
-#include <grpc++/impl/thd.h>
-#include <grpc/support/log.h>
+#include "src/cpp/thread_manager/thread_manager.h"
+
#include <climits>
+#include <mutex>
+#include <thread>
-#include "src/cpp/thread_manager/thread_manager.h"
+#include <grpc/support/log.h>
namespace grpc {
@@ -59,7 +60,7 @@ ThreadManager::ThreadManager(int min_pollers, int max_pollers)
ThreadManager::~ThreadManager() {
{
- std::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
GPR_ASSERT(num_threads_ == 0);
}
@@ -67,29 +68,29 @@ ThreadManager::~ThreadManager() {
}
void ThreadManager::Wait() {
- std::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
while (num_threads_ != 0) {
shutdown_cv_.wait(lock);
}
}
void ThreadManager::Shutdown() {
- std::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
shutdown_ = true;
}
bool ThreadManager::IsShutdown() {
- std::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
return shutdown_;
}
void ThreadManager::MarkAsCompleted(WorkerThread* thd) {
{
- std::unique_lock<grpc::mutex> list_lock(list_mu_);
+ std::unique_lock<std::mutex> list_lock(list_mu_);
completed_threads_.push_back(thd);
}
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
num_threads_--;
if (num_threads_ == 0) {
shutdown_cv_.notify_one();
@@ -97,7 +98,7 @@ void ThreadManager::MarkAsCompleted(WorkerThread* thd) {
}
void ThreadManager::CleanupCompletedThreads() {
- std::unique_lock<grpc::mutex> lock(list_mu_);
+ std::unique_lock<std::mutex> lock(list_mu_);
for (auto thd = completed_threads_.begin(); thd != completed_threads_.end();
thd = completed_threads_.erase(thd)) {
delete *thd;
@@ -114,7 +115,7 @@ void ThreadManager::Initialize() {
// less than max threshold (i.e max_pollers_) and the total number of threads is
// below the maximum threshold, we can let the current thread continue as poller
bool ThreadManager::MaybeContinueAsPoller() {
- std::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
if (shutdown_ || num_pollers_ > max_pollers_) {
return false;
}
@@ -127,7 +128,7 @@ bool ThreadManager::MaybeContinueAsPoller() {
// threads currently blocked in PollForWork()) is below the threshold (i.e
// min_pollers_) and the total number of threads is below the maximum threshold
void ThreadManager::MaybeCreatePoller() {
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
if (!shutdown_ && num_pollers_ < min_pollers_) {
num_pollers_++;
num_threads_++;
@@ -156,7 +157,7 @@ void ThreadManager::MainWorkLoop() {
WorkStatus work_status = PollForWork(&tag, &ok);
{
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
num_pollers_--;
if (work_status == TIMEOUT && num_pollers_ > min_pollers_) {
diff --git a/src/cpp/thread_manager/thread_manager.h b/src/cpp/thread_manager/thread_manager.h
index 9cfdb8af25..9c0569c62c 100644
--- a/src/cpp/thread_manager/thread_manager.h
+++ b/src/cpp/thread_manager/thread_manager.h
@@ -34,11 +34,12 @@
#ifndef GRPC_INTERNAL_CPP_THREAD_MANAGER_H
#define GRPC_INTERNAL_CPP_THREAD_MANAGER_H
+#include <condition_variable>
#include <list>
#include <memory>
+#include <mutex>
+#include <thread>
-#include <grpc++/impl/sync.h>
-#include <grpc++/impl/thd.h>
#include <grpc++/support/config.h>
namespace grpc {
@@ -115,7 +116,7 @@ class ThreadManager {
void Run();
ThreadManager* thd_mgr_;
- grpc::thread thd_;
+ std::thread thd_;
};
// The main funtion in ThreadManager
@@ -134,10 +135,10 @@ class ThreadManager {
// Protects shutdown_, num_pollers_ and num_threads_
// TODO: sreek - Change num_pollers and num_threads_ to atomics
- grpc::mutex mu_;
+ std::mutex mu_;
bool shutdown_;
- grpc::condition_variable shutdown_cv_;
+ std::condition_variable shutdown_cv_;
// Number of threads doing polling
int num_pollers_;
@@ -150,7 +151,7 @@ class ThreadManager {
// currently polling i.e num_pollers_)
int num_threads_;
- grpc::mutex list_mu_;
+ std::mutex list_mu_;
std::list<WorkerThread*> completed_threads_;
};
diff --git a/src/cpp/util/time_cc.cc b/src/cpp/util/time_cc.cc
index c43d848cc6..cd59a19703 100644
--- a/src/cpp/util/time_cc.cc
+++ b/src/cpp/util/time_cc.cc
@@ -32,9 +32,6 @@
*/
#include <grpc++/support/config.h>
-
-#ifndef GRPC_CXX0X_NO_CHRONO
-
#include <grpc++/support/time.h>
#include <grpc/support/time.h>
@@ -91,5 +88,3 @@ system_clock::time_point Timespec2Timepoint(gpr_timespec t) {
}
} // namespace grpc
-
-#endif // !GRPC_CXX0X_NO_CHRONO
diff --git a/tools/dockerfile/grpc_check_generated_pb_files/check_pb_files.sh b/src/google_benchmark/gen_build_yaml.py
index 9db7aae9eb..302e08737a 100755
--- a/tools/dockerfile/grpc_check_generated_pb_files/check_pb_files.sh
+++ b/src/google_benchmark/gen_build_yaml.py
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/usr/bin/env python2.7
+
# Copyright 2015, Google Inc.
# All rights reserved.
#
@@ -28,23 +29,25 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-set -e
-
-mkdir -p /var/local/git
-git clone /var/local/jenkins/grpc /var/local/git/grpc
-# clone gRPC submodules, use data from locally cloned submodules where possible
-(cd /var/local/jenkins/grpc/ && git submodule foreach 'cd /var/local/git/grpc \
-&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \
-${name}')
+import os
+import sys
+import glob
+import yaml
-cd /var/local/git/grpc
+os.chdir(os.path.dirname(sys.argv[0])+'/../..')
-# build grpc cpp plugin for generating grpc pb files
-make grpc_cpp_plugin
+out = {}
-# generate pb files
-tools/codegen/extensions/gen_reflection_proto.sh
+out['libs'] = [{
+ 'name': 'google_benchmark',
+ 'build': 'private',
+ 'language': 'c++',
+ 'secure': 'no',
+ 'defaults': 'google_benchmark',
+ 'src': sorted(glob.glob('third_party/google_benchmark/src/*.cc')),
+ 'headers': sorted(
+ glob.glob('third_party/google_benchmark/src/*.h') +
+ glob.glob('third_party/google_benchmark/include/benchmark/*.h')),
+}]
-# check if the pb files in the checked out codebase are identical with the newly
-# generated ones
-git diff --exit-code
+print yaml.dump(out)
diff --git a/src/objective-c/GRPCClient/GRPCCall+ChannelArg.h b/src/objective-c/GRPCClient/GRPCCall+ChannelArg.h
index c1623a0068..4a3f3fa4a1 100644
--- a/src/objective-c/GRPCClient/GRPCCall+ChannelArg.h
+++ b/src/objective-c/GRPCClient/GRPCCall+ChannelArg.h
@@ -40,18 +40,15 @@
@interface GRPCCall (ChannelArg)
/**
- * Use the provided @c userAgentPrefix at the beginning of the HTTP User Agent
- * string for all calls to the specified @c host.
+ * Use the provided @c userAgentPrefix at the beginning of the HTTP User Agent string for all calls
+ * to the specified @c host.
*/
-+ (void)setUserAgentPrefix:(nonnull NSString *)userAgentPrefix
- forHost:(nonnull NSString *)host;
++ (void)setUserAgentPrefix:(nonnull NSString *)userAgentPrefix forHost:(nonnull NSString *)host;
-/** The default response size limit is 4MB. Set this to override that default.
- */
+/** The default response size limit is 4MB. Set this to override that default. */
+ (void)setResponseSizeLimit:(NSUInteger)limit forHost:(nonnull NSString *)host;
-+ (void)closeOpenConnections DEPRECATED_MSG_ATTRIBUTE(
- "The API for this feature is experimental, "
- "and might be removed or modified at any "
- "time.");
++ (void)closeOpenConnections DEPRECATED_MSG_ATTRIBUTE("The API for this feature is experimental, "
+ "and might be removed or modified at any "
+ "time.");
@end
diff --git a/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h b/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h
index beae0d11a2..ac2a37d75f 100644
--- a/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h
+++ b/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h
@@ -33,26 +33,24 @@
#import "GRPCCall.h"
-/** Helpers for setting TLS Trusted Roots, Client Certificates, and Private Key
- */
+/** Helpers for setting TLS Trusted Roots, Client Certificates, and Private Key */
@interface GRPCCall (ChannelCredentials)
/**
- * Use the provided @c pemRootCert as the set of trusted root Certificate
- * Authorities for @c host.
+ * Use the provided @c pemRootCert as the set of trusted root Certificate Authorities for @c host.
*/
+ (BOOL)setTLSPEMRootCerts:(nullable NSString *)pemRootCert
forHost:(nonnull NSString *)host
- error:(NSError *_Nullable *_Nullable)errorPtr;
+ error:(NSError * _Nullable * _Nullable)errorPtr;
/**
- * Configures @c host with TLS/SSL Client Credentials and optionally trusted
- * root Certificate Authorities. If @c pemRootCerts is nil, the default CA
- * Certificates bundled with gRPC will be used.
+ * Configures @c host with TLS/SSL Client Credentials and optionally trusted root Certificate
+ * Authorities. If @c pemRootCerts is nil, the default CA Certificates bundled with gRPC will be
+ * used.
*/
+ (BOOL)setTLSPEMRootCerts:(nullable NSString *)pemRootCerts
withPrivateKey:(nullable NSString *)pemPrivateKey
withCertChain:(nullable NSString *)pemCertChain
forHost:(nonnull NSString *)host
- error:(NSError *_Nullable *_Nullable)errorPtr;
+ error:(NSError * _Nullable * _Nullable)errorPtr;
@end
diff --git a/src/objective-c/GRPCClient/GRPCCall+OAuth2.h b/src/objective-c/GRPCClient/GRPCCall+OAuth2.h
index 467c6332c1..6b443877e9 100644
--- a/src/objective-c/GRPCClient/GRPCCall+OAuth2.h
+++ b/src/objective-c/GRPCClient/GRPCCall+OAuth2.h
@@ -37,17 +37,15 @@
@interface GRPCCall (OAuth2)
/**
- * Setting this property is equivalent to setting "Bearer <passed token>" as the
- * value of the request header with key "authorization" (the authorization
- * header). Setting it to nil removes the authorization header from the request.
- * The value obtained by getting the property is the OAuth2 bearer token if the
- * authorization header of the request has the form "Bearer <token>", or nil
- * otherwise.
+ * Setting this property is equivalent to setting "Bearer <passed token>" as the value of the
+ * request header with key "authorization" (the authorization header). Setting it to nil removes the
+ * authorization header from the request.
+ * The value obtained by getting the property is the OAuth2 bearer token if the authorization header
+ * of the request has the form "Bearer <token>", or nil otherwise.
*/
@property(atomic, copy) NSString *oauth2AccessToken;
-/** Returns the value (if any) of the "www-authenticate" response header (the
- * challenge header). */
+/** Returns the value (if any) of the "www-authenticate" response header (the challenge header). */
@property(atomic, readonly) NSString *oauth2ChallengeHeader;
@end
diff --git a/src/objective-c/GRPCClient/GRPCCall+Tests.h b/src/objective-c/GRPCClient/GRPCCall+Tests.h
index f517f3aac8..184ad09c5c 100644
--- a/src/objective-c/GRPCClient/GRPCCall+Tests.h
+++ b/src/objective-c/GRPCClient/GRPCCall+Tests.h
@@ -34,36 +34,33 @@
#import "GRPCCall.h"
/**
- * Methods to let tune down the security of gRPC connections for specific hosts.
- * These shouldn't be used in releases, but are sometimes needed for testing.
+ * Methods to let tune down the security of gRPC connections for specific hosts. These shouldn't be
+ * used in releases, but are sometimes needed for testing.
*/
@interface GRPCCall (Tests)
/**
- * Establish all SSL connections to the provided host using the passed SSL
- * target name and the root certificates found in the file at |certsPath|.
+ * Establish all SSL connections to the provided host using the passed SSL target name and the root
+ * certificates found in the file at |certsPath|.
*
- * Must be called before any gRPC call to that host is made. It's illegal to
- * pass the same host to more than one invocation of the methods of this
- * category.
+ * Must be called before any gRPC call to that host is made. It's illegal to pass the same host to
+ * more than one invocation of the methods of this category.
*/
+ (void)useTestCertsPath:(NSString *)certsPath
testName:(NSString *)testName
forHost:(NSString *)host;
/**
- * Establish all connections to the provided host using cleartext instead of
- * SSL.
+ * Establish all connections to the provided host using cleartext instead of SSL.
*
- * Must be called before any gRPC call to that host is made. It's illegal to
- * pass the same host to more than one invocation of the methods of this
- * category.
+ * Must be called before any gRPC call to that host is made. It's illegal to pass the same host to
+ * more than one invocation of the methods of this category.
*/
+ (void)useInsecureConnectionsForHost:(NSString *)host;
/**
- * Resets all host configurations to their default values, and flushes all
- * connections from the cache.
+ * Resets all host configurations to their default values, and flushes all connections from the
+ * cache.
*/
+ (void)resetHostSettings;
@end
diff --git a/src/objective-c/GRPCClient/GRPCCall.h b/src/objective-c/GRPCClient/GRPCCall.h
index 5ed160d7a0..7645bb1d34 100644
--- a/src/objective-c/GRPCClient/GRPCCall.h
+++ b/src/objective-c/GRPCClient/GRPCCall.h
@@ -34,18 +34,17 @@
/**
* The gRPC protocol is an RPC protocol on top of HTTP2.
*
- * While the most common type of RPC receives only one request message and
- * returns only one response message, the protocol also supports RPCs that
- * return multiple individual messages in a streaming fashion, RPCs that accept
- * a stream of request messages, or RPCs with both streaming requests and
+ * While the most common type of RPC receives only one request message and returns only one response
+ * message, the protocol also supports RPCs that return multiple individual messages in a streaming
+ * fashion, RPCs that accept a stream of request messages, or RPCs with both streaming requests and
* responses.
*
- * Conceptually, each gRPC call consists of a bidirectional stream of binary
- * messages, with RPCs of the "non-streaming type" sending only one message in
- * the corresponding direction (the protocol doesn't make any distinction).
+ * Conceptually, each gRPC call consists of a bidirectional stream of binary messages, with RPCs of
+ * the "non-streaming type" sending only one message in the corresponding direction (the protocol
+ * doesn't make any distinction).
*
- * Each RPC uses a different HTTP2 stream, and thus multiple simultaneous RPCs
- * can be multiplexed transparently on the same TCP connection.
+ * Each RPC uses a different HTTP2 stream, and thus multiple simultaneous RPCs can be multiplexed
+ * transparently on the same TCP connection.
*/
#import <Foundation/Foundation.h>
@@ -60,56 +59,51 @@ extern NSString *const kGRPCErrorDomain;
/**
* gRPC error codes.
- * Note that a few of these are never produced by the gRPC libraries, but are of
- * general utility for server applications to produce.
+ * Note that a few of these are never produced by the gRPC libraries, but are of general utility for
+ * server applications to produce.
*/
typedef NS_ENUM(NSUInteger, GRPCErrorCode) {
/** The operation was cancelled (typically by the caller). */
GRPCErrorCodeCancelled = 1,
/**
- * Unknown error. Errors raised by APIs that do not return enough error
- * information may be
+ * Unknown error. Errors raised by APIs that do not return enough error information may be
* converted to this error.
*/
GRPCErrorCodeUnknown = 2,
/**
- * The client specified an invalid argument. Note that this differs from
- * FAILED_PRECONDITION.
- * INVALID_ARGUMENT indicates arguments that are problematic regardless of the
- * state of the server (e.g., a malformed file name).
+ * The client specified an invalid argument. Note that this differs from FAILED_PRECONDITION.
+ * INVALID_ARGUMENT indicates arguments that are problematic regardless of the state of the
+ * server (e.g., a malformed file name).
*/
GRPCErrorCodeInvalidArgument = 3,
/**
- * Deadline expired before operation could complete. For operations that
- * change the state of the server, this error may be returned even if the
- * operation has completed successfully. For example, a successful response
- * from the server could have been delayed long enough for the deadline to
- * expire.
+ * Deadline expired before operation could complete. For operations that change the state of the
+ * server, this error may be returned even if the operation has completed successfully. For
+ * example, a successful response from the server could have been delayed long enough for the
+ * deadline to expire.
*/
GRPCErrorCodeDeadlineExceeded = 4,
/** Some requested entity (e.g., file or directory) was not found. */
GRPCErrorCodeNotFound = 5,
- /** Some entity that we attempted to create (e.g., file or directory) already
- exists. */
+ /** Some entity that we attempted to create (e.g., file or directory) already exists. */
GRPCErrorCodeAlreadyExists = 6,
/**
- * The caller does not have permission to execute the specified operation.
- * PERMISSION_DENIED isn't used for rejections caused by exhausting some
- * resource (RESOURCE_EXHAUSTED is used instead for those errors).
- * PERMISSION_DENIED doesn't indicate a failure to identify the caller
+ * The caller does not have permission to execute the specified operation. PERMISSION_DENIED isn't
+ * used for rejections caused by exhausting some resource (RESOURCE_EXHAUSTED is used instead for
+ * those errors). PERMISSION_DENIED doesn't indicate a failure to identify the caller
* (UNAUTHENTICATED is used instead for those errors).
*/
GRPCErrorCodePermissionDenied = 7,
/**
- * The request does not have valid authentication credentials for the
- * operation (e.g. the caller's identity can't be verified).
+ * The request does not have valid authentication credentials for the operation (e.g. the caller's
+ * identity can't be verified).
*/
GRPCErrorCodeUnauthenticated = 16,
@@ -117,47 +111,42 @@ typedef NS_ENUM(NSUInteger, GRPCErrorCode) {
GRPCErrorCodeResourceExhausted = 8,
/**
- * The RPC was rejected because the server is not in a state required for the
- * procedure's
+ * The RPC was rejected because the server is not in a state required for the procedure's
* execution. For example, a directory to be deleted may be non-empty, etc.
- * The client should not retry until the server state has been explicitly
- * fixed (e.g. by
- * performing another RPC). The details depend on the service being called,
- * and should be found in the NSError's userInfo.
+ * The client should not retry until the server state has been explicitly fixed (e.g. by
+ * performing another RPC). The details depend on the service being called, and should be found in
+ * the NSError's userInfo.
*/
GRPCErrorCodeFailedPrecondition = 9,
/**
- * The RPC was aborted, typically due to a concurrency issue like sequencer
- * check failures, transaction aborts, etc. The client should retry at a
- * higher-level (e.g., restarting a read-modify-write sequence).
+ * The RPC was aborted, typically due to a concurrency issue like sequencer check failures,
+ * transaction aborts, etc. The client should retry at a higher-level (e.g., restarting a read-
+ * modify-write sequence).
*/
GRPCErrorCodeAborted = 10,
/**
- * The RPC was attempted past the valid range. E.g., enumerating past the end
- * of a list.
- * Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed
- * if the system state changes. For example, an RPC to get elements of a list
- * will generate INVALID_ARGUMENT if asked to return the element at a negative
- * index, but it will generate OUT_OF_RANGE if asked to return the element at
- * an index past the current size of the list.
+ * The RPC was attempted past the valid range. E.g., enumerating past the end of a list.
+ * Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed if the system state
+ * changes. For example, an RPC to get elements of a list will generate INVALID_ARGUMENT if asked
+ * to return the element at a negative index, but it will generate OUT_OF_RANGE if asked to return
+ * the element at an index past the current size of the list.
*/
GRPCErrorCodeOutOfRange = 11,
- /** The procedure is not implemented or not supported/enabled in this server.
- */
+ /** The procedure is not implemented or not supported/enabled in this server. */
GRPCErrorCodeUnimplemented = 12,
/**
- * Internal error. Means some invariant expected by the server application or
- * the gRPC library has been broken.
+ * Internal error. Means some invariant expected by the server application or the gRPC library has
+ * been broken.
*/
GRPCErrorCodeInternal = 13,
/**
- * The server is currently unavailable. This is most likely a transient
- * condition and may be corrected by retrying with a backoff.
+ * The server is currently unavailable. This is most likely a transient condition and may be
+ * corrected by retrying with a backoff.
*/
GRPCErrorCodeUnavailable = 14,
@@ -169,19 +158,17 @@ typedef NS_ENUM(NSUInteger, GRPCErrorCode) {
* Safety remark of a gRPC method as defined in RFC 2616 Section 9.1
*/
typedef NS_ENUM(NSUInteger, GRPCCallSafety) {
- /** Signal that there is no guarantees on how the call affects the server
- state. */
+ /** Signal that there is no guarantees on how the call affects the server state. */
GRPCCallSafetyDefault = 0,
/** Signal that the call is idempotent. gRPC is free to use PUT verb. */
GRPCCallSafetyIdempotentRequest = 1,
- /** Signal that the call is cacheable and will not affect server state. gRPC
- is free to use GET verb. */
+ /** Signal that the call is cacheable and will not affect server state. gRPC is free to use GET verb. */
GRPCCallSafetyCacheableRequest = 2,
};
/**
- * Keys used in |NSError|'s |userInfo| dictionary to store the response headers
- * and trailers sent by the server.
+ * Keys used in |NSError|'s |userInfo| dictionary to store the response headers and trailers sent by
+ * the server.
*/
extern id const kGRPCHeadersKey;
extern id const kGRPCTrailersKey;
@@ -192,24 +179,20 @@ extern id const kGRPCTrailersKey;
@interface GRPCCall : GRXWriter
/**
- * The container of the request headers of an RPC conforms to this protocol,
- * which is a subset of NSMutableDictionary's interface. It will become a
- * NSMutableDictionary later on. The keys of this container are the header
- * names, which per the HTTP standard are case-insensitive. They are stored in
- * lowercase (which is how HTTP/2 mandates them on the wire), and can only
- * consist of ASCII characters.
- * A header value is a NSString object (with only ASCII characters), unless the
- * header name has the suffix "-bin", in which case the value has to be a NSData
- * object.
+ * The container of the request headers of an RPC conforms to this protocol, which is a subset of
+ * NSMutableDictionary's interface. It will become a NSMutableDictionary later on.
+ * The keys of this container are the header names, which per the HTTP standard are case-
+ * insensitive. They are stored in lowercase (which is how HTTP/2 mandates them on the wire), and
+ * can only consist of ASCII characters.
+ * A header value is a NSString object (with only ASCII characters), unless the header name has the
+ * suffix "-bin", in which case the value has to be a NSData object.
*/
/**
- * These HTTP headers will be passed to the server as part of this call. Each
- * HTTP header is a name-value pair with string names and either string or
- * binary values.
+ * These HTTP headers will be passed to the server as part of this call. Each HTTP header is a
+ * name-value pair with string names and either string or binary values.
*
- * The passed dictionary has to use NSString keys, corresponding to the header
- * names. The value associated to each can be a NSString object or a NSData
- * object. E.g.:
+ * The passed dictionary has to use NSString keys, corresponding to the header names. The value
+ * associated to each can be a NSString object or a NSData object. E.g.:
*
* call.requestHeaders = @{@"authorization": @"Bearer ..."};
*
@@ -222,61 +205,53 @@ extern id const kGRPCTrailersKey;
@property(atomic, readonly) NSMutableDictionary *requestHeaders;
/**
- * This dictionary is populated with the HTTP headers received from the server.
- * This happens before any response message is received from the server. It has
- * the same structure as the request headers dictionary: Keys are NSString
- * header names; names ending with the suffix "-bin" have a NSData value; the
- * others have a NSString value.
+ * This dictionary is populated with the HTTP headers received from the server. This happens before
+ * any response message is received from the server. It has the same structure as the request
+ * headers dictionary: Keys are NSString header names; names ending with the suffix "-bin" have a
+ * NSData value; the others have a NSString value.
*
- * The value of this property is nil until all response headers are received,
- * and will change before any of -writeValue: or -writesFinishedWithError: are
- * sent to the writeable.
+ * The value of this property is nil until all response headers are received, and will change before
+ * any of -writeValue: or -writesFinishedWithError: are sent to the writeable.
*/
@property(atomic, readonly) NSDictionary *responseHeaders;
/**
- * Same as responseHeaders, but populated with the HTTP trailers received from
- * the server before the call finishes.
+ * Same as responseHeaders, but populated with the HTTP trailers received from the server before the
+ * call finishes.
*
- * The value of this property is nil until all response trailers are received,
- * and will change before -writesFinishedWithError: is sent to the writeable.
+ * The value of this property is nil until all response trailers are received, and will change
+ * before -writesFinishedWithError: is sent to the writeable.
*/
@property(atomic, readonly) NSDictionary *responseTrailers;
/**
- * The request writer has to write NSData objects into the provided Writeable.
- * The server will receive each of those separately and in order as distinct
- * messages.
- * A gRPC call might not complete until the request writer finishes. On the
- * other hand, the request finishing doesn't necessarily make the call to
- * finish, as the server might continue sending messages to the response side of
- * the call indefinitely (depending on the semantics of the specific remote
- * method called).
+ * The request writer has to write NSData objects into the provided Writeable. The server will
+ * receive each of those separately and in order as distinct messages.
+ * A gRPC call might not complete until the request writer finishes. On the other hand, the request
+ * finishing doesn't necessarily make the call to finish, as the server might continue sending
+ * messages to the response side of the call indefinitely (depending on the semantics of the
+ * specific remote method called).
* To finish a call right away, invoke cancel.
- * host parameter should not contain the scheme (http:// or https://), only the
- * name or IP addr and the port number, for example @"localhost:5050".
+ * host parameter should not contain the scheme (http:// or https://), only the name or IP addr
+ * and the port number, for example @"localhost:5050".
*/
- (instancetype)initWithHost:(NSString *)host
path:(NSString *)path
- requestsWriter:(GRXWriter *)requestsWriter
- NS_DESIGNATED_INITIALIZER;
+ requestsWriter:(GRXWriter *)requestsWriter NS_DESIGNATED_INITIALIZER;
/**
- * Finishes the request side of this call, notifies the server that the RPC
- * should be cancelled, and finishes the response side of the call with an error
- * of code CANCELED.
+ * Finishes the request side of this call, notifies the server that the RPC should be cancelled, and
+ * finishes the response side of the call with an error of code CANCELED.
*/
- (void)cancel;
/**
* Set the call flag for a specific host path.
*
- * Host parameter should not contain the scheme (http:// or https://), only the
- * name or IP addr and the port number, for example @"localhost:5050".
+ * Host parameter should not contain the scheme (http:// or https://), only the name or IP addr
+ * and the port number, for example @"localhost:5050".
*/
-+ (void)setCallSafety:(GRPCCallSafety)callSafety
- host:(NSString *)host
- path:(NSString *)path;
++ (void)setCallSafety:(GRPCCallSafety)callSafety host:(NSString *)host path:(NSString *)path;
// TODO(jcanizales): Let specify a deadline. As a category of GRXWriter?
@end
@@ -285,7 +260,7 @@ extern id const kGRPCTrailersKey;
/** This protocol is kept for backwards compatibility with existing code. */
DEPRECATED_MSG_ATTRIBUTE("Use NSDictionary or NSMutableDictionary instead.")
-@protocol GRPCRequestHeaders<NSObject>
+@protocol GRPCRequestHeaders <NSObject>
@property(nonatomic, readonly) NSUInteger count;
- (id)objectForKeyedSubscript:(id)key;
@@ -298,6 +273,6 @@ DEPRECATED_MSG_ATTRIBUTE("Use NSDictionary or NSMutableDictionary instead.")
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
/** This is only needed for backwards-compatibility. */
-@interface NSMutableDictionary (GRPCRequestHeaders)<GRPCRequestHeaders>
+@interface NSMutableDictionary (GRPCRequestHeaders) <GRPCRequestHeaders>
@end
#pragma clang diagnostic pop
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m
index 85d141aa09..44393f6b99 100644
--- a/src/objective-c/GRPCClient/GRPCCall.m
+++ b/src/objective-c/GRPCClient/GRPCCall.m
@@ -33,9 +33,9 @@
#import "GRPCCall.h"
-#import <RxLibrary/GRXConcurrentWriteable.h>
#include <grpc/grpc.h>
#include <grpc/support/time.h>
+#import <RxLibrary/GRXConcurrentWriteable.h>
#import "private/GRPCConnectivityMonitor.h"
#import "private/GRPCHost.h"
@@ -45,11 +45,11 @@
#import "private/NSDictionary+GRPC.h"
#import "private/NSError+GRPC.h"
-NSString *const kGRPCHeadersKey = @"io.grpc.HeadersKey";
-NSString *const kGRPCTrailersKey = @"io.grpc.TrailersKey";
+NSString * const kGRPCHeadersKey = @"io.grpc.HeadersKey";
+NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey";
static NSMutableDictionary *callFlags;
-@interface GRPCCall ()<GRXWriteable>
+@interface GRPCCall () <GRXWriteable>
// Make them read-write.
@property(atomic, strong) NSDictionary *responseHeaders;
@property(atomic, strong) NSDictionary *responseTrailers;
@@ -85,21 +85,17 @@ static NSMutableDictionary *callFlags;
// correct ordering.
GRXConcurrentWriteable *_responseWriteable;
- // The network thread wants the requestWriter to resume (when the server is
- // ready for more input), or to stop (on errors), concurrently with user
- // threads that want to start it, pause it or stop it. Because a writer isn't
- // thread-safe, we'll synchronize those operations on it.
- // We don't use a dispatch queue for that purpose, because the writer can call
- // writeValue: or writesFinishedWithError: on this GRPCCall as part of those
- // operations. We want to be able to pause the writer immediately on
- // writeValue:, so we need our locking to be recursive.
+ // The network thread wants the requestWriter to resume (when the server is ready for more input),
+ // or to stop (on errors), concurrently with user threads that want to start it, pause it or stop
+ // it. Because a writer isn't thread-safe, we'll synchronize those operations on it.
+ // We don't use a dispatch queue for that purpose, because the writer can call writeValue: or
+ // writesFinishedWithError: on this GRPCCall as part of those operations. We want to be able to
+ // pause the writer immediately on writeValue:, so we need our locking to be recursive.
GRXWriter *_requestWriter;
// To create a retain cycle when a call is started, up until it finishes. See
- // |startWithWriteable:| and |finishWithError:|. This saves users from having
- // to retain a
- // reference to the call object if all they're interested in is the handler
- // being executed when
+ // |startWithWriteable:| and |finishWithError:|. This saves users from having to retain a
+ // reference to the call object if all they're interested in is the handler being executed when
// the response arrives.
GRPCCall *_retainSelf;
@@ -108,16 +104,13 @@ static NSMutableDictionary *callFlags;
@synthesize state = _state;
-// TODO(jcanizales): If grpc_init is idempotent, this should be changed from
-// load to initialize.
+// TODO(jcanizales): If grpc_init is idempotent, this should be changed from load to initialize.
+ (void)load {
grpc_init();
callFlags = [NSMutableDictionary dictionary];
}
-+ (void)setCallSafety:(GRPCCallSafety)callSafety
- host:(NSString *)host
- path:(NSString *)path {
++ (void)setCallSafety:(GRPCCallSafety)callSafety host:(NSString *)host path:(NSString *)path {
NSString *hostAndPath = [NSString stringWithFormat:@"%@/%@", host, path];
switch (callSafety) {
case GRPCCallSafetyDefault:
@@ -148,8 +141,7 @@ static NSMutableDictionary *callFlags;
path:(NSString *)path
requestsWriter:(GRXWriter *)requestWriter {
if (!host || !path) {
- [NSException raise:NSInvalidArgumentException
- format:@"Neither host nor path can be nil."];
+ [NSException raise:NSInvalidArgumentException format:@"Neither host nor path can be nil."];
}
if (requestWriter.state != GRXWriterStateNotStarted) {
[NSException raise:NSInvalidArgumentException
@@ -199,10 +191,7 @@ static NSMutableDictionary *callFlags;
- (void)cancel {
[self finishWithError:[NSError errorWithDomain:kGRPCErrorDomain
code:GRPCErrorCodeCancelled
- userInfo:@{
- NSLocalizedDescriptionKey :
- @"Canceled by app"
- }]];
+ userInfo:@{NSLocalizedDescriptionKey: @"Canceled by app"}]];
[self cancelCall];
}
@@ -217,18 +206,15 @@ static NSMutableDictionary *callFlags;
// Only called from the call queue.
// The handler will be called from the network queue.
-- (void)startReadWithHandler:(void (^)(grpc_byte_buffer *))handler {
+- (void)startReadWithHandler:(void(^)(grpc_byte_buffer *))handler {
// TODO(jcanizales): Add error handlers for async failures
- [_wrappedCall startBatchWithOperations:@[ [[GRPCOpRecvMessage alloc]
- initWithHandler:handler] ]];
+ [_wrappedCall startBatchWithOperations:@[[[GRPCOpRecvMessage alloc] initWithHandler:handler]]];
}
// Called initially from the network queue once response headers are received,
-// then "recursively" from the responseWriteable queue after each response from
-// the
+// then "recursively" from the responseWriteable queue after each response from the
// server has been written.
-// If the call is currently paused, this is a noop. Restarting the call will
-// invoke this
+// If the call is currently paused, this is a noop. Restarting the call will invoke this
// method.
// TODO(jcanizales): Rename to readResponseIfNotPaused.
- (void)startNextRead {
@@ -251,23 +237,15 @@ static NSMutableDictionary *callFlags;
// don't want to throw, because the app shouldn't crash for a behavior
// that's on the hands of any server to have. Instead we finish and ask
// the server to cancel.
- [weakSelf
- finishWithError:[NSError
- errorWithDomain:kGRPCErrorDomain
- code:GRPCErrorCodeResourceExhausted
- userInfo:@{
- NSLocalizedDescriptionKey :
- @"Client does not have enough "
- @"memory to hold the server "
- @"response."
- }]];
+ [weakSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain
+ code:GRPCErrorCodeResourceExhausted
+ userInfo:@{NSLocalizedDescriptionKey: @"Client does not have enough memory to hold the server response."}]];
[weakSelf cancelCall];
return;
}
- [weakWriteable enqueueValue:data
- completionHandler:^{
- [weakSelf startNextRead];
- }];
+ [weakWriteable enqueueValue:data completionHandler:^{
+ [weakSelf startNextRead];
+ }];
}];
});
}
@@ -276,22 +254,19 @@ static NSMutableDictionary *callFlags;
- (void)sendHeaders:(NSDictionary *)headers {
// TODO(jcanizales): Add error handlers for async failures
- [_wrappedCall startBatchWithOperations:@[
- [[GRPCOpSendMetadata alloc]
- initWithMetadata:headers
- flags:[GRPCCall callFlagsForHost:_host path:_path]
- handler:nil]
- ]];
+ [_wrappedCall startBatchWithOperations:@[[[GRPCOpSendMetadata alloc] initWithMetadata:headers
+ flags:[GRPCCall callFlagsForHost:_host path:_path]
+ handler:nil]]];
}
#pragma mark GRXWriteable implementation
// Only called from the call queue. The error handler will be called from the
// network queue if the write didn't succeed.
-- (void)writeMessage:(NSData *)message
- withErrorHandler:(void (^)())errorHandler {
+- (void)writeMessage:(NSData *)message withErrorHandler:(void (^)())errorHandler {
+
__weak GRPCCall *weakSelf = self;
- void (^resumingHandler)(void) = ^{
+ void(^resumingHandler)(void) = ^{
// Resume the request writer.
GRPCCall *strongSelf = weakSelf;
if (strongSelf) {
@@ -300,9 +275,8 @@ static NSMutableDictionary *callFlags;
}
}
};
- [_wrappedCall startBatchWithOperations:@[ [[GRPCOpSendMessage alloc]
- initWithMessage:message
- handler:resumingHandler] ]
+ [_wrappedCall startBatchWithOperations:@[[[GRPCOpSendMessage alloc] initWithMessage:message
+ handler:resumingHandler]]
errorHandler:errorHandler];
}
@@ -317,20 +291,18 @@ static NSMutableDictionary *callFlags;
__weak GRPCCall *weakSelf = self;
dispatch_async(_callQueue, ^{
- [weakSelf writeMessage:value
- withErrorHandler:^{
- [weakSelf
- finishWithError:[NSError errorWithDomain:kGRPCErrorDomain
+ [weakSelf writeMessage:value withErrorHandler:^{
+ [weakSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain
code:GRPCErrorCodeInternal
userInfo:nil]];
- }];
+ }];
});
}
// Only called from the call queue. The error handler will be called from the
// network queue if the requests stream couldn't be closed successfully.
- (void)finishRequestWithErrorHandler:(void (^)())errorHandler {
- [_wrappedCall startBatchWithOperations:@[ [[GRPCOpSendClose alloc] init] ]
+ [_wrappedCall startBatchWithOperations:@[[[GRPCOpSendClose alloc] init]]
errorHandler:errorHandler];
}
@@ -351,19 +323,17 @@ static NSMutableDictionary *callFlags;
#pragma mark Invoke
-// Both handlers will eventually be called, from the network queue. Writes can
-// start immediately after this.
+// Both handlers will eventually be called, from the network queue. Writes can start immediately
+// after this.
// The first one (headersHandler), when the response headers are received.
// The second one (completionHandler), whenever the RPC finishes for any reason.
-- (void)invokeCallWithHeadersHandler:(void (^)(NSDictionary *))headersHandler
- completionHandler:
- (void (^)(NSError *, NSDictionary *))completionHandler {
+- (void)invokeCallWithHeadersHandler:(void(^)(NSDictionary *))headersHandler
+ completionHandler:(void(^)(NSError *, NSDictionary *))completionHandler {
// TODO(jcanizales): Add error handlers for async failures
- [_wrappedCall startBatchWithOperations:@[ [[GRPCOpRecvMetadata alloc]
- initWithHandler:headersHandler] ]];
- [_wrappedCall
- startBatchWithOperations:@[ [[GRPCOpRecvStatus alloc]
- initWithHandler:completionHandler] ]];
+ [_wrappedCall startBatchWithOperations:@[[[GRPCOpRecvMetadata alloc]
+ initWithHandler:headersHandler]]];
+ [_wrappedCall startBatchWithOperations:@[[[GRPCOpRecvStatus alloc]
+ initWithHandler:completionHandler]]];
}
- (void)invokeCall {
@@ -371,31 +341,27 @@ static NSMutableDictionary *callFlags;
// Response headers received.
self.responseHeaders = headers;
[self startNextRead];
- }
- completionHandler:^(NSError *error, NSDictionary *trailers) {
- self.responseTrailers = trailers;
-
- if (error) {
- NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
- if (error.userInfo) {
- [userInfo addEntriesFromDictionary:error.userInfo];
- }
- userInfo[kGRPCTrailersKey] = self.responseTrailers;
- // TODO(jcanizales): The C gRPC library doesn't guarantee that the
- // headers block will be called before this one, so an error might end
- // up with trailers but no headers. We shouldn't call finishWithError
- // until ater both blocks are called. It is also when this is done
- // that we can provide a merged view of response headers and trailers
- // in a thread-safe way.
- if (self.responseHeaders) {
- userInfo[kGRPCHeadersKey] = self.responseHeaders;
- }
- error = [NSError errorWithDomain:error.domain
- code:error.code
- userInfo:userInfo];
- }
- [self finishWithError:error];
- }];
+ } completionHandler:^(NSError *error, NSDictionary *trailers) {
+ self.responseTrailers = trailers;
+
+ if (error) {
+ NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
+ if (error.userInfo) {
+ [userInfo addEntriesFromDictionary:error.userInfo];
+ }
+ userInfo[kGRPCTrailersKey] = self.responseTrailers;
+ // TODO(jcanizales): The C gRPC library doesn't guarantee that the headers block will be
+ // called before this one, so an error might end up with trailers but no headers. We
+ // shouldn't call finishWithError until ater both blocks are called. It is also when this is
+ // done that we can provide a merged view of response headers and trailers in a thread-safe
+ // way.
+ if (self.responseHeaders) {
+ userInfo[kGRPCHeadersKey] = self.responseHeaders;
+ }
+ error = [NSError errorWithDomain:error.domain code:error.code userInfo:userInfo];
+ }
+ [self finishWithError:error];
+ }];
// Now that the RPC has been initiated, request writes can start.
@synchronized(_requestWriter) {
[_requestWriter startWithWriteable:self];
@@ -409,16 +375,14 @@ static NSMutableDictionary *callFlags;
_state = GRXWriterStateStarted;
}
- // Create a retain cycle so that this instance lives until the RPC finishes
- // (or is cancelled). This makes RPCs in which the call isn't externally
- // retained possible (as long as it is started before being autoreleased).
- // Care is taken not to retain self strongly in any of the blocks used in this
- // implementation, so that the life of the instance is determined by this
- // retain cycle.
+ // Create a retain cycle so that this instance lives until the RPC finishes (or is cancelled).
+ // This makes RPCs in which the call isn't externally retained possible (as long as it is started
+ // before being autoreleased).
+ // Care is taken not to retain self strongly in any of the blocks used in this implementation, so
+ // that the life of the instance is determined by this retain cycle.
_retainSelf = self;
- _responseWriteable =
- [[GRXConcurrentWriteable alloc] initWithWriteable:writeable];
+ _responseWriteable = [[GRXConcurrentWriteable alloc] initWithWriteable:writeable];
_wrappedCall = [[GRPCWrappedCall alloc] initWithHost:_host path:_path];
NSAssert(_wrappedCall, @"Error allocating RPC objects. Low memory?");
@@ -427,37 +391,29 @@ static NSMutableDictionary *callFlags;
[self invokeCall];
// TODO(jcanizales): Extract this logic somewhere common.
- NSString *host =
- [NSURL URLWithString:[@"https://" stringByAppendingString:_host]].host;
+ NSString *host = [NSURL URLWithString:[@"https://" stringByAppendingString:_host]].host;
if (!host) {
// TODO(jcanizales): Check this on init.
- [NSException raise:NSInvalidArgumentException
- format:@"host of %@ is nil", _host];
+ [NSException raise:NSInvalidArgumentException format:@"host of %@ is nil", _host];
}
__weak typeof(self) weakSelf = self;
_connectivityMonitor = [GRPCConnectivityMonitor monitorWithHost:host];
void (^handler)() = ^{
typeof(self) strongSelf = weakSelf;
if (strongSelf) {
- [strongSelf
- finishWithError:[NSError errorWithDomain:kGRPCErrorDomain
- code:GRPCErrorCodeUnavailable
- userInfo:@{
- NSLocalizedDescriptionKey :
- @"Connectivity lost."
- }]];
+ [strongSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain
+ code:GRPCErrorCodeUnavailable
+ userInfo:@{ NSLocalizedDescriptionKey : @"Connectivity lost." }]];
}
};
[_connectivityMonitor handleLossWithHandler:handler
- wifiStatusChangeHandler:^{
- }];
+ wifiStatusChangeHandler:nil];
}
- (void)setState:(GRXWriterState)newState {
@synchronized(self) {
// Manual transitions are only allowed from the started or paused states.
- if (_state == GRXWriterStateNotStarted ||
- _state == GRXWriterStateFinished) {
+ if (_state == GRXWriterStateNotStarted || _state == GRXWriterStateFinished) {
return;
}
diff --git a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h
index c0bbf22c74..fe3b8f39d1 100644
--- a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h
+++ b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h
@@ -34,19 +34,18 @@
#import <Foundation/Foundation.h>
#include <grpc/grpc.h>
-typedef void (^GRPCQueueCompletionHandler)(bool success);
+typedef void(^GRPCQueueCompletionHandler)(bool success);
/**
- * This class lets one more easily use |grpc_completion_queue|. To use it, pass
- * the value of the |unmanagedQueue| property of an instance of this class to
- * |grpc_channel_create_call|. Then for every |grpc_call_*| method that accepts
- * a tag, you can pass a block of type |GRPCQueueCompletionHandler| (remembering
- * to cast it using |__bridge_retained|). The block is guaranteed to eventually
- * be called, by a concurrent queue, and then released. Each such block is
+ * This class lets one more easily use |grpc_completion_queue|. To use it, pass the value of the
+ * |unmanagedQueue| property of an instance of this class to |grpc_channel_create_call|. Then for
+ * every |grpc_call_*| method that accepts a tag, you can pass a block of type
+ * |GRPCQueueCompletionHandler| (remembering to cast it using |__bridge_retained|). The block is
+ * guaranteed to eventually be called, by a concurrent queue, and then released. Each such block is
* passed a |bool| that tells if the operation was successful.
*
- * Release the GRPCCompletionQueue object only after you are not going to pass
- * any more blocks to the |grpc_call| that's using it.
+ * Release the GRPCCompletionQueue object only after you are not going to pass any more blocks to
+ * the |grpc_call| that's using it.
*/
@interface GRPCCompletionQueue : NSObject
@property(nonatomic, readonly) grpc_completion_queue *unmanagedQueue;
diff --git a/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.h b/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.h
index 941b596d2c..e341b6ef6c 100644
--- a/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.h
+++ b/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.h
@@ -45,7 +45,7 @@
*/
#define GRPC_XMACRO_ITEM(methodName, FlagName) \
- @property(nonatomic, readonly) BOOL methodName;
+@property(nonatomic, readonly) BOOL methodName;
#include "GRPCReachabilityFlagNames.xmacro.h"
#undef GRPC_XMACRO_ITEM
@@ -60,19 +60,18 @@
- (nonnull instancetype)init NS_UNAVAILABLE;
/**
- * Queue on which callbacks will be dispatched. Default is the main queue. Set
- * it before calling handleLossWithHandler:.
+ * Queue on which callbacks will be dispatched. Default is the main queue. Set it before calling
+ * handleLossWithHandler:.
*/
// TODO(jcanizales): Default to a serial background queue instead.
@property(nonatomic, strong, null_resettable) dispatch_queue_t queue;
/**
- * Calls handler every time the connectivity to this instance's host is lost. If
- * this instance is released before that happens, the handler won't be called.
- * Only one handler is active at a time, so if this method is called again
- * before the previous handler has been called, it might never be called at all
- * (or yes, if it has already been queued).
+ * Calls handler every time the connectivity to this instance's host is lost. If this instance is
+ * released before that happens, the handler won't be called.
+ * Only one handler is active at a time, so if this method is called again before the previous
+ * handler has been called, it might never be called at all (or yes, if it has already been queued).
*/
-- (void)handleLossWithHandler:(nonnull void (^)())handler
- wifiStatusChangeHandler:(nonnull void (^)())wifiStatusChangeHandler;
+- (void)handleLossWithHandler:(nullable void (^)())lossHandler
+ wifiStatusChangeHandler:(nullable void (^)())wifiStatusChangeHandler;
@end
diff --git a/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m b/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m
index fec6391d39..40afca2d3d 100644
--- a/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m
+++ b/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m
@@ -58,20 +58,19 @@
}
*/
-#define GRPC_XMACRO_ITEM(methodName, FlagName) \
- -(BOOL)methodName { \
- return !!(_flags & kSCNetworkReachabilityFlags##FlagName); \
- }
+#define GRPC_XMACRO_ITEM(methodName, FlagName) \
+- (BOOL)methodName { \
+ return !!(_flags & kSCNetworkReachabilityFlags ## FlagName); \
+}
#include "GRPCReachabilityFlagNames.xmacro.h"
#undef GRPC_XMACRO_ITEM
- (BOOL)isHostReachable {
- // Note: connectionOnDemand means it'll be reachable only if using the
- // CFSocketStream API or APIs on top of it.
- // connectionRequired means we can't tell until a connection is attempted
- // (e.g. for VPN on demand).
- return self.reachable && !self.interventionRequired &&
- !self.connectionOnDemand;
+ // Note: connectionOnDemand means it'll be reachable only if using the CFSocketStream API or APIs
+ // on top of it.
+ // connectionRequired means we can't tell until a connection is attempted (e.g. for VPN on
+ // demand).
+ return self.reachable && !self.interventionRequired && !self.connectionOnDemand;
}
- (NSString *)description {
@@ -80,9 +79,9 @@
/*
* For each flag, add its name to the array if it's ON. Example:
- if (self.isCell) {
- [activeOptions addObject:@"isCell"];
- }
+ if (self.isCell) {
+ [activeOptions addObject:@"isCell"];
+ }
*/
#define GRPC_XMACRO_ITEM(methodName, FlagName) \
@@ -92,14 +91,12 @@
#include "GRPCReachabilityFlagNames.xmacro.h"
#undef GRPC_XMACRO_ITEM
- return activeOptions.count == 0
- ? @"(none)"
- : [activeOptions componentsJoinedByString:@", "];
+ return activeOptions.count == 0 ? @"(none)" : [activeOptions componentsJoinedByString:@", "];
}
- (BOOL)isEqual:(id)object {
return [object isKindOfClass:[GRPCReachabilityFlags class]] &&
- _flags == ((GRPCReachabilityFlags *)object)->_flags;
+ _flags == ((GRPCReachabilityFlags *)object)->_flags;
}
- (NSUInteger)hash {
@@ -109,16 +106,15 @@
#pragma mark Connectivity Monitor
-// Assumes the third argument is a block that accepts a GRPCReachabilityFlags
-// object, and passes the received ones to it.
+// Assumes the third argument is a block that accepts a GRPCReachabilityFlags object, and passes the
+// received ones to it.
static void PassFlagsToContextInfoBlock(SCNetworkReachabilityRef target,
SCNetworkReachabilityFlags flags,
void *info) {
-#pragma unused(target)
- // This can be called many times with the same info. The info is retained by
- // SCNetworkReachability while this function is being executed.
- void (^handler)(GRPCReachabilityFlags *) =
- (__bridge void (^)(GRPCReachabilityFlags *))info;
+ #pragma unused (target)
+ // This can be called many times with the same info. The info is retained by SCNetworkReachability
+ // while this function is being executed.
+ void (^handler)(GRPCReachabilityFlags *) = (__bridge void (^)(GRPCReachabilityFlags *))info;
handler([[GRPCReachabilityFlags alloc] initWithFlags:flags]);
}
@@ -127,8 +123,7 @@ static void PassFlagsToContextInfoBlock(SCNetworkReachabilityRef target,
GRPCReachabilityFlags *_previousReachabilityFlags;
}
-- (nullable instancetype)initWithReachability:
- (nullable SCNetworkReachabilityRef)reachability {
+- (nullable instancetype)initWithReachability:(nullable SCNetworkReachabilityRef)reachability {
if (!reachability) {
return nil;
}
@@ -149,23 +144,23 @@ static void PassFlagsToContextInfoBlock(SCNetworkReachabilityRef target,
SCNetworkReachabilityRef reachability =
SCNetworkReachabilityCreateWithName(NULL, hostName);
- GRPCConnectivityMonitor *returnValue =
- [[self alloc] initWithReachability:reachability];
+ GRPCConnectivityMonitor *returnValue = [[self alloc] initWithReachability:reachability];
if (reachability) {
CFRelease(reachability);
}
return returnValue;
}
-- (void)handleLossWithHandler:(void (^)())handler
- wifiStatusChangeHandler:(nonnull void (^)())wifiStatusChangeHandler {
+- (void)handleLossWithHandler:(nullable void (^)())lossHandler
+ wifiStatusChangeHandler:(nullable void (^)())wifiStatusChangeHandler {
__weak typeof(self) weakSelf = self;
[self startListeningWithHandler:^(GRPCReachabilityFlags *flags) {
typeof(self) strongSelf = weakSelf;
if (strongSelf) {
- if (!flags.reachable) {
- handler();
- } else if (strongSelf->_previousReachabilityFlags &&
+ if (lossHandler && !flags.reachable) {
+ lossHandler();
+ } else if (wifiStatusChangeHandler &&
+ strongSelf->_previousReachabilityFlags &&
(flags.isWWAN ^
strongSelf->_previousReachabilityFlags.isWWAN)) {
wifiStatusChangeHandler();
@@ -176,19 +171,17 @@ static void PassFlagsToContextInfoBlock(SCNetworkReachabilityRef target,
}
- (void)startListeningWithHandler:(void (^)(GRPCReachabilityFlags *))handler {
- // Copy to ensure the handler block is in the heap (and so can't be
- // deallocated when this method returns).
+ // Copy to ensure the handler block is in the heap (and so can't be deallocated when this method
+ // returns).
void (^copiedHandler)(GRPCReachabilityFlags *) = [handler copy];
SCNetworkReachabilityContext context = {
- .version = 0,
- .info = (__bridge void *)copiedHandler,
- .retain = CFRetain,
- .release = CFRelease,
+ .version = 0,
+ .info = (__bridge void *)copiedHandler,
+ .retain = CFRetain,
+ .release = CFRelease,
};
- // The following will retain context.info, and release it when the callback is
- // set to NULL.
- SCNetworkReachabilitySetCallback(_reachabilityRef,
- PassFlagsToContextInfoBlock, &context);
+ // The following will retain context.info, and release it when the callback is set to NULL.
+ SCNetworkReachabilitySetCallback(_reachabilityRef, PassFlagsToContextInfoBlock, &context);
SCNetworkReachabilitySetDispatchQueue(_reachabilityRef, _queue);
}
diff --git a/src/objective-c/GRPCClient/private/GRPCHost.m b/src/objective-c/GRPCClient/private/GRPCHost.m
index dd0479083d..31065cbf01 100644
--- a/src/objective-c/GRPCClient/private/GRPCHost.m
+++ b/src/objective-c/GRPCClient/private/GRPCHost.m
@@ -33,9 +33,9 @@
#import "GRPCHost.h"
-#import <GRPCClient/GRPCCall.h>
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
+#import <GRPCClient/GRPCCall.h>
#ifdef GRPC_COMPILE_WITH_CRONET
#import <GRPCClient/GRPCCall+ChannelArg.h>
#import <GRPCClient/GRPCCall+Cronet.h>
@@ -48,8 +48,7 @@
NS_ASSUME_NONNULL_BEGIN
-// TODO(jcanizales): Generate the version in a standalone header, from
-// templates. Like
+// TODO(jcanizales): Generate the version in a standalone header, from templates. Like
// templates/src/core/surface/version.c.template .
#define GRPC_OBJC_VERSION_STRING @"1.0.1"
@@ -62,8 +61,7 @@ static NSMutableDictionary *kHostCache;
static GRPCConnectivityMonitor *connectivityMonitor = nil;
@implementation GRPCHost {
- // TODO(mlumish): Investigate whether caching channels with strong links is a
- // good idea.
+ // TODO(mlumish): Investigate whether caching channels with strong links is a good idea.
GRPCChannel *_channel;
}
@@ -83,13 +81,11 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil;
return nil;
}
- // To provide a default port, we try to interpret the address. If it's just a
- // host name without scheme and without port, we'll use port 443. If it has a
- // scheme, we pass it untouched to the C gRPC library.
- // TODO(jcanizales): Add unit tests for the types of addresses we want to let
- // pass untouched.
- NSURL *hostURL =
- [NSURL URLWithString:[@"https://" stringByAppendingString:address]];
+ // To provide a default port, we try to interpret the address. If it's just a host name without
+ // scheme and without port, we'll use port 443. If it has a scheme, we pass it untouched to the C
+ // gRPC library.
+ // TODO(jcanizales): Add unit tests for the types of addresses we want to let pass untouched.
+ NSURL *hostURL = [NSURL URLWithString:[@"https://" stringByAppendingString:address]];
if (hostURL.host && !hostURL.port) {
address = [hostURL.host stringByAppendingString:@":443"];
}
@@ -99,7 +95,6 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil;
dispatch_once(&cacheInitialization, ^{
kHostCache = [NSMutableDictionary dictionary];
});
-
@synchronized(kHostCache) {
GRPCHost *cachedHost = kHostCache[address];
if (cachedHost) {
@@ -137,7 +132,7 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil;
}
+ (void)resetAllHostSettings {
- @synchronized(kHostCache) {
+ @synchronized (kHostCache) {
kHostCache = [NSMutableDictionary dictionary];
}
}
@@ -163,19 +158,16 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil;
static NSError *kDefaultRootsError;
static dispatch_once_t loading;
dispatch_once(&loading, ^{
- NSString *defaultPath = @"gRPCCertificates.bundle/roots"; // .pem
- // Do not use NSBundle.mainBundle, as it's nil for tests of library
- // projects.
+ NSString *defaultPath = @"gRPCCertificates.bundle/roots"; // .pem
+ // Do not use NSBundle.mainBundle, as it's nil for tests of library projects.
NSBundle *bundle = [NSBundle bundleForClass:self.class];
NSString *path = [bundle pathForResource:defaultPath ofType:@"pem"];
NSError *error;
- // Files in PEM format can have non-ASCII characters in their comments (e.g.
- // for the name of the issuer). Load them as UTF8 and produce an ASCII
- // equivalent.
- NSString *contentInUTF8 =
- [NSString stringWithContentsOfFile:path
- encoding:NSUTF8StringEncoding
- error:&error];
+ // Files in PEM format can have non-ASCII characters in their comments (e.g. for the name of the
+ // issuer). Load them as UTF8 and produce an ASCII equivalent.
+ NSString *contentInUTF8 = [NSString stringWithContentsOfFile:path
+ encoding:NSUTF8StringEncoding
+ error:&error];
if (contentInUTF8 == nil) {
kDefaultRootsError = error;
return;
@@ -193,15 +185,11 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil;
if (errorPtr) {
*errorPtr = kDefaultRootsError;
}
- NSAssert(kDefaultRootsASCII,
- @"Could not read gRPCCertificates.bundle/roots.pem. This file, "
- "with the root certificates, is needed to establish secure "
- "(TLS) connections. "
- "Because the file is distributed with the gRPC library, this "
- "error is usually a sign "
- "that the library wasn't configured correctly for your "
- "project. Error: %@",
- kDefaultRootsError);
+ NSAssert(kDefaultRootsASCII, @"Could not read gRPCCertificates.bundle/roots.pem. This file, "
+ "with the root certificates, is needed to establish secure (TLS) connections. "
+ "Because the file is distributed with the gRPC library, this error is usually a sign "
+ "that the library wasn't configured correctly for your project. Error: %@",
+ kDefaultRootsError);
return NO;
}
rootsASCII = kDefaultRootsASCII;
@@ -212,12 +200,10 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil;
creds = grpc_ssl_credentials_create(rootsASCII.bytes, NULL, NULL);
} else {
grpc_ssl_pem_key_cert_pair key_cert_pair;
- NSData *privateKeyASCII =
- [pemPrivateKey dataUsingEncoding:NSASCIIStringEncoding
- allowLossyConversion:YES];
- NSData *certChainASCII =
- [pemCertChain dataUsingEncoding:NSASCIIStringEncoding
- allowLossyConversion:YES];
+ NSData *privateKeyASCII = [pemPrivateKey dataUsingEncoding:NSASCIIStringEncoding
+ allowLossyConversion:YES];
+ NSData *certChainASCII = [pemCertChain dataUsingEncoding:NSASCIIStringEncoding
+ allowLossyConversion:YES];
key_cert_pair.private_key = privateKeyASCII.bytes;
key_cert_pair.cert_chain = certChainASCII.bytes;
creds = grpc_ssl_credentials_create(rootsASCII.bytes, &key_cert_pair, NULL);
@@ -237,8 +223,7 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil;
NSMutableDictionary *args = [NSMutableDictionary dictionary];
// TODO(jcanizales): Add OS and device information (see
- // https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#user-agents
- // ).
+ // https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#user-agents ).
NSString *userAgent = @"grpc-objc/" GRPC_OBJC_VERSION_STRING;
if (_userAgentPrefix) {
userAgent = [_userAgentPrefix stringByAppendingFormat:@" %@", userAgent];
@@ -252,7 +237,7 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil;
if (_responseSizeLimitOverride) {
args[@GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH] = _responseSizeLimitOverride;
}
- // Use 10000ms initial backoff time for correct behavior on bad/slow networks
+ // Use 10000ms initial backoff time for correct behavior on bad/slow networks
args[@GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS] = @10000;
return args;
}
@@ -266,15 +251,12 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil;
GRPCChannel *channel;
@synchronized(self) {
if (_channelCreds == nil) {
- [self setTLSPEMRootCerts:nil
- withPrivateKey:nil
- withCertChain:nil
- error:nil];
+ [self setTLSPEMRootCerts:nil withPrivateKey:nil withCertChain:nil error:nil];
}
#ifdef GRPC_COMPILE_WITH_CRONET
if (useCronet) {
- channel =
- [GRPCChannel secureCronetChannelWithHost:_address channelArgs:args];
+ channel = [GRPCChannel secureCronetChannelWithHost:_address
+ channelArgs:args];
} else
#endif
{
@@ -290,8 +272,7 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil;
}
- (NSString *)hostName {
- // TODO(jcanizales): Default to nil instead of _address when Issue #2635 is
- // clarified.
+ // TODO(jcanizales): Default to nil instead of _address when Issue #2635 is clarified.
return _hostNameOverride ?: _address;
}
diff --git a/src/objective-c/GRPCClient/private/GRPCRequestHeaders.m b/src/objective-c/GRPCClient/private/GRPCRequestHeaders.m
index 58c6032e80..c6a03c145e 100644
--- a/src/objective-c/GRPCClient/private/GRPCRequestHeaders.m
+++ b/src/objective-c/GRPCClient/private/GRPCRequestHeaders.m
@@ -38,10 +38,9 @@
#import "NSDictionary+GRPC.h"
// Used by the setter.
-static void CheckIsNonNilASCII(NSString *name, NSString *value) {
+static void CheckIsNonNilASCII(NSString *name, NSString* value) {
if (!value) {
- [NSException raise:NSInvalidArgumentException
- format:@"%@ cannot be nil", name];
+ [NSException raise:NSInvalidArgumentException format:@"%@ cannot be nil", name];
}
if (![value canBeConvertedToEncoding:NSASCIIStringEncoding]) {
[NSException raise:NSInvalidArgumentException
@@ -53,20 +52,15 @@ static void CheckIsNonNilASCII(NSString *name, NSString *value) {
static void CheckKeyValuePairIsValid(NSString *key, id value) {
if ([key hasSuffix:@"-bin"]) {
if (![value isKindOfClass:NSData.class]) {
- [NSException
- raise:NSInvalidArgumentException
- format:@"Expected NSData value for header %@ ending in \"-bin\", "
- @"instead got %@",
- key, value];
+ [NSException raise:NSInvalidArgumentException
+ format:@"Expected NSData value for header %@ ending in \"-bin\", "
+ @"instead got %@", key, value];
}
} else {
if (![value isKindOfClass:NSString.class]) {
- [NSException
- raise:NSInvalidArgumentException
- format:
- @"Expected NSString value for header %@ not ending in \"-bin\", "
- @"instead got %@",
- key, value];
+ [NSException raise:NSInvalidArgumentException
+ format:@"Expected NSString value for header %@ not ending in \"-bin\", "
+ @"instead got %@", key, value];
}
CheckIsNonNilASCII(@"Text header value", (NSString *)value);
}
@@ -74,10 +68,9 @@ static void CheckKeyValuePairIsValid(NSString *key, id value) {
@implementation GRPCRequestHeaders {
__weak GRPCCall *_call;
- // The NSMutableDictionary superclass doesn't hold any storage (so that people
- // can implement their own in subclasses). As that's not the reason we're
- // subclassing, we just delegate storage to the default NSMutableDictionary
- // subclass returned by the cluster (e.g. __NSDictionaryM on iOS 9).
+ // The NSMutableDictionary superclass doesn't hold any storage (so that people can implement their
+ // own in subclasses). As that's not the reason we're subclassing, we just delegate storage to the
+ // default NSMutableDictionary subclass returned by the cluster (e.g. __NSDictionaryM on iOS 9).
NSMutableDictionary *_delegate;
}
@@ -98,8 +91,7 @@ static void CheckKeyValuePairIsValid(NSString *key, id value) {
}
// Designated initializer
-- (instancetype)initWithCall:(GRPCCall *)call
- storage:(NSMutableDictionary *)storage {
+- (instancetype)initWithCall:(GRPCCall *)call storage:(NSMutableDictionary *)storage {
// TODO(jcanizales): Throw if call or storage are nil.
if ((self = [super init])) {
_call = call;
@@ -108,10 +100,9 @@ static void CheckKeyValuePairIsValid(NSString *key, id value) {
return self;
}
-- (instancetype)
-initWithObjects:(const id _Nonnull __unsafe_unretained *)objects
- forKeys:(const id<NSCopying> _Nonnull __unsafe_unretained *)keys
- count:(NSUInteger)cnt {
+- (instancetype)initWithObjects:(const id _Nonnull __unsafe_unretained *)objects
+ forKeys:(const id<NSCopying> _Nonnull __unsafe_unretained *)keys
+ count:(NSUInteger)cnt {
return [self init];
}
@@ -143,7 +134,7 @@ initWithObjects:(const id _Nonnull __unsafe_unretained *)objects
return _delegate.count;
}
-- (NSEnumerator *_Nonnull)keyEnumerator {
+- (NSEnumerator * _Nonnull)keyEnumerator {
return [_delegate keyEnumerator];
}
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
index bbda9f2f64..627b6aa86d 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
@@ -34,27 +34,27 @@
#import "GRPCWrappedCall.h"
#import <Foundation/Foundation.h>
-#include <grpc/byte_buffer.h>
#include <grpc/grpc.h>
+#include <grpc/byte_buffer.h>
#include <grpc/support/alloc.h>
#import "GRPCCompletionQueue.h"
#import "GRPCHost.h"
-#import "NSData+GRPC.h"
#import "NSDictionary+GRPC.h"
+#import "NSData+GRPC.h"
#import "NSError+GRPC.h"
@implementation GRPCOperation {
- @protected
- // Most operation subclasses don't set any flags in the grpc_op, and rely on
- // the flag member being initialized to zero.
+@protected
+ // Most operation subclasses don't set any flags in the grpc_op, and rely on the flag member being
+ // initialized to zero.
grpc_op _op;
- void (^_handler)();
+ void(^_handler)();
}
- (void)finish {
if (_handler) {
- void (^handler)() = _handler;
+ void(^handler)() = _handler;
_handler = nil;
handler();
}
@@ -101,8 +101,7 @@
- (instancetype)initWithMessage:(NSData *)message handler:(void (^)())handler {
if (!message) {
- [NSException raise:NSInvalidArgumentException
- format:@"message cannot be nil"];
+ [NSException raise:NSInvalidArgumentException format:@"message cannot be nil"];
}
if (self = [super init]) {
_op.op = GRPC_OP_SEND_MESSAGE;
@@ -138,11 +137,11 @@
grpc_metadata_array _headers;
}
-- (instancetype)init {
+- (instancetype) init {
return [self initWithHandler:nil];
}
-- (instancetype)initWithHandler:(void (^)(NSDictionary *))handler {
+- (instancetype) initWithHandler:(void (^)(NSDictionary *))handler {
if (self = [super init]) {
_op.op = GRPC_OP_RECV_INITIAL_METADATA;
grpc_metadata_array_init(&_headers);
@@ -153,7 +152,7 @@
_handler = ^{
__strong typeof(self) strongSelf = weakSelf;
NSDictionary *metadata = [NSDictionary
- grpc_dictionaryFromMetadataArray:strongSelf->_headers];
+ grpc_dictionaryFromMetadataArray:strongSelf->_headers];
handler(metadata);
};
}
@@ -167,7 +166,7 @@
@end
-@implementation GRPCOpRecvMessage {
+@implementation GRPCOpRecvMessage{
grpc_byte_buffer *_receivedMessage;
}
@@ -193,18 +192,18 @@
@end
-@implementation GRPCOpRecvStatus {
+@implementation GRPCOpRecvStatus{
grpc_status_code _statusCode;
char *_details;
size_t _detailsCapacity;
grpc_metadata_array _trailers;
}
-- (instancetype)init {
+- (instancetype) init {
return [self initWithHandler:nil];
}
-- (instancetype)initWithHandler:(void (^)(NSError *, NSDictionary *))handler {
+- (instancetype) initWithHandler:(void (^)(NSError *, NSDictionary *))handler {
if (self = [super init]) {
_op.op = GRPC_OP_RECV_STATUS_ON_CLIENT;
_op.data.recv_status_on_client.status = &_statusCode;
@@ -217,11 +216,10 @@
__weak typeof(self) weakSelf = self;
_handler = ^{
__strong typeof(self) strongSelf = weakSelf;
- NSError *error =
- [NSError grpc_errorFromStatusCode:strongSelf->_statusCode
- details:strongSelf->_details];
+ NSError *error = [NSError grpc_errorFromStatusCode:strongSelf->_statusCode
+ details:strongSelf->_details];
NSDictionary *trailers = [NSDictionary
- grpc_dictionaryFromMetadataArray:strongSelf->_trailers];
+ grpc_dictionaryFromMetadataArray:strongSelf->_trailers];
handler(error, trailers);
};
}
@@ -247,21 +245,20 @@
return [self initWithHost:nil path:nil];
}
-- (instancetype)initWithHost:(NSString *)host path:(NSString *)path {
+- (instancetype)initWithHost:(NSString *)host
+ path:(NSString *)path {
if (!path || !host) {
[NSException raise:NSInvalidArgumentException
format:@"path and host cannot be nil."];
}
if (self = [super init]) {
- // Each completion queue consumes one thread. There's a trade to be made
- // between creating and consuming too many threads and having contention of
- // multiple calls in a single completion queue. Currently we use a singleton
- // queue.
+ // Each completion queue consumes one thread. There's a trade to be made between creating and
+ // consuming too many threads and having contention of multiple calls in a single completion
+ // queue. Currently we use a singleton queue.
_queue = [GRPCCompletionQueue completionQueue];
- _call = [[GRPCHost hostWithAddress:host] unmanagedCallWithPath:path
- completionQueue:_queue];
+ _call = [[GRPCHost hostWithAddress:host] unmanagedCallWithPath:path completionQueue:_queue];
if (_call == NULL) {
return nil;
}
@@ -273,35 +270,32 @@
[self startBatchWithOperations:operations errorHandler:nil];
}
-- (void)startBatchWithOperations:(NSArray *)operations
- errorHandler:(void (^)())errorHandler {
+- (void)startBatchWithOperations:(NSArray *)operations errorHandler:(void (^)())errorHandler {
size_t nops = operations.count;
grpc_op *ops_array = gpr_malloc(nops * sizeof(grpc_op));
size_t i = 0;
for (GRPCOperation *operation in operations) {
ops_array[i++] = operation.op;
}
- grpc_call_error error = grpc_call_start_batch(
- _call, ops_array, nops, (__bridge_retained void *)(^(bool success) {
- if (!success) {
- if (errorHandler) {
- errorHandler();
- } else {
- return;
- }
- }
- for (GRPCOperation *operation in operations) {
- [operation finish];
- }
- }),
- NULL);
+ grpc_call_error error = grpc_call_start_batch(_call, ops_array, nops,
+ (__bridge_retained void *)(^(bool success){
+ if (!success) {
+ if (errorHandler) {
+ errorHandler();
+ } else {
+ return;
+ }
+ }
+ for (GRPCOperation *operation in operations) {
+ [operation finish];
+ }
+ }), NULL);
gpr_free(ops_array);
if (error != GRPC_CALL_OK) {
[NSException raise:NSInternalInconsistencyException
- format:@"A precondition for calling grpc_call_start_batch "
- @"wasn't met. Error %i",
- error];
+ format:@"A precondition for calling grpc_call_start_batch wasn't met. Error %i",
+ error];
}
}
diff --git a/src/objective-c/GRPCClient/private/NSError+GRPC.h b/src/objective-c/GRPCClient/private/NSError+GRPC.h
index a9a321470c..e0c1efc1f9 100644
--- a/src/objective-c/GRPCClient/private/NSError+GRPC.h
+++ b/src/objective-c/GRPCClient/private/NSError+GRPC.h
@@ -36,9 +36,8 @@
@interface NSError (GRPC)
/**
- * Returns nil if the status code is OK. Otherwise, a NSError whose code is one
- * of |GRPCErrorCode| and whose domain is |kGRPCErrorDomain|.
+ * Returns nil if the status code is OK. Otherwise, a NSError whose code is one of |GRPCErrorCode|
+ * and whose domain is |kGRPCErrorDomain|.
*/
-+ (instancetype)grpc_errorFromStatusCode:(grpc_status_code)statusCode
- details:(char *)details;
++ (instancetype)grpc_errorFromStatusCode:(grpc_status_code)statusCode details:(char *)details;
@end
diff --git a/src/php/lib/Grpc/AbstractCall.php b/src/php/lib/Grpc/AbstractCall.php
index e24be3fc76..c4d56790f7 100644
--- a/src/php/lib/Grpc/AbstractCall.php
+++ b/src/php/lib/Grpc/AbstractCall.php
@@ -35,7 +35,7 @@
namespace Grpc;
/**
- * Class AbstractCall
+ * Class AbstractCall.
* @package Grpc
*/
abstract class AbstractCall
@@ -121,13 +121,14 @@ abstract class AbstractCall
}
/**
- * Serialize a message to the protobuf binary format
+ * Serialize a message to the protobuf binary format.
*
* @param mixed $data The Protobuf message
*
* @return string The protobuf binary format
*/
- protected function serializeMessage($data) {
+ protected function serializeMessage($data)
+ {
// Proto3 implementation
if (method_exists($data, 'encode')) {
return $data->encode();
@@ -155,6 +156,7 @@ abstract class AbstractCall
list($className, $deserializeFunc) = $this->deserialize;
$obj = new $className();
$obj->$deserializeFunc($value);
+
return $obj;
}
diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php
index 36d94cae2c..d0baeae955 100644
--- a/src/php/lib/Grpc/BaseStub.php
+++ b/src/php/lib/Grpc/BaseStub.php
@@ -252,7 +252,7 @@ class BaseStub
*
* @param string $method The name of the method to call
* @param array $arguments An array or Traversable of arguments to stream to the
- * server
+ * server
* @param callable $deserialize A function that deserializes the response
* @param array $metadata A metadata map to send to the server
*
diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php
index 3d62e86ab0..d201915d66 100755
--- a/src/php/tests/interop/interop_client.php
+++ b/src/php/tests/interop/interop_client.php
@@ -477,10 +477,10 @@ function statusCodeAndMessage($stub)
list($result, $status) = $call->wait();
hardAssert($status->code === 2,
- 'Received unexpected UnaryCall status code: ' .
+ 'Received unexpected UnaryCall status code: '.
$status->code);
hardAssert($status->details === 'test status message',
- 'Received unexpected UnaryCall status details: ' .
+ 'Received unexpected UnaryCall status details: '.
$status->details);
$streaming_call = $stub->FullDuplexCall();
@@ -493,10 +493,10 @@ function statusCodeAndMessage($stub)
$status = $streaming_call->getStatus();
hardAssert($status->code === 2,
- 'Received unexpected FullDuplexCall status code: ' .
+ 'Received unexpected FullDuplexCall status code: '.
$status->code);
hardAssert($status->details === 'test status message',
- 'Received unexpected FullDuplexCall status details: ' .
+ 'Received unexpected FullDuplexCall status details: '.
$status->details);
}
diff --git a/src/php/tests/unit_tests/CallTest.php b/src/php/tests/unit_tests/CallTest.php
index 1205f0cd8e..f60eb96730 100644
--- a/src/php/tests/unit_tests/CallTest.php
+++ b/src/php/tests/unit_tests/CallTest.php
@@ -94,7 +94,7 @@ class CallTest extends PHPUnit_Framework_TestCase
$batch = [
Grpc\OP_SEND_INITIAL_METADATA => ['key1' => ['value1'],
'key2' => ['value2',
- 'value3'], ],
+ 'value3', ], ],
];
$result = $this->call->startBatch($batch);
$this->assertTrue($result->send_metadata);
diff --git a/src/proto/grpc/lb/v1/load_balancer.options b/src/proto/grpc/lb/v1/load_balancer.options
index a9398d5f47..7fbd44b9de 100644
--- a/src/proto/grpc/lb/v1/load_balancer.options
+++ b/src/proto/grpc/lb/v1/load_balancer.options
@@ -1,6 +1,5 @@
grpc.lb.v1.InitialLoadBalanceRequest.name max_size:128
-grpc.lb.v1.InitialLoadBalanceResponse.client_config max_size:64
grpc.lb.v1.InitialLoadBalanceResponse.load_balancer_delegate max_size:64
grpc.lb.v1.Server.ip_address max_size:16
-grpc.lb.v1.Server.load_balance_token max_size:65
+grpc.lb.v1.Server.load_balance_token max_size:50
load_balancer.proto no_unions:true
diff --git a/src/proto/grpc/lb/v1/load_balancer.proto b/src/proto/grpc/lb/v1/load_balancer.proto
index 210fba1323..44a5150a7e 100644
--- a/src/proto/grpc/lb/v1/load_balancer.proto
+++ b/src/proto/grpc/lb/v1/load_balancer.proto
@@ -63,7 +63,8 @@ message LoadBalanceRequest {
}
message InitialLoadBalanceRequest {
- // Name of load balanced service (IE, service.grpc.gslb.google.com)
+ // Name of load balanced service (IE, service.grpc.gslb.google.com). Its
+ // length should be less than 256 bytes.
string name = 1;
}
@@ -95,7 +96,8 @@ message InitialLoadBalanceResponse {
// This is an application layer redirect that indicates the client should use
// the specified server for load balancing. When this field is non-empty in
// the response, the client should open a separate connection to the
- // load_balancer_delegate and call the BalanceLoad method.
+ // load_balancer_delegate and call the BalanceLoad method. Its length should
+ // be less than 64 bytes.
string load_balancer_delegate = 1;
// This interval defines how often the client should send the client stats
@@ -130,6 +132,8 @@ message Server {
// frontend requests for that pick must include the token in its initial
// metadata. The token is used by the backend to verify the request and to
// allow the backend to report load to the gRPC LB system.
+ //
+ // Its length is variable but less than 50 bytes.
string load_balance_token = 3;
// Indicates whether this particular request should be dropped by the client
diff --git a/src/proto/grpc/reflection/v1alpha/reflection.proto b/src/proto/grpc/reflection/v1alpha/reflection.proto
index 276ff0e255..01e582cc8a 100644
--- a/src/proto/grpc/reflection/v1alpha/reflection.proto
+++ b/src/proto/grpc/reflection/v1alpha/reflection.proto
@@ -59,8 +59,8 @@ message ServerReflectionRequest {
// message type with the given field number.
ExtensionRequest file_containing_extension = 5;
- // Finds the tag numbers used by all known extensions of extendee_type, and
- // appends them to ExtensionNumberResponse in an undefined order.
+ // Finds the tag numbers used by all known extensions of the given message
+ // type, and appends them to ExtensionNumberResponse in an undefined order.
// Its corresponding method is best-effort: it's not guaranteed that the
// reflection service will implement this method, and it's not guaranteed
// that this method will provide all extensions. Returns
diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py
index 1ad423909f..8f4b3bc9b2 100644
--- a/src/python/grpcio/grpc_core_dependencies.py
+++ b/src/python/grpcio/grpc_core_dependencies.py
@@ -181,6 +181,7 @@ CORE_SOURCE_FILES = [
'src/core/lib/transport/metadata.c',
'src/core/lib/transport/metadata_batch.c',
'src/core/lib/transport/method_config.c',
+ 'src/core/lib/transport/pid_controller.c',
'src/core/lib/transport/static_metadata.c',
'src/core/lib/transport/timeout_encoding.c',
'src/core/lib/transport/transport.c',
diff --git a/src/python/grpcio_health_checking/.gitignore b/src/python/grpcio_health_checking/.gitignore
index 85af466886..432c3194f0 100644
--- a/src/python/grpcio_health_checking/.gitignore
+++ b/src/python/grpcio_health_checking/.gitignore
@@ -1,5 +1,6 @@
*.proto
*_pb2.py
+*_pb2_grpc.py
build/
grpcio_health_checking.egg-info/
dist/
diff --git a/src/python/grpcio_tests/.gitignore b/src/python/grpcio_tests/.gitignore
index fc620135dc..dcba283a8c 100644
--- a/src/python/grpcio_tests/.gitignore
+++ b/src/python/grpcio_tests/.gitignore
@@ -1,4 +1,5 @@
proto/
src/
*_pb2.py
+*_pb2_grpc.py
*.egg-info/
diff --git a/src/python/grpcio_tests/setup.py b/src/python/grpcio_tests/setup.py
index 7384206602..01d5fa875b 100644
--- a/src/python/grpcio_tests/setup.py
+++ b/src/python/grpcio_tests/setup.py
@@ -80,8 +80,14 @@ PACKAGE_DATA = {
'credentials/server1.key',
'credentials/server1.pem',
],
- 'tests.protoc_plugin': [
- 'protoc_plugin_test.proto',
+ 'tests.protoc_plugin.protos.invocation_testing': [
+ 'same.proto',
+ ],
+ 'tests.protoc_plugin.protos.invocation_testing.split_messages': [
+ 'messages.proto',
+ ],
+ 'tests.protoc_plugin.protos.invocation_testing.split_services': [
+ 'services.proto',
],
'tests.unit': [
'credentials/ca.pem',
diff --git a/src/python/grpcio_tests/tests/_loader.py b/src/python/grpcio_tests/tests/_loader.py
index c2f097f6c6..621bedc7bb 100644
--- a/src/python/grpcio_tests/tests/_loader.py
+++ b/src/python/grpcio_tests/tests/_loader.py
@@ -84,11 +84,9 @@ class Loader(object):
along.
"""
for importer, module_name, is_package in (
- pkgutil.iter_modules(package_paths)):
+ pkgutil.walk_packages(package_paths)):
module = importer.find_module(module_name).load_module(module_name)
self.visit_module(module)
- if is_package:
- self.walk_packages(module.__path__)
def visit_module(self, module):
"""Visits the module, adding discovered tests to the test suite.
diff --git a/src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py b/src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py
new file mode 100644
index 0000000000..089366a8c7
--- /dev/null
+++ b/src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py
@@ -0,0 +1,304 @@
+# Copyright 2016, 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.
+
+import collections
+from concurrent import futures
+import contextlib
+import distutils.spawn
+import errno
+import importlib
+import os
+import os.path
+import pkgutil
+import shutil
+import subprocess
+import sys
+import tempfile
+import threading
+import unittest
+
+import grpc
+from grpc.tools import protoc
+from tests.unit.framework.common import test_constants
+
+_MESSAGES_IMPORT = b'import "messages.proto";'
+
+@contextlib.contextmanager
+def _system_path(path):
+ old_system_path = sys.path[:]
+ sys.path = sys.path[0:1] + path + sys.path[1:]
+ yield
+ sys.path = old_system_path
+
+
+class DummySplitServicer(object):
+
+ def __init__(self, request_class, response_class):
+ self.request_class = request_class
+ self.response_class = response_class
+
+ def Call(self, request, context):
+ return self.response_class()
+
+
+class SeparateTestMixin(object):
+
+ def testImportAttributes(self):
+ with _system_path([self.python_out_directory]):
+ pb2 = importlib.import_module(self.pb2_import)
+ pb2.Request
+ pb2.Response
+ if self.should_find_services_in_pb2:
+ pb2.TestServiceServicer
+ else:
+ with self.assertRaises(AttributeError):
+ pb2.TestServiceServicer
+
+ with _system_path([self.grpc_python_out_directory]):
+ pb2_grpc = importlib.import_module(self.pb2_grpc_import)
+ pb2_grpc.TestServiceServicer
+ with self.assertRaises(AttributeError):
+ pb2_grpc.Request
+ with self.assertRaises(AttributeError):
+ pb2_grpc.Response
+
+ def testCall(self):
+ with _system_path([self.python_out_directory]):
+ pb2 = importlib.import_module(self.pb2_import)
+ with _system_path([self.grpc_python_out_directory]):
+ pb2_grpc = importlib.import_module(self.pb2_grpc_import)
+ server = grpc.server(
+ futures.ThreadPoolExecutor(max_workers=test_constants.POOL_SIZE))
+ pb2_grpc.add_TestServiceServicer_to_server(
+ DummySplitServicer(
+ pb2.Request, pb2.Response), server)
+ port = server.add_insecure_port('[::]:0')
+ server.start()
+ channel = grpc.insecure_channel('localhost:{}'.format(port))
+ stub = pb2_grpc.TestServiceStub(channel)
+ request = pb2.Request()
+ expected_response = pb2.Response()
+ response = stub.Call(request)
+ self.assertEqual(expected_response, response)
+
+
+class CommonTestMixin(object):
+
+ def testImportAttributes(self):
+ with _system_path([self.python_out_directory]):
+ pb2 = importlib.import_module(self.pb2_import)
+ pb2.Request
+ pb2.Response
+ if self.should_find_services_in_pb2:
+ pb2.TestServiceServicer
+ else:
+ with self.assertRaises(AttributeError):
+ pb2.TestServiceServicer
+
+ with _system_path([self.grpc_python_out_directory]):
+ pb2_grpc = importlib.import_module(self.pb2_grpc_import)
+ pb2_grpc.TestServiceServicer
+ with self.assertRaises(AttributeError):
+ pb2_grpc.Request
+ with self.assertRaises(AttributeError):
+ pb2_grpc.Response
+
+ def testCall(self):
+ with _system_path([self.python_out_directory]):
+ pb2 = importlib.import_module(self.pb2_import)
+ with _system_path([self.grpc_python_out_directory]):
+ pb2_grpc = importlib.import_module(self.pb2_grpc_import)
+ server = grpc.server(
+ futures.ThreadPoolExecutor(max_workers=test_constants.POOL_SIZE))
+ pb2_grpc.add_TestServiceServicer_to_server(
+ DummySplitServicer(
+ pb2.Request, pb2.Response), server)
+ port = server.add_insecure_port('[::]:0')
+ server.start()
+ channel = grpc.insecure_channel('localhost:{}'.format(port))
+ stub = pb2_grpc.TestServiceStub(channel)
+ request = pb2.Request()
+ expected_response = pb2.Response()
+ response = stub.Call(request)
+ self.assertEqual(expected_response, response)
+
+
+class SameSeparateTest(unittest.TestCase, SeparateTestMixin):
+
+ def setUp(self):
+ same_proto_contents = pkgutil.get_data(
+ 'tests.protoc_plugin.protos.invocation_testing', 'same.proto')
+ self.directory = tempfile.mkdtemp(suffix='same_separate', dir='.')
+ self.proto_directory = os.path.join(self.directory, 'proto_path')
+ self.python_out_directory = os.path.join(self.directory, 'python_out')
+ self.grpc_python_out_directory = os.path.join(self.directory, 'grpc_python_out')
+ os.makedirs(self.proto_directory)
+ os.makedirs(self.python_out_directory)
+ os.makedirs(self.grpc_python_out_directory)
+ same_proto_file = os.path.join(self.proto_directory, 'same_separate.proto')
+ open(same_proto_file, 'wb').write(same_proto_contents)
+ protoc_result = protoc.main([
+ '',
+ '--proto_path={}'.format(self.proto_directory),
+ '--python_out={}'.format(self.python_out_directory),
+ '--grpc_python_out={}'.format(self.grpc_python_out_directory),
+ same_proto_file,
+ ])
+ if protoc_result != 0:
+ raise Exception("unexpected protoc error")
+ open(os.path.join(self.grpc_python_out_directory, '__init__.py'), 'w').write('')
+ open(os.path.join(self.python_out_directory, '__init__.py'), 'w').write('')
+ self.pb2_import = 'same_separate_pb2'
+ self.pb2_grpc_import = 'same_separate_pb2_grpc'
+ self.should_find_services_in_pb2 = False
+
+ def tearDown(self):
+ shutil.rmtree(self.directory)
+
+
+class SameCommonTest(unittest.TestCase, CommonTestMixin):
+
+ def setUp(self):
+ same_proto_contents = pkgutil.get_data(
+ 'tests.protoc_plugin.protos.invocation_testing', 'same.proto')
+ self.directory = tempfile.mkdtemp(suffix='same_common', dir='.')
+ self.proto_directory = os.path.join(self.directory, 'proto_path')
+ self.python_out_directory = os.path.join(self.directory, 'python_out')
+ self.grpc_python_out_directory = self.python_out_directory
+ os.makedirs(self.proto_directory)
+ os.makedirs(self.python_out_directory)
+ same_proto_file = os.path.join(self.proto_directory, 'same_common.proto')
+ open(same_proto_file, 'wb').write(same_proto_contents)
+ protoc_result = protoc.main([
+ '',
+ '--proto_path={}'.format(self.proto_directory),
+ '--python_out={}'.format(self.python_out_directory),
+ '--grpc_python_out={}'.format(self.grpc_python_out_directory),
+ same_proto_file,
+ ])
+ if protoc_result != 0:
+ raise Exception("unexpected protoc error")
+ open(os.path.join(self.python_out_directory, '__init__.py'), 'w').write('')
+ self.pb2_import = 'same_common_pb2'
+ self.pb2_grpc_import = 'same_common_pb2_grpc'
+ self.should_find_services_in_pb2 = True
+
+ def tearDown(self):
+ shutil.rmtree(self.directory)
+
+
+class SplitCommonTest(unittest.TestCase, CommonTestMixin):
+
+ def setUp(self):
+ services_proto_contents = pkgutil.get_data(
+ 'tests.protoc_plugin.protos.invocation_testing.split_services',
+ 'services.proto')
+ messages_proto_contents = pkgutil.get_data(
+ 'tests.protoc_plugin.protos.invocation_testing.split_messages',
+ 'messages.proto')
+ self.directory = tempfile.mkdtemp(suffix='split_common', dir='.')
+ self.proto_directory = os.path.join(self.directory, 'proto_path')
+ self.python_out_directory = os.path.join(self.directory, 'python_out')
+ self.grpc_python_out_directory = self.python_out_directory
+ os.makedirs(self.proto_directory)
+ os.makedirs(self.python_out_directory)
+ services_proto_file = os.path.join(self.proto_directory,
+ 'split_common_services.proto')
+ messages_proto_file = os.path.join(self.proto_directory,
+ 'split_common_messages.proto')
+ open(services_proto_file, 'wb').write(services_proto_contents.replace(
+ _MESSAGES_IMPORT,
+ b'import "split_common_messages.proto";'
+ ))
+ open(messages_proto_file, 'wb').write(messages_proto_contents)
+ protoc_result = protoc.main([
+ '',
+ '--proto_path={}'.format(self.proto_directory),
+ '--python_out={}'.format(self.python_out_directory),
+ '--grpc_python_out={}'.format(self.python_out_directory),
+ services_proto_file,
+ messages_proto_file,
+ ])
+ if protoc_result != 0:
+ raise Exception("unexpected protoc error")
+ open(os.path.join(self.python_out_directory, '__init__.py'), 'w').write('')
+ self.pb2_import = 'split_common_messages_pb2'
+ self.pb2_grpc_import = 'split_common_services_pb2_grpc'
+ self.should_find_services_in_pb2 = False
+
+ def tearDown(self):
+ shutil.rmtree(self.directory)
+
+
+class SplitSeparateTest(unittest.TestCase, SeparateTestMixin):
+
+ def setUp(self):
+ services_proto_contents = pkgutil.get_data(
+ 'tests.protoc_plugin.protos.invocation_testing.split_services',
+ 'services.proto')
+ messages_proto_contents = pkgutil.get_data(
+ 'tests.protoc_plugin.protos.invocation_testing.split_messages',
+ 'messages.proto')
+ self.directory = tempfile.mkdtemp(suffix='split_separate', dir='.')
+ self.proto_directory = os.path.join(self.directory, 'proto_path')
+ self.python_out_directory = os.path.join(self.directory, 'python_out')
+ self.grpc_python_out_directory = os.path.join(self.directory, 'grpc_python_out')
+ os.makedirs(self.proto_directory)
+ os.makedirs(self.python_out_directory)
+ os.makedirs(self.grpc_python_out_directory)
+ services_proto_file = os.path.join(self.proto_directory,
+ 'split_separate_services.proto')
+ messages_proto_file = os.path.join(self.proto_directory,
+ 'split_separate_messages.proto')
+ open(services_proto_file, 'wb').write(services_proto_contents.replace(
+ _MESSAGES_IMPORT,
+ b'import "split_separate_messages.proto";'
+ ))
+ open(messages_proto_file, 'wb').write(messages_proto_contents)
+ protoc_result = protoc.main([
+ '',
+ '--proto_path={}'.format(self.proto_directory),
+ '--python_out={}'.format(self.python_out_directory),
+ '--grpc_python_out={}'.format(self.grpc_python_out_directory),
+ services_proto_file,
+ messages_proto_file,
+ ])
+ if protoc_result != 0:
+ raise Exception("unexpected protoc error")
+ open(os.path.join(self.python_out_directory, '__init__.py'), 'w').write('')
+ self.pb2_import = 'split_separate_messages_pb2'
+ self.pb2_grpc_import = 'split_separate_services_pb2_grpc'
+ self.should_find_services_in_pb2 = False
+
+ def tearDown(self):
+ shutil.rmtree(self.directory)
+
+
+if __name__ == '__main__':
+ unittest.main(verbosity=2)
diff --git a/tools/distrib/check_generated_pb_files.sh b/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/__init__.py
index 6b93895484..2f88fa0412 100755..100644
--- a/tools/distrib/check_generated_pb_files.sh
+++ b/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/__init__.py
@@ -1,4 +1,3 @@
-#!/bin/bash
# Copyright 2016, Google Inc.
# All rights reserved.
#
@@ -28,16 +27,4 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-set -ex
-# change to root directory
-cd $(dirname $0)/../..
-
-# build grpc_check_generated_pb_files docker image
-docker build -t grpc_check_generated_pb_files tools/dockerfile/grpc_check_generated_pb_files
-
-# run check_pb_files against the checked out codebase
-docker run -e TEST=$TEST --rm=true -v ${HOST_GIT_ROOT:-`pwd`}:/var/local/jenkins/grpc -t grpc_check_generated_pb_files /var/local/jenkins/grpc/tools/dockerfile/grpc_check_generated_pb_files/check_pb_files.sh
-
-# If the test fails, please make sure your protobuf submodule is up-to-date and run
-# tools/codegen/extensions/gen_reflection_proto.sh to update the generated files.
diff --git a/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/same.proto b/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/same.proto
new file mode 100644
index 0000000000..269e2fd2c7
--- /dev/null
+++ b/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/same.proto
@@ -0,0 +1,39 @@
+// Copyright 2016, 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.
+
+syntax = "proto3";
+
+package grpc_protoc_plugin.invocation_testing;
+
+message Request {}
+message Response {}
+
+service TestService {
+ rpc Call(Request) returns (Response);
+}
diff --git a/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_messages/__init__.py b/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_messages/__init__.py
new file mode 100644
index 0000000000..2f88fa0412
--- /dev/null
+++ b/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_messages/__init__.py
@@ -0,0 +1,30 @@
+# Copyright 2016, 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.
+
+
diff --git a/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_messages/messages.proto b/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_messages/messages.proto
new file mode 100644
index 0000000000..de22dae049
--- /dev/null
+++ b/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_messages/messages.proto
@@ -0,0 +1,35 @@
+// Copyright 2016, 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.
+
+syntax = "proto3";
+
+package grpc_protoc_plugin.invocation_testing.split;
+
+message Request {}
+message Response {}
diff --git a/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_services/__init__.py b/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_services/__init__.py
new file mode 100644
index 0000000000..2f88fa0412
--- /dev/null
+++ b/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_services/__init__.py
@@ -0,0 +1,30 @@
+# Copyright 2016, 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.
+
+
diff --git a/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_services/services.proto b/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_services/services.proto
new file mode 100644
index 0000000000..af999cd48d
--- /dev/null
+++ b/src/python/grpcio_tests/tests/protoc_plugin/protos/invocation_testing/split_services/services.proto
@@ -0,0 +1,38 @@
+// Copyright 2016, 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.
+
+syntax = "proto3";
+
+import "messages.proto";
+
+package grpc_protoc_plugin.invocation_testing.split;
+
+service TestService {
+ rpc Call(Request) returns (Response);
+}
diff --git a/src/python/grpcio_tests/tests/tests.json b/src/python/grpcio_tests/tests/tests.json
index 2e85f1f397..dd4a0257f5 100644
--- a/src/python/grpcio_tests/tests/tests.json
+++ b/src/python/grpcio_tests/tests/tests.json
@@ -1,45 +1,49 @@
[
- "_api_test.AllTest",
- "_api_test.ChannelConnectivityTest",
- "_api_test.ChannelTest",
- "_auth_test.AccessTokenCallCredentialsTest",
- "_auth_test.GoogleCallCredentialsTest",
- "_beta_features_test.BetaFeaturesTest",
- "_beta_features_test.ContextManagementAndLifecycleTest",
- "_cancel_many_calls_test.CancelManyCallsTest",
- "_channel_args_test.ChannelArgsTest",
- "_channel_connectivity_test.ChannelConnectivityTest",
- "_channel_ready_future_test.ChannelReadyFutureTest",
- "_channel_test.ChannelTest",
- "_compression_test.CompressionTest",
- "_connectivity_channel_test.ConnectivityStatesTest",
- "_credentials_test.CredentialsTest",
- "_empty_message_test.EmptyMessageTest",
- "_exit_test.ExitTest",
- "_face_interface_test.DynamicInvokerBlockingInvocationInlineServiceTest",
- "_face_interface_test.DynamicInvokerFutureInvocationAsynchronousEventServiceTest",
- "_face_interface_test.GenericInvokerBlockingInvocationInlineServiceTest",
- "_face_interface_test.GenericInvokerFutureInvocationAsynchronousEventServiceTest",
- "_face_interface_test.MultiCallableInvokerBlockingInvocationInlineServiceTest",
- "_face_interface_test.MultiCallableInvokerFutureInvocationAsynchronousEventServiceTest",
- "_health_servicer_test.HealthServicerTest",
- "_implementations_test.CallCredentialsTest",
- "_implementations_test.ChannelCredentialsTest",
- "_insecure_interop_test.InsecureInteropTest",
- "_logging_pool_test.LoggingPoolTest",
- "_metadata_code_details_test.MetadataCodeDetailsTest",
- "_metadata_test.MetadataTest",
- "_not_found_test.NotFoundTest",
- "_python_plugin_test.PythonPluginTest",
- "_read_some_but_not_all_responses_test.ReadSomeButNotAllResponsesTest",
- "_reflection_servicer_test.ReflectionServicerTest",
- "_rpc_test.RPCTest",
- "_sanity_test.Sanity",
- "_secure_interop_test.SecureInteropTest",
- "_thread_cleanup_test.CleanupThreadTest",
- "_utilities_test.ChannelConnectivityTest",
- "beta_python_plugin_test.PythonPluginTest",
- "cygrpc_test.InsecureServerInsecureClient",
- "cygrpc_test.SecureServerSecureClient",
- "cygrpc_test.TypeSmokeTest"
+ "health_check._health_servicer_test.HealthServicerTest",
+ "interop._insecure_interop_test.InsecureInteropTest",
+ "interop._secure_interop_test.SecureInteropTest",
+ "protoc_plugin._python_plugin_test.PythonPluginTest",
+ "protoc_plugin._split_definitions_test.SameCommonTest",
+ "protoc_plugin._split_definitions_test.SameSeparateTest",
+ "protoc_plugin._split_definitions_test.SplitCommonTest",
+ "protoc_plugin._split_definitions_test.SplitSeparateTest",
+ "protoc_plugin.beta_python_plugin_test.PythonPluginTest",
+ "reflection._reflection_servicer_test.ReflectionServicerTest",
+ "unit._api_test.AllTest",
+ "unit._api_test.ChannelConnectivityTest",
+ "unit._api_test.ChannelTest",
+ "unit._auth_test.AccessTokenCallCredentialsTest",
+ "unit._auth_test.GoogleCallCredentialsTest",
+ "unit._channel_args_test.ChannelArgsTest",
+ "unit._channel_connectivity_test.ChannelConnectivityTest",
+ "unit._channel_ready_future_test.ChannelReadyFutureTest",
+ "unit._compression_test.CompressionTest",
+ "unit._credentials_test.CredentialsTest",
+ "unit._cython._cancel_many_calls_test.CancelManyCallsTest",
+ "unit._cython._channel_test.ChannelTest",
+ "unit._cython._read_some_but_not_all_responses_test.ReadSomeButNotAllResponsesTest",
+ "unit._cython.cygrpc_test.InsecureServerInsecureClient",
+ "unit._cython.cygrpc_test.SecureServerSecureClient",
+ "unit._cython.cygrpc_test.TypeSmokeTest",
+ "unit._empty_message_test.EmptyMessageTest",
+ "unit._exit_test.ExitTest",
+ "unit._metadata_code_details_test.MetadataCodeDetailsTest",
+ "unit._metadata_test.MetadataTest",
+ "unit._rpc_test.RPCTest",
+ "unit._sanity._sanity_test.Sanity",
+ "unit._thread_cleanup_test.CleanupThreadTest",
+ "unit.beta._beta_features_test.BetaFeaturesTest",
+ "unit.beta._beta_features_test.ContextManagementAndLifecycleTest",
+ "unit.beta._connectivity_channel_test.ConnectivityStatesTest",
+ "unit.beta._face_interface_test.DynamicInvokerBlockingInvocationInlineServiceTest",
+ "unit.beta._face_interface_test.DynamicInvokerFutureInvocationAsynchronousEventServiceTest",
+ "unit.beta._face_interface_test.GenericInvokerBlockingInvocationInlineServiceTest",
+ "unit.beta._face_interface_test.GenericInvokerFutureInvocationAsynchronousEventServiceTest",
+ "unit.beta._face_interface_test.MultiCallableInvokerBlockingInvocationInlineServiceTest",
+ "unit.beta._face_interface_test.MultiCallableInvokerFutureInvocationAsynchronousEventServiceTest",
+ "unit.beta._implementations_test.CallCredentialsTest",
+ "unit.beta._implementations_test.ChannelCredentialsTest",
+ "unit.beta._not_found_test.NotFoundTest",
+ "unit.beta._utilities_test.ChannelConnectivityTest",
+ "unit.framework.foundation._logging_pool_test.LoggingPoolTest"
]
diff --git a/src/python/grpcio_tests/tests/unit/_rpc_test.py b/src/python/grpcio_tests/tests/unit/_rpc_test.py
index ab6546bf87..eb00156da5 100644
--- a/src/python/grpcio_tests/tests/unit/_rpc_test.py
+++ b/src/python/grpcio_tests/tests/unit/_rpc_test.py
@@ -191,6 +191,10 @@ class RPCTest(unittest.TestCase):
self._channel = grpc.insecure_channel('localhost:%d' % port)
+ def tearDown(self):
+ self._server.stop(None)
+ self._server_pool.shutdown(wait=True)
+
def testUnrecognizedMethod(self):
request = b'abc'
diff --git a/src/ruby/ext/grpc/rb_compression_options.c b/src/ruby/ext/grpc/rb_compression_options.c
index c5668fdab4..6200dbafeb 100644
--- a/src/ruby/ext/grpc/rb_compression_options.c
+++ b/src/ruby/ext/grpc/rb_compression_options.c
@@ -283,6 +283,8 @@ VALUE grpc_rb_compression_options_level_value_to_name_internal(
rb_eArgError,
"Failed to convert compression level value to name for value: %d",
(int)compression_value);
+ /* return something to avoid compiler error about no return */
+ return Qnil;
}
}
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
index 2b6c0b1a36..c3c636c6af 100644
--- a/templates/CMakeLists.txt.template
+++ b/templates/CMakeLists.txt.template
@@ -60,7 +60,7 @@
cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "grpc")
- set(PACKAGE_VERSION "${settings.core_version}")
+ set(PACKAGE_VERSION "${settings.cpp_version}")
set(PACKAGE_STRING "<%text>${PACKAGE_NAME} ${PACKAGE_VERSION}</%text>")
set(PACKAGE_TARNAME "<%text>${PACKAGE_NAME}-${PACKAGE_VERSION}</%text>")
set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
diff --git a/templates/Makefile.template b/templates/Makefile.template
index 3b76ded95d..109de33c31 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -62,6 +62,12 @@
return warning[3:]
else:
return 'no-' + warning
+
+ lang_to_var = {
+ 'c': 'CORE',
+ 'c++': 'CPP',
+ 'csharp': 'CSHARP'
+ }
%>
@@ -311,7 +317,9 @@
Q = @
endif
- VERSION = ${settings.core_version}
+ CORE_VERSION = ${settings.core_version}
+ CPP_VERSION = ${settings.cpp_version}
+ CSHARP_VERSION = ${settings.csharp_version}
CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
@@ -344,31 +352,69 @@
CACHE_MK += HAS_PKG_CONFIG = true,
endif
- PC_TEMPLATE = prefix=$(prefix),\
+ CORE_PC_TEMPLATE = prefix=$(prefix),\
+ exec_prefix=${'\$${prefix}'},\
+ includedir=${'\$${prefix}'}/include,\
+ libdir=${'\$${exec_prefix}'}/lib,\
+ ,\
+ Name: $(PC_NAME),\
+ Description: $(PC_DESCRIPTION),\
+ Version: $(CORE_VERSION),\
+ Cflags: -I${'\$${includedir}'} $(PC_CFLAGS),\
+ Requires.private: $(PC_REQUIRES_PRIVATE),\
+ Libs: -L${'\$${libdir}'} $(PC_LIB),\
+ Libs.private: $(PC_LIBS_PRIVATE)
+
+ CPP_PC_TEMPLATE = prefix=$(prefix),\
+ exec_prefix=${'\$${prefix}'},\
+ includedir=${'\$${prefix}'}/include,\
+ libdir=${'\$${exec_prefix}'}/lib,\
+ ,\
+ Name: $(PC_NAME),\
+ Description: $(PC_DESCRIPTION),\
+ Version: $(CPP_VERSION),\
+ Cflags: -I${'\$${includedir}'} $(PC_CFLAGS),\
+ Requires.private: $(PC_REQUIRES_PRIVATE),\
+ Libs: -L${'\$${libdir}'} $(PC_LIB),\
+ Libs.private: $(PC_LIBS_PRIVATE)
+
+ CSHARP_PC_TEMPLATE = prefix=$(prefix),\
exec_prefix=${'\$${prefix}'},\
includedir=${'\$${prefix}'}/include,\
libdir=${'\$${exec_prefix}'}/lib,\
,\
Name: $(PC_NAME),\
Description: $(PC_DESCRIPTION),\
- Version: $(VERSION),\
+ Version: $(CSHARP_VERSION),\
Cflags: -I${'\$${includedir}'} $(PC_CFLAGS),\
Requires.private: $(PC_REQUIRES_PRIVATE),\
Libs: -L${'\$${libdir}'} $(PC_LIB),\
Libs.private: $(PC_LIBS_PRIVATE)
ifeq ($(SYSTEM),MINGW32)
- SHARED_EXT = dll
+ SHARED_EXT_CORE = dll
+ SHARED_EXT_CPP = dll
+ SHARED_EXT_CSHARP = dll
SHARED_PREFIX =
- SHARED_VERSION = -${settings.core_version.major}
+ SHARED_VERSION_CORE = -${settings.core_version.major}
+ SHARED_VERSION_CPP = -${settings.cpp_version.major}
+ SHARED_VERSION_CSHARP = -${settings.csharp_version.major}
else ifeq ($(SYSTEM),Darwin)
- SHARED_EXT = dylib
+ SHARED_EXT_CORE = dylib
+ SHARED_EXT_CPP = dylib
+ SHARED_EXT_CSHARP = dylib
SHARED_PREFIX = lib
- SHARED_VERSION =
+ SHARED_VERSION_CORE =
+ SHARED_VERSION_CPP =
+ SHARED_VERSION_CSHARP =
else
- SHARED_EXT = so.$(VERSION)
+ SHARED_EXT_CORE = so.$(CORE_VERSION)
+ SHARED_EXT_CPP = so.$(CPP_VERSION)
+ SHARED_EXT_CSHARP = so.$(CSHARP_VERSION)
SHARED_PREFIX = lib
- SHARED_VERSION =
+ SHARED_VERSION_CORE =
+ SHARED_VERSION_CPP =
+ SHARED_VERSION_CSHARP =
endif
ifeq ($(wildcard .git),)
@@ -603,7 +649,7 @@
PC_REQUIRES_PRIVATE = $(PC_REQUIRES_GRPC) $(PC_REQUIRES_SECURE)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPC) $(PC_LIBS_SECURE)
PC_LIB = -lgrpc
- GRPC_PC_FILE := $(PC_TEMPLATE)
+ GRPC_PC_FILE := $(CORE_PC_TEMPLATE)
# grpc_unsecure .pc file
PC_NAME = gRPC unsecure
@@ -612,7 +658,7 @@
PC_REQUIRES_PRIVATE = $(PC_REQUIRES_GRPC)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPC)
PC_LIB = -lgrpc
- GRPC_UNSECURE_PC_FILE := $(PC_TEMPLATE)
+ GRPC_UNSECURE_PC_FILE := $(CORE_PC_TEMPLATE)
PROTOBUF_PKG_CONFIG = false
@@ -680,7 +726,7 @@
PC_REQUIRES_PRIVATE = grpc $(PC_REQUIRES_GRPCXX)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPCXX)
PC_LIB = -lgrpc++
- GRPCXX_PC_FILE := $(PC_TEMPLATE)
+ GRPCXX_PC_FILE := $(CPP_PC_TEMPLATE)
# grpc++_unsecure .pc file
PC_NAME = gRPC++ unsecure
@@ -689,7 +735,7 @@
PC_REQUIRES_PRIVATE = grpc_unsecure $(PC_REQUIRES_GRPCXX)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPCXX)
PC_LIB = -lgrpc++
- GRPCXX_UNSECURE_PC_FILE := $(PC_TEMPLATE)
+ GRPCXX_UNSECURE_PC_FILE := $(CPP_PC_TEMPLATE)
ifeq ($(MAKECMDGOALS),clean)
NO_DEPS = true
@@ -855,7 +901,7 @@
% for lib in libs:
% if 'Makefile' in lib.get('build_system', ['Makefile']):
% if lib.build == 'all' and lib.language == 'c' and not lib.get('external_deps', None):
- $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)\
+ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)\
% endif
% endif
% endfor
@@ -864,7 +910,7 @@
% for lib in libs:
% if 'Makefile' in lib.get('build_system', ['Makefile']):
% if lib.build == 'all' and lib.language == 'c++':
- $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)\
+ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)\
% endif
% endif
% endfor
@@ -874,7 +920,7 @@
% for lib in libs:
% if 'Makefile' in lib.get('build_system', ['Makefile']):
% if lib.build == 'all' and lib.language == 'csharp':
- $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)\
+ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP)\
% endif
% endif
% endfor
@@ -1076,8 +1122,8 @@
% if lib.language == "c":
% if lib.build == "all":
% if not lib.get('external_deps', None):
- $(E) "[STRIP] Stripping $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)"
- $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)
+ $(E) "[STRIP] Stripping $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)"
+ $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)
% endif
% endif
% endif
@@ -1091,8 +1137,8 @@
% if 'Makefile' in lib.get('build_system', ['Makefile']):
% if lib.language == "c++":
% if lib.build == "all":
- $(E) "[STRIP] Stripping $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)"
- $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)
+ $(E) "[STRIP] Stripping $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
+ $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)
% endif
% endif
% endif
@@ -1105,8 +1151,8 @@
% if 'Makefile' in lib.get('build_system', ['Makefile']):
% if lib.language == "csharp":
% if lib.build == "all":
- $(E) "[STRIP] Stripping $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)"
- $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)
+ $(E) "[STRIP] Stripping $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP)"
+ $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP)
% endif
% endif
% endif
@@ -1245,14 +1291,14 @@
% if lib.language == lang_filter:
% if lib.build == "all":
% if not lib.get('external_deps', None):
- $(E) "[INSTALL] Installing $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)"
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_${lang_to_var[lib.language]}).$(SHARED_EXT_${lang_to_var[lib.language]})"
$(Q) $(INSTALL) -d $(prefix)/lib
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_${lang_to_var[lib.language]}).$(SHARED_EXT_${lang_to_var[lib.language]}) $(prefix)/lib/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT_${lang_to_var[lib.language]})
ifeq ($(SYSTEM),MINGW32)
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}-imp.a $(prefix)/lib/lib${lib.name}-imp.a
else ifneq ($(SYSTEM),Darwin)
- $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so.${settings.core_version.major}
- $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so
+ $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_${lang_to_var[lib.language]}).$(SHARED_EXT_${lang_to_var[lib.language]}) $(prefix)/lib/lib${lib.name}.so.${settings.core_version.major}
+ $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_${lang_to_var[lib.language]}).$(SHARED_EXT_${lang_to_var[lib.language]}) $(prefix)/lib/lib${lib.name}.so
endif
% endif
% endif
@@ -1364,7 +1410,7 @@
$(LIBDIR)/$(CONFIG)/lib${lib.name}.a: openssl_dep_error
% if lib.build == "all":
- $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT): openssl_dep_error
+ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_${lang_to_var[lib.language]}).$(SHARED_EXT_${lang_to_var[lib.language]}): openssl_dep_error
% endif
else
@@ -1377,7 +1423,7 @@
$(LIBDIR)/$(CONFIG)/lib${lib.name}.a: protobuf_dep_error
% if lib.build == "all":
- $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error
+ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_${lang_to_var[lib.language]}).$(SHARED_EXT_${lang_to_var[lib.language]}): protobuf_dep_error
% endif
else
@@ -1394,7 +1440,7 @@
$(LIBDIR)/$(CONFIG)/lib${lib.name}.a: protobuf_dep_error
% if lib.build == "all":
- $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error
+ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION_${lang_to_var[lib.language]}).$(SHARED_EXT_${lang_to_var[lib.language]}): protobuf_dep_error
% endif
else
@@ -1440,12 +1486,12 @@
else:
ld = '$(LD)'
- out_mingbase = '$(LIBDIR)/$(CONFIG)/' + lib.name + '$(SHARED_VERSION)'
- out_libbase = '$(LIBDIR)/$(CONFIG)/lib' + lib.name + '$(SHARED_VERSION)'
+ out_mingbase = '$(LIBDIR)/$(CONFIG)/' + lib.name + '$(SHARED_VERSION_' + lang_to_var[lib.language] + ')'
+ out_libbase = '$(LIBDIR)/$(CONFIG)/lib' + lib.name + '$(SHARED_VERSION_' + lang_to_var[lib.language] + ')'
common = '$(LIB' + lib.name.upper() + '_OBJS) $(LDLIBS)'
- libs = ''
+ link_libs = ''
lib_deps = ' $(ZLIB_DEP)'
mingw_libs = ''
mingw_lib_deps = ' $(ZLIB_DEP)'
@@ -1460,10 +1506,15 @@
mingw_lib_deps = mingw_lib_deps + ' ' + lib_archive
else:
for dep in lib.get('deps', []):
- libs = libs + ' -l' + dep
- lib_deps = lib_deps + ' $(LIBDIR)/$(CONFIG)/lib' + dep + '.$(SHARED_EXT)'
+ dep_lib = None
+ for dl in libs:
+ if dl.name == dep:
+ dep_lib = dl
+ assert dep_lib, 'lib %s not found (in %s)' % (dep, lib.name)
+ link_libs = link_libs + ' -l' + dep
+ lib_deps = lib_deps + ' $(LIBDIR)/$(CONFIG)/lib' + dep + '.$(SHARED_EXT_' + lang_to_var[dep_lib.language] + ')'
mingw_libs = mingw_libs + ' -l' + dep + '-imp'
- mingw_lib_deps = mingw_lib_deps + ' $(LIBDIR)/$(CONFIG)/' + dep + '.$(SHARED_EXT)'
+ mingw_lib_deps = mingw_lib_deps + ' $(LIBDIR)/$(CONFIG)/' + dep + '.$(SHARED_EXT_' + lang_to_var[dep_lib.language] + ')'
security = lib.get('secure', 'check')
if security == True:
@@ -1492,20 +1543,20 @@
% if lib.build == "all":
ifeq ($(SYSTEM),MINGW32)
- ${out_mingbase}.$(SHARED_EXT): $(LIB${lib.name.upper()}_OBJS) ${mingw_lib_deps}
+ ${out_mingbase}.$(SHARED_EXT_${lang_to_var[lib.language]}): $(LIB${lib.name.upper()}_OBJS) ${mingw_lib_deps}
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) ${ld} ${ldflags} -L$(LIBDIR)/$(CONFIG) -shared ${lib.name}.def -Wl,--output-def=${out_mingbase}.def -Wl,--out-implib=${out_libbase}-dll.a -o ${out_mingbase}.$(SHARED_EXT) ${common}${mingw_libs}
+ $(Q) ${ld} ${ldflags} -L$(LIBDIR)/$(CONFIG) -shared ${lib.name}.def -Wl,--output-def=${out_mingbase}.def -Wl,--out-implib=${out_libbase}-dll.a -o ${out_mingbase}.$(SHARED_EXT_${lang_to_var[lib.language]}) ${common}${mingw_libs}
else
- ${out_libbase}.$(SHARED_EXT): $(LIB${lib.name.upper()}_OBJS) ${lib_deps}
+ ${out_libbase}.$(SHARED_EXT_${lang_to_var[lib.language]}): $(LIB${lib.name.upper()}_OBJS) ${lib_deps}
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
ifeq ($(SYSTEM),Darwin)
- $(Q) ${ld} ${ldflags} -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o ${out_libbase}.$(SHARED_EXT) ${common}${libs}
+ $(Q) ${ld} ${ldflags} -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT_${lang_to_var[lib.language]}) -dynamiclib -o ${out_libbase}.$(SHARED_EXT_${lang_to_var[lib.language]}) ${common}${link_libs}
else
- $(Q) ${ld} ${ldflags} -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,lib${lib.name}.so.${settings.core_version.major} -o ${out_libbase}.$(SHARED_EXT) ${common}${libs}
- $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) ${out_libbase}.so.${settings.core_version.major}
- $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) ${out_libbase}.so
+ $(Q) ${ld} ${ldflags} -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,lib${lib.name}.so.${settings.core_version.major} -o ${out_libbase}.$(SHARED_EXT_${lang_to_var[lib.language]}) ${common}${link_libs}
+ $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT_${lang_to_var[lib.language]}) ${out_libbase}.so.${settings.get(lang_to_var[lib.language].lower() + '_version').major}
+ $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT_${lang_to_var[lib.language]}) ${out_libbase}.so
endif
endif
% endif
diff --git a/templates/src/cpp/common/version_cc.cc.template b/templates/src/cpp/common/version_cc.cc.template
new file mode 100644
index 0000000000..d14e974f56
--- /dev/null
+++ b/templates/src/cpp/common/version_cc.cc.template
@@ -0,0 +1,43 @@
+%YAML 1.2
+--- |
+ /*
+ *
+ * Copyright 2016, 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.
+ *
+ */
+
+ /* This file is autogenerated from:
+ templates/src/core/surface/version.c.template */
+
+ #include <grpc++/grpc++.h>
+
+ namespace grpc {
+ grpc::string Version() { return "${settings.cpp_version}"; }
+ }
diff --git a/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template
index 211baff2d1..35b0e177fb 100644
--- a/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template
@@ -37,5 +37,9 @@
<%include file="../../clang_update.include"/>
<%include file="../../run_tests_addons.include"/>
<%include file="../../libuv_install.include"/>
+
+ # Install gcc-4.8 and other relevant items
+ RUN apt-get update && apt-get -y install gcc-4.8 gcc-4.8-multilib g++-4.8 g++-4.8-multilib && apt-get clean
+
# Define the default command.
CMD ["bash"]
diff --git a/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template b/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template
index 49fbea0f45..643b5cb65b 100644
--- a/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template
+++ b/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template
@@ -35,5 +35,9 @@
<%include file="../../python_deps.include"/>
<%include file="../../cxx_deps.include"/>
<%include file="../../run_tests_addons.include"/>
+
+ # Install gcc-4.8 and other relevant items
+ RUN apt-get update && apt-get -y install gcc-4.8 gcc-4.8-multilib g++-4.8 g++-4.8-multilib && apt-get clean
+
# Define the default command.
CMD ["bash"]
diff --git a/test/core/client_channel/lb_policies_test.c b/test/core/client_channel/lb_policies_test.c
index 844db5e6cb..6e317eb9a9 100644
--- a/test/core/client_channel/lb_policies_test.c
+++ b/test/core/client_channel/lb_policies_test.c
@@ -48,7 +48,6 @@
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/end2end/cq_verifier.h"
-#include "test/core/end2end/fake_resolver.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
@@ -501,7 +500,7 @@ void run_spec(const test_spec *spec) {
request_data rdata;
servers_fixture *f;
grpc_channel_args args;
- grpc_arg arg;
+ grpc_arg arg_array[2];
rdata.call_details =
gpr_malloc(sizeof(grpc_call_details) * spec->num_servers);
f = setup_servers("127.0.0.1", &rdata, spec->num_servers);
@@ -509,14 +508,16 @@ void run_spec(const test_spec *spec) {
/* Create client. */
servers_hostports_str = gpr_strjoin_sep((const char **)f->servers_hostports,
f->num_servers, ",", NULL);
- gpr_asprintf(&client_hostport, "test:%s?lb_policy=round_robin",
- servers_hostports_str);
+ gpr_asprintf(&client_hostport, "ipv4:%s", servers_hostports_str);
- arg.type = GRPC_ARG_INTEGER;
- arg.key = "grpc.testing.fixed_reconnect_backoff";
- arg.value.integer = RETRY_TIMEOUT;
- args.num_args = 1;
- args.args = &arg;
+ arg_array[0].type = GRPC_ARG_INTEGER;
+ arg_array[0].key = "grpc.testing.fixed_reconnect_backoff";
+ arg_array[0].value.integer = RETRY_TIMEOUT;
+ arg_array[1].type = GRPC_ARG_STRING;
+ arg_array[1].key = GRPC_ARG_LB_POLICY_NAME;
+ arg_array[1].value.string = "round_robin";
+ args.num_args = 2;
+ args.args = arg_array;
client = grpc_insecure_channel_create(client_hostport, &args, NULL);
@@ -540,19 +541,21 @@ static grpc_channel *create_client(const servers_fixture *f) {
grpc_channel *client;
char *client_hostport;
char *servers_hostports_str;
- grpc_arg arg;
+ grpc_arg arg_array[2];
grpc_channel_args args;
servers_hostports_str = gpr_strjoin_sep((const char **)f->servers_hostports,
f->num_servers, ",", NULL);
- gpr_asprintf(&client_hostport, "test:%s?lb_policy=round_robin",
- servers_hostports_str);
+ gpr_asprintf(&client_hostport, "ipv4:%s", servers_hostports_str);
- arg.type = GRPC_ARG_INTEGER;
- arg.key = "grpc.testing.fixed_reconnect_backoff";
- arg.value.integer = RETRY_TIMEOUT;
- args.num_args = 1;
- args.args = &arg;
+ arg_array[0].type = GRPC_ARG_INTEGER;
+ arg_array[0].key = "grpc.testing.fixed_reconnect_backoff";
+ arg_array[0].value.integer = RETRY_TIMEOUT;
+ arg_array[1].type = GRPC_ARG_STRING;
+ arg_array[1].key = GRPC_ARG_LB_POLICY_NAME;
+ arg_array[1].value.string = "round_robin";
+ args.num_args = 2;
+ args.args = arg_array;
client = grpc_insecure_channel_create(client_hostport, &args, NULL);
gpr_free(client_hostport);
@@ -875,7 +878,6 @@ int main(int argc, char **argv) {
const size_t NUM_SERVERS = 4;
grpc_test_init(argc, argv);
- grpc_fake_resolver_init();
grpc_init();
grpc_tracer_set_enabled("round_robin", 1);
diff --git a/test/core/client_channel/set_initial_connect_string_test.c b/test/core/client_channel/set_initial_connect_string_test.c
index 379f30fb9f..d93cad57b4 100644
--- a/test/core/client_channel/set_initial_connect_string_test.c
+++ b/test/core/client_channel/set_initial_connect_string_test.c
@@ -115,8 +115,8 @@ static void reset_addr_and_set_magic_string(grpc_resolved_address **addr,
target.sin_family = AF_INET;
target.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
target.sin_port = htons((uint16_t)server_port);
- (*addr)->len = sizeof(target);
*addr = (grpc_resolved_address *)gpr_malloc(sizeof(grpc_resolved_address));
+ (*addr)->len = sizeof(target);
memcpy((*addr)->addr, &target, sizeof(target));
}
diff --git a/test/core/end2end/connection_refused_test.c b/test/core/end2end/connection_refused_test.c
index 07d7010daa..13414c0378 100644
--- a/test/core/end2end/connection_refused_test.c
+++ b/test/core/end2end/connection_refused_test.c
@@ -39,8 +39,11 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
+#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/transport/metadata.h"
+#include "src/core/lib/transport/method_config.h"
+
#include "test/core/end2end/cq_verifier.h"
-#include "test/core/end2end/fake_resolver.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
@@ -62,7 +65,6 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
gpr_log(GPR_INFO, "TEST: wait_for_ready=%d use_service_config=%d",
wait_for_ready, use_service_config);
- grpc_fake_resolver_init();
grpc_init();
grpc_metadata_array_init(&trailing_metadata_recv);
@@ -70,21 +72,30 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
cq = grpc_completion_queue_create(NULL);
cqv = cq_verifier_create(cq);
+ /* if using service config, create channel args */
+ grpc_channel_args *args = NULL;
+ if (use_service_config) {
+ GPR_ASSERT(wait_for_ready);
+ grpc_method_config_table_entry entry = {
+ grpc_mdstr_from_string("/service/method"),
+ grpc_method_config_create(&wait_for_ready, NULL, NULL, NULL),
+ };
+ grpc_method_config_table *method_config_table =
+ grpc_method_config_table_create(1, &entry);
+ GRPC_MDSTR_UNREF(entry.method_name);
+ grpc_method_config_unref(entry.method_config);
+ grpc_arg arg =
+ grpc_method_config_table_create_channel_arg(method_config_table);
+ args = grpc_channel_args_copy_and_add(args, &arg, 1);
+ grpc_method_config_table_unref(method_config_table);
+ }
+
/* create a call, channel to a port which will refuse connection */
int port = grpc_pick_unused_port_or_die();
char *addr;
gpr_join_host_port(&addr, "127.0.0.1", port);
- if (use_service_config) {
- GPR_ASSERT(wait_for_ready);
- char *server_uri;
- gpr_asprintf(&server_uri,
- "test:%s?method_name=/service/method&wait_for_ready=1", addr);
- gpr_free(addr);
- addr = server_uri;
- }
gpr_log(GPR_INFO, "server: %s", addr);
-
- chan = grpc_insecure_channel_create(addr, NULL, NULL);
+ chan = grpc_insecure_channel_create(addr, args, NULL);
call = grpc_channel_create_call(chan, NULL, GRPC_PROPAGATE_DEFAULTS, cq,
"/service/method", "nonexistant", deadline,
NULL);
@@ -133,6 +144,8 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
gpr_free(details);
grpc_metadata_array_destroy(&trailing_metadata_recv);
+ if (args != NULL) grpc_channel_args_destroy(args);
+
grpc_shutdown();
}
diff --git a/include/grpc++/impl/codegen/sync_cxx11.h b/test/core/end2end/end2end_test_utils.c
index 6626ca1f94..46fb4ec1af 100644
--- a/include/grpc++/impl/codegen/sync_cxx11.h
+++ b/test/core/end2end/end2end_test_utils.c
@@ -31,19 +31,21 @@
*
*/
-#ifndef GRPCXX_IMPL_CODEGEN_SYNC_CXX11_H
-#define GRPCXX_IMPL_CODEGEN_SYNC_CXX11_H
+#include "test/core/end2end/end2end_tests.h"
-#include <condition_variable>
-#include <mutex>
+#include <string.h>
-namespace grpc {
+#include <grpc/support/log.h>
-using std::condition_variable;
-using std::mutex;
-using std::lock_guard;
-using std::unique_lock;
+const char *get_host_override_string(const char *str,
+ grpc_end2end_test_config config) {
+ return (config.feature_mask & FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER ? str
+ : NULL);
+}
-} // namespace grpc
-
-#endif // GRPCXX_IMPL_CODEGEN_SYNC_CXX11_H
+void validate_host_override_string(const char *pattern, const char *str,
+ grpc_end2end_test_config config) {
+ if (config.feature_mask & FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER) {
+ GPR_ASSERT(0 == strcmp(str, pattern));
+ }
+}
diff --git a/test/core/end2end/end2end_tests.h b/test/core/end2end/end2end_tests.h
index e20273de90..f25e90b5f6 100644
--- a/test/core/end2end/end2end_tests.h
+++ b/test/core/end2end/end2end_tests.h
@@ -43,7 +43,8 @@ typedef struct grpc_end2end_test_config grpc_end2end_test_config;
#define FEATURE_MASK_SUPPORTS_HOSTNAME_VERIFICATION 2
#define FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS 4
#define FEATURE_MASK_SUPPORTS_REQUEST_PROXYING 8
-#define FEATURE_MASK_SUPPORTS_QUERY_ARGS 16
+#define FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL 16
+#define FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER 32
#define FAIL_AUTH_CHECK_SERVER_ARG_NAME "fail_auth_check"
@@ -60,7 +61,7 @@ struct grpc_end2end_test_config {
grpc_end2end_test_fixture (*create_fixture)(grpc_channel_args *client_args,
grpc_channel_args *server_args);
void (*init_client)(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args, const char *query_args);
+ grpc_channel_args *client_args);
void (*init_server)(grpc_end2end_test_fixture *f,
grpc_channel_args *server_args);
void (*tear_down_data)(grpc_end2end_test_fixture *f);
@@ -69,4 +70,10 @@ struct grpc_end2end_test_config {
void grpc_end2end_tests_pre_init(void);
void grpc_end2end_tests(int argc, char **argv, grpc_end2end_test_config config);
+const char *get_host_override_string(const char *str,
+ grpc_end2end_test_config config);
+
+void validate_host_override_string(const char *pattern, const char *str,
+ grpc_end2end_test_config config);
+
#endif /* GRPC_TEST_CORE_END2END_END2END_TESTS_H */
diff --git a/test/core/end2end/fake_resolver.c b/test/core/end2end/fake_resolver.c
index a2343cb709..51fa8ec2d5 100644
--- a/test/core/end2end/fake_resolver.c
+++ b/test/core/end2end/fake_resolver.c
@@ -49,7 +49,6 @@
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/unix_sockets_posix.h"
#include "src/core/lib/support/string.h"
-#include "src/core/lib/transport/method_config.h"
//
// fake_resolver
@@ -62,8 +61,6 @@ typedef struct {
// passed-in parameters
grpc_channel_args* channel_args;
grpc_lb_addresses* addresses;
- char* lb_policy_name;
- grpc_method_config_table* method_config_table;
// mutex guarding the rest of the state
gpr_mu mu;
@@ -80,8 +77,6 @@ static void fake_resolver_destroy(grpc_exec_ctx* exec_ctx, grpc_resolver* gr) {
gpr_mu_destroy(&r->mu);
grpc_channel_args_destroy(r->channel_args);
grpc_lb_addresses_destroy(r->addresses);
- gpr_free(r->lb_policy_name);
- grpc_method_config_table_unref(r->method_config_table);
gpr_free(r);
}
@@ -101,21 +96,9 @@ static void fake_resolver_maybe_finish_next_locked(grpc_exec_ctx* exec_ctx,
fake_resolver* r) {
if (r->next_completion != NULL && !r->published) {
r->published = true;
- grpc_arg new_args[3];
- size_t num_args = 0;
- new_args[num_args++] = grpc_lb_addresses_create_channel_arg(r->addresses);
- if (r->method_config_table != NULL) {
- new_args[num_args++] =
- grpc_method_config_table_create_channel_arg(r->method_config_table);
- }
- if (r->lb_policy_name != NULL) {
- new_args[num_args].type = GRPC_ARG_STRING;
- new_args[num_args].key = GRPC_ARG_LB_POLICY_NAME;
- new_args[num_args].value.string = r->lb_policy_name;
- ++num_args;
- }
+ grpc_arg arg = grpc_lb_addresses_create_channel_arg(r->addresses);
*r->target_result =
- grpc_channel_args_copy_and_add(r->channel_args, new_args, num_args);
+ grpc_channel_args_copy_and_add(r->channel_args, &arg, 1);
grpc_exec_ctx_sched(exec_ctx, r->next_completion, GRPC_ERROR_NONE, NULL);
r->next_completion = NULL;
}
@@ -194,45 +177,6 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory,
grpc_lb_addresses_destroy(addresses);
return NULL;
}
- // Construct method config table.
- // We only support parameters for a single method.
- grpc_method_config_table* method_config_table = NULL;
- const char* method_name = grpc_uri_get_query_arg(args->uri, "method_name");
- if (method_name != NULL) {
- const char* wait_for_ready_str =
- grpc_uri_get_query_arg(args->uri, "wait_for_ready");
- // Anything other than "0" is interpreted as true.
- bool wait_for_ready =
- wait_for_ready_str != NULL && strcmp("0", wait_for_ready_str) != 0;
- const char* timeout_str =
- grpc_uri_get_query_arg(args->uri, "timeout_seconds");
- gpr_timespec timeout = {timeout_str == NULL ? 0 : atoi(timeout_str), 0,
- GPR_TIMESPAN};
- const char* max_request_message_bytes_str =
- grpc_uri_get_query_arg(args->uri, "max_request_message_bytes");
- int32_t max_request_message_bytes =
- max_request_message_bytes_str == NULL
- ? 0
- : atoi(max_request_message_bytes_str);
- const char* max_response_message_bytes_str =
- grpc_uri_get_query_arg(args->uri, "max_response_message_bytes");
- int32_t max_response_message_bytes =
- max_response_message_bytes_str == NULL
- ? 0
- : atoi(max_response_message_bytes_str);
- grpc_method_config* method_config = grpc_method_config_create(
- wait_for_ready_str == NULL ? NULL : &wait_for_ready,
- timeout_str == NULL ? NULL : &timeout,
- max_request_message_bytes_str == NULL ? NULL
- : &max_request_message_bytes,
- max_response_message_bytes_str == NULL ? NULL
- : &max_response_message_bytes);
- grpc_method_config_table_entry entry = {grpc_mdstr_from_string(method_name),
- method_config};
- method_config_table = grpc_method_config_table_create(1, &entry);
- GRPC_MDSTR_UNREF(entry.method_name);
- grpc_method_config_unref(method_config);
- }
// Instantiate resolver.
fake_resolver* r = gpr_malloc(sizeof(fake_resolver));
memset(r, 0, sizeof(*r));
@@ -243,9 +187,6 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory,
r->channel_args =
grpc_channel_args_copy_and_add(args->args, &server_name_arg, 1);
r->addresses = addresses;
- r->lb_policy_name =
- gpr_strdup(grpc_uri_get_query_arg(args->uri, "lb_policy"));
- r->method_config_table = method_config_table;
gpr_mu_init(&r->mu);
grpc_resolver_init(&r->base, &fake_resolver_vtable);
return &r->base;
diff --git a/test/core/end2end/fixtures/h2_census.c b/test/core/end2end/fixtures/h2_census.c
index c2e1acf57f..c52d7660f5 100644
--- a/test/core/end2end/fixtures/h2_census.c
+++ b/test/core/end2end/fixtures/h2_census.c
@@ -79,9 +79,7 @@ static grpc_arg make_census_enable_arg(void) {
}
void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_channel_args *client_args) {
fullstack_fixture_data *ffd = f->fixture_data;
grpc_arg arg = make_census_enable_arg();
client_args = grpc_channel_args_copy_and_add(client_args, &arg, 1);
@@ -113,7 +111,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack+census", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION,
+ {"chttp2/fullstack+census", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
diff --git a/test/core/end2end/fixtures/h2_compress.c b/test/core/end2end/fixtures/h2_compress.c
index 94a198f380..fedd2ebc46 100644
--- a/test/core/end2end/fixtures/h2_compress.c
+++ b/test/core/end2end/fixtures/h2_compress.c
@@ -75,9 +75,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_compression(
}
void chttp2_init_client_fullstack_compression(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_channel_args *client_args) {
fullstack_compression_fixture_data *ffd = f->fixture_data;
if (ffd->client_args_compression != NULL) {
grpc_channel_args_destroy(ffd->client_args_compression);
@@ -115,7 +113,9 @@ void chttp2_tear_down_fullstack_compression(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack_compression", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION,
+ {"chttp2/fullstack_compression", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack_compression,
chttp2_init_client_fullstack_compression,
chttp2_init_server_fullstack_compression,
diff --git a/test/core/end2end/fixtures/h2_fake_resolver.c b/test/core/end2end/fixtures/h2_fake_resolver.c
deleted file mode 100644
index 429f3c95f9..0000000000
--- a/test/core/end2end/fixtures/h2_fake_resolver.c
+++ /dev/null
@@ -1,128 +0,0 @@
-//
-// Copyright 2016, 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.
-//
-
-#include "test/core/end2end/end2end_tests.h"
-
-#include <string.h>
-
-#include <grpc/support/alloc.h>
-#include <grpc/support/host_port.h>
-#include <grpc/support/log.h>
-#include <grpc/support/string_util.h>
-#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
-#include <grpc/support/useful.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"
-#include "src/core/lib/surface/channel.h"
-#include "src/core/lib/surface/server.h"
-#include "test/core/end2end/fake_resolver.h"
-#include "test/core/util/port.h"
-#include "test/core/util/test_config.h"
-
-typedef struct fullstack_fixture_data {
- char *localaddr;
-} fullstack_fixture_data;
-
-static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
- grpc_end2end_test_fixture f;
- int port = grpc_pick_unused_port_or_die();
- fullstack_fixture_data *ffd = gpr_malloc(sizeof(fullstack_fixture_data));
- memset(&f, 0, sizeof(f));
-
- gpr_join_host_port(&ffd->localaddr, "127.0.0.1", port);
-
- f.fixture_data = ffd;
- f.cq = grpc_completion_queue_create(NULL);
-
- return f;
-}
-
-void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- fullstack_fixture_data *ffd = f->fixture_data;
- char *server_uri;
- gpr_asprintf(&server_uri, "test:%s%s%s", ffd->localaddr,
- (query_args == NULL ? "" : "?"),
- (query_args == NULL ? "" : query_args));
- gpr_log(GPR_INFO, "server_uri: %s", server_uri);
- f->client = grpc_insecure_channel_create(server_uri, client_args, NULL);
- GPR_ASSERT(f->client);
- gpr_free(server_uri);
-}
-
-void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
- fullstack_fixture_data *ffd = f->fixture_data;
- if (f->server) {
- grpc_server_destroy(f->server);
- }
- f->server = grpc_server_create(server_args, NULL);
- grpc_server_register_completion_queue(f->server, f->cq, NULL);
- GPR_ASSERT(grpc_server_add_insecure_http2_port(f->server, ffd->localaddr));
- grpc_server_start(f->server);
-}
-
-void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_fixture_data *ffd = f->fixture_data;
- gpr_free(ffd->localaddr);
- gpr_free(ffd);
-}
-
-/* All test configurations */
-static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_QUERY_ARGS,
- chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
- chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
-};
-
-int main(int argc, char **argv) {
- size_t i;
-
- grpc_test_init(argc, argv);
- grpc_end2end_tests_pre_init();
- grpc_fake_resolver_init();
- grpc_init();
-
- for (i = 0; i < sizeof(configs) / sizeof(*configs); i++) {
- grpc_end2end_tests(argc, argv, configs[i]);
- }
-
- grpc_shutdown();
-
- return 0;
-}
diff --git a/test/core/end2end/fixtures/h2_fakesec.c b/test/core/end2end/fixtures/h2_fakesec.c
index dbe9011dcf..c9747913c2 100644
--- a/test/core/end2end/fixtures/h2_fakesec.c
+++ b/test/core/end2end/fixtures/h2_fakesec.c
@@ -105,9 +105,7 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) {
}
static void chttp2_init_client_fake_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_end2end_test_fixture *f, grpc_channel_args *client_args) {
grpc_channel_credentials *fake_ts_creds =
grpc_fake_transport_security_credentials_create();
chttp2_init_client_secure_fullstack(f, client_args, fake_ts_creds);
@@ -142,7 +140,9 @@ static void chttp2_init_server_fake_secure_fullstack(
static grpc_end2end_test_config configs[] = {
{"chttp2/fake_secure_fullstack",
FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS,
+ FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_secure_fullstack,
chttp2_init_client_fake_secure_fullstack,
chttp2_init_server_fake_secure_fullstack,
diff --git a/test/core/end2end/fixtures/h2_fd.c b/test/core/end2end/fixtures/h2_fd.c
index 2dfa54fb6b..223fadc386 100644
--- a/test/core/end2end/fixtures/h2_fd.c
+++ b/test/core/end2end/fixtures/h2_fd.c
@@ -78,10 +78,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
}
static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
-
+ grpc_channel_args *client_args) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
sp_fixture_data *sfd = f->fixture_data;
@@ -114,9 +111,9 @@ static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fd", 0, chttp2_create_fixture_socketpair,
- chttp2_init_client_socketpair, chttp2_init_server_socketpair,
- chttp2_tear_down_socketpair},
+ {"chttp2/fd", FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
+ chttp2_create_fixture_socketpair, chttp2_init_client_socketpair,
+ chttp2_init_server_socketpair, chttp2_tear_down_socketpair},
};
int main(int argc, char **argv) {
diff --git a/test/core/end2end/fixtures/h2_full+pipe.c b/test/core/end2end/fixtures/h2_full+pipe.c
index e0026a7940..c6013f3040 100644
--- a/test/core/end2end/fixtures/h2_full+pipe.c
+++ b/test/core/end2end/fixtures/h2_full+pipe.c
@@ -76,9 +76,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
}
void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_channel_args *client_args) {
fullstack_fixture_data *ffd = f->fixture_data;
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client);
@@ -104,7 +102,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION,
+ {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
diff --git a/test/core/end2end/fixtures/h2_full+trace.c b/test/core/end2end/fixtures/h2_full+trace.c
index eadc62d963..11a102a576 100644
--- a/test/core/end2end/fixtures/h2_full+trace.c
+++ b/test/core/end2end/fixtures/h2_full+trace.c
@@ -76,9 +76,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
}
void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_channel_args *client_args) {
fullstack_fixture_data *ffd = f->fixture_data;
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client);
@@ -104,7 +102,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION,
+ {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
diff --git a/test/core/end2end/fixtures/h2_full.c b/test/core/end2end/fixtures/h2_full.c
index 182ce23a51..3399f1981e 100644
--- a/test/core/end2end/fixtures/h2_full.c
+++ b/test/core/end2end/fixtures/h2_full.c
@@ -70,9 +70,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
}
void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_channel_args *client_args) {
fullstack_fixture_data *ffd = f->fixture_data;
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client);
@@ -98,7 +96,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION,
+ {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
diff --git a/test/core/end2end/fixtures/h2_http_proxy.c b/test/core/end2end/fixtures/h2_http_proxy.c
index 2acc06f549..44b223664a 100644
--- a/test/core/end2end/fixtures/h2_http_proxy.c
+++ b/test/core/end2end/fixtures/h2_http_proxy.c
@@ -75,9 +75,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
}
void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_channel_args *client_args) {
fullstack_fixture_data *ffd = f->fixture_data;
char *proxy_uri;
gpr_asprintf(&proxy_uri, "http://%s",
@@ -109,7 +107,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION,
+ {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
diff --git a/test/core/end2end/fixtures/h2_load_reporting.c b/test/core/end2end/fixtures/h2_load_reporting.c
index 0957666a44..7a76489b44 100644
--- a/test/core/end2end/fixtures/h2_load_reporting.c
+++ b/test/core/end2end/fixtures/h2_load_reporting.c
@@ -73,9 +73,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_load_reporting(
}
void chttp2_init_client_load_reporting(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_channel_args *client_args) {
load_reporting_fixture_data *ffd = f->fixture_data;
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client);
@@ -105,7 +103,9 @@ void chttp2_tear_down_load_reporting(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
{"chttp2/fullstack+load_reporting",
- FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION,
+ FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_load_reporting, chttp2_init_client_load_reporting,
chttp2_init_server_load_reporting, chttp2_tear_down_load_reporting},
};
diff --git a/test/core/end2end/fixtures/h2_oauth2.c b/test/core/end2end/fixtures/h2_oauth2.c
index dd636cfff6..6122f4f2f9 100644
--- a/test/core/end2end/fixtures/h2_oauth2.c
+++ b/test/core/end2end/fixtures/h2_oauth2.c
@@ -150,9 +150,7 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) {
}
static void chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_end2end_test_fixture *f, grpc_channel_args *client_args) {
grpc_channel_credentials *ssl_creds =
grpc_ssl_credentials_create(test_root_cert, NULL, NULL);
grpc_call_credentials *oauth2_creds =
@@ -218,7 +216,9 @@ static void chttp2_init_server_simple_ssl_secure_fullstack(
static grpc_end2end_test_config configs[] = {
{"chttp2/simple_ssl_with_oauth2_fullstack",
FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS,
+ FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_secure_fullstack,
chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack,
chttp2_init_server_simple_ssl_secure_fullstack,
diff --git a/test/core/end2end/fixtures/h2_proxy.c b/test/core/end2end/fixtures/h2_proxy.c
index 2671e0abde..9e37ed4db3 100644
--- a/test/core/end2end/fixtures/h2_proxy.c
+++ b/test/core/end2end/fixtures/h2_proxy.c
@@ -85,9 +85,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
}
void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_channel_args *client_args) {
fullstack_fixture_data *ffd = f->fixture_data;
f->client = grpc_insecure_channel_create(
grpc_end2end_proxy_get_client_target(ffd->proxy), client_args, NULL);
@@ -116,7 +114,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
{"chttp2/fullstack+proxy", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_REQUEST_PROXYING,
+ FEATURE_MASK_SUPPORTS_REQUEST_PROXYING |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c
index a358edf321..726ed8735c 100644
--- a/test/core/end2end/fixtures/h2_sockpair+trace.c
+++ b/test/core/end2end/fixtures/h2_sockpair+trace.c
@@ -104,9 +104,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
}
static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_channel_args *client_args) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_endpoint_pair *sfd = f->fixture_data;
grpc_transport *transport;
@@ -143,9 +141,9 @@ static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/socketpair", 0, chttp2_create_fixture_socketpair,
- chttp2_init_client_socketpair, chttp2_init_server_socketpair,
- chttp2_tear_down_socketpair},
+ {"chttp2/socketpair", FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
+ chttp2_create_fixture_socketpair, chttp2_init_client_socketpair,
+ chttp2_init_server_socketpair, chttp2_tear_down_socketpair},
};
int main(int argc, char **argv) {
diff --git a/test/core/end2end/fixtures/h2_sockpair.c b/test/core/end2end/fixtures/h2_sockpair.c
index 8f7083af59..94b2623b3e 100644
--- a/test/core/end2end/fixtures/h2_sockpair.c
+++ b/test/core/end2end/fixtures/h2_sockpair.c
@@ -98,9 +98,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
}
static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_channel_args *client_args) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_endpoint_pair *sfd = f->fixture_data;
grpc_transport *transport;
@@ -137,9 +135,9 @@ static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/socketpair", 0, chttp2_create_fixture_socketpair,
- chttp2_init_client_socketpair, chttp2_init_server_socketpair,
- chttp2_tear_down_socketpair},
+ {"chttp2/socketpair", FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
+ chttp2_create_fixture_socketpair, chttp2_init_client_socketpair,
+ chttp2_init_server_socketpair, chttp2_tear_down_socketpair},
};
int main(int argc, char **argv) {
diff --git a/test/core/end2end/fixtures/h2_sockpair_1byte.c b/test/core/end2end/fixtures/h2_sockpair_1byte.c
index b3d9924c12..0a45f76395 100644
--- a/test/core/end2end/fixtures/h2_sockpair_1byte.c
+++ b/test/core/end2end/fixtures/h2_sockpair_1byte.c
@@ -98,9 +98,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
}
static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_channel_args *client_args) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_endpoint_pair *sfd = f->fixture_data;
grpc_transport *transport;
@@ -137,9 +135,10 @@ static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/socketpair_one_byte_at_a_time", 0,
- chttp2_create_fixture_socketpair, chttp2_init_client_socketpair,
- chttp2_init_server_socketpair, chttp2_tear_down_socketpair},
+ {"chttp2/socketpair_one_byte_at_a_time",
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_socketpair,
+ chttp2_init_client_socketpair, chttp2_init_server_socketpair,
+ chttp2_tear_down_socketpair},
};
int main(int argc, char **argv) {
diff --git a/test/core/end2end/fixtures/h2_ssl.c b/test/core/end2end/fixtures/h2_ssl.c
index 63282ae081..bbd522cf30 100644
--- a/test/core/end2end/fixtures/h2_ssl.c
+++ b/test/core/end2end/fixtures/h2_ssl.c
@@ -109,9 +109,7 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) {
}
static void chttp2_init_client_simple_ssl_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_end2end_test_fixture *f, grpc_channel_args *client_args) {
grpc_channel_credentials *ssl_creds =
grpc_ssl_credentials_create(NULL, NULL, NULL);
grpc_arg ssl_name_override = {GRPC_ARG_STRING,
@@ -153,7 +151,9 @@ static void chttp2_init_server_simple_ssl_secure_fullstack(
static grpc_end2end_test_config configs[] = {
{"chttp2/simple_ssl_fullstack",
FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS,
+ FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_secure_fullstack,
chttp2_init_client_simple_ssl_secure_fullstack,
chttp2_init_server_simple_ssl_secure_fullstack,
diff --git a/test/core/end2end/fixtures/h2_ssl_cert.c b/test/core/end2end/fixtures/h2_ssl_cert.c
index 4c2f5f535e..e39cb491de 100644
--- a/test/core/end2end/fixtures/h2_ssl_cert.c
+++ b/test/core/end2end/fixtures/h2_ssl_cert.c
@@ -154,41 +154,39 @@ SERVER_INIT(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY)
typedef enum { NONE, SELF_SIGNED, SIGNED, BAD_CERT_PAIR } certtype;
-#define CLIENT_INIT(cert_type) \
- static void CLIENT_INIT_NAME(cert_type)(grpc_end2end_test_fixture * f, \
- grpc_channel_args * client_args, \
- const char *query_args) { \
- GPR_ASSERT(query_args == NULL); \
- grpc_channel_credentials *ssl_creds = NULL; \
- grpc_ssl_pem_key_cert_pair self_signed_client_key_cert_pair = { \
- test_self_signed_client_key, test_self_signed_client_cert}; \
- grpc_ssl_pem_key_cert_pair signed_client_key_cert_pair = { \
- test_signed_client_key, test_signed_client_cert}; \
- grpc_ssl_pem_key_cert_pair bad_client_key_cert_pair = { \
- test_self_signed_client_key, test_signed_client_cert}; \
- grpc_ssl_pem_key_cert_pair *key_cert_pair = NULL; \
- switch (cert_type) { \
- case SELF_SIGNED: \
- key_cert_pair = &self_signed_client_key_cert_pair; \
- break; \
- case SIGNED: \
- key_cert_pair = &signed_client_key_cert_pair; \
- break; \
- case BAD_CERT_PAIR: \
- key_cert_pair = &bad_client_key_cert_pair; \
- break; \
- default: \
- break; \
- } \
- ssl_creds = \
- grpc_ssl_credentials_create(test_root_cert, key_cert_pair, NULL); \
- grpc_arg ssl_name_override = {GRPC_ARG_STRING, \
- GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, \
- {"foo.test.google.fr"}}; \
- grpc_channel_args *new_client_args = \
- grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); \
- chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds); \
- grpc_channel_args_destroy(new_client_args); \
+#define CLIENT_INIT(cert_type) \
+ static void CLIENT_INIT_NAME(cert_type)(grpc_end2end_test_fixture * f, \
+ grpc_channel_args * client_args) { \
+ grpc_channel_credentials *ssl_creds = NULL; \
+ grpc_ssl_pem_key_cert_pair self_signed_client_key_cert_pair = { \
+ test_self_signed_client_key, test_self_signed_client_cert}; \
+ grpc_ssl_pem_key_cert_pair signed_client_key_cert_pair = { \
+ test_signed_client_key, test_signed_client_cert}; \
+ grpc_ssl_pem_key_cert_pair bad_client_key_cert_pair = { \
+ test_self_signed_client_key, test_signed_client_cert}; \
+ grpc_ssl_pem_key_cert_pair *key_cert_pair = NULL; \
+ switch (cert_type) { \
+ case SELF_SIGNED: \
+ key_cert_pair = &self_signed_client_key_cert_pair; \
+ break; \
+ case SIGNED: \
+ key_cert_pair = &signed_client_key_cert_pair; \
+ break; \
+ case BAD_CERT_PAIR: \
+ key_cert_pair = &bad_client_key_cert_pair; \
+ break; \
+ default: \
+ break; \
+ } \
+ ssl_creds = \
+ grpc_ssl_credentials_create(test_root_cert, key_cert_pair, NULL); \
+ grpc_arg ssl_name_override = {GRPC_ARG_STRING, \
+ GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, \
+ {"foo.test.google.fr"}}; \
+ grpc_channel_args *new_client_args = \
+ grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); \
+ chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds); \
+ grpc_channel_args_destroy(new_client_args); \
}
CLIENT_INIT(NONE)
@@ -205,7 +203,8 @@ typedef enum { SUCCESS, FAIL } test_result;
{ \
{TEST_NAME(request_type, cert_type, result), \
FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | \
- FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS, \
+ FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | \
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL, \
chttp2_create_fixture_secure_fullstack, CLIENT_INIT_NAME(cert_type), \
SERVER_INIT_NAME(request_type), chttp2_tear_down_secure_fullstack}, \
result \
@@ -267,7 +266,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.c b/test/core/end2end/fixtures/h2_ssl_proxy.c
index 7d39fb2055..27cf3ebf32 100644
--- a/test/core/end2end/fixtures/h2_ssl_proxy.c
+++ b/test/core/end2end/fixtures/h2_ssl_proxy.c
@@ -142,9 +142,7 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) {
}
static void chttp2_init_client_simple_ssl_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_end2end_test_fixture *f, grpc_channel_args *client_args) {
grpc_channel_credentials *ssl_creds =
grpc_ssl_credentials_create(NULL, NULL, NULL);
grpc_arg ssl_name_override = {GRPC_ARG_STRING,
@@ -187,7 +185,9 @@ static grpc_end2end_test_config configs[] = {
{"chttp2/simple_ssl_fullstack",
FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
FEATURE_MASK_SUPPORTS_REQUEST_PROXYING |
- FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS,
+ FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_secure_fullstack,
chttp2_init_client_simple_ssl_secure_fullstack,
chttp2_init_server_simple_ssl_secure_fullstack,
diff --git a/test/core/end2end/fixtures/h2_uds.c b/test/core/end2end/fixtures/h2_uds.c
index 888d6c0a10..bc973ea8e3 100644
--- a/test/core/end2end/fixtures/h2_uds.c
+++ b/test/core/end2end/fixtures/h2_uds.c
@@ -76,9 +76,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
}
void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- const char *query_args) {
- GPR_ASSERT(query_args == NULL);
+ grpc_channel_args *client_args) {
fullstack_fixture_data *ffd = f->fixture_data;
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
}
@@ -103,7 +101,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack_uds", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION,
+ {"chttp2/fullstack_uds", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/server_hanging_response_1_header b/test/core/end2end/fuzzers/client_fuzzer_corpus/server_hanging_response_1_header
new file mode 100644
index 0000000000..d2abd17464
--- /dev/null
+++ b/test/core/end2end/fuzzers/client_fuzzer_corpus/server_hanging_response_1_header
Binary files differ
diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/server_hanging_response_2_header2 b/test/core/end2end/fuzzers/client_fuzzer_corpus/server_hanging_response_2_header2
new file mode 100644
index 0000000000..752af468ba
--- /dev/null
+++ b/test/core/end2end/fuzzers/client_fuzzer_corpus/server_hanging_response_2_header2
Binary files differ
diff --git a/tools/dockerfile/grpc_check_generated_pb_files/Dockerfile b/test/core/end2end/fuzzers/generate_client_examples_of_bad_closing_streams.py
index d19bc67120..d80c1e0442 100644..100755
--- a/tools/dockerfile/grpc_check_generated_pb_files/Dockerfile
+++ b/test/core/end2end/fuzzers/generate_client_examples_of_bad_closing_streams.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python2.7
# Copyright 2015, Google Inc.
# All rights reserved.
#
@@ -27,47 +28,22 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-FROM debian:jessie
+import os
+import sys
-# Install Git and basic packages.
-RUN apt-get update && apt-get install -y \
- autoconf \
- autotools-dev \
- build-essential \
- bzip2 \
- ccache \
- curl \
- gcc \
- gcc-multilib \
- git \
- golang \
- gyp \
- lcov \
- libc6 \
- libc6-dbg \
- libc6-dev \
- libgtest-dev \
- libtool \
- make \
- perl \
- strace \
- python-dev \
- python-setuptools \
- python-yaml \
- telnet \
- unzip \
- wget \
- zip && apt-get clean
+os.chdir(os.path.dirname(sys.argv[0]))
-#================
-# Build profiling
-RUN apt-get update && apt-get install -y time && apt-get clean
+streams = {
+ 'server_hanging_response_1_header': (
+ [0,0,0,4,0,0,0,0,0] + # settings frame
+ [0,0,0,1,5,0,0,0,1] # trailers
+ ),
+ 'server_hanging_response_2_header2': (
+ [0,0,0,4,0,0,0,0,0] + # settings frame
+ [0,0,0,1,4,0,0,0,1] + # headers
+ [0,0,0,1,5,0,0,0,1] # trailers
+ ),
+}
-#=================
-# C++ dependencies
-RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean
-
-RUN mkdir /var/local/jenkins
-
-# Define the default command.
-CMD ["bash"]
+for name, stream in streams.items():
+ open('client_fuzzer_corpus/%s' % name, 'w').write(bytearray(stream))
diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py
index bdb3874c21..26eee93439 100755
--- a/test/core/end2end/gen_build_yaml.py
+++ b/test/core/end2end/gen_build_yaml.py
@@ -56,7 +56,6 @@ END2END_FIXTURES = {
'h2_census': default_unsecure_fixture_options,
'h2_load_reporting': default_unsecure_fixture_options,
'h2_fakesec': default_secure_fixture_options._replace(ci_mac=False),
- 'h2_fake_resolver': default_unsecure_fixture_options,
'h2_fd': fd_unsecure_fixture_options,
'h2_full': default_unsecure_fixture_options,
'h2_full+pipe': default_unsecure_fixture_options._replace(
@@ -191,7 +190,8 @@ def main():
'build': 'private',
'language': 'c',
'secure': True,
- 'src': ['test/core/end2end/end2end_tests.c'] + [
+ 'src': ['test/core/end2end/end2end_tests.c',
+ 'test/core/end2end/end2end_test_utils.c'] + [
'test/core/end2end/tests/%s.c' % t
for t in sorted(END2END_TESTS.keys())],
'headers': ['test/core/end2end/tests/cancel_test_helpers.h',
@@ -205,7 +205,8 @@ def main():
'build': 'private',
'language': 'c',
'secure': False,
- 'src': ['test/core/end2end/end2end_nosec_tests.c'] + [
+ 'src': ['test/core/end2end/end2end_nosec_tests.c',
+ 'test/core/end2end/end2end_test_utils.c'] + [
'test/core/end2end/tests/%s.c' % t
for t in sorted(END2END_TESTS.keys())
if not END2END_TESTS[t].secure],
diff --git a/test/core/end2end/tests/bad_hostname.c b/test/core/end2end/tests/bad_hostname.c
index 85258dd288..e0c7ac7c02 100644
--- a/test/core/end2end/tests/bad_hostname.c
+++ b/test/core/end2end/tests/bad_hostname.c
@@ -54,7 +54,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
config.init_server(&f, server_args);
return f;
}
diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c
index 73b0f17c24..f1ebbbb66f 100644
--- a/test/core/end2end/tests/binary_metadata.c
+++ b/test/core/end2end/tests/binary_metadata.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -146,8 +146,10 @@ static void test_request_response_with_metadata_and_payload(
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -248,7 +250,8 @@ static void test_request_response_with_metadata_and_payload(
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 0);
GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world"));
GPR_ASSERT(byte_buffer_eq_string(response_payload_recv, "hello you"));
diff --git a/test/core/end2end/tests/call_creds.c b/test/core/end2end/tests/call_creds.c
index 99c5d94e39..8bde79c400 100644
--- a/test/core/end2end/tests/call_creds.c
+++ b/test/core/end2end/tests/call_creds.c
@@ -61,7 +61,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(NULL, NULL);
- config.init_client(&f, NULL, NULL);
+ config.init_client(&f, NULL);
if (fail_server_auth_check) {
grpc_arg fail_auth_arg = {
GRPC_ARG_STRING, FAIL_AUTH_CHECK_SERVER_ARG_NAME, {NULL}};
@@ -164,8 +164,10 @@ static void request_response_with_payload_and_call_creds(
f = begin_test(config, test_name, 0);
cqv = cq_verifier_create(f.cq);
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
creds = grpc_google_iam_credentials_create(iam_token, iam_selector, NULL);
GPR_ASSERT(creds != NULL);
@@ -294,7 +296,8 @@ static void request_response_with_payload_and_call_creds(
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 0);
GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world"));
GPR_ASSERT(byte_buffer_eq_string(response_payload_recv, "hello you"));
@@ -397,8 +400,10 @@ static void test_request_with_server_rejecting_client_creds(
f = begin_test(config, "test_request_with_server_rejecting_client_creds", 1);
cqv = cq_verifier_create(f.cq);
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
creds = grpc_google_iam_credentials_create(iam_token, iam_selector, NULL);
diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c
index 9f49815527..fd03432ff5 100644
--- a/test/core/end2end/tests/cancel_after_accept.c
+++ b/test/core/end2end/tests/cancel_after_accept.c
@@ -41,6 +41,11 @@
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include <grpc/support/useful.h>
+
+#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/transport/metadata.h"
+#include "src/core/lib/transport/method_config.h"
+
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
@@ -49,13 +54,12 @@ static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
const char *test_name,
grpc_channel_args *client_args,
- grpc_channel_args *server_args,
- const char *query_args) {
+ grpc_channel_args *server_args) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, query_args);
+ config.init_client(&f, client_args);
return f;
}
@@ -126,19 +130,31 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
int was_cancelled = 2;
- const char *query_args = NULL;
+ grpc_channel_args *args = NULL;
if (use_service_config) {
- query_args =
- "method_name=/service/method"
- "&timeout_seconds=5";
+ gpr_timespec timeout = {5, 0, GPR_TIMESPAN};
+ grpc_method_config_table_entry entry = {
+ grpc_mdstr_from_string("/service/method"),
+ grpc_method_config_create(NULL, &timeout, NULL, NULL),
+ };
+ grpc_method_config_table *method_config_table =
+ grpc_method_config_table_create(1, &entry);
+ GRPC_MDSTR_UNREF(entry.method_name);
+ grpc_method_config_unref(entry.method_config);
+ grpc_arg arg =
+ grpc_method_config_table_create_channel_arg(method_config_table);
+ args = grpc_channel_args_copy_and_add(args, &arg, 1);
+ grpc_method_config_table_unref(method_config_table);
}
+
grpc_end2end_test_fixture f =
- begin_test(config, "cancel_after_accept", NULL, NULL, query_args);
+ begin_test(config, "cancel_after_accept", args, NULL);
cq_verifier *cqv = cq_verifier_create(f.cq);
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/service/method", "foo.test.google.fr",
- deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/service/method",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -233,6 +249,8 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
grpc_call_destroy(c);
grpc_call_destroy(s);
+ if (args != NULL) grpc_channel_args_destroy(args);
+
cq_verifier_destroy(cqv);
end_test(&f);
config.tear_down_data(&f);
@@ -244,15 +262,10 @@ void cancel_after_accept(grpc_end2end_test_config config) {
for (i = 0; i < GPR_ARRAY_SIZE(cancellation_modes); i++) {
test_cancel_after_accept(config, cancellation_modes[i],
false /* use_service_config */);
- }
-
- if (config.feature_mask & FEATURE_MASK_SUPPORTS_QUERY_ARGS) {
- for (i = 0; i < GPR_ARRAY_SIZE(cancellation_modes); i++) {
- if (cancellation_modes[i].expect_status ==
- GRPC_STATUS_DEADLINE_EXCEEDED) {
- test_cancel_after_accept(config, cancellation_modes[i],
- true /* use_service_config */);
- }
+ if (config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL &&
+ cancellation_modes[i].expect_status == GRPC_STATUS_DEADLINE_EXCEEDED) {
+ test_cancel_after_accept(config, cancellation_modes[i],
+ true /* use_service_config */);
}
}
}
diff --git a/test/core/end2end/tests/cancel_after_client_done.c b/test/core/end2end/tests/cancel_after_client_done.c
index f61a404b2d..26de66eba7 100644
--- a/test/core/end2end/tests/cancel_after_client_done.c
+++ b/test/core/end2end/tests/cancel_after_client_done.c
@@ -54,7 +54,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -125,8 +125,10 @@ static void test_cancel_after_accept_and_writes_closed(
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c
index c31582bf2e..afbfb02a39 100644
--- a/test/core/end2end/tests/cancel_after_invoke.c
+++ b/test/core/end2end/tests/cancel_after_invoke.c
@@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s/%s", test_name, config.name, mode.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -120,8 +120,10 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config,
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c
index 5dcd44e7b4..d0eeed8ab8 100644
--- a/test/core/end2end/tests/cancel_before_invoke.c
+++ b/test/core/end2end/tests/cancel_before_invoke.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -118,8 +118,10 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config,
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
GPR_ASSERT(GRPC_CALL_OK == grpc_call_cancel(c, NULL));
diff --git a/test/core/end2end/tests/cancel_in_a_vacuum.c b/test/core/end2end/tests/cancel_in_a_vacuum.c
index 7f75a92e4a..5be850b6ea 100644
--- a/test/core/end2end/tests/cancel_in_a_vacuum.c
+++ b/test/core/end2end/tests/cancel_in_a_vacuum.c
@@ -54,7 +54,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -105,8 +105,10 @@ static void test_cancel_in_a_vacuum(grpc_end2end_test_config config,
gpr_timespec deadline = five_seconds_time();
cq_verifier *v_client = cq_verifier_create(f.cq);
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
GPR_ASSERT(GRPC_CALL_OK == mode.initiate_cancel(c, NULL));
diff --git a/test/core/end2end/tests/cancel_with_status.c b/test/core/end2end/tests/cancel_with_status.c
index 5cf3eb6be6..3aecaf7159 100644
--- a/test/core/end2end/tests/cancel_with_status.c
+++ b/test/core/end2end/tests/cancel_with_status.c
@@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -97,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) {
+static void simple_request_body(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f, size_t num_ops) {
grpc_call *c;
gpr_timespec deadline = five_seconds_time();
cq_verifier *cqv = cq_verifier_create(f.cq);
@@ -112,9 +113,10 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) {
gpr_log(GPR_DEBUG, "test with %" PRIuPTR " ops", num_ops);
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr:1234", deadline,
- NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -170,7 +172,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config,
grpc_end2end_test_fixture f;
f = begin_test(config, "test_invoke_simple_request", NULL, NULL);
- simple_request_body(f, num_ops);
+ simple_request_body(config, f, num_ops);
end_test(&f);
config.tear_down_data(&f);
}
diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c
index f598a3812b..166e8efe37 100644
--- a/test/core/end2end/tests/compressed_payload.c
+++ b/test/core/end2end/tests/compressed_payload.c
@@ -60,7 +60,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -146,8 +146,10 @@ static void request_for_disabled_algorithm(
f = begin_test(config, test_name, client_args, server_args);
cqv = cq_verifier_create(f.cq);
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -242,7 +244,8 @@ static void request_for_disabled_algorithm(
GPR_ASSERT(0 == strcmp(details, expected_details));
gpr_free(expected_details);
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
gpr_free(details);
grpc_metadata_array_destroy(&initial_metadata_recv);
@@ -318,8 +321,10 @@ static void request_with_payload_template(
f = begin_test(config, test_name, client_args, server_args);
cqv = cq_verifier_create(f.cq);
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -491,7 +496,8 @@ static void request_with_payload_template(
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 0);
gpr_free(details);
diff --git a/test/core/end2end/tests/connectivity.c b/test/core/end2end/tests/connectivity.c
index 4a99165666..260297ebd4 100644
--- a/test/core/end2end/tests/connectivity.c
+++ b/test/core/end2end/tests/connectivity.c
@@ -68,7 +68,7 @@ static void test_connectivity(grpc_end2end_test_config config) {
gpr_thd_options thdopt = gpr_thd_options_default();
gpr_thd_id thdid;
- config.init_client(&f, NULL, NULL);
+ config.init_client(&f, NULL);
ce.channel = f.client;
ce.cq = f.cq;
diff --git a/test/core/end2end/tests/default_host.c b/test/core/end2end/tests/default_host.c
index 5b32b50c03..208e31697e 100644
--- a/test/core/end2end/tests/default_host.c
+++ b/test/core/end2end/tests/default_host.c
@@ -54,7 +54,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
config.init_server(&f, server_args);
return f;
}
diff --git a/test/core/end2end/tests/disappearing_server.c b/test/core/end2end/tests/disappearing_server.c
index d8d76f8c38..8ebf7e643e 100644
--- a/test/core/end2end/tests/disappearing_server.c
+++ b/test/core/end2end/tests/disappearing_server.c
@@ -79,7 +79,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f,
+static void do_request_and_shutdown_server(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture *f,
cq_verifier *cqv) {
grpc_call *c;
grpc_call *s;
@@ -96,9 +97,10 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f,
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f->client, NULL, GRPC_PROPAGATE_DEFAULTS, f->cq,
- "/foo", "foo.test.google.fr:1234", deadline,
- NULL);
+ c = grpc_channel_create_call(
+ f->client, NULL, GRPC_PROPAGATE_DEFAULTS, f->cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -174,7 +176,8 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f,
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@@ -193,15 +196,15 @@ static void disappearing_server_test(grpc_end2end_test_config config) {
gpr_log(GPR_INFO, "%s/%s", "disappearing_server_test", config.name);
- config.init_client(&f, NULL, NULL);
+ config.init_client(&f, NULL);
config.init_server(&f, NULL);
- do_request_and_shutdown_server(&f, cqv);
+ do_request_and_shutdown_server(config, &f, cqv);
/* now destroy and recreate the server */
config.init_server(&f, NULL);
- do_request_and_shutdown_server(&f, cqv);
+ do_request_and_shutdown_server(config, &f, cqv);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/empty_batch.c b/test/core/end2end/tests/empty_batch.c
index bc27b1ac14..dc8e52a60f 100644
--- a/test/core/end2end/tests/empty_batch.c
+++ b/test/core/end2end/tests/empty_batch.c
@@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -97,15 +97,18 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void empty_batch_body(grpc_end2end_test_fixture f) {
+static void empty_batch_body(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f) {
grpc_call *c;
gpr_timespec deadline = five_seconds_time();
cq_verifier *cqv = cq_verifier_create(f.cq);
grpc_call_error error;
grpc_op *op = NULL;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
error = grpc_call_start_batch(c, op, 0, tag(1), NULL);
@@ -122,7 +125,7 @@ static void test_invoke_empty_body(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f;
f = begin_test(config, "test_invoke_empty_body", NULL, NULL);
- empty_batch_body(f);
+ empty_batch_body(config, f);
end_test(&f);
config.tear_down_data(&f);
}
diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c
index 0e5692f4c9..84d95b20b8 100644
--- a/test/core/end2end/tests/filter_call_init_fails.c
+++ b/test/core/end2end/tests/filter_call_init_fails.c
@@ -61,7 +61,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -127,8 +127,10 @@ static void test_request(grpc_end2end_test_config config) {
char *details = NULL;
size_t details_capacity = 0;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c
index d5eddc7330..51e56d74a3 100644
--- a/test/core/end2end/tests/filter_causes_close.c
+++ b/test/core/end2end/tests/filter_causes_close.c
@@ -58,7 +58,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -123,8 +123,10 @@ static void test_request(grpc_end2end_test_config config) {
char *details = NULL;
size_t details_capacity = 0;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
diff --git a/test/core/end2end/tests/graceful_server_shutdown.c b/test/core/end2end/tests/graceful_server_shutdown.c
index e098a63f8b..5fecadbe44 100644
--- a/test/core/end2end/tests/graceful_server_shutdown.c
+++ b/test/core/end2end/tests/graceful_server_shutdown.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -111,8 +111,10 @@ static void test_early_server_shutdown_finishes_inflight_calls(
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -190,7 +192,8 @@ static void test_early_server_shutdown_finishes_inflight_calls(
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
diff --git a/test/core/end2end/tests/high_initial_seqno.c b/test/core/end2end/tests/high_initial_seqno.c
index 193706b8cf..01a4909ccd 100644
--- a/test/core/end2end/tests/high_initial_seqno.c
+++ b/test/core/end2end/tests/high_initial_seqno.c
@@ -57,7 +57,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -99,7 +99,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void simple_request_body(grpc_end2end_test_fixture f) {
+static void simple_request_body(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@@ -116,9 +117,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr:1234", deadline,
- NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -189,7 +191,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@@ -229,7 +232,7 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config,
initial_sequence_number);
f = begin_test(config, name, &client_args, NULL);
for (i = 0; i < 10; i++) {
- simple_request_body(f);
+ simple_request_body(config, f);
gpr_log(GPR_INFO, "Passed simple request %d", i);
}
end_test(&f);
diff --git a/test/core/end2end/tests/hpack_size.c b/test/core/end2end/tests/hpack_size.c
index 78afdb5594..cec8b2faae 100644
--- a/test/core/end2end/tests/hpack_size.c
+++ b/test/core/end2end/tests/hpack_size.c
@@ -197,7 +197,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -239,7 +239,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void simple_request_body(grpc_end2end_test_fixture f, size_t index) {
+static void simple_request_body(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f, size_t index) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@@ -268,9 +269,10 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t index) {
extra_metadata[2].value = dragons[index % GPR_ARRAY_SIZE(dragons)];
extra_metadata[2].value_length = strlen(extra_metadata[2].value);
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr:1234", deadline,
- NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -342,7 +344,8 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t index) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@@ -383,7 +386,7 @@ static void test_size(grpc_end2end_test_config config, int encode_size,
f = begin_test(config, name, encode_size != 4096 ? &client_args : NULL,
decode_size != 4096 ? &server_args : NULL);
for (i = 0; i < 4 * GPR_ARRAY_SIZE(hobbits); i++) {
- simple_request_body(f, i);
+ simple_request_body(config, f, i);
}
end_test(&f);
config.tear_down_data(&f);
diff --git a/test/core/end2end/tests/idempotent_request.c b/test/core/end2end/tests/idempotent_request.c
index b53e00386b..4f6d3bb808 100644
--- a/test/core/end2end/tests/idempotent_request.c
+++ b/test/core/end2end/tests/idempotent_request.c
@@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -97,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void simple_request_body(grpc_end2end_test_fixture f) {
+static void simple_request_body(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@@ -115,9 +116,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
int was_cancelled = 2;
char *peer;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr:1234", deadline,
- NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
peer = grpc_call_get_peer(c);
@@ -202,7 +204,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST == call_details.flags);
GPR_ASSERT(was_cancelled == 1);
@@ -222,7 +225,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f;
f = begin_test(config, "test_invoke_simple_request", NULL, NULL);
- simple_request_body(f);
+ simple_request_body(config, f);
end_test(&f);
config.tear_down_data(&f);
}
@@ -232,7 +235,7 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_10_simple_requests", NULL, NULL);
for (i = 0; i < 10; i++) {
- simple_request_body(f);
+ simple_request_body(config, f);
gpr_log(GPR_INFO, "Passed simple request %d", i);
}
end_test(&f);
diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c
index 3820504e11..edb655fea5 100644
--- a/test/core/end2end/tests/invoke_large_request.c
+++ b/test/core/end2end/tests/invoke_large_request.c
@@ -54,7 +54,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -144,8 +144,10 @@ static void test_invoke_large_request(grpc_end2end_test_config config,
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -244,7 +246,8 @@ static void test_invoke_large_request(grpc_end2end_test_config config,
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c
index 6107836b12..499c56413b 100644
--- a/test/core/end2end/tests/large_metadata.c
+++ b/test/core/end2end/tests/large_metadata.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -125,8 +125,10 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
meta.key = "key";
@@ -227,7 +229,8 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 0);
GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world"));
GPR_ASSERT(contains_metadata(&request_metadata_recv, "key", meta.value));
diff --git a/test/core/end2end/tests/load_reporting_hook.c b/test/core/end2end/tests/load_reporting_hook.c
index 0915730a02..ca4e2709a9 100644
--- a/test/core/end2end/tests/load_reporting_hook.c
+++ b/test/core/end2end/tests/load_reporting_hook.c
@@ -78,7 +78,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -121,12 +121,10 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void request_response_with_payload(grpc_end2end_test_fixture f,
- const char *method_name,
- const char *request_msg,
- const char *response_msg,
- grpc_metadata *initial_lr_metadata,
- grpc_metadata *trailing_lr_metadata) {
+static void request_response_with_payload(
+ grpc_end2end_test_config config, grpc_end2end_test_fixture f,
+ const char *method_name, const char *request_msg, const char *response_msg,
+ grpc_metadata *initial_lr_metadata, grpc_metadata *trailing_lr_metadata) {
gpr_slice request_payload_slice = gpr_slice_from_static_string(request_msg);
gpr_slice response_payload_slice = gpr_slice_from_static_string(response_msg);
grpc_call *c;
@@ -151,9 +149,10 @@ static void request_response_with_payload(grpc_end2end_test_fixture f,
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- method_name, "foo.test.google.fr", deadline,
- NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, method_name,
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -307,8 +306,9 @@ static void test_load_reporting_hook(grpc_end2end_test_config config) {
memset(&trailing_lr_metadata.internal_data, 0,
sizeof(trailing_lr_metadata.internal_data));
- request_response_with_payload(f, method_name, request_msg, response_msg,
- &initial_lr_metadata, &trailing_lr_metadata);
+ request_response_with_payload(config, f, method_name, request_msg,
+ response_msg, &initial_lr_metadata,
+ &trailing_lr_metadata);
end_test(&f);
grpc_channel_args_destroy(lr_server_args);
config.tear_down_data(&f);
diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c
index 6c7bf9f531..9338bc5f0d 100644
--- a/test/core/end2end/tests/max_concurrent_streams.c
+++ b/test/core/end2end/tests/max_concurrent_streams.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -95,7 +95,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void simple_request_body(grpc_end2end_test_fixture f) {
+static void simple_request_body(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@@ -112,9 +113,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr:1234", deadline,
- NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -185,7 +187,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@@ -250,20 +253,22 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
/* perform a ping-pong to ensure that settings have had a chance to round
trip */
- simple_request_body(f);
+ simple_request_body(config, f);
/* perform another one to make sure that the one stream case still works */
- simple_request_body(f);
+ simple_request_body(config, f);
/* start two requests - ensuring that the second is not accepted until
the first completes */
deadline = n_seconds_time(1000);
- c1 = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/alpha", "foo.test.google.fr:1234", deadline,
- NULL);
+ c1 = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/alpha",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c1);
- c2 = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/beta", "foo.test.google.fr:1234", deadline,
- NULL);
+ c2 = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/beta",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c2);
GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call(
diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c
index 449a581d23..b416627bfd 100644
--- a/test/core/end2end/tests/max_message_length.c
+++ b/test/core/end2end/tests/max_message_length.c
@@ -41,6 +41,11 @@
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include <grpc/support/useful.h>
+
+#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/transport/metadata.h"
+#include "src/core/lib/transport/method_config.h"
+
#include "test/core/end2end/cq_verifier.h"
static void *tag(intptr_t t) { return (void *)t; }
@@ -48,8 +53,7 @@ static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
const char *test_name,
grpc_channel_args *client_args,
- grpc_channel_args *server_args,
- const char *query_args) {
+ grpc_channel_args *server_args) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
// We intentionally do not pass the client and server args to
@@ -57,7 +61,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
// proxy, only on the backend server.
f = config.create_fixture(NULL, NULL);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, query_args);
+ config.init_client(&f, client_args);
return f;
}
@@ -109,8 +113,6 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
send_limit, use_service_config);
grpc_end2end_test_fixture f;
- grpc_arg channel_arg;
- grpc_channel_args channel_args;
grpc_call *c = NULL;
grpc_call *s = NULL;
cq_verifier *cqv;
@@ -130,37 +132,50 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
size_t details_capacity = 0;
int was_cancelled = 2;
- char *query_args = NULL;
grpc_channel_args *client_args = NULL;
grpc_channel_args *server_args = NULL;
if (use_service_config) {
// We don't currently support service configs on the server side.
GPR_ASSERT(send_limit);
- query_args =
- "method_name=/service/method"
- "&max_request_message_bytes=5";
+ int32_t max_request_message_bytes = 5;
+ grpc_method_config_table_entry entry = {
+ grpc_mdstr_from_string("/service/method"),
+ grpc_method_config_create(NULL, NULL, &max_request_message_bytes, NULL),
+ };
+ grpc_method_config_table *method_config_table =
+ grpc_method_config_table_create(1, &entry);
+ GRPC_MDSTR_UNREF(entry.method_name);
+ grpc_method_config_unref(entry.method_config);
+ grpc_arg arg =
+ grpc_method_config_table_create_channel_arg(method_config_table);
+ client_args = grpc_channel_args_copy_and_add(NULL, &arg, 1);
+ grpc_method_config_table_unref(method_config_table);
} else {
// Set limit via channel args.
- channel_arg.key = send_limit ? GRPC_ARG_MAX_SEND_MESSAGE_LENGTH
- : GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH;
- channel_arg.type = GRPC_ARG_INTEGER;
- channel_arg.value.integer = 5;
- channel_args.num_args = 1;
- channel_args.args = &channel_arg;
+ grpc_arg arg;
+ arg.key = send_limit ? GRPC_ARG_MAX_SEND_MESSAGE_LENGTH
+ : GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH;
+ arg.type = GRPC_ARG_INTEGER;
+ arg.value.integer = 5;
+ grpc_channel_args *args = grpc_channel_args_copy_and_add(NULL, &arg, 1);
if (send_limit) {
- client_args = &channel_args;
+ client_args = args;
} else {
- server_args = &channel_args;
+ server_args = args;
}
}
f = begin_test(config, "test_max_request_message_length", client_args,
- server_args, query_args);
+ server_args);
+ if (client_args != NULL) grpc_channel_args_destroy(client_args);
+ if (server_args != NULL) grpc_channel_args_destroy(server_args);
+
cqv = cq_verifier_create(f.cq);
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/service/method", "foo.test.google.fr:1234",
- gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/service/method",
+ get_host_override_string("foo.test.google.fr:1234", config),
+ gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -233,7 +248,8 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
cq_verify(cqv);
GPR_ASSERT(0 == strcmp(call_details.method, "/service/method"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 1);
done:
@@ -270,8 +286,6 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
send_limit, use_service_config);
grpc_end2end_test_fixture f;
- grpc_arg channel_arg;
- grpc_channel_args channel_args;
grpc_call *c = NULL;
grpc_call *s = NULL;
cq_verifier *cqv;
@@ -292,32 +306,45 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
size_t details_capacity = 0;
int was_cancelled = 2;
- char *query_args = NULL;
grpc_channel_args *client_args = NULL;
grpc_channel_args *server_args = NULL;
if (use_service_config) {
// We don't currently support service configs on the server side.
GPR_ASSERT(!send_limit);
- query_args =
- "method_name=/service/method"
- "&max_response_message_bytes=5";
+ int32_t max_response_message_bytes = 5;
+ grpc_method_config_table_entry entry = {
+ grpc_mdstr_from_string("/service/method"),
+ grpc_method_config_create(NULL, NULL, NULL,
+ &max_response_message_bytes),
+ };
+ grpc_method_config_table *method_config_table =
+ grpc_method_config_table_create(1, &entry);
+ GRPC_MDSTR_UNREF(entry.method_name);
+ grpc_method_config_unref(entry.method_config);
+ grpc_arg arg =
+ grpc_method_config_table_create_channel_arg(method_config_table);
+ client_args = grpc_channel_args_copy_and_add(NULL, &arg, 1);
+ grpc_method_config_table_unref(method_config_table);
} else {
// Set limit via channel args.
- channel_arg.key = send_limit ? GRPC_ARG_MAX_SEND_MESSAGE_LENGTH
- : GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH;
- channel_arg.type = GRPC_ARG_INTEGER;
- channel_arg.value.integer = 5;
- channel_args.num_args = 1;
- channel_args.args = &channel_arg;
+ grpc_arg arg;
+ arg.key = send_limit ? GRPC_ARG_MAX_SEND_MESSAGE_LENGTH
+ : GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH;
+ arg.type = GRPC_ARG_INTEGER;
+ arg.value.integer = 5;
+ grpc_channel_args *args = grpc_channel_args_copy_and_add(NULL, &arg, 1);
if (send_limit) {
- server_args = &channel_args;
+ server_args = args;
} else {
- client_args = &channel_args;
+ client_args = args;
}
}
f = begin_test(config, "test_max_response_message_length", client_args,
- server_args, query_args);
+ server_args);
+ if (client_args != NULL) grpc_channel_args_destroy(client_args);
+ if (server_args != NULL) grpc_channel_args_destroy(server_args);
+
cqv = cq_verifier_create(f.cq);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
@@ -435,12 +462,10 @@ void max_message_length(grpc_end2end_test_config config) {
false /* use_service_config */);
test_max_message_length_on_response(config, true /* send_limit */,
false /* use_service_config */);
- if (config.feature_mask & FEATURE_MASK_SUPPORTS_QUERY_ARGS) {
- test_max_message_length_on_request(config, true /* send_limit */,
- true /* use_service_config */);
- test_max_message_length_on_response(config, false /* send_limit */,
- true /* use_service_config */);
- }
+ test_max_message_length_on_request(config, true /* send_limit */,
+ true /* use_service_config */);
+ test_max_message_length_on_response(config, false /* send_limit */,
+ true /* use_service_config */);
}
void max_message_length_pre_init(void) {}
diff --git a/test/core/end2end/tests/negative_deadline.c b/test/core/end2end/tests/negative_deadline.c
index 12c6a0f2bd..929777d39e 100644
--- a/test/core/end2end/tests/negative_deadline.c
+++ b/test/core/end2end/tests/negative_deadline.c
@@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -97,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) {
+static void simple_request_body(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f, size_t num_ops) {
grpc_call *c;
gpr_timespec deadline = gpr_inf_past(GPR_CLOCK_REALTIME);
cq_verifier *cqv = cq_verifier_create(f.cq);
@@ -112,9 +113,10 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) {
gpr_log(GPR_DEBUG, "test with %" PRIuPTR " ops", num_ops);
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr:1234", deadline,
- NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -167,7 +169,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config,
grpc_end2end_test_fixture f;
f = begin_test(config, "test_invoke_simple_request", NULL, NULL);
- simple_request_body(f, num_ops);
+ simple_request_body(config, f, num_ops);
end_test(&f);
config.tear_down_data(&f);
}
diff --git a/test/core/end2end/tests/network_status_change.c b/test/core/end2end/tests/network_status_change.c
index fa711bb0b6..96e909e463 100644
--- a/test/core/end2end/tests/network_status_change.c
+++ b/test/core/end2end/tests/network_status_change.c
@@ -56,7 +56,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -122,8 +122,10 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -212,7 +214,8 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
// Expected behavior of a RPC when network is lost.
GPR_ASSERT(status == GRPC_STATUS_UNAVAILABLE);
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
gpr_free(details);
grpc_metadata_array_destroy(&initial_metadata_recv);
diff --git a/test/core/end2end/tests/no_logging.c b/test/core/end2end/tests/no_logging.c
index 8f9ef78ba2..54614cb029 100644
--- a/test/core/end2end/tests/no_logging.c
+++ b/test/core/end2end/tests/no_logging.c
@@ -83,7 +83,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -125,7 +125,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void simple_request_body(grpc_end2end_test_fixture f) {
+static void simple_request_body(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@@ -143,9 +144,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
int was_cancelled = 2;
char *peer;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr:1234", deadline,
- NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
peer = grpc_call_get_peer(c);
@@ -227,7 +229,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(0 == call_details.flags);
GPR_ASSERT(was_cancelled == 1);
@@ -248,7 +251,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config) {
f = begin_test(config, "test_invoke_simple_request_with_no_error_logging",
NULL, NULL);
- simple_request_body(f);
+ simple_request_body(config, f);
end_test(&f);
config.tear_down_data(&f);
}
@@ -259,10 +262,10 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
begin_test(config, "test_invoke_10_simple_requests_with_no_error_logging",
NULL, NULL);
for (i = 0; i < 10; i++) {
- simple_request_body(f);
+ simple_request_body(config, f);
gpr_log(GPR_INFO, "Passed simple request %d", i);
}
- simple_request_body(f);
+ simple_request_body(config, f);
end_test(&f);
config.tear_down_data(&f);
}
@@ -283,10 +286,10 @@ static void test_no_logging_in_one_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f =
begin_test(config, "test_no_logging_in_last_request", NULL, NULL);
for (i = 0; i < 10; i++) {
- simple_request_body(f);
+ simple_request_body(config, f);
}
gpr_atm_no_barrier_store(&g_log_func, (gpr_atm)test_no_log);
- simple_request_body(f);
+ simple_request_body(config, f);
gpr_atm_no_barrier_store(&g_log_func, (gpr_atm)gpr_default_log);
end_test(&f);
config.tear_down_data(&f);
diff --git a/test/core/end2end/tests/no_op.c b/test/core/end2end/tests/no_op.c
index a1c61cb8d1..8b29c219dc 100644
--- a/test/core/end2end/tests/no_op.c
+++ b/test/core/end2end/tests/no_op.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
diff --git a/test/core/end2end/tests/payload.c b/test/core/end2end/tests/payload.c
index 8353ea32fd..17cea48f03 100644
--- a/test/core/end2end/tests/payload.c
+++ b/test/core/end2end/tests/payload.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -111,7 +111,8 @@ static gpr_slice generate_random_slice() {
return out;
}
-static void request_response_with_payload(grpc_end2end_test_fixture f) {
+static void request_response_with_payload(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f) {
/* Create large request and response bodies. These are big enough to require
* multiple round trips to deliver to the peer, and their exact contents of
* will be verified on completion. */
@@ -140,8 +141,10 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) {
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -240,7 +243,8 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 0);
GPR_ASSERT(byte_buffer_eq_slice(request_payload_recv, request_payload_slice));
GPR_ASSERT(
@@ -269,7 +273,7 @@ static void test_invoke_request_response_with_payload(
grpc_end2end_test_config config) {
grpc_end2end_test_fixture f = begin_test(
config, "test_invoke_request_response_with_payload", NULL, NULL);
- request_response_with_payload(f);
+ request_response_with_payload(config, f);
end_test(&f);
config.tear_down_data(&f);
}
@@ -280,7 +284,7 @@ static void test_invoke_10_request_response_with_payload(
grpc_end2end_test_fixture f = begin_test(
config, "test_invoke_10_request_response_with_payload", NULL, NULL);
for (i = 0; i < 10; i++) {
- request_response_with_payload(f);
+ request_response_with_payload(config, f);
}
end_test(&f);
config.tear_down_data(&f);
diff --git a/test/core/end2end/tests/ping.c b/test/core/end2end/tests/ping.c
index f7e119cc2f..5e5169dedc 100644
--- a/test/core/end2end/tests/ping.c
+++ b/test/core/end2end/tests/ping.c
@@ -48,7 +48,7 @@ static void test_ping(grpc_end2end_test_config config) {
grpc_connectivity_state state = GRPC_CHANNEL_IDLE;
int i;
- config.init_client(&f, NULL, NULL);
+ config.init_client(&f, NULL);
config.init_server(&f, NULL);
grpc_channel_ping(f.client, f.cq, tag(0), NULL);
diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c
index 30ea80043b..52f0d70a44 100644
--- a/test/core/end2end/tests/ping_pong_streaming.c
+++ b/test/core/end2end/tests/ping_pong_streaming.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -123,9 +123,10 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world");
gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you");
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr:1234", deadline,
- NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
diff --git a/test/core/end2end/tests/registered_call.c b/test/core/end2end/tests/registered_call.c
index 4c094e1b8b..6594b420b9 100644
--- a/test/core/end2end/tests/registered_call.c
+++ b/test/core/end2end/tests/registered_call.c
@@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -97,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
+static void simple_request_body(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f, void *rc) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@@ -186,7 +187,8 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@@ -204,10 +206,11 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
static void test_invoke_simple_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_simple_request", NULL, NULL);
- void *rc = grpc_channel_register_call(f.client, "/foo",
- "foo.test.google.fr:1234", NULL);
+ void *rc = grpc_channel_register_call(
+ f.client, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), NULL);
- simple_request_body(f, rc);
+ simple_request_body(config, f, rc);
end_test(&f);
config.tear_down_data(&f);
}
@@ -216,11 +219,12 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
int i;
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_10_simple_requests", NULL, NULL);
- void *rc = grpc_channel_register_call(f.client, "/foo",
- "foo.test.google.fr:1234", NULL);
+ void *rc = grpc_channel_register_call(
+ f.client, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), NULL);
for (i = 0; i < 10; i++) {
- simple_request_body(f, rc);
+ simple_request_body(config, f, rc);
gpr_log(GPR_INFO, "Passed simple request %d", i);
}
end_test(&f);
diff --git a/test/core/end2end/tests/request_with_flags.c b/test/core/end2end/tests/request_with_flags.c
index 69ad69af66..f96ef6aa94 100644
--- a/test/core/end2end/tests/request_with_flags.c
+++ b/test/core/end2end/tests/request_with_flags.c
@@ -54,7 +54,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -120,8 +120,10 @@ static void test_invoke_request_with_flags(
size_t details_capacity = 0;
grpc_call_error expectation;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c
index 56ff83cdb4..359f4e9fd2 100644
--- a/test/core/end2end/tests/request_with_payload.c
+++ b/test/core/end2end/tests/request_with_payload.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -119,8 +119,10 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -208,7 +210,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 0);
GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world"));
diff --git a/test/core/end2end/tests/resource_quota_server.c b/test/core/end2end/tests/resource_quota_server.c
index fbd4986dfb..35f200b75f 100644
--- a/test/core/end2end/tests/resource_quota_server.c
+++ b/test/core/end2end/tests/resource_quota_server.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -137,17 +137,22 @@ void resource_quota_server(grpc_end2end_test_config config) {
* will be verified on completion. */
gpr_slice request_payload_slice = generate_random_slice();
- grpc_call *client_calls[NUM_CALLS];
- grpc_call *server_calls[NUM_CALLS];
- grpc_metadata_array initial_metadata_recv[NUM_CALLS];
- grpc_metadata_array trailing_metadata_recv[NUM_CALLS];
- grpc_metadata_array request_metadata_recv[NUM_CALLS];
- grpc_call_details call_details[NUM_CALLS];
- grpc_status_code status[NUM_CALLS];
- char *details[NUM_CALLS];
- size_t details_capacity[NUM_CALLS];
- grpc_byte_buffer *request_payload_recv[NUM_CALLS];
- int was_cancelled[NUM_CALLS];
+ grpc_call **client_calls = malloc(sizeof(grpc_call *) * NUM_CALLS);
+ grpc_call **server_calls = malloc(sizeof(grpc_call *) * NUM_CALLS);
+ grpc_metadata_array *initial_metadata_recv =
+ malloc(sizeof(grpc_metadata_array) * NUM_CALLS);
+ grpc_metadata_array *trailing_metadata_recv =
+ malloc(sizeof(grpc_metadata_array) * NUM_CALLS);
+ grpc_metadata_array *request_metadata_recv =
+ malloc(sizeof(grpc_metadata_array) * NUM_CALLS);
+ grpc_call_details *call_details =
+ malloc(sizeof(grpc_call_details) * NUM_CALLS);
+ grpc_status_code *status = malloc(sizeof(grpc_status_code) * NUM_CALLS);
+ char **details = malloc(sizeof(char *) * NUM_CALLS);
+ size_t *details_capacity = malloc(sizeof(size_t) * NUM_CALLS);
+ grpc_byte_buffer **request_payload_recv =
+ malloc(sizeof(grpc_byte_buffer *) * NUM_CALLS);
+ int *was_cancelled = malloc(sizeof(int) * NUM_CALLS);
grpc_call_error error;
int pending_client_calls = 0;
int pending_server_start_calls = 0;
@@ -356,6 +361,18 @@ void resource_quota_server(grpc_end2end_test_config config) {
gpr_slice_unref(request_payload_slice);
grpc_resource_quota_unref(resource_quota);
+ free(client_calls);
+ free(server_calls);
+ free(initial_metadata_recv);
+ free(trailing_metadata_recv);
+ free(request_metadata_recv);
+ free(call_details);
+ free(status);
+ free(details);
+ free(details_capacity);
+ free(request_payload_recv);
+ free(was_cancelled);
+
end_test(&f);
config.tear_down_data(&f);
}
diff --git a/test/core/end2end/tests/server_finishes_request.c b/test/core/end2end/tests/server_finishes_request.c
index c23b7581f4..3bb25fd924 100644
--- a/test/core/end2end/tests/server_finishes_request.c
+++ b/test/core/end2end/tests/server_finishes_request.c
@@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -97,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void simple_request_body(grpc_end2end_test_fixture f) {
+static void simple_request_body(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@@ -114,9 +115,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr:1234", deadline,
- NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -183,7 +185,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@@ -202,7 +205,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f;
f = begin_test(config, "test_invoke_simple_request", NULL, NULL);
- simple_request_body(f);
+ simple_request_body(config, f);
end_test(&f);
config.tear_down_data(&f);
}
diff --git a/test/core/end2end/tests/shutdown_finishes_calls.c b/test/core/end2end/tests/shutdown_finishes_calls.c
index a21a63ad78..b80a2e35f2 100644
--- a/test/core/end2end/tests/shutdown_finishes_calls.c
+++ b/test/core/end2end/tests/shutdown_finishes_calls.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -104,8 +104,10 @@ static void test_early_server_shutdown_finishes_inflight_calls(
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -171,7 +173,8 @@ static void test_early_server_shutdown_finishes_inflight_calls(
GPR_ASSERT(status == GRPC_STATUS_UNAVAILABLE);
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
diff --git a/test/core/end2end/tests/shutdown_finishes_tags.c b/test/core/end2end/tests/shutdown_finishes_tags.c
index aca7c55b9f..1d110a74ea 100644
--- a/test/core/end2end/tests/shutdown_finishes_tags.c
+++ b/test/core/end2end/tests/shutdown_finishes_tags.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
diff --git a/test/core/end2end/tests/simple_cacheable_request.c b/test/core/end2end/tests/simple_cacheable_request.c
index 29ba41bd8b..9f6a6a08a0 100644
--- a/test/core/end2end/tests/simple_cacheable_request.c
+++ b/test/core/end2end/tests/simple_cacheable_request.c
@@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -133,8 +133,10 @@ static void test_cacheable_request_response_with_metadata_and_payload(
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -235,7 +237,8 @@ static void test_cacheable_request_response_with_metadata_and_payload(
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
if (config.feature_mask & FEATURE_MASK_SUPPORTS_REQUEST_PROXYING) {
// Our simple proxy does not support cacheable requests
} else {
diff --git a/test/core/end2end/tests/simple_delayed_request.c b/test/core/end2end/tests/simple_delayed_request.c
index 9d7d3a658e..ec40c8f22d 100644
--- a/test/core/end2end/tests/simple_delayed_request.c
+++ b/test/core/end2end/tests/simple_delayed_request.c
@@ -104,10 +104,12 @@ static void simple_delayed_request_body(grpc_end2end_test_config config,
size_t details_capacity = 0;
int was_cancelled = 2;
- config.init_client(f, client_args, NULL);
+ config.init_client(f, client_args);
- c = grpc_channel_create_call(f->client, NULL, GRPC_PROPAGATE_DEFAULTS, f->cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f->client, NULL, GRPC_PROPAGATE_DEFAULTS, f->cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -180,7 +182,8 @@ static void simple_delayed_request_body(grpc_end2end_test_config config,
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
diff --git a/test/core/end2end/tests/simple_metadata.c b/test/core/end2end/tests/simple_metadata.c
index 304af9c3fa..7b8adb1f32 100644
--- a/test/core/end2end/tests/simple_metadata.c
+++ b/test/core/end2end/tests/simple_metadata.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -130,8 +130,10 @@ static void test_request_response_with_metadata_and_payload(
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -232,7 +234,8 @@ static void test_request_response_with_metadata_and_payload(
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 0);
GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world"));
GPR_ASSERT(byte_buffer_eq_string(response_payload_recv, "hello you"));
diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c
index 65a3710c14..2dea5d6af2 100644
--- a/test/core/end2end/tests/simple_request.c
+++ b/test/core/end2end/tests/simple_request.c
@@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -97,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void simple_request_body(grpc_end2end_test_fixture f) {
+static void simple_request_body(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@@ -115,9 +116,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
int was_cancelled = 2;
char *peer;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr:1234", deadline,
- NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
peer = grpc_call_get_peer(c);
@@ -202,7 +204,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(0 == call_details.flags);
GPR_ASSERT(was_cancelled == 1);
@@ -222,7 +225,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f;
f = begin_test(config, "test_invoke_simple_request", NULL, NULL);
- simple_request_body(f);
+ simple_request_body(config, f);
end_test(&f);
config.tear_down_data(&f);
}
@@ -232,7 +235,7 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_10_simple_requests", NULL, NULL);
for (i = 0; i < 10; i++) {
- simple_request_body(f);
+ simple_request_body(config, f);
gpr_log(GPR_INFO, "Passed simple request %d", i);
}
end_test(&f);
diff --git a/test/core/end2end/tests/streaming_error_response.c b/test/core/end2end/tests/streaming_error_response.c
index fe63c6f7bb..7b5315d667 100644
--- a/test/core/end2end/tests/streaming_error_response.c
+++ b/test/core/end2end/tests/streaming_error_response.c
@@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
request_status_early ? "true" : "false");
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -125,8 +125,10 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -245,7 +247,8 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
GPR_ASSERT(status == GRPC_STATUS_FAILED_PRECONDITION);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
diff --git a/test/core/end2end/tests/trailing_metadata.c b/test/core/end2end/tests/trailing_metadata.c
index e6bfc7c9f1..87e29a934f 100644
--- a/test/core/end2end/tests/trailing_metadata.c
+++ b/test/core/end2end/tests/trailing_metadata.c
@@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -133,8 +133,10 @@ static void test_request_response_with_metadata_and_payload(
size_t details_capacity = 0;
int was_cancelled = 2;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr", deadline, NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -236,7 +238,8 @@ static void test_request_response_with_metadata_and_payload(
GPR_ASSERT(status == GRPC_STATUS_OK);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world"));
GPR_ASSERT(byte_buffer_eq_string(response_payload_recv, "hello you"));
GPR_ASSERT(contains_metadata(&request_metadata_recv, "key1", "val1"));
diff --git a/test/core/iomgr/resource_quota_test.c b/test/core/iomgr/resource_quota_test.c
index 34dee1aee1..22c4e4e989 100644
--- a/test/core/iomgr/resource_quota_test.c
+++ b/test/core/iomgr/resource_quota_test.c
@@ -81,11 +81,7 @@ grpc_closure *make_unused_reclaimer(grpc_closure *then) {
static void destroy_user(grpc_resource_user *usr) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- bool done = false;
- grpc_resource_user_shutdown(&exec_ctx, usr, set_bool(&done));
- grpc_exec_ctx_flush(&exec_ctx);
- GPR_ASSERT(done);
- grpc_resource_user_destroy(&exec_ctx, usr);
+ grpc_resource_user_unref(&exec_ctx, usr);
grpc_exec_ctx_finish(&exec_ctx);
}
@@ -106,10 +102,9 @@ static void test_resource_user_no_op(void) {
gpr_log(GPR_INFO, "** test_resource_user_no_op **");
grpc_resource_quota *q =
grpc_resource_quota_create("test_resource_user_no_op");
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
grpc_resource_quota_unref(q);
- destroy_user(&usr);
+ destroy_user(usr);
}
static void test_instant_alloc_then_free(void) {
@@ -117,20 +112,19 @@ static void test_instant_alloc_then_free(void) {
grpc_resource_quota *q =
grpc_resource_quota_create("test_instant_alloc_then_free");
grpc_resource_quota_resize(q, 1024 * 1024);
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL);
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, NULL);
grpc_exec_ctx_finish(&exec_ctx);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr, 1024);
+ grpc_resource_user_free(&exec_ctx, usr, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
grpc_resource_quota_unref(q);
- destroy_user(&usr);
+ destroy_user(usr);
}
static void test_instant_alloc_free_pair(void) {
@@ -138,16 +132,15 @@ static void test_instant_alloc_free_pair(void) {
grpc_resource_quota *q =
grpc_resource_quota_create("test_instant_alloc_free_pair");
grpc_resource_quota_resize(q, 1024 * 1024);
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL);
- grpc_resource_user_free(&exec_ctx, &usr, 1024);
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, NULL);
+ grpc_resource_user_free(&exec_ctx, usr, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
grpc_resource_quota_unref(q);
- destroy_user(&usr);
+ destroy_user(usr);
}
static void test_simple_async_alloc(void) {
@@ -155,22 +148,21 @@ static void test_simple_async_alloc(void) {
grpc_resource_quota *q =
grpc_resource_quota_create("test_simple_async_alloc");
grpc_resource_quota_resize(q, 1024 * 1024);
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
{
bool done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(done);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr, 1024);
+ grpc_resource_user_free(&exec_ctx, usr, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
grpc_resource_quota_unref(q);
- destroy_user(&usr);
+ destroy_user(usr);
}
static void test_async_alloc_blocked_by_size(void) {
@@ -178,12 +170,11 @@ static void test_async_alloc_blocked_by_size(void) {
grpc_resource_quota *q =
grpc_resource_quota_create("test_async_alloc_blocked_by_size");
grpc_resource_quota_resize(q, 1);
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
bool done = false;
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(!done);
}
@@ -191,87 +182,83 @@ static void test_async_alloc_blocked_by_size(void) {
GPR_ASSERT(done);
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr, 1024);
+ grpc_resource_user_free(&exec_ctx, usr, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
grpc_resource_quota_unref(q);
- destroy_user(&usr);
+ destroy_user(usr);
}
static void test_scavenge(void) {
gpr_log(GPR_INFO, "** test_scavenge **");
grpc_resource_quota *q = grpc_resource_quota_create("test_scavenge");
grpc_resource_quota_resize(q, 1024);
- grpc_resource_user usr1;
- grpc_resource_user usr2;
- grpc_resource_user_init(&usr1, q, "usr1");
- grpc_resource_user_init(&usr2, q, "usr2");
+ grpc_resource_user *usr1 = grpc_resource_user_create(q, "usr1");
+ grpc_resource_user *usr2 = grpc_resource_user_create(q, "usr2");
{
bool done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr1, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(done);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr1, 1024);
+ grpc_resource_user_free(&exec_ctx, usr1, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
{
bool done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr2, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(done);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr2, 1024);
+ grpc_resource_user_free(&exec_ctx, usr2, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
grpc_resource_quota_unref(q);
- destroy_user(&usr1);
- destroy_user(&usr2);
+ destroy_user(usr1);
+ destroy_user(usr2);
}
static void test_scavenge_blocked(void) {
gpr_log(GPR_INFO, "** test_scavenge_blocked **");
grpc_resource_quota *q = grpc_resource_quota_create("test_scavenge_blocked");
grpc_resource_quota_resize(q, 1024);
- grpc_resource_user usr1;
- grpc_resource_user usr2;
- grpc_resource_user_init(&usr1, q, "usr1");
- grpc_resource_user_init(&usr2, q, "usr2");
+ grpc_resource_user *usr1 = grpc_resource_user_create(q, "usr1");
+ grpc_resource_user *usr2 = grpc_resource_user_create(q, "usr2");
bool done;
{
done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr1, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(done);
}
{
done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr2, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(!done);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr1, 1024);
+ grpc_resource_user_free(&exec_ctx, usr1, 1024);
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(done);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr2, 1024);
+ grpc_resource_user_free(&exec_ctx, usr2, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
grpc_resource_quota_unref(q);
- destroy_user(&usr1);
- destroy_user(&usr2);
+ destroy_user(usr1);
+ destroy_user(usr2);
}
static void test_blocked_until_scheduled_reclaim(void) {
@@ -279,12 +266,11 @@ static void test_blocked_until_scheduled_reclaim(void) {
grpc_resource_quota *q =
grpc_resource_quota_create("test_blocked_until_scheduled_reclaim");
grpc_resource_quota_resize(q, 1024);
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
{
bool done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(done);
}
@@ -292,25 +278,25 @@ static void test_blocked_until_scheduled_reclaim(void) {
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_resource_user_post_reclaimer(
- &exec_ctx, &usr, false,
- make_reclaimer(&usr, 1024, set_bool(&reclaim_done)));
+ &exec_ctx, usr, false,
+ make_reclaimer(usr, 1024, set_bool(&reclaim_done)));
grpc_exec_ctx_finish(&exec_ctx);
}
{
bool done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(reclaim_done);
GPR_ASSERT(done);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr, 1024);
+ grpc_resource_user_free(&exec_ctx, usr, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
grpc_resource_quota_unref(q);
- destroy_user(&usr);
+ destroy_user(usr);
}
static void test_blocked_until_scheduled_reclaim_and_scavenge(void) {
@@ -318,14 +304,12 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) {
grpc_resource_quota *q = grpc_resource_quota_create(
"test_blocked_until_scheduled_reclaim_and_scavenge");
grpc_resource_quota_resize(q, 1024);
- grpc_resource_user usr1;
- grpc_resource_user usr2;
- grpc_resource_user_init(&usr1, q, "usr1");
- grpc_resource_user_init(&usr2, q, "usr2");
+ grpc_resource_user *usr1 = grpc_resource_user_create(q, "usr1");
+ grpc_resource_user *usr2 = grpc_resource_user_create(q, "usr2");
{
bool done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr1, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(done);
}
@@ -333,26 +317,26 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) {
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_resource_user_post_reclaimer(
- &exec_ctx, &usr1, false,
- make_reclaimer(&usr1, 1024, set_bool(&reclaim_done)));
+ &exec_ctx, usr1, false,
+ make_reclaimer(usr1, 1024, set_bool(&reclaim_done)));
grpc_exec_ctx_finish(&exec_ctx);
}
{
bool done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr2, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(reclaim_done);
GPR_ASSERT(done);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr2, 1024);
+ grpc_resource_user_free(&exec_ctx, usr2, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
grpc_resource_quota_unref(q);
- destroy_user(&usr1);
- destroy_user(&usr2);
+ destroy_user(usr1);
+ destroy_user(usr2);
}
static void test_blocked_until_scheduled_destructive_reclaim(void) {
@@ -360,12 +344,11 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) {
grpc_resource_quota *q = grpc_resource_quota_create(
"test_blocked_until_scheduled_destructive_reclaim");
grpc_resource_quota_resize(q, 1024);
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
{
bool done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(done);
}
@@ -373,25 +356,25 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) {
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_resource_user_post_reclaimer(
- &exec_ctx, &usr, true,
- make_reclaimer(&usr, 1024, set_bool(&reclaim_done)));
+ &exec_ctx, usr, true,
+ make_reclaimer(usr, 1024, set_bool(&reclaim_done)));
grpc_exec_ctx_finish(&exec_ctx);
}
{
bool done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(reclaim_done);
GPR_ASSERT(done);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr, 1024);
+ grpc_resource_user_free(&exec_ctx, usr, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
grpc_resource_quota_unref(q);
- destroy_user(&usr);
+ destroy_user(usr);
}
static void test_unused_reclaim_is_cancelled(void) {
@@ -399,23 +382,22 @@ static void test_unused_reclaim_is_cancelled(void) {
grpc_resource_quota *q =
grpc_resource_quota_create("test_unused_reclaim_is_cancelled");
grpc_resource_quota_resize(q, 1024);
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
bool benign_done = false;
bool destructive_done = false;
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_resource_user_post_reclaimer(
- &exec_ctx, &usr, false, make_unused_reclaimer(set_bool(&benign_done)));
+ &exec_ctx, usr, false, make_unused_reclaimer(set_bool(&benign_done)));
grpc_resource_user_post_reclaimer(
- &exec_ctx, &usr, true,
+ &exec_ctx, usr, true,
make_unused_reclaimer(set_bool(&destructive_done)));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(!benign_done);
GPR_ASSERT(!destructive_done);
}
grpc_resource_quota_unref(q);
- destroy_user(&usr);
+ destroy_user(usr);
GPR_ASSERT(benign_done);
GPR_ASSERT(destructive_done);
}
@@ -425,24 +407,23 @@ static void test_benign_reclaim_is_preferred(void) {
grpc_resource_quota *q =
grpc_resource_quota_create("test_benign_reclaim_is_preferred");
grpc_resource_quota_resize(q, 1024);
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
bool benign_done = false;
bool destructive_done = false;
{
bool done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(done);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_resource_user_post_reclaimer(
- &exec_ctx, &usr, false,
- make_reclaimer(&usr, 1024, set_bool(&benign_done)));
+ &exec_ctx, usr, false,
+ make_reclaimer(usr, 1024, set_bool(&benign_done)));
grpc_resource_user_post_reclaimer(
- &exec_ctx, &usr, true,
+ &exec_ctx, usr, true,
make_unused_reclaimer(set_bool(&destructive_done)));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(!benign_done);
@@ -451,7 +432,7 @@ static void test_benign_reclaim_is_preferred(void) {
{
bool done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(benign_done);
GPR_ASSERT(!destructive_done);
@@ -459,11 +440,11 @@ static void test_benign_reclaim_is_preferred(void) {
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr, 1024);
+ grpc_resource_user_free(&exec_ctx, usr, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
grpc_resource_quota_unref(q);
- destroy_user(&usr);
+ destroy_user(usr);
GPR_ASSERT(benign_done);
GPR_ASSERT(destructive_done);
}
@@ -473,25 +454,24 @@ static void test_multiple_reclaims_can_be_triggered(void) {
grpc_resource_quota *q =
grpc_resource_quota_create("test_multiple_reclaims_can_be_triggered");
grpc_resource_quota_resize(q, 1024);
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
bool benign_done = false;
bool destructive_done = false;
{
bool done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(done);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_resource_user_post_reclaimer(
- &exec_ctx, &usr, false,
- make_reclaimer(&usr, 512, set_bool(&benign_done)));
+ &exec_ctx, usr, false,
+ make_reclaimer(usr, 512, set_bool(&benign_done)));
grpc_resource_user_post_reclaimer(
- &exec_ctx, &usr, true,
- make_reclaimer(&usr, 512, set_bool(&destructive_done)));
+ &exec_ctx, usr, true,
+ make_reclaimer(usr, 512, set_bool(&destructive_done)));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(!benign_done);
GPR_ASSERT(!destructive_done);
@@ -499,7 +479,7 @@ static void test_multiple_reclaims_can_be_triggered(void) {
{
bool done = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done));
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(benign_done);
GPR_ASSERT(destructive_done);
@@ -507,11 +487,11 @@ static void test_multiple_reclaims_can_be_triggered(void) {
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr, 1024);
+ grpc_resource_user_free(&exec_ctx, usr, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
grpc_resource_quota_unref(q);
- destroy_user(&usr);
+ destroy_user(usr);
GPR_ASSERT(benign_done);
GPR_ASSERT(destructive_done);
}
@@ -522,30 +502,21 @@ static void test_resource_user_stays_allocated_until_memory_released(void) {
grpc_resource_quota *q = grpc_resource_quota_create(
"test_resource_user_stays_allocated_until_memory_released");
grpc_resource_quota_resize(q, 1024 * 1024);
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
- bool done = false;
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL);
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, NULL);
grpc_exec_ctx_finish(&exec_ctx);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_resource_quota_unref(q);
- grpc_resource_user_shutdown(&exec_ctx, &usr, set_bool(&done));
+ grpc_resource_user_unref(&exec_ctx, usr);
grpc_exec_ctx_finish(&exec_ctx);
- GPR_ASSERT(!done);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr, 1024);
- grpc_exec_ctx_finish(&exec_ctx);
- GPR_ASSERT(done);
- }
- {
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_destroy(&exec_ctx, &usr);
+ grpc_resource_user_free(&exec_ctx, usr, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
}
@@ -562,14 +533,12 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released(
"released");
grpc_resource_quota_resize(q, 1024);
for (int i = 0; i < 10; i++) {
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
- bool done = false;
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
bool reclaimer_cancelled = false;
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_resource_user_post_reclaimer(
- &exec_ctx, &usr, false,
+ &exec_ctx, usr, false,
make_unused_reclaimer(set_bool(&reclaimer_cancelled)));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(!reclaimer_cancelled);
@@ -577,30 +546,23 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released(
{
bool allocated = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated));
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&allocated));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(allocated);
GPR_ASSERT(!reclaimer_cancelled);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_shutdown(&exec_ctx, &usr, set_bool(&done));
+ grpc_resource_user_unref(&exec_ctx, usr);
grpc_exec_ctx_finish(&exec_ctx);
- GPR_ASSERT(!done);
GPR_ASSERT(!reclaimer_cancelled);
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr, 1024);
+ grpc_resource_user_free(&exec_ctx, usr, 1024);
grpc_exec_ctx_finish(&exec_ctx);
- GPR_ASSERT(done);
GPR_ASSERT(reclaimer_cancelled);
}
- {
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_destroy(&exec_ctx, &usr);
- grpc_exec_ctx_finish(&exec_ctx);
- }
}
grpc_resource_quota_unref(q);
}
@@ -610,12 +572,11 @@ static void test_reclaimers_can_be_posted_repeatedly(void) {
grpc_resource_quota *q =
grpc_resource_quota_create("test_reclaimers_can_be_posted_repeatedly");
grpc_resource_quota_resize(q, 1024);
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
{
bool allocated = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated));
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&allocated));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(allocated);
}
@@ -624,15 +585,15 @@ static void test_reclaimers_can_be_posted_repeatedly(void) {
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_resource_user_post_reclaimer(
- &exec_ctx, &usr, false,
- make_reclaimer(&usr, 1024, set_bool(&reclaimer_done)));
+ &exec_ctx, usr, false,
+ make_reclaimer(usr, 1024, set_bool(&reclaimer_done)));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(!reclaimer_done);
}
{
bool allocated = false;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated));
+ grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&allocated));
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(allocated);
GPR_ASSERT(reclaimer_done);
@@ -640,10 +601,10 @@ static void test_reclaimers_can_be_posted_repeatedly(void) {
}
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_free(&exec_ctx, &usr, 1024);
+ grpc_resource_user_free(&exec_ctx, usr, 1024);
grpc_exec_ctx_finish(&exec_ctx);
}
- destroy_user(&usr);
+ destroy_user(usr);
grpc_resource_quota_unref(q);
}
@@ -653,13 +614,11 @@ static void test_one_slice(void) {
grpc_resource_quota *q = grpc_resource_quota_create("test_one_slice");
grpc_resource_quota_resize(q, 1024);
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
grpc_resource_user_slice_allocator alloc;
int num_allocs = 0;
- grpc_resource_user_slice_allocator_init(&alloc, &usr, inc_int_cb,
- &num_allocs);
+ grpc_resource_user_slice_allocator_init(&alloc, usr, inc_int_cb, &num_allocs);
gpr_slice_buffer buffer;
gpr_slice_buffer_init(&buffer);
@@ -673,7 +632,7 @@ static void test_one_slice(void) {
}
gpr_slice_buffer_destroy(&buffer);
- destroy_user(&usr);
+ destroy_user(usr);
grpc_resource_quota_unref(q);
}
@@ -684,13 +643,11 @@ static void test_one_slice_deleted_late(void) {
grpc_resource_quota_create("test_one_slice_deleted_late");
grpc_resource_quota_resize(q, 1024);
- grpc_resource_user usr;
- grpc_resource_user_init(&usr, q, "usr");
+ grpc_resource_user *usr = grpc_resource_user_create(q, "usr");
grpc_resource_user_slice_allocator alloc;
int num_allocs = 0;
- grpc_resource_user_slice_allocator_init(&alloc, &usr, inc_int_cb,
- &num_allocs);
+ grpc_resource_user_slice_allocator_init(&alloc, usr, inc_int_cb, &num_allocs);
gpr_slice_buffer buffer;
gpr_slice_buffer_init(&buffer);
@@ -703,22 +660,14 @@ static void test_one_slice_deleted_late(void) {
GPR_ASSERT(num_allocs == start_allocs + 1);
}
- bool done = false;
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_shutdown(&exec_ctx, &usr, set_bool(&done));
+ grpc_resource_user_unref(&exec_ctx, usr);
grpc_exec_ctx_finish(&exec_ctx);
- GPR_ASSERT(!done);
}
grpc_resource_quota_unref(q);
gpr_slice_buffer_destroy(&buffer);
- GPR_ASSERT(done);
- {
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_resource_user_destroy(&exec_ctx, &usr);
- grpc_exec_ctx_finish(&exec_ctx);
- }
}
int main(int argc, char **argv) {
diff --git a/test/core/transport/pid_controller_test.c b/test/core/transport/pid_controller_test.c
new file mode 100644
index 0000000000..9614983b00
--- /dev/null
+++ b/test/core/transport/pid_controller_test.c
@@ -0,0 +1,77 @@
+/*
+ *
+ * Copyright 2016, 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.
+ *
+ */
+
+#include "src/core/lib/transport/pid_controller.h"
+
+#include <math.h>
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
+#include <grpc/support/useful.h>
+#include "src/core/lib/support/string.h"
+#include "test/core/util/test_config.h"
+
+static void test_noop(void) {
+ gpr_log(GPR_INFO, "test_noop");
+ grpc_pid_controller pid;
+ grpc_pid_controller_init(&pid, 1, 1, 1);
+}
+
+static void test_simple_convergence(double gain_p, double gain_i, double gain_d,
+ double dt, double set_point, double start) {
+ gpr_log(GPR_INFO,
+ "test_simple_convergence(p=%lf, i=%lf, d=%lf); dt=%lf set_point=%lf "
+ "start=%lf",
+ gain_p, gain_i, gain_d, dt, set_point, start);
+ grpc_pid_controller pid;
+ grpc_pid_controller_init(&pid, 0.2, 0.1, 0.1);
+
+ double current = start;
+
+ for (int i = 0; i < 1000; i++) {
+ current += grpc_pid_controller_update(&pid, set_point - current, 1);
+ }
+
+ GPR_ASSERT(fabs(set_point - current) < 0.1);
+ GPR_ASSERT(fabs(pid.error_integral) < 0.1);
+}
+
+int main(int argc, char **argv) {
+ grpc_test_init(argc, argv);
+ test_noop();
+ test_simple_convergence(0.2, 0, 0, 1, 100, 0);
+ test_simple_convergence(0.2, 0.1, 0, 1, 100, 0);
+ test_simple_convergence(0.2, 0.1, 0.1, 1, 100, 0);
+ return 0;
+}
diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c
index 2b041a4484..2dac877a65 100644
--- a/test/core/util/mock_endpoint.c
+++ b/test/core/util/mock_endpoint.c
@@ -41,12 +41,11 @@
typedef struct grpc_mock_endpoint {
grpc_endpoint base;
gpr_mu mu;
- int refs;
void (*on_write)(gpr_slice slice);
gpr_slice_buffer read_buffer;
gpr_slice_buffer *on_read_out;
grpc_closure *on_read;
- grpc_resource_user resource_user;
+ grpc_resource_user *resource_user;
} grpc_mock_endpoint;
static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
@@ -78,24 +77,6 @@ static void me_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
static void me_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
grpc_pollset_set *pollset) {}
-static void unref(grpc_exec_ctx *exec_ctx, grpc_mock_endpoint *m) {
- gpr_mu_lock(&m->mu);
- if (0 == --m->refs) {
- gpr_mu_unlock(&m->mu);
- gpr_slice_buffer_destroy(&m->read_buffer);
- grpc_resource_user_destroy(exec_ctx, &m->resource_user);
- gpr_free(m);
- } else {
- gpr_mu_unlock(&m->mu);
- }
-}
-
-static void me_finish_shutdown(grpc_exec_ctx *exec_ctx, void *me,
- grpc_error *error) {
- grpc_mock_endpoint *m = me;
- unref(exec_ctx, m);
-}
-
static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) {
grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep;
gpr_mu_lock(&m->mu);
@@ -104,14 +85,15 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) {
GRPC_ERROR_CREATE("Endpoint Shutdown"), NULL);
m->on_read = NULL;
}
- grpc_resource_user_shutdown(exec_ctx, &m->resource_user,
- grpc_closure_create(me_finish_shutdown, m));
gpr_mu_unlock(&m->mu);
+ grpc_resource_user_shutdown(exec_ctx, m->resource_user);
}
static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) {
grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep;
- unref(exec_ctx, m);
+ gpr_slice_buffer_destroy(&m->read_buffer);
+ grpc_resource_user_unref(exec_ctx, m->resource_user);
+ gpr_free(m);
}
static char *me_get_peer(grpc_endpoint *ep) {
@@ -120,7 +102,7 @@ static char *me_get_peer(grpc_endpoint *ep) {
static grpc_resource_user *me_get_resource_user(grpc_endpoint *ep) {
grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep;
- return &m->resource_user;
+ return m->resource_user;
}
static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; }
@@ -141,10 +123,9 @@ grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice),
grpc_resource_quota *resource_quota) {
grpc_mock_endpoint *m = gpr_malloc(sizeof(*m));
m->base.vtable = &vtable;
- m->refs = 2;
char *name;
gpr_asprintf(&name, "mock_endpoint_%" PRIxPTR, (intptr_t)m);
- grpc_resource_user_init(&m->resource_user, resource_quota, name);
+ m->resource_user = grpc_resource_user_create(resource_quota, name);
gpr_free(name);
gpr_slice_buffer_init(&m->read_buffer);
gpr_mu_init(&m->mu);
diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c
index ee6ef7da60..a920a15aa5 100644
--- a/test/core/util/passthru_endpoint.c
+++ b/test/core/util/passthru_endpoint.c
@@ -46,7 +46,7 @@ typedef struct {
gpr_slice_buffer read_buffer;
gpr_slice_buffer *on_read_out;
grpc_closure *on_read;
- grpc_resource_user resource_user;
+ grpc_resource_user *resource_user;
} half;
struct passthru_endpoint {
@@ -123,10 +123,10 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) {
m->on_read = NULL;
}
gpr_mu_unlock(&m->parent->mu);
+ grpc_resource_user_shutdown(exec_ctx, m->resource_user);
}
-static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *ep,
- grpc_error *error) {
+static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) {
passthru_endpoint *p = ((half *)ep)->parent;
gpr_mu_lock(&p->mu);
if (0 == --p->halves) {
@@ -134,18 +134,14 @@ static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *ep,
gpr_mu_destroy(&p->mu);
gpr_slice_buffer_destroy(&p->client.read_buffer);
gpr_slice_buffer_destroy(&p->server.read_buffer);
+ grpc_resource_user_unref(exec_ctx, p->client.resource_user);
+ grpc_resource_user_unref(exec_ctx, p->server.resource_user);
gpr_free(p);
} else {
gpr_mu_unlock(&p->mu);
}
}
-static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) {
- half *m = (half *)ep;
- grpc_resource_user_shutdown(exec_ctx, &m->resource_user,
- grpc_closure_create(me_really_destroy, m));
-}
-
static char *me_get_peer(grpc_endpoint *ep) {
return gpr_strdup("fake:mock_endpoint");
}
@@ -154,7 +150,7 @@ static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; }
static grpc_resource_user *me_get_resource_user(grpc_endpoint *ep) {
half *m = (half *)ep;
- return &m->resource_user;
+ return m->resource_user;
}
static const grpc_endpoint_vtable vtable = {
@@ -179,7 +175,7 @@ static void half_init(half *m, passthru_endpoint *parent,
char *name;
gpr_asprintf(&name, "passthru_endpoint_%s_%" PRIxPTR, half_name,
(intptr_t)parent);
- grpc_resource_user_init(&m->resource_user, resource_quota, name);
+ m->resource_user = grpc_resource_user_create(resource_quota, name);
gpr_free(name);
}
diff --git a/test/cpp/codegen/compiler_test_golden b/test/cpp/codegen/compiler_test_golden
index 5f0e824655..0b82f2a59f 100644
--- a/test/cpp/codegen/compiler_test_golden
+++ b/test/cpp/codegen/compiler_test_golden
@@ -67,7 +67,7 @@ namespace testing {
// ServiceA detached comment 2
//
// ServiceA leading comment 1
-class ServiceA GRPC_FINAL {
+class ServiceA final {
public:
class StubInterface {
public:
@@ -94,10 +94,10 @@ class ServiceA GRPC_FINAL {
virtual ::grpc::ClientWriterInterface< ::grpc::testing::Request>* MethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response) = 0;
virtual ::grpc::ClientAsyncWriterInterface< ::grpc::testing::Request>* AsyncMethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq, void* tag) = 0;
};
- class Stub GRPC_FINAL : public StubInterface {
+ class Stub final : public StubInterface {
public:
Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
- ::grpc::Status MethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::testing::Response* response) GRPC_OVERRIDE;
+ ::grpc::Status MethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::testing::Response* response) override;
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>> AsyncMethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>>(AsyncMethodA1Raw(context, request, cq));
}
@@ -110,9 +110,9 @@ class ServiceA GRPC_FINAL {
private:
std::shared_ptr< ::grpc::ChannelInterface> channel_;
- ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>* AsyncMethodA1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) GRPC_OVERRIDE;
- ::grpc::ClientWriter< ::grpc::testing::Request>* MethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response) GRPC_OVERRIDE;
- ::grpc::ClientAsyncWriter< ::grpc::testing::Request>* AsyncMethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE;
+ ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>* AsyncMethodA1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) override;
+ ::grpc::ClientWriter< ::grpc::testing::Request>* MethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response) override;
+ ::grpc::ClientAsyncWriter< ::grpc::testing::Request>* AsyncMethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq, void* tag) override;
const ::grpc::RpcMethod rpcmethod_MethodA1_;
const ::grpc::RpcMethod rpcmethod_MethodA2_;
};
@@ -140,11 +140,11 @@ class ServiceA GRPC_FINAL {
WithAsyncMethod_MethodA1() {
::grpc::Service::MarkMethodAsync(0);
}
- ~WithAsyncMethod_MethodA1() GRPC_OVERRIDE {
+ ~WithAsyncMethod_MethodA1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) GRPC_FINAL GRPC_OVERRIDE {
+ ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -160,11 +160,11 @@ class ServiceA GRPC_FINAL {
WithAsyncMethod_MethodA2() {
::grpc::Service::MarkMethodAsync(1);
}
- ~WithAsyncMethod_MethodA2() GRPC_OVERRIDE {
+ ~WithAsyncMethod_MethodA2() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) GRPC_FINAL GRPC_OVERRIDE {
+ ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -181,11 +181,11 @@ class ServiceA GRPC_FINAL {
WithGenericMethod_MethodA1() {
::grpc::Service::MarkMethodGeneric(0);
}
- ~WithGenericMethod_MethodA1() GRPC_OVERRIDE {
+ ~WithGenericMethod_MethodA1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) GRPC_FINAL GRPC_OVERRIDE {
+ ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -198,11 +198,11 @@ class ServiceA GRPC_FINAL {
WithGenericMethod_MethodA2() {
::grpc::Service::MarkMethodGeneric(1);
}
- ~WithGenericMethod_MethodA2() GRPC_OVERRIDE {
+ ~WithGenericMethod_MethodA2() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) GRPC_FINAL GRPC_OVERRIDE {
+ ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -216,11 +216,11 @@ class ServiceA GRPC_FINAL {
::grpc::Service::MarkMethodStreamed(0,
new ::grpc::StreamedUnaryHandler< ::grpc::testing::Request, ::grpc::testing::Response>(std::bind(&WithStreamedUnaryMethod_MethodA1<BaseClass>::StreamedMethodA1, this, std::placeholders::_1, std::placeholders::_2)));
}
- ~WithStreamedUnaryMethod_MethodA1() GRPC_OVERRIDE {
+ ~WithStreamedUnaryMethod_MethodA1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
- ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) GRPC_FINAL GRPC_OVERRIDE {
+ ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -233,7 +233,7 @@ class ServiceA GRPC_FINAL {
};
// ServiceB leading comment 1
-class ServiceB GRPC_FINAL {
+class ServiceB final {
public:
class StubInterface {
public:
@@ -247,17 +247,17 @@ class ServiceB GRPC_FINAL {
private:
virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>* AsyncMethodB1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) = 0;
};
- class Stub GRPC_FINAL : public StubInterface {
+ class Stub final : public StubInterface {
public:
Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
- ::grpc::Status MethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::testing::Response* response) GRPC_OVERRIDE;
+ ::grpc::Status MethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::testing::Response* response) override;
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>> AsyncMethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>>(AsyncMethodB1Raw(context, request, cq));
}
private:
std::shared_ptr< ::grpc::ChannelInterface> channel_;
- ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>* AsyncMethodB1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) GRPC_OVERRIDE;
+ ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>* AsyncMethodB1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) override;
const ::grpc::RpcMethod rpcmethod_MethodB1_;
};
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
@@ -278,11 +278,11 @@ class ServiceB GRPC_FINAL {
WithAsyncMethod_MethodB1() {
::grpc::Service::MarkMethodAsync(0);
}
- ~WithAsyncMethod_MethodB1() GRPC_OVERRIDE {
+ ~WithAsyncMethod_MethodB1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) GRPC_FINAL GRPC_OVERRIDE {
+ ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -299,11 +299,11 @@ class ServiceB GRPC_FINAL {
WithGenericMethod_MethodB1() {
::grpc::Service::MarkMethodGeneric(0);
}
- ~WithGenericMethod_MethodB1() GRPC_OVERRIDE {
+ ~WithGenericMethod_MethodB1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
- ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) GRPC_FINAL GRPC_OVERRIDE {
+ ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@@ -317,11 +317,11 @@ class ServiceB GRPC_FINAL {
::grpc::Service::MarkMethodStreamed(0,
new ::grpc::StreamedUnaryHandler< ::grpc::testing::Request, ::grpc::testing::Response>(std::bind(&WithStreamedUnaryMethod_MethodB1<BaseClass>::StreamedMethodB1, this, std::placeholders::_1, std::placeholders::_2)));
}
- ~WithStreamedUnaryMethod_MethodB1() GRPC_OVERRIDE {
+ ~WithStreamedUnaryMethod_MethodB1() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
- ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) GRPC_FINAL GRPC_OVERRIDE {
+ ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
diff --git a/test/cpp/common/auth_property_iterator_test.cc b/test/cpp/common/auth_property_iterator_test.cc
index 66225ff335..16bebcab74 100644
--- a/test/cpp/common/auth_property_iterator_test.cc
+++ b/test/cpp/common/auth_property_iterator_test.cc
@@ -56,7 +56,7 @@ class TestAuthPropertyIterator : public AuthPropertyIterator {
class AuthPropertyIteratorTest : public ::testing::Test {
protected:
- void SetUp() GRPC_OVERRIDE {
+ void SetUp() override {
ctx_ = grpc_auth_context_create(NULL);
grpc_auth_context_add_cstring_property(ctx_, "name", "chapi");
grpc_auth_context_add_cstring_property(ctx_, "name", "chapo");
@@ -64,7 +64,7 @@ class AuthPropertyIteratorTest : public ::testing::Test {
EXPECT_EQ(1,
grpc_auth_context_set_peer_identity_property_name(ctx_, "name"));
}
- void TearDown() GRPC_OVERRIDE { grpc_auth_context_release(ctx_); }
+ void TearDown() override { grpc_auth_context_release(ctx_); }
grpc_auth_context* ctx_;
};
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc
index 823f0bd035..3845582d5d 100644
--- a/test/cpp/end2end/async_end2end_test.cc
+++ b/test/cpp/end2end/async_end2end_test.cc
@@ -211,10 +211,10 @@ bool plugin_has_sync_methods(std::unique_ptr<ServerBuilderPlugin>& plugin) {
// that needs to be tested here.
class ServerBuilderSyncPluginDisabler : public ::grpc::ServerBuilderOption {
public:
- void UpdateArguments(ChannelArguments* arg) GRPC_OVERRIDE {}
+ void UpdateArguments(ChannelArguments* arg) override {}
- void UpdatePlugins(std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins)
- GRPC_OVERRIDE {
+ void UpdatePlugins(
+ std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) override {
plugins->erase(std::remove_if(plugins->begin(), plugins->end(),
plugin_has_sync_methods),
plugins->end());
@@ -246,7 +246,7 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<TestScenario> {
protected:
AsyncEnd2endTest() { GetParam().Log(); }
- void SetUp() GRPC_OVERRIDE {
+ void SetUp() override {
poll_overrider_.reset(new PollingOverrider(!GetParam().disable_blocking));
port_ = grpc_pick_unused_port_or_die();
@@ -269,7 +269,7 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<TestScenario> {
gpr_tls_set(&g_is_async_end2end_test, 1);
}
- void TearDown() GRPC_OVERRIDE {
+ void TearDown() override {
server_->Shutdown();
void* ignored_tag;
bool ignored_ok;
diff --git a/test/cpp/end2end/client_crash_test_server.cc b/test/cpp/end2end/client_crash_test_server.cc
index 6e1457407c..0e0a105989 100644
--- a/test/cpp/end2end/client_crash_test_server.cc
+++ b/test/cpp/end2end/client_crash_test_server.cc
@@ -58,11 +58,10 @@ using namespace gflags;
namespace grpc {
namespace testing {
-class ServiceImpl GRPC_FINAL
- : public ::grpc::testing::EchoTestService::Service {
- Status BidiStream(ServerContext* context,
- ServerReaderWriter<EchoResponse, EchoRequest>* stream)
- GRPC_OVERRIDE {
+class ServiceImpl final : public ::grpc::testing::EchoTestService::Service {
+ Status BidiStream(
+ ServerContext* context,
+ ServerReaderWriter<EchoResponse, EchoRequest>* stream) override {
EchoRequest request;
EchoResponse response;
while (stream->Read(&request)) {
diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc
index 43b7d44255..4b8749884f 100644
--- a/test/cpp/end2end/end2end_test.cc
+++ b/test/cpp/end2end/end2end_test.cc
@@ -92,12 +92,12 @@ class TestMetadataCredentialsPlugin : public MetadataCredentialsPlugin {
is_blocking_(is_blocking),
is_successful_(is_successful) {}
- bool IsBlocking() const GRPC_OVERRIDE { return is_blocking_; }
+ bool IsBlocking() const override { return is_blocking_; }
- Status GetMetadata(grpc::string_ref service_url, grpc::string_ref method_name,
- const grpc::AuthContext& channel_auth_context,
- std::multimap<grpc::string, grpc::string>* metadata)
- GRPC_OVERRIDE {
+ Status GetMetadata(
+ grpc::string_ref service_url, grpc::string_ref method_name,
+ const grpc::AuthContext& channel_auth_context,
+ std::multimap<grpc::string, grpc::string>* metadata) override {
EXPECT_GT(service_url.length(), 0UL);
EXPECT_GT(method_name.length(), 0UL);
EXPECT_TRUE(channel_auth_context.IsPeerAuthenticated());
@@ -145,11 +145,11 @@ class TestAuthMetadataProcessor : public AuthMetadataProcessor {
}
// Interface implementation
- bool IsBlocking() const GRPC_OVERRIDE { return is_blocking_; }
+ bool IsBlocking() const override { return is_blocking_; }
Status Process(const InputMetadata& auth_metadata, AuthContext* context,
OutputMetadata* consumed_auth_metadata,
- OutputMetadata* response_metadata) GRPC_OVERRIDE {
+ OutputMetadata* response_metadata) override {
EXPECT_TRUE(consumed_auth_metadata != nullptr);
EXPECT_TRUE(context != nullptr);
EXPECT_TRUE(response_metadata != nullptr);
@@ -185,7 +185,7 @@ class Proxy : public ::grpc::testing::EchoTestService::Service {
: stub_(grpc::testing::EchoTestService::NewStub(channel)) {}
Status Echo(ServerContext* server_context, const EchoRequest* request,
- EchoResponse* response) GRPC_OVERRIDE {
+ EchoResponse* response) override {
std::unique_ptr<ClientContext> client_context =
ClientContext::FromServerContext(*server_context);
return stub_->Echo(client_context.get(), *request, response);
@@ -199,7 +199,7 @@ class TestServiceImplDupPkg
: public ::grpc::testing::duplicate::EchoTestService::Service {
public:
Status Echo(ServerContext* context, const EchoRequest* request,
- EchoResponse* response) GRPC_OVERRIDE {
+ EchoResponse* response) override {
response->set_message("no package");
return Status::OK;
}
@@ -229,7 +229,7 @@ class End2endTest : public ::testing::TestWithParam<TestScenario> {
GetParam().Log();
}
- void TearDown() GRPC_OVERRIDE {
+ void TearDown() override {
if (is_server_started_) {
server_->Shutdown();
if (proxy_server_) proxy_server_->Shutdown();
@@ -1496,7 +1496,7 @@ class ResourceQuotaEnd2endTest : public End2endTest {
ResourceQuotaEnd2endTest()
: server_resource_quota_("server_resource_quota") {}
- virtual void ConfigureServerBuilder(ServerBuilder* builder) GRPC_OVERRIDE {
+ virtual void ConfigureServerBuilder(ServerBuilder* builder) override {
builder->SetResourceQuota(server_resource_quota_);
}
diff --git a/test/cpp/end2end/filter_end2end_test.cc b/test/cpp/end2end/filter_end2end_test.cc
index 853720fd0d..ab6ed46de5 100644
--- a/test/cpp/end2end/filter_end2end_test.cc
+++ b/test/cpp/end2end/filter_end2end_test.cc
@@ -78,35 +78,35 @@ namespace {
int global_num_connections = 0;
int global_num_calls = 0;
-mutex global_mu;
+std::mutex global_mu;
void IncrementConnectionCounter() {
- unique_lock<mutex> lock(global_mu);
+ std::unique_lock<std::mutex> lock(global_mu);
++global_num_connections;
}
void ResetConnectionCounter() {
- unique_lock<mutex> lock(global_mu);
+ std::unique_lock<std::mutex> lock(global_mu);
global_num_connections = 0;
}
int GetConnectionCounterValue() {
- unique_lock<mutex> lock(global_mu);
+ std::unique_lock<std::mutex> lock(global_mu);
return global_num_connections;
}
void IncrementCallCounter() {
- unique_lock<mutex> lock(global_mu);
+ std::unique_lock<std::mutex> lock(global_mu);
++global_num_calls;
}
void ResetCallCounter() {
- unique_lock<mutex> lock(global_mu);
+ std::unique_lock<std::mutex> lock(global_mu);
global_num_calls = 0;
}
int GetCallCounterValue() {
- unique_lock<mutex> lock(global_mu);
+ std::unique_lock<std::mutex> lock(global_mu);
return global_num_calls;
}
@@ -126,7 +126,7 @@ class CallDataImpl : public CallData {
: CallData(channel_data) {}
void StartTransportStreamOp(grpc_exec_ctx* exec_ctx, grpc_call_element* elem,
- TransportStreamOp* op) GRPC_OVERRIDE {
+ TransportStreamOp* op) override {
// Incrementing the counter could be done from the ctor, but we want
// to test that the individual methods are actually called correctly.
if (op->recv_initial_metadata() != nullptr) IncrementCallCounter();
@@ -138,7 +138,7 @@ class FilterEnd2endTest : public ::testing::Test {
protected:
FilterEnd2endTest() : server_host_("localhost") {}
- void SetUp() GRPC_OVERRIDE {
+ void SetUp() override {
int port = grpc_pick_unused_port_or_die();
server_address_ << server_host_ << ":" << port;
// Setup server
@@ -150,7 +150,7 @@ class FilterEnd2endTest : public ::testing::Test {
server_ = builder.BuildAndStart();
}
- void TearDown() GRPC_OVERRIDE {
+ void TearDown() override {
server_->Shutdown();
void* ignored_tag;
bool ignored_ok;
diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc
index 57efa5fa17..25c221bb2b 100644
--- a/test/cpp/end2end/generic_end2end_test.cc
+++ b/test/cpp/end2end/generic_end2end_test.cc
@@ -75,7 +75,7 @@ class GenericEnd2endTest : public ::testing::Test {
protected:
GenericEnd2endTest() : server_host_("localhost") {}
- void SetUp() GRPC_OVERRIDE {
+ void SetUp() override {
int port = grpc_pick_unused_port_or_die();
server_address_ << server_host_ << ":" << port;
// Setup server
@@ -91,7 +91,7 @@ class GenericEnd2endTest : public ::testing::Test {
server_ = builder.BuildAndStart();
}
- void TearDown() GRPC_OVERRIDE {
+ void TearDown() override {
server_->Shutdown();
void* ignored_tag;
bool ignored_ok;
diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc
index 76a5732f33..a4ba76fed1 100644
--- a/test/cpp/end2end/hybrid_end2end_test.cc
+++ b/test/cpp/end2end/hybrid_end2end_test.cc
@@ -188,7 +188,7 @@ class TestServiceImplDupPkg
: public ::grpc::testing::duplicate::EchoTestService::Service {
public:
Status Echo(ServerContext* context, const EchoRequest* request,
- EchoResponse* response) GRPC_OVERRIDE {
+ EchoResponse* response) override {
response->set_message(request->message() + "_dup");
return Status::OK;
}
@@ -230,7 +230,7 @@ class HybridEnd2endTest : public ::testing::Test {
server_ = builder.BuildAndStart();
}
- void TearDown() GRPC_OVERRIDE {
+ void TearDown() override {
if (server_) {
server_->Shutdown();
}
@@ -449,9 +449,9 @@ class StreamedUnaryDupPkg
: public duplicate::EchoTestService::WithStreamedUnaryMethod_Echo<
TestServiceImplDupPkg> {
public:
- Status StreamedEcho(ServerContext* context,
- ServerUnaryStreamer<EchoRequest, EchoResponse>* stream)
- GRPC_OVERRIDE {
+ Status StreamedEcho(
+ ServerContext* context,
+ ServerUnaryStreamer<EchoRequest, EchoResponse>* stream) override {
EchoRequest req;
EchoResponse resp;
uint32_t next_msg_sz;
@@ -487,9 +487,9 @@ TEST_F(HybridEnd2endTest,
class FullyStreamedUnaryDupPkg
: public duplicate::EchoTestService::StreamedUnaryService {
public:
- Status StreamedEcho(ServerContext* context,
- ServerUnaryStreamer<EchoRequest, EchoResponse>* stream)
- GRPC_OVERRIDE {
+ Status StreamedEcho(
+ ServerContext* context,
+ ServerUnaryStreamer<EchoRequest, EchoResponse>* stream) override {
EchoRequest req;
EchoResponse resp;
uint32_t next_msg_sz;
@@ -528,7 +528,7 @@ class SplitResponseStreamDupPkg
public:
Status StreamedResponseStream(
ServerContext* context,
- ServerSplitStreamer<EchoRequest, EchoResponse>* stream) GRPC_OVERRIDE {
+ ServerSplitStreamer<EchoRequest, EchoResponse>* stream) override {
EchoRequest req;
EchoResponse resp;
uint32_t next_msg_sz;
@@ -568,7 +568,7 @@ class FullySplitStreamedDupPkg
public:
Status StreamedResponseStream(
ServerContext* context,
- ServerSplitStreamer<EchoRequest, EchoResponse>* stream) GRPC_OVERRIDE {
+ ServerSplitStreamer<EchoRequest, EchoResponse>* stream) override {
EchoRequest req;
EchoResponse resp;
uint32_t next_msg_sz;
@@ -605,9 +605,9 @@ TEST_F(HybridEnd2endTest,
// Add a second service that is fully server streamed
class FullyStreamedDupPkg : public duplicate::EchoTestService::StreamedService {
public:
- Status StreamedEcho(ServerContext* context,
- ServerUnaryStreamer<EchoRequest, EchoResponse>* stream)
- GRPC_OVERRIDE {
+ Status StreamedEcho(
+ ServerContext* context,
+ ServerUnaryStreamer<EchoRequest, EchoResponse>* stream) override {
EchoRequest req;
EchoResponse resp;
uint32_t next_msg_sz;
@@ -620,7 +620,7 @@ class FullyStreamedDupPkg : public duplicate::EchoTestService::StreamedService {
}
Status StreamedResponseStream(
ServerContext* context,
- ServerSplitStreamer<EchoRequest, EchoResponse>* stream) GRPC_OVERRIDE {
+ ServerSplitStreamer<EchoRequest, EchoResponse>* stream) override {
EchoRequest req;
EchoResponse resp;
uint32_t next_msg_sz;
diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc
index 0da5861b67..d6664da5a0 100644
--- a/test/cpp/end2end/mock_test.cc
+++ b/test/cpp/end2end/mock_test.cc
@@ -61,46 +61,44 @@ namespace testing {
namespace {
template <class W, class R>
-class MockClientReaderWriter GRPC_FINAL
- : public ClientReaderWriterInterface<W, R> {
+class MockClientReaderWriter final : public ClientReaderWriterInterface<W, R> {
public:
- void WaitForInitialMetadata() GRPC_OVERRIDE {}
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ void WaitForInitialMetadata() override {}
+ bool NextMessageSize(uint32_t* sz) override {
*sz = UINT_MAX;
return true;
}
- bool Read(R* msg) GRPC_OVERRIDE { return true; }
- bool Write(const W& msg) GRPC_OVERRIDE { return true; }
- bool WritesDone() GRPC_OVERRIDE { return true; }
- Status Finish() GRPC_OVERRIDE { return Status::OK; }
+ bool Read(R* msg) override { return true; }
+ bool Write(const W& msg) override { return true; }
+ bool WritesDone() override { return true; }
+ Status Finish() override { return Status::OK; }
};
template <>
-class MockClientReaderWriter<EchoRequest, EchoResponse> GRPC_FINAL
+class MockClientReaderWriter<EchoRequest, EchoResponse> final
: public ClientReaderWriterInterface<EchoRequest, EchoResponse> {
public:
MockClientReaderWriter() : writes_done_(false) {}
- void WaitForInitialMetadata() GRPC_OVERRIDE {}
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ void WaitForInitialMetadata() override {}
+ bool NextMessageSize(uint32_t* sz) override {
*sz = UINT_MAX;
return true;
}
- bool Read(EchoResponse* msg) GRPC_OVERRIDE {
+ bool Read(EchoResponse* msg) override {
if (writes_done_) return false;
msg->set_message(last_message_);
return true;
}
- bool Write(const EchoRequest& msg,
- const WriteOptions& options) GRPC_OVERRIDE {
+ bool Write(const EchoRequest& msg, const WriteOptions& options) override {
gpr_log(GPR_INFO, "mock recv msg %s", msg.message().c_str());
last_message_ = msg.message();
return true;
}
- bool WritesDone() GRPC_OVERRIDE {
+ bool WritesDone() override {
writes_done_ = true;
return true;
}
- Status Finish() GRPC_OVERRIDE { return Status::OK; }
+ Status Finish() override { return Status::OK; }
private:
bool writes_done_;
@@ -113,51 +111,51 @@ class MockStub : public EchoTestService::StubInterface {
MockStub() {}
~MockStub() {}
Status Echo(ClientContext* context, const EchoRequest& request,
- EchoResponse* response) GRPC_OVERRIDE {
+ EchoResponse* response) override {
response->set_message(request.message());
return Status::OK;
}
Status Unimplemented(ClientContext* context, const EchoRequest& request,
- EchoResponse* response) GRPC_OVERRIDE {
+ EchoResponse* response) override {
return Status::OK;
}
private:
ClientAsyncResponseReaderInterface<EchoResponse>* AsyncEchoRaw(
ClientContext* context, const EchoRequest& request,
- CompletionQueue* cq) GRPC_OVERRIDE {
+ CompletionQueue* cq) override {
return nullptr;
}
ClientWriterInterface<EchoRequest>* RequestStreamRaw(
- ClientContext* context, EchoResponse* response) GRPC_OVERRIDE {
+ ClientContext* context, EchoResponse* response) override {
return nullptr;
}
ClientAsyncWriterInterface<EchoRequest>* AsyncRequestStreamRaw(
ClientContext* context, EchoResponse* response, CompletionQueue* cq,
- void* tag) GRPC_OVERRIDE {
+ void* tag) override {
return nullptr;
}
ClientReaderInterface<EchoResponse>* ResponseStreamRaw(
- ClientContext* context, const EchoRequest& request) GRPC_OVERRIDE {
+ ClientContext* context, const EchoRequest& request) override {
return nullptr;
}
ClientAsyncReaderInterface<EchoResponse>* AsyncResponseStreamRaw(
ClientContext* context, const EchoRequest& request, CompletionQueue* cq,
- void* tag) GRPC_OVERRIDE {
+ void* tag) override {
return nullptr;
}
ClientReaderWriterInterface<EchoRequest, EchoResponse>* BidiStreamRaw(
- ClientContext* context) GRPC_OVERRIDE {
+ ClientContext* context) override {
return new MockClientReaderWriter<EchoRequest, EchoResponse>();
}
ClientAsyncReaderWriterInterface<EchoRequest, EchoResponse>*
AsyncBidiStreamRaw(ClientContext* context, CompletionQueue* cq,
- void* tag) GRPC_OVERRIDE {
+ void* tag) override {
return nullptr;
}
ClientAsyncResponseReaderInterface<EchoResponse>* AsyncUnimplementedRaw(
ClientContext* context, const EchoRequest& request,
- CompletionQueue* cq) GRPC_OVERRIDE {
+ CompletionQueue* cq) override {
return nullptr;
}
};
@@ -216,14 +214,14 @@ class FakeClient {
class TestServiceImpl : public EchoTestService::Service {
public:
Status Echo(ServerContext* context, const EchoRequest* request,
- EchoResponse* response) GRPC_OVERRIDE {
+ EchoResponse* response) override {
response->set_message(request->message());
return Status::OK;
}
- Status BidiStream(ServerContext* context,
- ServerReaderWriter<EchoResponse, EchoRequest>* stream)
- GRPC_OVERRIDE {
+ Status BidiStream(
+ ServerContext* context,
+ ServerReaderWriter<EchoResponse, EchoRequest>* stream) override {
EchoRequest request;
EchoResponse response;
while (stream->Read(&request)) {
@@ -239,7 +237,7 @@ class MockTest : public ::testing::Test {
protected:
MockTest() {}
- void SetUp() GRPC_OVERRIDE {
+ void SetUp() override {
int port = grpc_pick_unused_port_or_die();
server_address_ << "localhost:" << port;
// Setup server
@@ -250,7 +248,7 @@ class MockTest : public ::testing::Test {
server_ = builder.BuildAndStart();
}
- void TearDown() GRPC_OVERRIDE { server_->Shutdown(); }
+ void TearDown() override { server_->Shutdown(); }
void ResetStub() {
std::shared_ptr<Channel> channel =
diff --git a/test/cpp/end2end/proto_server_reflection_test.cc b/test/cpp/end2end/proto_server_reflection_test.cc
index 75efd01f06..8b9688d200 100644
--- a/test/cpp/end2end/proto_server_reflection_test.cc
+++ b/test/cpp/end2end/proto_server_reflection_test.cc
@@ -56,7 +56,7 @@ class ProtoServerReflectionTest : public ::testing::Test {
public:
ProtoServerReflectionTest() {}
- void SetUp() GRPC_OVERRIDE {
+ void SetUp() override {
port_ = grpc_pick_unused_port_or_die();
ref_desc_pool_ = protobuf::DescriptorPool::generated_pool();
diff --git a/test/cpp/end2end/round_robin_end2end_test.cc b/test/cpp/end2end/round_robin_end2end_test.cc
new file mode 100644
index 0000000000..76211cbdd3
--- /dev/null
+++ b/test/cpp/end2end/round_robin_end2end_test.cc
@@ -0,0 +1,211 @@
+/*
+ *
+ * Copyright 2016, 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.
+ *
+ */
+
+#include <memory>
+#include <mutex>
+#include <thread>
+
+#include <grpc++/channel.h>
+#include <grpc++/client_context.h>
+#include <grpc++/create_channel.h>
+#include <grpc++/server.h>
+#include <grpc++/server_builder.h>
+#include <grpc/grpc.h>
+#include <grpc/support/log.h>
+#include <grpc/support/thd.h>
+#include <grpc/support/time.h>
+#include <gtest/gtest.h>
+
+#include "src/proto/grpc/testing/echo.grpc.pb.h"
+#include "test/core/util/port.h"
+#include "test/core/util/test_config.h"
+#include "test/cpp/end2end/test_service_impl.h"
+
+using grpc::testing::EchoRequest;
+using grpc::testing::EchoResponse;
+using std::chrono::system_clock;
+
+namespace grpc {
+namespace testing {
+namespace {
+
+// Subclass of TestServiceImpl that increments a request counter for
+// every call to the Echo RPC.
+class MyTestServiceImpl : public TestServiceImpl {
+ public:
+ MyTestServiceImpl() : request_count_(0) {}
+
+ Status Echo(ServerContext* context, const EchoRequest* request,
+ EchoResponse* response) override {
+ {
+ std::unique_lock<std::mutex> lock(mu_);
+ ++request_count_;
+ }
+ return TestServiceImpl::Echo(context, request, response);
+ }
+
+ int request_count() {
+ std::unique_lock<std::mutex> lock(mu_);
+ return request_count_;
+ }
+
+ private:
+ std::mutex mu_;
+ int request_count_;
+};
+
+class RoundRobinEnd2endTest : public ::testing::Test {
+ protected:
+ RoundRobinEnd2endTest() : server_host_("localhost") {}
+
+ void StartServers(int num_servers) {
+ for (int i = 0; i < num_servers; ++i) {
+ servers_.emplace_back(new ServerData(server_host_));
+ }
+ }
+
+ void TearDown() override {
+ for (size_t i = 0; i < servers_.size(); ++i) {
+ servers_[i]->Shutdown();
+ }
+ }
+
+ void ResetStub(bool round_robin) {
+ ChannelArguments args;
+ if (round_robin) args.SetLoadBalancingPolicyName("round_robin");
+ std::ostringstream uri;
+ uri << "ipv4:///";
+ for (size_t i = 0; i < servers_.size() - 1; ++i) {
+ uri << "127.0.0.1:" << servers_[i]->port_ << ",";
+ }
+ uri << "127.0.0.1:" << servers_[servers_.size() - 1]->port_;
+ std::shared_ptr<Channel> channel =
+ CreateCustomChannel(uri.str(), InsecureChannelCredentials(), args);
+ stub_ = grpc::testing::EchoTestService::NewStub(channel);
+ }
+
+ void SendRpc(int num_rpcs) {
+ EchoRequest request;
+ EchoResponse response;
+ request.set_message("Live long and prosper.");
+ for (int i = 0; i < num_rpcs; i++) {
+ ClientContext context;
+ Status status = stub_->Echo(&context, request, &response);
+ EXPECT_TRUE(status.ok());
+ EXPECT_EQ(response.message(), request.message());
+ }
+ }
+
+ struct ServerData {
+ int port_;
+ std::unique_ptr<Server> server_;
+ MyTestServiceImpl service_;
+ std::unique_ptr<std::thread> thread_;
+
+ explicit ServerData(const grpc::string& server_host) {
+ port_ = grpc_pick_unused_port_or_die();
+ gpr_log(GPR_INFO, "starting server on port %d", port_);
+ std::mutex mu;
+ std::condition_variable cond;
+ thread_.reset(new std::thread(
+ std::bind(&ServerData::Start, this, server_host, &mu, &cond)));
+ std::unique_lock<std::mutex> lock(mu);
+ cond.wait(lock);
+ gpr_log(GPR_INFO, "server startup complete");
+ }
+
+ void Start(const grpc::string& server_host, std::mutex* mu,
+ std::condition_variable* cond) {
+ std::ostringstream server_address;
+ server_address << server_host << ":" << port_;
+ ServerBuilder builder;
+ builder.AddListeningPort(server_address.str(),
+ InsecureServerCredentials());
+ builder.RegisterService(&service_);
+ server_ = builder.BuildAndStart();
+ std::lock_guard<std::mutex> lock(*mu);
+ cond->notify_one();
+ }
+
+ void Shutdown() {
+ server_->Shutdown();
+ thread_->join();
+ }
+ };
+
+ const grpc::string server_host_;
+ CompletionQueue cli_cq_;
+ std::unique_ptr<grpc::testing::EchoTestService::Stub> stub_;
+ std::vector<std::unique_ptr<ServerData>> servers_;
+};
+
+TEST_F(RoundRobinEnd2endTest, PickFirst) {
+ // Start servers and send one RPC per server.
+ const int kNumServers = 3;
+ StartServers(kNumServers);
+ ResetStub(false /* round_robin */);
+ SendRpc(kNumServers);
+ // All requests should have gone to a single server.
+ bool found = false;
+ for (size_t i = 0; i < servers_.size(); ++i) {
+ const int request_count = servers_[i]->service_.request_count();
+ if (request_count == kNumServers) {
+ found = true;
+ } else {
+ EXPECT_EQ(0, request_count);
+ }
+ }
+ EXPECT_TRUE(found);
+}
+
+TEST_F(RoundRobinEnd2endTest, RoundRobin) {
+ // Start servers and send one RPC per server.
+ const int kNumServers = 3;
+ StartServers(kNumServers);
+ ResetStub(true /* round_robin */);
+ SendRpc(kNumServers);
+ // One request should have gone to each server.
+ for (size_t i = 0; i < servers_.size(); ++i) {
+ EXPECT_EQ(1, servers_[i]->service_.request_count());
+ }
+}
+
+} // namespace
+} // namespace testing
+} // namespace grpc
+
+int main(int argc, char** argv) {
+ grpc_test_init(argc, argv);
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc
index b967a5d1e9..1b6f4ce37d 100644
--- a/test/cpp/end2end/server_builder_plugin_test.cc
+++ b/test/cpp/end2end/server_builder_plugin_test.cc
@@ -31,13 +31,14 @@
*
*/
+#include <thread>
+
#include <grpc++/channel.h>
#include <grpc++/client_context.h>
#include <grpc++/create_channel.h>
#include <grpc++/impl/server_builder_option.h>
#include <grpc++/impl/server_builder_plugin.h>
#include <grpc++/impl/server_initializer.h>
-#include <grpc++/impl/thd.h>
#include <grpc++/security/credentials.h>
#include <grpc++/security/server_credentials.h>
#include <grpc++/server.h>
@@ -65,29 +66,29 @@ class TestServerBuilderPlugin : public ServerBuilderPlugin {
register_service_ = false;
}
- grpc::string name() GRPC_OVERRIDE { return PLUGIN_NAME; }
+ grpc::string name() override { return PLUGIN_NAME; }
- void InitServer(ServerInitializer* si) GRPC_OVERRIDE {
+ void InitServer(ServerInitializer* si) override {
init_server_is_called_ = true;
if (register_service_) {
si->RegisterService(service_);
}
}
- void Finish(ServerInitializer* si) GRPC_OVERRIDE { finish_is_called_ = true; }
+ void Finish(ServerInitializer* si) override { finish_is_called_ = true; }
- void ChangeArguments(const grpc::string& name, void* value) GRPC_OVERRIDE {
+ void ChangeArguments(const grpc::string& name, void* value) override {
change_arguments_is_called_ = true;
}
- bool has_async_methods() const GRPC_OVERRIDE {
+ bool has_async_methods() const override {
if (register_service_) {
return service_->has_async_methods();
}
return false;
}
- bool has_sync_methods() const GRPC_OVERRIDE {
+ bool has_sync_methods() const override {
if (register_service_) {
return service_->has_synchronous_methods();
}
@@ -112,10 +113,10 @@ class InsertPluginServerBuilderOption : public ServerBuilderOption {
public:
InsertPluginServerBuilderOption() { register_service_ = false; }
- void UpdateArguments(ChannelArguments* arg) GRPC_OVERRIDE {}
+ void UpdateArguments(ChannelArguments* arg) override {}
- void UpdatePlugins(std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins)
- GRPC_OVERRIDE {
+ void UpdatePlugins(
+ std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) override {
plugins->clear();
std::unique_ptr<TestServerBuilderPlugin> plugin(
@@ -154,7 +155,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
public:
ServerBuilderPluginTest() {}
- void SetUp() GRPC_OVERRIDE {
+ void SetUp() override {
port_ = grpc_pick_unused_port_or_die();
builder_.reset(new ServerBuilder());
}
@@ -191,7 +192,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
// we run some tests without a service, and for those we need to supply a
// frequently polled completion queue
cq_ = builder_->AddCompletionQueue();
- cq_thread_ = new grpc::thread(&ServerBuilderPluginTest::RunCQ, this);
+ cq_thread_ = new std::thread(&ServerBuilderPluginTest::RunCQ, this);
server_ = builder_->BuildAndStart();
EXPECT_TRUE(CheckPresent());
}
@@ -202,7 +203,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
stub_ = grpc::testing::EchoTestService::NewStub(channel_);
}
- void TearDown() GRPC_OVERRIDE {
+ void TearDown() override {
auto plugin = CheckPresent();
EXPECT_TRUE(plugin);
EXPECT_TRUE(plugin->init_server_is_called());
@@ -225,7 +226,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
std::unique_ptr<grpc::testing::EchoTestService::Stub> stub_;
std::unique_ptr<ServerCompletionQueue> cq_;
std::unique_ptr<Server> server_;
- grpc::thread* cq_thread_;
+ std::thread* cq_thread_;
TestServiceImpl service_;
int port_;
diff --git a/test/cpp/end2end/server_crash_test.cc b/test/cpp/end2end/server_crash_test.cc
index 16a5fa2322..8cee1403dc 100644
--- a/test/cpp/end2end/server_crash_test.cc
+++ b/test/cpp/end2end/server_crash_test.cc
@@ -60,14 +60,13 @@ namespace testing {
namespace {
-class ServiceImpl GRPC_FINAL
- : public ::grpc::testing::EchoTestService::Service {
+class ServiceImpl final : public ::grpc::testing::EchoTestService::Service {
public:
ServiceImpl() : bidi_stream_count_(0), response_stream_count_(0) {}
- Status BidiStream(ServerContext* context,
- ServerReaderWriter<EchoResponse, EchoRequest>* stream)
- GRPC_OVERRIDE {
+ Status BidiStream(
+ ServerContext* context,
+ ServerReaderWriter<EchoResponse, EchoRequest>* stream) override {
bidi_stream_count_++;
EchoRequest request;
EchoResponse response;
@@ -82,7 +81,7 @@ class ServiceImpl GRPC_FINAL
}
Status ResponseStream(ServerContext* context, const EchoRequest* request,
- ServerWriter<EchoResponse>* writer) GRPC_OVERRIDE {
+ ServerWriter<EchoResponse>* writer) override {
EchoResponse response;
response_stream_count_++;
for (int i = 0;; i++) {
diff --git a/test/cpp/end2end/shutdown_test.cc b/test/cpp/end2end/shutdown_test.cc
index 4cba3b1c81..5b52b1fc1a 100644
--- a/test/cpp/end2end/shutdown_test.cc
+++ b/test/cpp/end2end/shutdown_test.cc
@@ -61,7 +61,7 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
explicit TestServiceImpl(gpr_event* ev) : ev_(ev) {}
Status Echo(ServerContext* context, const EchoRequest* request,
- EchoResponse* response) GRPC_OVERRIDE {
+ EchoResponse* response) override {
gpr_event_set(ev_, (void*)1);
while (!context->IsCancelled()) {
}
@@ -76,7 +76,7 @@ class ShutdownTest : public ::testing::Test {
public:
ShutdownTest() : shutdown_(false), service_(&ev_) { gpr_event_init(&ev_); }
- void SetUp() GRPC_OVERRIDE {
+ void SetUp() override {
port_ = grpc_pick_unused_port_or_die();
server_ = SetUpServer(port_);
}
@@ -91,7 +91,7 @@ class ShutdownTest : public ::testing::Test {
return server;
}
- void TearDown() GRPC_OVERRIDE { GPR_ASSERT(shutdown_); }
+ void TearDown() override { GPR_ASSERT(shutdown_); }
void ResetStub() {
string target = "dns:localhost:" + to_string(port_);
diff --git a/test/cpp/end2end/streaming_throughput_test.cc b/test/cpp/end2end/streaming_throughput_test.cc
index fbef761ca9..302583766b 100644
--- a/test/cpp/end2end/streaming_throughput_test.cc
+++ b/test/cpp/end2end/streaming_throughput_test.cc
@@ -121,9 +121,9 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
}
// Only implement the one method we will be calling for brevity.
- Status BidiStream(ServerContext* context,
- ServerReaderWriter<EchoResponse, EchoRequest>* stream)
- GRPC_OVERRIDE {
+ Status BidiStream(
+ ServerContext* context,
+ ServerReaderWriter<EchoResponse, EchoRequest>* stream) override {
EchoRequest request;
gpr_atm should_exit;
gpr_atm_rel_store(&should_exit, static_cast<gpr_atm>(0));
@@ -147,7 +147,7 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
class End2endTest : public ::testing::Test {
protected:
- void SetUp() GRPC_OVERRIDE {
+ void SetUp() override {
int port = grpc_pick_unused_port_or_die();
server_address_ << "localhost:" << port;
// Setup server
@@ -158,7 +158,7 @@ class End2endTest : public ::testing::Test {
server_ = builder.BuildAndStart();
}
- void TearDown() GRPC_OVERRIDE { server_->Shutdown(); }
+ void TearDown() override { server_->Shutdown(); }
void ResetStub() {
std::shared_ptr<Channel> channel =
diff --git a/test/cpp/end2end/test_service_impl.h b/test/cpp/end2end/test_service_impl.h
index c89f88c900..88e0be7bca 100644
--- a/test/cpp/end2end/test_service_impl.h
+++ b/test/cpp/end2end/test_service_impl.h
@@ -63,20 +63,20 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
: signal_client_(false), host_(new grpc::string(host)) {}
Status Echo(ServerContext* context, const EchoRequest* request,
- EchoResponse* response) GRPC_OVERRIDE;
+ EchoResponse* response) override;
// Unimplemented is left unimplemented to test the returned error.
Status RequestStream(ServerContext* context,
ServerReader<EchoRequest>* reader,
- EchoResponse* response) GRPC_OVERRIDE;
+ EchoResponse* response) override;
Status ResponseStream(ServerContext* context, const EchoRequest* request,
- ServerWriter<EchoResponse>* writer) GRPC_OVERRIDE;
+ ServerWriter<EchoResponse>* writer) override;
- Status BidiStream(ServerContext* context,
- ServerReaderWriter<EchoResponse, EchoRequest>* stream)
- GRPC_OVERRIDE;
+ Status BidiStream(
+ ServerContext* context,
+ ServerReaderWriter<EchoResponse, EchoRequest>* stream) override;
bool signal_client() {
std::unique_lock<std::mutex> lock(mu_);
diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc
index 0b9d4cda9f..fe5a219eed 100644
--- a/test/cpp/end2end/thread_stress_test.cc
+++ b/test/cpp/end2end/thread_stress_test.cc
@@ -86,12 +86,12 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
TestServiceImpl() : signal_client_(false) {}
Status Echo(ServerContext* context, const EchoRequest* request,
- EchoResponse* response) GRPC_OVERRIDE {
+ EchoResponse* response) override {
response->set_message(request->message());
MaybeEchoDeadline(context, request, response);
if (request->has_param() && request->param().client_cancel_after_us()) {
{
- unique_lock<mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
signal_client_ = true;
}
while (!context->IsCancelled()) {
@@ -118,7 +118,7 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
Status RequestStream(ServerContext* context,
ServerReader<EchoRequest>* reader,
- EchoResponse* response) GRPC_OVERRIDE {
+ EchoResponse* response) override {
EchoRequest request;
response->set_message("");
while (reader->Read(&request)) {
@@ -130,7 +130,7 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
// Return 3 messages.
// TODO(yangg) make it generic by adding a parameter into EchoRequest
Status ResponseStream(ServerContext* context, const EchoRequest* request,
- ServerWriter<EchoResponse>* writer) GRPC_OVERRIDE {
+ ServerWriter<EchoResponse>* writer) override {
EchoResponse response;
response.set_message(request->message() + "0");
writer->Write(response);
@@ -142,9 +142,9 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
return Status::OK;
}
- Status BidiStream(ServerContext* context,
- ServerReaderWriter<EchoResponse, EchoRequest>* stream)
- GRPC_OVERRIDE {
+ Status BidiStream(
+ ServerContext* context,
+ ServerReaderWriter<EchoResponse, EchoRequest>* stream) override {
EchoRequest request;
EchoResponse response;
while (stream->Read(&request)) {
@@ -156,20 +156,20 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
}
bool signal_client() {
- unique_lock<mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
return signal_client_;
}
private:
bool signal_client_;
- mutex mu_;
+ std::mutex mu_;
};
class TestServiceImplDupPkg
: public ::grpc::testing::duplicate::EchoTestService::Service {
public:
Status Echo(ServerContext* context, const EchoRequest* request,
- EchoResponse* response) GRPC_OVERRIDE {
+ EchoResponse* response) override {
response->set_message("no package");
return Status::OK;
}
@@ -215,12 +215,12 @@ class CommonStressTest {
class CommonStressTestSyncServer : public CommonStressTest<TestServiceImpl> {
public:
- void SetUp() GRPC_OVERRIDE {
+ void SetUp() override {
ServerBuilder builder;
SetUpStart(&builder, &service_);
SetUpEnd(&builder);
}
- void TearDown() GRPC_OVERRIDE {
+ void TearDown() override {
TearDownStart();
TearDownEnd();
}
@@ -232,7 +232,7 @@ class CommonStressTestSyncServer : public CommonStressTest<TestServiceImpl> {
class CommonStressTestAsyncServer
: public CommonStressTest<grpc::testing::EchoTestService::AsyncService> {
public:
- void SetUp() GRPC_OVERRIDE {
+ void SetUp() override {
shutting_down_ = false;
ServerBuilder builder;
SetUpStart(&builder, &service_);
@@ -247,9 +247,9 @@ class CommonStressTestAsyncServer
new std::thread(&CommonStressTestAsyncServer::ProcessRpcs, this));
}
}
- void TearDown() GRPC_OVERRIDE {
+ void TearDown() override {
{
- unique_lock<mutex> l(mu_);
+ std::unique_lock<std::mutex> l(mu_);
TearDownStart();
shutting_down_ = true;
cq_->Shutdown();
@@ -292,7 +292,7 @@ class CommonStressTestAsyncServer
}
}
void RefreshContext(int i) {
- unique_lock<mutex> l(mu_);
+ std::unique_lock<std::mutex> l(mu_);
if (!shutting_down_) {
contexts_[i].state = Context::READY;
contexts_[i].srv_ctx.reset(new ServerContext);
@@ -315,7 +315,7 @@ class CommonStressTestAsyncServer
::grpc::testing::EchoTestService::AsyncService service_;
std::unique_ptr<ServerCompletionQueue> cq_;
bool shutting_down_;
- mutex mu_;
+ std::mutex mu_;
std::vector<std::thread*> server_threads_;
};
@@ -323,8 +323,8 @@ template <class Common>
class End2endTest : public ::testing::Test {
protected:
End2endTest() {}
- void SetUp() GRPC_OVERRIDE { common_.SetUp(); }
- void TearDown() GRPC_OVERRIDE { common_.TearDown(); }
+ void SetUp() override { common_.SetUp(); }
+ void TearDown() override { common_.TearDown(); }
void ResetStub() { common_.ResetStub(); }
Common common_;
@@ -369,8 +369,8 @@ class AsyncClientEnd2endTest : public ::testing::Test {
protected:
AsyncClientEnd2endTest() : rpcs_outstanding_(0) {}
- void SetUp() GRPC_OVERRIDE { common_.SetUp(); }
- void TearDown() GRPC_OVERRIDE {
+ void SetUp() override { common_.SetUp(); }
+ void TearDown() override {
void* ignored_tag;
bool ignored_ok;
while (cq_.Next(&ignored_tag, &ignored_ok))
@@ -379,7 +379,7 @@ class AsyncClientEnd2endTest : public ::testing::Test {
}
void Wait() {
- unique_lock<mutex> l(mu_);
+ std::unique_lock<std::mutex> l(mu_);
while (rpcs_outstanding_ != 0) {
cv_.wait(l);
}
@@ -404,7 +404,7 @@ class AsyncClientEnd2endTest : public ::testing::Test {
call->response_reader->Finish(&call->response, &call->status,
(void*)call);
- unique_lock<mutex> l(mu_);
+ std::unique_lock<std::mutex> l(mu_);
rpcs_outstanding_++;
}
}
@@ -422,7 +422,7 @@ class AsyncClientEnd2endTest : public ::testing::Test {
bool notify;
{
- unique_lock<mutex> l(mu_);
+ std::unique_lock<std::mutex> l(mu_);
rpcs_outstanding_--;
notify = (rpcs_outstanding_ == 0);
}
@@ -434,8 +434,8 @@ class AsyncClientEnd2endTest : public ::testing::Test {
Common common_;
CompletionQueue cq_;
- mutex mu_;
- condition_variable cv_;
+ std::mutex mu_;
+ std::condition_variable cv_;
int rpcs_outstanding_;
};
diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc
index b6056f9ae4..70d50ec2fa 100644
--- a/test/cpp/grpclb/grpclb_test.cc
+++ b/test/cpp/grpclb/grpclb_test.cc
@@ -76,10 +76,22 @@ extern "C" {
// - Send a serverlist with faulty ip:port addresses (port > 2^16, etc).
// - Test reception of invalid serverlist
// - Test pinging
-// - Test against a non-LB server. That server should return UNIMPLEMENTED and
-// the call should fail.
+// - Test against a non-LB server.
// - Random LB server closing the stream unexpectedly.
// - Test using DNS-resolvable names (localhost?)
+//
+// Findings from end to end testing to be covered here:
+// - Handling of LB servers restart, including reconnection after backing-off
+// retries.
+// - Destruction of load balanced channel (and therefore of grpclb instance)
+// while:
+// 1) the internal LB call is still active. This should work by virtue
+// of the weak reference the LB call holds. The call should be terminated as
+// part of the grpclb shutdown process.
+// 2) the retry timer is active. Again, the weak reference it holds should
+// prevent a premature call to \a glb_destroy.
+// - Restart of backend servers with no changes to serverlist. This exercises
+// the RR handover mechanism.
namespace grpc {
namespace {
@@ -144,7 +156,6 @@ static gpr_slice build_response_payload_slice(
// disfunctional implementation of std::to_string in gcc 4.4, which doesn't
// have a version for int but does have one for long long int.
string token_data = "token" + std::to_string((long long int)ports[i]);
- token_data.resize(64, '-');
server->set_load_balance_token(token_data);
}
const grpc::string &enc_resp = response.SerializeAsString();
@@ -333,7 +344,6 @@ static void start_backend_server(server_fixture *sf) {
// disfunctional implementation of std::to_string in gcc 4.4, which doesn't
// have a version for int but does have one for long long int.
string expected_token = "token" + std::to_string((long long int)sf->port);
- expected_token.resize(64, '-');
GPR_ASSERT(contains_metadata(&request_metadata_recv, "lb-token",
expected_token.c_str()));
@@ -633,7 +643,9 @@ static test_fixture setup_test_fixture(int lb_server_update_delay_ms) {
gpr_thd_new(&tf.lb_server.tid, fork_lb_server, &tf.lb_server, &options);
char *server_uri;
- gpr_asprintf(&server_uri, "test:%s?lb_policy=grpclb&lb_enabled=1",
+ // The grpclb LB policy will be automatically selected by virtue of
+ // the fact that the returned addresses are balancer addresses.
+ gpr_asprintf(&server_uri, "test:%s?lb_enabled=1",
tf.lb_server.servers_hostport);
setup_client(server_uri, &tf.client);
gpr_free(server_uri);
diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc
index 46d09b7f28..fc35db5233 100644
--- a/test/cpp/interop/stress_test.cc
+++ b/test/cpp/interop/stress_test.cc
@@ -40,7 +40,6 @@
#include <gflags/gflags.h>
#include <grpc++/create_channel.h>
#include <grpc++/grpc++.h>
-#include <grpc++/impl/thd.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
@@ -321,7 +320,7 @@ int main(int argc, char** argv) {
gpr_log(GPR_INFO, "Starting test(s)..");
- std::vector<grpc::thread> test_threads;
+ std::vector<std::thread> test_threads;
// Create and start the test threads.
// Note that:
@@ -361,7 +360,7 @@ int main(int argc, char** argv) {
"/stress_test/server_%d/channel_%d/stub_%d/qps",
server_idx, channel_idx, stub_idx);
- test_threads.emplace_back(grpc::thread(
+ test_threads.emplace_back(std::thread(
&StressTestInteropClient::MainLoop, client,
metrics_service.CreateQpsGauge(buffer, &is_already_created)));
diff --git a/include/grpc++/impl/thd.h b/test/cpp/microbenchmarks/noop-benchmark.cc
index f8d4258ac6..6b06c69c6e 100644
--- a/include/grpc++/impl/thd.h
+++ b/test/cpp/microbenchmarks/noop-benchmark.cc
@@ -31,15 +31,15 @@
*
*/
-#ifndef GRPCXX_IMPL_THD_H
-#define GRPCXX_IMPL_THD_H
+/* This benchmark exists to ensure that the google_benchmark integration is
+ * working */
-#include <grpc++/support/config.h>
+#include "third_party/google_benchmark/include/benchmark/benchmark.h"
-#ifdef GRPC_CXX0X_NO_THREAD
-#include <grpc++/impl/thd_no_cxx11.h>
-#else
-#include <grpc++/impl/thd_cxx11.h>
-#endif
+static void BM_NoOp(benchmark::State& state) {
+ while (state.KeepRunning()) {
+ }
+}
+BENCHMARK(BM_NoOp);
-#endif // GRPCXX_IMPL_THD_H
+BENCHMARK_MAIN();
diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h
index 9983c8a7b0..a8d125ad28 100644
--- a/test/cpp/qps/client.h
+++ b/test/cpp/qps/client.h
@@ -113,7 +113,7 @@ class ClientRequestCreator<ByteBuffer> {
}
};
-class HistogramEntry GRPC_FINAL {
+class HistogramEntry final {
public:
HistogramEntry() : value_used_(false), status_used_(false) {}
bool value_used() const { return value_used_; }
diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc
index 4d36a6ba42..2ec6a5a23b 100644
--- a/test/cpp/qps/client_async.cc
+++ b/test/cpp/qps/client_async.cc
@@ -93,8 +93,8 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext {
callback_(on_done),
next_issue_(next_issue),
start_req_(start_req) {}
- ~ClientRpcContextUnaryImpl() GRPC_OVERRIDE {}
- void Start(CompletionQueue* cq) GRPC_OVERRIDE {
+ ~ClientRpcContextUnaryImpl() override {}
+ void Start(CompletionQueue* cq) override {
cq_ = cq;
if (!next_issue_) { // ready to issue
RunNextState(true, nullptr);
@@ -102,7 +102,7 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext {
alarm_.reset(new Alarm(cq_, next_issue_(), ClientRpcContext::tag(this)));
}
}
- bool RunNextState(bool ok, HistogramEntry* entry) GRPC_OVERRIDE {
+ bool RunNextState(bool ok, HistogramEntry* entry) override {
switch (next_state_) {
case State::READY:
start_ = UsageTimer::Now();
@@ -121,7 +121,7 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext {
return false;
}
}
- ClientRpcContext* StartNewClone() GRPC_OVERRIDE {
+ ClientRpcContext* StartNewClone() override {
return new ClientRpcContextUnaryImpl(stub_, req_, next_issue_, start_req_,
callback_);
}
@@ -217,7 +217,7 @@ class AsyncClient : public ClientImpl<StubType, RequestType> {
}
return num_threads;
}
- void DestroyMultithreading() GRPC_OVERRIDE GRPC_FINAL {
+ void DestroyMultithreading() override final {
for (auto ss = shutdown_state_.begin(); ss != shutdown_state_.end(); ++ss) {
std::lock_guard<std::mutex> lock((*ss)->mutex);
(*ss)->shutdown = true;
@@ -228,8 +228,7 @@ class AsyncClient : public ClientImpl<StubType, RequestType> {
this->EndThreads(); // this needed for resolution
}
- bool ThreadFunc(HistogramEntry* entry,
- size_t thread_idx) GRPC_OVERRIDE GRPC_FINAL {
+ bool ThreadFunc(HistogramEntry* entry, size_t thread_idx) override final {
void* got_tag;
bool ok;
@@ -279,7 +278,7 @@ static std::unique_ptr<BenchmarkService::Stub> BenchmarkStubCreator(
return BenchmarkService::NewStub(ch);
}
-class AsyncUnaryClient GRPC_FINAL
+class AsyncUnaryClient final
: public AsyncClient<BenchmarkService::Stub, SimpleRequest> {
public:
explicit AsyncUnaryClient(const ClientConfig& config)
@@ -287,7 +286,7 @@ class AsyncUnaryClient GRPC_FINAL
config, SetupCtx, BenchmarkStubCreator) {
StartThreads(num_async_threads_);
}
- ~AsyncUnaryClient() GRPC_OVERRIDE {}
+ ~AsyncUnaryClient() override {}
private:
static void CheckDone(grpc::Status s, SimpleResponse* response,
@@ -329,13 +328,13 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext {
callback_(on_done),
next_issue_(next_issue),
start_req_(start_req) {}
- ~ClientRpcContextStreamingImpl() GRPC_OVERRIDE {}
- void Start(CompletionQueue* cq) GRPC_OVERRIDE {
+ ~ClientRpcContextStreamingImpl() override {}
+ void Start(CompletionQueue* cq) override {
cq_ = cq;
stream_ = start_req_(stub_, &context_, cq, ClientRpcContext::tag(this));
next_state_ = State::STREAM_IDLE;
}
- bool RunNextState(bool ok, HistogramEntry* entry) GRPC_OVERRIDE {
+ bool RunNextState(bool ok, HistogramEntry* entry) override {
while (true) {
switch (next_state_) {
case State::STREAM_IDLE:
@@ -377,7 +376,7 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext {
}
}
}
- ClientRpcContext* StartNewClone() GRPC_OVERRIDE {
+ ClientRpcContext* StartNewClone() override {
return new ClientRpcContextStreamingImpl(stub_, req_, next_issue_,
start_req_, callback_);
}
@@ -410,7 +409,7 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext {
stream_;
};
-class AsyncStreamingClient GRPC_FINAL
+class AsyncStreamingClient final
: public AsyncClient<BenchmarkService::Stub, SimpleRequest> {
public:
explicit AsyncStreamingClient(const ClientConfig& config)
@@ -419,7 +418,7 @@ class AsyncStreamingClient GRPC_FINAL
StartThreads(num_async_threads_);
}
- ~AsyncStreamingClient() GRPC_OVERRIDE {}
+ ~AsyncStreamingClient() override {}
private:
static void CheckDone(grpc::Status s, SimpleResponse* response) {}
@@ -458,8 +457,8 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext {
callback_(on_done),
next_issue_(next_issue),
start_req_(start_req) {}
- ~ClientRpcContextGenericStreamingImpl() GRPC_OVERRIDE {}
- void Start(CompletionQueue* cq) GRPC_OVERRIDE {
+ ~ClientRpcContextGenericStreamingImpl() override {}
+ void Start(CompletionQueue* cq) override {
cq_ = cq;
const grpc::string kMethodName(
"/grpc.testing.BenchmarkService/StreamingCall");
@@ -467,7 +466,7 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext {
ClientRpcContext::tag(this));
next_state_ = State::STREAM_IDLE;
}
- bool RunNextState(bool ok, HistogramEntry* entry) GRPC_OVERRIDE {
+ bool RunNextState(bool ok, HistogramEntry* entry) override {
while (true) {
switch (next_state_) {
case State::STREAM_IDLE:
@@ -509,7 +508,7 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext {
}
}
}
- ClientRpcContext* StartNewClone() GRPC_OVERRIDE {
+ ClientRpcContext* StartNewClone() override {
return new ClientRpcContextGenericStreamingImpl(stub_, req_, next_issue_,
start_req_, callback_);
}
@@ -546,7 +545,7 @@ static std::unique_ptr<grpc::GenericStub> GenericStubCreator(
return std::unique_ptr<grpc::GenericStub>(new grpc::GenericStub(ch));
}
-class GenericAsyncStreamingClient GRPC_FINAL
+class GenericAsyncStreamingClient final
: public AsyncClient<grpc::GenericStub, ByteBuffer> {
public:
explicit GenericAsyncStreamingClient(const ClientConfig& config)
@@ -555,7 +554,7 @@ class GenericAsyncStreamingClient GRPC_FINAL
StartThreads(num_async_threads_);
}
- ~GenericAsyncStreamingClient() GRPC_OVERRIDE {}
+ ~GenericAsyncStreamingClient() override {}
private:
static void CheckDone(grpc::Status s, ByteBuffer* response) {}
diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc
index f61e80d76b..a88a24d89c 100644
--- a/test/cpp/qps/client_sync.cc
+++ b/test/cpp/qps/client_sync.cc
@@ -108,10 +108,10 @@ class SynchronousClient
std::vector<SimpleResponse> responses_;
private:
- void DestroyMultithreading() GRPC_OVERRIDE GRPC_FINAL { EndThreads(); }
+ void DestroyMultithreading() override final { EndThreads(); }
};
-class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient {
+class SynchronousUnaryClient final : public SynchronousClient {
public:
SynchronousUnaryClient(const ClientConfig& config)
: SynchronousClient(config) {
@@ -119,7 +119,7 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient {
}
~SynchronousUnaryClient() {}
- bool ThreadFunc(HistogramEntry* entry, size_t thread_idx) GRPC_OVERRIDE {
+ bool ThreadFunc(HistogramEntry* entry, size_t thread_idx) override {
if (!WaitToIssue(thread_idx)) {
return true;
}
@@ -135,7 +135,7 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient {
}
};
-class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient {
+class SynchronousStreamingClient final : public SynchronousClient {
public:
SynchronousStreamingClient(const ClientConfig& config)
: SynchronousClient(config) {
@@ -165,7 +165,7 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient {
delete[] context_;
}
- bool ThreadFunc(HistogramEntry* entry, size_t thread_idx) GRPC_OVERRIDE {
+ bool ThreadFunc(HistogramEntry* entry, size_t thread_idx) override {
if (!WaitToIssue(thread_idx)) {
return true;
}
diff --git a/test/cpp/qps/gen_build_yaml.py b/test/cpp/qps/gen_build_yaml.py
index 369da2c8ca..e4d9e7ac58 100755
--- a/test/cpp/qps/gen_build_yaml.py
+++ b/test/cpp/qps/gen_build_yaml.py
@@ -82,7 +82,7 @@ print yaml.dump({
'defaults': 'boringssl',
'cpu_cost': guess_cpu(scenario_json),
'exclude_configs': [],
- 'timeout_seconds': 3*60
+ 'timeout_seconds': 6*60
}
for scenario_json in scenario_config.CXXLanguage().scenarios()
if 'scalable' in scenario_json.get('CATEGORIES', [])
diff --git a/test/cpp/qps/interarrival.h b/test/cpp/qps/interarrival.h
index 0980d5e8ba..4bef06f566 100644
--- a/test/cpp/qps/interarrival.h
+++ b/test/cpp/qps/interarrival.h
@@ -69,11 +69,11 @@ inline RandomDistInterface::~RandomDistInterface() {}
// independent identical stationary sources. For more information,
// see http://en.wikipedia.org/wiki/Exponential_distribution
-class ExpDist GRPC_FINAL : public RandomDistInterface {
+class ExpDist final : public RandomDistInterface {
public:
explicit ExpDist(double lambda) : lambda_recip_(1.0 / lambda) {}
- ~ExpDist() GRPC_OVERRIDE {}
- double transform(double uni) const GRPC_OVERRIDE {
+ ~ExpDist() override {}
+ double transform(double uni) const override {
// Note: Use 1.0-uni above to avoid NaN if uni is 0
return lambda_recip_ * (-log(1.0 - uni));
}
diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc
index d3e53fe14a..d437920e68 100644
--- a/test/cpp/qps/qps_worker.cc
+++ b/test/cpp/qps/qps_worker.cc
@@ -100,7 +100,7 @@ static std::unique_ptr<Server> CreateServer(const ServerConfig& config) {
abort();
}
-class ScopedProfile GRPC_FINAL {
+class ScopedProfile final {
public:
ScopedProfile(const char* filename, bool enable) : enable_(enable) {
if (enable_) grpc_profiler_start(filename);
@@ -113,14 +113,14 @@ class ScopedProfile GRPC_FINAL {
const bool enable_;
};
-class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service {
+class WorkerServiceImpl final : public WorkerService::Service {
public:
WorkerServiceImpl(int server_port, QpsWorker* worker)
: acquired_(false), server_port_(server_port), worker_(worker) {}
- Status RunClient(ServerContext* ctx,
- ServerReaderWriter<ClientStatus, ClientArgs>* stream)
- GRPC_OVERRIDE {
+ Status RunClient(
+ ServerContext* ctx,
+ ServerReaderWriter<ClientStatus, ClientArgs>* stream) override {
InstanceGuard g(this);
if (!g.Acquired()) {
return Status(StatusCode::RESOURCE_EXHAUSTED, "Client worker busy");
@@ -132,9 +132,9 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service {
return ret;
}
- Status RunServer(ServerContext* ctx,
- ServerReaderWriter<ServerStatus, ServerArgs>* stream)
- GRPC_OVERRIDE {
+ Status RunServer(
+ ServerContext* ctx,
+ ServerReaderWriter<ServerStatus, ServerArgs>* stream) override {
InstanceGuard g(this);
if (!g.Acquired()) {
return Status(StatusCode::RESOURCE_EXHAUSTED, "Server worker busy");
@@ -147,12 +147,12 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service {
}
Status CoreCount(ServerContext* ctx, const CoreRequest*,
- CoreResponse* resp) GRPC_OVERRIDE {
+ CoreResponse* resp) override {
resp->set_cores(gpr_cpu_num_cores());
return Status::OK;
}
- Status QuitWorker(ServerContext* ctx, const Void*, Void*) GRPC_OVERRIDE {
+ Status QuitWorker(ServerContext* ctx, const Void*, Void*) override {
InstanceGuard g(this);
if (!g.Acquired()) {
return Status(StatusCode::RESOURCE_EXHAUSTED, "Quitting worker busy");
diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h
index 39cf498e7b..9dc259e95a 100644
--- a/test/cpp/qps/report.h
+++ b/test/cpp/qps/report.h
@@ -82,10 +82,10 @@ class CompositeReporter : public Reporter {
/** Adds a \a reporter to the composite. */
void add(std::unique_ptr<Reporter> reporter);
- void ReportQPS(const ScenarioResult& result) GRPC_OVERRIDE;
- void ReportQPSPerCore(const ScenarioResult& result) GRPC_OVERRIDE;
- void ReportLatency(const ScenarioResult& result) GRPC_OVERRIDE;
- void ReportTimes(const ScenarioResult& result) GRPC_OVERRIDE;
+ void ReportQPS(const ScenarioResult& result) override;
+ void ReportQPSPerCore(const ScenarioResult& result) override;
+ void ReportLatency(const ScenarioResult& result) override;
+ void ReportTimes(const ScenarioResult& result) override;
private:
std::vector<std::unique_ptr<Reporter> > reporters_;
@@ -97,10 +97,10 @@ class GprLogReporter : public Reporter {
GprLogReporter(const string& name) : Reporter(name) {}
private:
- void ReportQPS(const ScenarioResult& result) GRPC_OVERRIDE;
- void ReportQPSPerCore(const ScenarioResult& result) GRPC_OVERRIDE;
- void ReportLatency(const ScenarioResult& result) GRPC_OVERRIDE;
- void ReportTimes(const ScenarioResult& result) GRPC_OVERRIDE;
+ void ReportQPS(const ScenarioResult& result) override;
+ void ReportQPSPerCore(const ScenarioResult& result) override;
+ void ReportLatency(const ScenarioResult& result) override;
+ void ReportTimes(const ScenarioResult& result) override;
};
/** Dumps the report to a JSON file. */
@@ -110,10 +110,10 @@ class JsonReporter : public Reporter {
: Reporter(name), report_file_(report_file) {}
private:
- void ReportQPS(const ScenarioResult& result) GRPC_OVERRIDE;
- void ReportQPSPerCore(const ScenarioResult& result) GRPC_OVERRIDE;
- void ReportLatency(const ScenarioResult& result) GRPC_OVERRIDE;
- void ReportTimes(const ScenarioResult& result) GRPC_OVERRIDE;
+ void ReportQPS(const ScenarioResult& result) override;
+ void ReportQPSPerCore(const ScenarioResult& result) override;
+ void ReportLatency(const ScenarioResult& result) override;
+ void ReportTimes(const ScenarioResult& result) override;
const string report_file_;
};
diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc
index bc4c896d83..f556fbdfa1 100644
--- a/test/cpp/qps/server_async.cc
+++ b/test/cpp/qps/server_async.cc
@@ -58,7 +58,7 @@ namespace testing {
template <class RequestType, class ResponseType, class ServiceType,
class ServerContextType>
-class AsyncQpsServerTest GRPC_FINAL : public grpc::testing::Server {
+class AsyncQpsServerTest final : public grpc::testing::Server {
public:
AsyncQpsServerTest(
const ServerConfig &config,
@@ -196,7 +196,7 @@ class AsyncQpsServerTest GRPC_FINAL : public grpc::testing::Server {
return reinterpret_cast<ServerRpcContext *>(tag);
}
- class ServerRpcContextUnaryImpl GRPC_FINAL : public ServerRpcContext {
+ class ServerRpcContextUnaryImpl final : public ServerRpcContext {
public:
ServerRpcContextUnaryImpl(
std::function<void(ServerContextType *, RequestType *,
@@ -213,11 +213,9 @@ class AsyncQpsServerTest GRPC_FINAL : public grpc::testing::Server {
request_method_(srv_ctx_.get(), &req_, &response_writer_,
AsyncQpsServerTest::tag(this));
}
- ~ServerRpcContextUnaryImpl() GRPC_OVERRIDE {}
- bool RunNextState(bool ok) GRPC_OVERRIDE {
- return (this->*next_state_)(ok);
- }
- void Reset() GRPC_OVERRIDE {
+ ~ServerRpcContextUnaryImpl() override {}
+ bool RunNextState(bool ok) override { return (this->*next_state_)(ok); }
+ void Reset() override {
srv_ctx_.reset(new ServerContextType);
req_ = RequestType();
response_writer_ =
@@ -257,7 +255,7 @@ class AsyncQpsServerTest GRPC_FINAL : public grpc::testing::Server {
grpc::ServerAsyncResponseWriter<ResponseType> response_writer_;
};
- class ServerRpcContextStreamingImpl GRPC_FINAL : public ServerRpcContext {
+ class ServerRpcContextStreamingImpl final : public ServerRpcContext {
public:
ServerRpcContextStreamingImpl(
std::function<void(
@@ -273,11 +271,9 @@ class AsyncQpsServerTest GRPC_FINAL : public grpc::testing::Server {
stream_(srv_ctx_.get()) {
request_method_(srv_ctx_.get(), &stream_, AsyncQpsServerTest::tag(this));
}
- ~ServerRpcContextStreamingImpl() GRPC_OVERRIDE {}
- bool RunNextState(bool ok) GRPC_OVERRIDE {
- return (this->*next_state_)(ok);
- }
- void Reset() GRPC_OVERRIDE {
+ ~ServerRpcContextStreamingImpl() override {}
+ bool RunNextState(bool ok) override { return (this->*next_state_)(ok); }
+ void Reset() override {
srv_ctx_.reset(new ServerContextType);
req_ = RequestType();
stream_ = grpc::ServerAsyncReaderWriter<ResponseType, RequestType>(
diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc
index 07f48e2644..8076a4a6b9 100644
--- a/test/cpp/qps/server_sync.cc
+++ b/test/cpp/qps/server_sync.cc
@@ -48,10 +48,10 @@
namespace grpc {
namespace testing {
-class BenchmarkServiceImpl GRPC_FINAL : public BenchmarkService::Service {
+class BenchmarkServiceImpl final : public BenchmarkService::Service {
public:
Status UnaryCall(ServerContext* context, const SimpleRequest* request,
- SimpleResponse* response) GRPC_OVERRIDE {
+ SimpleResponse* response) override {
if (request->response_size() > 0) {
if (!Server::SetPayload(request->response_type(),
request->response_size(),
@@ -63,7 +63,7 @@ class BenchmarkServiceImpl GRPC_FINAL : public BenchmarkService::Service {
}
Status StreamingCall(
ServerContext* context,
- ServerReaderWriter<SimpleResponse, SimpleRequest>* stream) GRPC_OVERRIDE {
+ ServerReaderWriter<SimpleResponse, SimpleRequest>* stream) override {
SimpleRequest request;
while (stream->Read(&request)) {
SimpleResponse response;
@@ -80,7 +80,7 @@ class BenchmarkServiceImpl GRPC_FINAL : public BenchmarkService::Service {
}
};
-class SynchronousServer GRPC_FINAL : public grpc::testing::Server {
+class SynchronousServer final : public grpc::testing::Server {
public:
explicit SynchronousServer(const ServerConfig& config) : Server(config) {
ServerBuilder builder;
diff --git a/test/cpp/thread_manager/thread_manager_test.cc b/test/cpp/thread_manager/thread_manager_test.cc
index 5c70103947..284761c53a 100644
--- a/test/cpp/thread_manager/thread_manager_test.cc
+++ b/test/cpp/thread_manager/thread_manager_test.cc
@@ -43,7 +43,7 @@
#include "test/cpp/util/test_config.h"
namespace grpc {
-class ThreadManagerTest GRPC_FINAL : public grpc::ThreadManager {
+class ThreadManagerTest final : public grpc::ThreadManager {
public:
ThreadManagerTest()
: ThreadManager(kMinPollers, kMaxPollers),
@@ -51,9 +51,8 @@ class ThreadManagerTest GRPC_FINAL : public grpc::ThreadManager {
num_poll_for_work_(0),
num_work_found_(0) {}
- grpc::ThreadManager::WorkStatus PollForWork(void **tag,
- bool *ok) GRPC_OVERRIDE;
- void DoWork(void *tag, bool ok) GRPC_OVERRIDE;
+ grpc::ThreadManager::WorkStatus PollForWork(void **tag, bool *ok) override;
+ void DoWork(void *tag, bool ok) override;
void PerformTest();
private:
diff --git a/test/cpp/util/cli_call.h b/test/cpp/util/cli_call.h
index 2fbc9618b6..65da86bd4e 100644
--- a/test/cpp/util/cli_call.h
+++ b/test/cpp/util/cli_call.h
@@ -43,7 +43,7 @@
namespace grpc {
namespace testing {
-class CliCall GRPC_FINAL {
+class CliCall final {
public:
typedef std::multimap<grpc::string, grpc::string> OutgoingMetadataContainer;
typedef std::multimap<grpc::string_ref, grpc::string_ref>
diff --git a/test/cpp/util/cli_call_test.cc b/test/cpp/util/cli_call_test.cc
index 75e90f824f..2e8501b2c3 100644
--- a/test/cpp/util/cli_call_test.cc
+++ b/test/cpp/util/cli_call_test.cc
@@ -56,7 +56,7 @@ namespace testing {
class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
public:
Status Echo(ServerContext* context, const EchoRequest* request,
- EchoResponse* response) GRPC_OVERRIDE {
+ EchoResponse* response) override {
if (!context->client_metadata().empty()) {
for (std::multimap<grpc::string_ref, grpc::string_ref>::const_iterator
iter = context->client_metadata().begin();
@@ -75,7 +75,7 @@ class CliCallTest : public ::testing::Test {
protected:
CliCallTest() {}
- void SetUp() GRPC_OVERRIDE {
+ void SetUp() override {
int port = grpc_pick_unused_port_or_die();
server_address_ << "localhost:" << port;
// Setup server
@@ -86,7 +86,7 @@ class CliCallTest : public ::testing::Test {
server_ = builder.BuildAndStart();
}
- void TearDown() GRPC_OVERRIDE { server_->Shutdown(); }
+ void TearDown() override { server_->Shutdown(); }
void ResetStub() {
channel_ =
diff --git a/test/cpp/util/grpc_tool_test.cc b/test/cpp/util/grpc_tool_test.cc
index bad1579f11..5ab054d04a 100644
--- a/test/cpp/util/grpc_tool_test.cc
+++ b/test/cpp/util/grpc_tool_test.cc
@@ -93,13 +93,12 @@ DECLARE_bool(l);
namespace {
-class TestCliCredentials GRPC_FINAL : public grpc::testing::CliCredentials {
+class TestCliCredentials final : public grpc::testing::CliCredentials {
public:
- std::shared_ptr<grpc::ChannelCredentials> GetCredentials() const
- GRPC_OVERRIDE {
+ std::shared_ptr<grpc::ChannelCredentials> GetCredentials() const override {
return InsecureChannelCredentials();
}
- const grpc::string GetCredentialUsage() const GRPC_OVERRIDE { return ""; }
+ const grpc::string GetCredentialUsage() const override { return ""; }
};
bool PrintStream(std::stringstream* ss, const grpc::string& output) {
@@ -118,7 +117,7 @@ size_t ArraySize(T& a) {
class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
public:
Status Echo(ServerContext* context, const EchoRequest* request,
- EchoResponse* response) GRPC_OVERRIDE {
+ EchoResponse* response) override {
if (!context->client_metadata().empty()) {
for (std::multimap<grpc::string_ref, grpc::string_ref>::const_iterator
iter = context->client_metadata().begin();
diff --git a/test/cpp/util/metrics_server.h b/test/cpp/util/metrics_server.h
index aa9bfed23d..4f1e393a63 100644
--- a/test/cpp/util/metrics_server.h
+++ b/test/cpp/util/metrics_server.h
@@ -83,13 +83,13 @@ class QpsGauge {
std::mutex num_queries_mu_;
};
-class MetricsServiceImpl GRPC_FINAL : public MetricsService::Service {
+class MetricsServiceImpl final : public MetricsService::Service {
public:
grpc::Status GetAllGauges(ServerContext* context, const EmptyMessage* request,
- ServerWriter<GaugeResponse>* writer) GRPC_OVERRIDE;
+ ServerWriter<GaugeResponse>* writer) override;
grpc::Status GetGauge(ServerContext* context, const GaugeRequest* request,
- GaugeResponse* response) GRPC_OVERRIDE;
+ GaugeResponse* response) override;
// Create a QpsGauge with name 'name'. is_present is set to true if the Gauge
// is already present in the map.
diff --git a/test/cpp/util/proto_file_parser.cc b/test/cpp/util/proto_file_parser.cc
index 98dd3f14ad..3e524227e5 100644
--- a/test/cpp/util/proto_file_parser.cc
+++ b/test/cpp/util/proto_file_parser.cc
@@ -61,7 +61,7 @@ class ErrorPrinter : public protobuf::compiler::MultiFileErrorCollector {
explicit ErrorPrinter(ProtoFileParser* parser) : parser_(parser) {}
void AddError(const grpc::string& filename, int line, int column,
- const grpc::string& message) GRPC_OVERRIDE {
+ const grpc::string& message) override {
std::ostringstream oss;
oss << "error " << filename << " " << line << " " << column << " "
<< message << "\n";
@@ -69,7 +69,7 @@ class ErrorPrinter : public protobuf::compiler::MultiFileErrorCollector {
}
void AddWarning(const grpc::string& filename, int line, int column,
- const grpc::string& message) GRPC_OVERRIDE {
+ const grpc::string& message) override {
std::cerr << "warning " << filename << " " << line << " " << column << " "
<< message << std::endl;
}
diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h
index dfa36044d9..259277ebbe 100644
--- a/test/cpp/util/proto_reflection_descriptor_database.h
+++ b/test/cpp/util/proto_reflection_descriptor_database.h
@@ -38,14 +38,9 @@
#include <unordered_set>
#include <vector>
-// GRPC_NO_GENERATED_CODE indicates generated pb files should not be used
-#ifdef GRPC_NO_GENERATED_CODE
-#include "src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h"
-#else
-#include <grpc++/ext/reflection.grpc.pb.h>
-#endif // GRPC_NO_GENERATED_CODE
#include <grpc++/grpc++.h>
#include <grpc++/impl/codegen/config_protobuf.h>
+#include "src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h"
namespace grpc {
@@ -67,14 +62,13 @@ class ProtoReflectionDescriptorDatabase : public protobuf::DescriptorDatabase {
// Find a file by file name. Fills in in *output and returns true if found.
// Otherwise, returns false, leaving the contents of *output undefined.
bool FindFileByName(const string& filename,
- protobuf::FileDescriptorProto* output) GRPC_OVERRIDE;
+ protobuf::FileDescriptorProto* output) override;
// Find the file that declares the given fully-qualified symbol name.
// If found, fills in *output and returns true, otherwise returns false
// and leaves *output undefined.
bool FindFileContainingSymbol(const string& symbol_name,
- protobuf::FileDescriptorProto* output)
- GRPC_OVERRIDE;
+ protobuf::FileDescriptorProto* output) override;
// Find the file which defines an extension extending the given message type
// with the given field number. If found, fills in *output and returns true,
@@ -82,7 +76,7 @@ class ProtoReflectionDescriptorDatabase : public protobuf::DescriptorDatabase {
// must be a fully-qualified type name.
bool FindFileContainingExtension(
const string& containing_type, int field_number,
- protobuf::FileDescriptorProto* output) GRPC_OVERRIDE;
+ protobuf::FileDescriptorProto* output) override;
// Finds the tag numbers used by all known extensions of
// extendee_type, and appends them to output in an undefined
@@ -92,7 +86,7 @@ class ProtoReflectionDescriptorDatabase : public protobuf::DescriptorDatabase {
// numbers. Returns true if the search was successful, otherwise
// returns false and leaves output unchanged.
bool FindAllExtensionNumbers(const string& extendee_type,
- std::vector<int>* output) GRPC_OVERRIDE;
+ std::vector<int>* output) override;
// Provide a list of full names of registered services
bool GetServices(std::vector<grpc::string>* output);
diff --git a/test/cpp/util/test_credentials_provider.cc b/test/cpp/util/test_credentials_provider.cc
index ca15f29795..0456b96667 100644
--- a/test/cpp/util/test_credentials_provider.cc
+++ b/test/cpp/util/test_credentials_provider.cc
@@ -34,9 +34,9 @@
#include "test/cpp/util/test_credentials_provider.h"
+#include <mutex>
#include <unordered_map>
-#include <grpc++/impl/sync.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
@@ -64,14 +64,14 @@ class CredentialsProvider {
class DefaultCredentialsProvider : public CredentialsProvider {
public:
- ~DefaultCredentialsProvider() GRPC_OVERRIDE {}
+ ~DefaultCredentialsProvider() override {}
- void AddSecureType(const grpc::string& type,
- std::unique_ptr<CredentialTypeProvider> type_provider)
- GRPC_OVERRIDE {
+ void AddSecureType(
+ const grpc::string& type,
+ std::unique_ptr<CredentialTypeProvider> type_provider) override {
// This clobbers any existing entry for type, except the defaults, which
// can't be clobbered.
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
auto it = std::find(added_secure_type_names_.begin(),
added_secure_type_names_.end(), type);
if (it == added_secure_type_names_.end()) {
@@ -84,7 +84,7 @@ class DefaultCredentialsProvider : public CredentialsProvider {
}
std::shared_ptr<ChannelCredentials> GetChannelCredentials(
- const grpc::string& type, ChannelArguments* args) GRPC_OVERRIDE {
+ const grpc::string& type, ChannelArguments* args) override {
if (type == grpc::testing::kInsecureCredentialsType) {
return InsecureChannelCredentials();
} else if (type == grpc::testing::kTlsCredentialsType) {
@@ -92,7 +92,7 @@ class DefaultCredentialsProvider : public CredentialsProvider {
args->SetSslTargetNameOverride("foo.test.google.fr");
return SslCredentials(ssl_opts);
} else {
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
auto it(std::find(added_secure_type_names_.begin(),
added_secure_type_names_.end(), type));
if (it == added_secure_type_names_.end()) {
@@ -105,7 +105,7 @@ class DefaultCredentialsProvider : public CredentialsProvider {
}
std::shared_ptr<ServerCredentials> GetServerCredentials(
- const grpc::string& type) GRPC_OVERRIDE {
+ const grpc::string& type) override {
if (type == grpc::testing::kInsecureCredentialsType) {
return InsecureServerCredentials();
} else if (type == grpc::testing::kTlsCredentialsType) {
@@ -116,7 +116,7 @@ class DefaultCredentialsProvider : public CredentialsProvider {
ssl_opts.pem_key_cert_pairs.push_back(pkcp);
return SslServerCredentials(ssl_opts);
} else {
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
auto it(std::find(added_secure_type_names_.begin(),
added_secure_type_names_.end(), type));
if (it == added_secure_type_names_.end()) {
@@ -127,10 +127,10 @@ class DefaultCredentialsProvider : public CredentialsProvider {
->GetServerCredentials();
}
}
- std::vector<grpc::string> GetSecureCredentialsTypeList() GRPC_OVERRIDE {
+ std::vector<grpc::string> GetSecureCredentialsTypeList() override {
std::vector<grpc::string> types;
types.push_back(grpc::testing::kTlsCredentialsType);
- grpc::unique_lock<grpc::mutex> lock(mu_);
+ std::unique_lock<std::mutex> lock(mu_);
for (auto it = added_secure_type_names_.begin();
it != added_secure_type_names_.end(); it++) {
types.push_back(*it);
@@ -139,7 +139,7 @@ class DefaultCredentialsProvider : public CredentialsProvider {
}
private:
- grpc::mutex mu_;
+ std::mutex mu_;
std::vector<grpc::string> added_secure_type_names_;
std::vector<std::unique_ptr<CredentialTypeProvider>>
added_secure_type_providers_;
diff --git a/third_party/google_benchmark b/third_party/google_benchmark
new file mode 160000
+Subproject 44c25c892a6229b20db7cd9dc05584ea865896d
diff --git a/tools/buildgen/generate_build_additions.sh b/tools/buildgen/generate_build_additions.sh
index 9a1a7a7249..1ea47042f4 100644
--- a/tools/buildgen/generate_build_additions.sh
+++ b/tools/buildgen/generate_build_additions.sh
@@ -30,6 +30,7 @@
gen_build_yaml_dirs=" \
src/boringssl \
+ src/google_benchmark \
src/proto \
src/zlib \
test/core/bad_client \
diff --git a/tools/codegen/extensions/gen_reflection_proto.sh b/tools/codegen/extensions/gen_reflection_proto.sh
deleted file mode 100755
index ea7689f7e8..0000000000
--- a/tools/codegen/extensions/gen_reflection_proto.sh
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/bin/bash
-
-# Copyright 2016, 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.
-
-set -e
-cd $(dirname $0)/../../..
-
-PROTO_DIR="src/proto/grpc/reflection/v1alpha"
-PROTO_FILE="reflection"
-HEADER_DIR="include/grpc++/ext"
-SRC_DIR="src/cpp/ext"
-INCLUDE_DIR="grpc++/ext"
-TMP_DIR="tmp"
-
-if hash grpc_cpp_plugin 2>/dev/null; then
- GRPC_PLUGIN=$(which grpc_cpp_plugin)
-else
- if [ -f bins/opt/grpc_cpp_plugin ]; then
- GRPC_PLUGIN="bins/opt/grpc_cpp_plugin"
- else
- echo "gRPC protoc plugin not found"
- exit 1
- fi
-fi
-
-if hash protoc 2>/dev/null; then
- PROTOC=$(which protoc)
-else
- if [ -f bins/opt/protobuf/protoc ]; then
- PROTOC="bins/opt/protobuf/protoc"
- else
- echo "protoc not found"
- exit 1
- fi
-fi
-
-TMP_DIR=${TMP_DIR}_${PROTO_FILE}
-
-[ ! -d $HEADER_DIR ] && mkdir -p $HEADER_DIR || :
-[ ! -d $SRC_DIR ] && mkdir -p $SRC_DIR || :
-[ ! -d $TMP_DIR ] && mkdir -p $TMP_DIR || :
-
-$PROTOC -I$PROTO_DIR --cpp_out=$TMP_DIR ${PROTO_DIR}/${PROTO_FILE}.proto
-$PROTOC -I$PROTO_DIR --grpc_out=$TMP_DIR --plugin=protoc-gen-grpc=${GRPC_PLUGIN} ${PROTO_DIR}/${PROTO_FILE}.proto
-
-sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.pb.cc
-sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.h
-sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.cc
-sed -i "s/\"${PROTO_FILE}.grpc.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.grpc.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.cc
-
-sed -i "1s/.*/\/\/ Generated by tools\/codegen\/extensions\/gen_reflection_proto.sh/g" ${TMP_DIR}/*.pb.h
-sed -i "1s/.*/\/\/ Generated by tools\/codegen\/extensions\/gen_reflection_proto.sh/g" ${TMP_DIR}/*.pb.cc
-
-/bin/cp LICENSE ${TMP_DIR}/TMP_LICENSE
-sed -i -e "s/./ &/" -e "s/.*/ \*&/" ${TMP_DIR}/TMP_LICENSE
-sed -i -r "\$a\ *\n *\/\n\n" ${TMP_DIR}/TMP_LICENSE
-
-sed -i -e "1s/^/ *\n/" -e "1s/^/\/*\n/" ${TMP_DIR}/*.pb.h
-sed -i -e "1s/^/ *\n/" -e "1s/^/\/*\n/" ${TMP_DIR}/*.pb.cc
-
-sed -i "2r ${TMP_DIR}/TMP_LICENSE" ${TMP_DIR}/*.pb.h
-sed -i "2r ${TMP_DIR}/TMP_LICENSE" ${TMP_DIR}/*.pb.cc
-
-/bin/mv ${TMP_DIR}/${PROTO_FILE}.pb.h ${HEADER_DIR}
-/bin/mv ${TMP_DIR}/${PROTO_FILE}.grpc.pb.h ${HEADER_DIR}
-/bin/mv ${TMP_DIR}/${PROTO_FILE}.pb.cc ${SRC_DIR}
-/bin/mv ${TMP_DIR}/${PROTO_FILE}.grpc.pb.cc ${SRC_DIR}
-/bin/rm -r $TMP_DIR
diff --git a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile
index 1f6641ac42..e968a0f589 100644
--- a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile
@@ -129,5 +129,9 @@ RUN mkdir /var/local/jenkins
#================
# libuv
RUN cd /tmp && wget http://dist.libuv.org/dist/v1.9.1/libuv-v1.9.1.tar.gz && tar -xf libuv-v1.9.1.tar.gz && cd libuv-v1.9.1 && sh autogen.sh && ./configure --prefix=/usr && make && make install
+
+# Install gcc-4.8 and other relevant items
+RUN apt-get update && apt-get -y install gcc-4.8 gcc-4.8-multilib g++-4.8 g++-4.8-multilib && apt-get clean
+
# Define the default command.
CMD ["bash"]
diff --git a/tools/dockerfile/test/cxx_jessie_x86/Dockerfile b/tools/dockerfile/test/cxx_jessie_x86/Dockerfile
index bee0849c67..f985480254 100644
--- a/tools/dockerfile/test/cxx_jessie_x86/Dockerfile
+++ b/tools/dockerfile/test/cxx_jessie_x86/Dockerfile
@@ -93,5 +93,9 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
RUN mkdir /var/local/jenkins
+
+# Install gcc-4.8 and other relevant items
+RUN apt-get update && apt-get -y install gcc-4.8 gcc-4.8-multilib g++-4.8 g++-4.8-multilib && apt-get clean
+
# Define the default command.
CMD ["bash"]
diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++
index 00f970a4cb..ff3a0e381d 100644
--- a/tools/doxygen/Doxyfile.c++
+++ b/tools/doxygen/Doxyfile.c++
@@ -781,12 +781,6 @@ include/grpc++/impl/server_builder_option.h \
include/grpc++/impl/server_builder_plugin.h \
include/grpc++/impl/server_initializer.h \
include/grpc++/impl/service_type.h \
-include/grpc++/impl/sync.h \
-include/grpc++/impl/sync_cxx11.h \
-include/grpc++/impl/sync_no_cxx11.h \
-include/grpc++/impl/thd.h \
-include/grpc++/impl/thd_cxx11.h \
-include/grpc++/impl/thd_no_cxx11.h \
include/grpc++/resource_quota.h \
include/grpc++/security/auth_context.h \
include/grpc++/security/auth_metadata_processor.h \
@@ -834,9 +828,6 @@ include/grpc++/impl/codegen/status_code_enum.h \
include/grpc++/impl/codegen/status_helper.h \
include/grpc++/impl/codegen/string_ref.h \
include/grpc++/impl/codegen/stub_options.h \
-include/grpc++/impl/codegen/sync.h \
-include/grpc++/impl/codegen/sync_cxx11.h \
-include/grpc++/impl/codegen/sync_no_cxx11.h \
include/grpc++/impl/codegen/sync_stream.h \
include/grpc++/impl/codegen/time.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal
index 6c2b475ed0..04e8f4e7f2 100644
--- a/tools/doxygen/Doxyfile.c++.internal
+++ b/tools/doxygen/Doxyfile.c++.internal
@@ -781,12 +781,6 @@ include/grpc++/impl/server_builder_option.h \
include/grpc++/impl/server_builder_plugin.h \
include/grpc++/impl/server_initializer.h \
include/grpc++/impl/service_type.h \
-include/grpc++/impl/sync.h \
-include/grpc++/impl/sync_cxx11.h \
-include/grpc++/impl/sync_no_cxx11.h \
-include/grpc++/impl/thd.h \
-include/grpc++/impl/thd_cxx11.h \
-include/grpc++/impl/thd_no_cxx11.h \
include/grpc++/resource_quota.h \
include/grpc++/security/auth_context.h \
include/grpc++/security/auth_metadata_processor.h \
@@ -834,9 +828,6 @@ include/grpc++/impl/codegen/status_code_enum.h \
include/grpc++/impl/codegen/status_helper.h \
include/grpc++/impl/codegen/string_ref.h \
include/grpc++/impl/codegen/stub_options.h \
-include/grpc++/impl/codegen/sync.h \
-include/grpc++/impl/codegen/sync_cxx11.h \
-include/grpc++/impl/codegen/sync_no_cxx11.h \
include/grpc++/impl/codegen/sync_stream.h \
include/grpc++/impl/codegen/time.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
@@ -886,6 +877,7 @@ src/cpp/common/completion_queue_cc.cc \
src/cpp/common/core_codegen.cc \
src/cpp/common/resource_quota_cc.cc \
src/cpp/common/rpc_method.cc \
+src/cpp/common/version_cc.cc \
src/cpp/server/async_generic_service.cc \
src/cpp/server/create_default_thread_pool.cc \
src/cpp/server/dynamic_thread_pool.cc \
diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core
index 003686cee6..91abb922ea 100644
--- a/tools/doxygen/Doxyfile.core
+++ b/tools/doxygen/Doxyfile.core
@@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 1.1.0-dev
+PROJECT_NUMBER = 2.0.0-dev
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index e83298766f..793561d78f 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 1.1.0-dev
+PROJECT_NUMBER = 2.0.0-dev
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -876,6 +876,7 @@ src/core/lib/transport/mdstr_hash_table.h \
src/core/lib/transport/metadata.h \
src/core/lib/transport/metadata_batch.h \
src/core/lib/transport/method_config.h \
+src/core/lib/transport/pid_controller.h \
src/core/lib/transport/static_metadata.h \
src/core/lib/transport/timeout_encoding.h \
src/core/lib/transport/transport.h \
@@ -1064,6 +1065,7 @@ src/core/lib/transport/mdstr_hash_table.c \
src/core/lib/transport/metadata.c \
src/core/lib/transport/metadata_batch.c \
src/core/lib/transport/method_config.c \
+src/core/lib/transport/pid_controller.c \
src/core/lib/transport/static_metadata.c \
src/core/lib/transport/timeout_encoding.c \
src/core/lib/transport/transport.c \
diff --git a/tools/gce/create_linux_worker.sh b/tools/gce/create_linux_worker.sh
index 013127c585..322a592c07 100755
--- a/tools/gce/create_linux_worker.sh
+++ b/tools/gce/create_linux_worker.sh
@@ -42,7 +42,7 @@ INSTANCE_NAME="${1:-grpc-jenkins-worker1}"
gcloud compute instances create $INSTANCE_NAME \
--project="$CLOUD_PROJECT" \
--zone "$ZONE" \
- --machine-type n1-highmem-8 \
+ --machine-type n1-standard-16 \
--image=ubuntu-1510 \
--image-project=grpc-testing \
--boot-disk-size 1000
diff --git a/tools/run_tests/performance/bq_upload_result.py b/tools/run_tests/performance/bq_upload_result.py
index 2a99499843..0ea23d2212 100755
--- a/tools/run_tests/performance/bq_upload_result.py
+++ b/tools/run_tests/performance/bq_upload_result.py
@@ -117,9 +117,13 @@ def _flatten_result_inplace(scenario_result):
scenario_result['latencies'] = json.dumps(scenario_result['latencies'])
for stats in scenario_result['clientStats']:
stats['latencies'] = json.dumps(stats['latencies'])
+ stats.pop('requestResults', None)
scenario_result['serverCores'] = json.dumps(scenario_result['serverCores'])
scenario_result['clientSuccess'] = json.dumps(scenario_result['clientSuccess'])
scenario_result['serverSuccess'] = json.dumps(scenario_result['serverSuccess'])
+ scenario_result['requestResults'] = json.dumps(scenario_result.get('requestResults', []))
+ scenario_result['summary'].pop('successfulRequestsPerSecond', None)
+ scenario_result['summary'].pop('failedRequestsPerSecond', None)
def _populate_metadata_inplace(scenario_result):
diff --git a/tools/run_tests/performance/scenario_result_schema.json b/tools/run_tests/performance/scenario_result_schema.json
index 6bec21df39..3285f212d7 100644
--- a/tools/run_tests/performance/scenario_result_schema.json
+++ b/tools/run_tests/performance/scenario_result_schema.json
@@ -208,5 +208,10 @@
"name": "serverSuccess",
"type": "STRING",
"mode": "NULLABLE"
+ },
+ {
+ "name": "requestResults",
+ "type": "STRING",
+ "mode": "NULLABLE"
}
]
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 911843e9f3..8f043f9bcc 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -332,6 +332,8 @@ class CLanguage(object):
return ('wheezy', self._gcc_make_options(version_suffix='-4.4'))
elif compiler == 'gcc4.6':
return ('wheezy', self._gcc_make_options(version_suffix='-4.6'))
+ elif compiler == 'gcc4.8':
+ return ('jessie', self._gcc_make_options(version_suffix='-4.8'))
elif compiler == 'gcc5.3':
return ('ubuntu1604', [])
elif compiler == 'clang3.4':
@@ -1061,7 +1063,7 @@ argp.add_argument('--arch',
help='Selects architecture to target. For some platforms "default" is the only supported choice.')
argp.add_argument('--compiler',
choices=['default',
- 'gcc4.4', 'gcc4.6', 'gcc4.9', 'gcc5.3',
+ 'gcc4.4', 'gcc4.6', 'gcc4.8', 'gcc4.9', 'gcc5.3',
'clang3.4', 'clang3.5', 'clang3.6', 'clang3.7',
'vs2010', 'vs2013', 'vs2015',
'python2.7', 'python3.4', 'python3.5', 'python3.6', 'pypy', 'pypy3',
diff --git a/tools/run_tests/run_tests_matrix.py b/tools/run_tests/run_tests_matrix.py
index b65010ad8b..41db67cdb5 100755
--- a/tools/run_tests/run_tests_matrix.py
+++ b/tools/run_tests/run_tests_matrix.py
@@ -46,16 +46,16 @@ os.chdir(_ROOT)
_RUNTESTS_TIMEOUT = 4*60*60
# Number of jobs assigned to each run_tests.py instance
-_INNER_JOBS = 2
+_DEFAULT_INNER_JOBS = 2
-def _docker_jobspec(name, runtests_args=[]):
+def _docker_jobspec(name, runtests_args=[], inner_jobs=_DEFAULT_INNER_JOBS):
"""Run a single instance of run_tests.py in a docker container"""
test_job = jobset.JobSpec(
cmdline=['python', 'tools/run_tests/run_tests.py',
'--use_docker',
'-t',
- '-j', str(_INNER_JOBS),
+ '-j', str(inner_jobs),
'-x', 'report_%s.xml' % name,
'--report_suite_name', '%s' % name] + runtests_args,
shortname='run_tests_%s' % name,
@@ -63,7 +63,7 @@ def _docker_jobspec(name, runtests_args=[]):
return test_job
-def _workspace_jobspec(name, runtests_args=[], workspace_name=None):
+def _workspace_jobspec(name, runtests_args=[], workspace_name=None, inner_jobs=_DEFAULT_INNER_JOBS):
"""Run a single instance of run_tests.py in a separate workspace"""
if not workspace_name:
workspace_name = 'workspace_%s' % name
@@ -71,7 +71,7 @@ def _workspace_jobspec(name, runtests_args=[], workspace_name=None):
test_job = jobset.JobSpec(
cmdline=['tools/run_tests/run_tests_in_workspace.sh',
'-t',
- '-j', str(_INNER_JOBS),
+ '-j', str(inner_jobs),
'-x', '../report_%s.xml' % name,
'--report_suite_name', '%s' % name] + runtests_args,
environ=env,
@@ -82,7 +82,8 @@ def _workspace_jobspec(name, runtests_args=[], workspace_name=None):
def _generate_jobs(languages, configs, platforms,
arch=None, compiler=None,
- labels=[], extra_args=[]):
+ labels=[], extra_args=[],
+ inner_jobs=_DEFAULT_INNER_JOBS):
result = []
for language in languages:
for platform in platforms:
@@ -97,68 +98,75 @@ def _generate_jobs(languages, configs, platforms,
runtests_args += extra_args
if platform == 'linux':
- job = _docker_jobspec(name=name, runtests_args=runtests_args)
+ job = _docker_jobspec(name=name, runtests_args=runtests_args, inner_jobs=inner_jobs)
else:
- job = _workspace_jobspec(name=name, runtests_args=runtests_args)
+ job = _workspace_jobspec(name=name, runtests_args=runtests_args, inner_jobs=inner_jobs)
job.labels = [platform, config, language] + labels
result.append(job)
return result
-def _create_test_jobs(extra_args=[]):
+def _create_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS):
test_jobs = []
# supported on linux only
test_jobs += _generate_jobs(languages=['sanity', 'php7'],
configs=['dbg', 'opt'],
platforms=['linux'],
labels=['basictests'],
- extra_args=extra_args)
+ extra_args=extra_args,
+ inner_jobs=inner_jobs)
# supported on all platforms.
test_jobs += _generate_jobs(languages=['c', 'csharp', 'node', 'python'],
configs=['dbg', 'opt'],
platforms=['linux', 'macos', 'windows'],
labels=['basictests'],
- extra_args=extra_args)
+ extra_args=extra_args,
+ inner_jobs=inner_jobs)
# supported on linux and mac.
test_jobs += _generate_jobs(languages=['c++', 'ruby', 'php'],
configs=['dbg', 'opt'],
platforms=['linux', 'macos'],
labels=['basictests'],
- extra_args=extra_args)
+ extra_args=extra_args,
+ inner_jobs=inner_jobs)
# supported on mac only.
test_jobs += _generate_jobs(languages=['objc'],
configs=['dbg', 'opt'],
platforms=['macos'],
labels=['basictests'],
- extra_args=extra_args)
+ extra_args=extra_args,
+ inner_jobs=inner_jobs)
# sanitizers
test_jobs += _generate_jobs(languages=['c'],
configs=['msan', 'asan', 'tsan'],
platforms=['linux'],
labels=['sanitizers'],
- extra_args=extra_args)
+ extra_args=extra_args,
+ inner_jobs=inner_jobs)
test_jobs += _generate_jobs(languages=['c++'],
configs=['asan', 'tsan'],
platforms=['linux'],
labels=['sanitizers'],
- extra_args=extra_args)
+ extra_args=extra_args,
+ inner_jobs=inner_jobs)
# libuv tests
test_jobs += _generate_jobs(languages=['c'],
configs=['dbg', 'opt'],
platforms=['linux'],
labels=['libuv'],
- extra_args=extra_args + ['--iomgr_platform=uv'])
+ extra_args=extra_args + ['--iomgr_platform=uv'],
+ inner_jobs=inner_jobs)
return test_jobs
-def _create_portability_test_jobs(extra_args=[]):
+def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS):
test_jobs = []
# portability C x86
test_jobs += _generate_jobs(languages=['c'],
@@ -167,18 +175,30 @@ def _create_portability_test_jobs(extra_args=[]):
arch='x86',
compiler='default',
labels=['portability'],
- extra_args=extra_args)
+ extra_args=extra_args,
+ inner_jobs=inner_jobs)
# portability C and C++ on x64
for compiler in ['gcc4.4', 'gcc4.6', 'gcc5.3',
'clang3.5', 'clang3.6', 'clang3.7']:
- test_jobs += _generate_jobs(languages=['c', 'c++'],
+ test_jobs += _generate_jobs(languages=['c'],
configs=['dbg'],
platforms=['linux'],
arch='x64',
compiler=compiler,
labels=['portability'],
- extra_args=extra_args)
+ extra_args=extra_args,
+ inner_jobs=inner_jobs)
+ for compiler in ['gcc4.8', 'gcc5.3',
+ 'clang3.5', 'clang3.6', 'clang3.7']:
+ test_jobs += _generate_jobs(languages=['c++'],
+ configs=['dbg'],
+ platforms=['linux'],
+ arch='x64',
+ compiler=compiler,
+ labels=['portability'],
+ extra_args=extra_args,
+ inner_jobs=inner_jobs)
# portability C on Windows
for arch in ['x86', 'x64']:
@@ -189,7 +209,8 @@ def _create_portability_test_jobs(extra_args=[]):
arch=arch,
compiler=compiler,
labels=['portability'],
- extra_args=extra_args)
+ extra_args=extra_args,
+ inner_jobs=inner_jobs)
test_jobs += _generate_jobs(languages=['python'],
configs=['dbg'],
@@ -197,7 +218,8 @@ def _create_portability_test_jobs(extra_args=[]):
arch='default',
compiler='python3.4',
labels=['portability'],
- extra_args=extra_args)
+ extra_args=extra_args,
+ inner_jobs=inner_jobs)
test_jobs += _generate_jobs(languages=['csharp'],
configs=['dbg'],
@@ -205,7 +227,8 @@ def _create_portability_test_jobs(extra_args=[]):
arch='default',
compiler='coreclr',
labels=['portability'],
- extra_args=extra_args)
+ extra_args=extra_args,
+ inner_jobs=inner_jobs)
return test_jobs
@@ -220,7 +243,7 @@ def _allowed_labels():
argp = argparse.ArgumentParser(description='Run a matrix of run_tests.py tests.')
argp.add_argument('-j', '--jobs',
- default=multiprocessing.cpu_count()/_INNER_JOBS,
+ default=multiprocessing.cpu_count()/_DEFAULT_INNER_JOBS,
type=int,
help='Number of concurrent run_tests.py instances.')
argp.add_argument('-f', '--filter',
@@ -249,15 +272,21 @@ argp.add_argument('--base_branch',
default='origin/master',
type=str,
help='Branch that pull request is requesting to merge into')
+argp.add_argument('--inner_jobs',
+ default=_DEFAULT_INNER_JOBS,
+ type=int,
+ help='Number of jobs in each run_tests.py instance')
args = argp.parse_args()
+
extra_args = []
if args.build_only:
extra_args.append('--build_only')
if args.force_default_poller:
extra_args.append('--force_default_poller')
-all_jobs = _create_test_jobs(extra_args=extra_args) + _create_portability_test_jobs(extra_args=extra_args)
+all_jobs = _create_test_jobs(extra_args=extra_args, inner_jobs=args.inner_jobs) + \
+ _create_portability_test_jobs(extra_args=extra_args, inner_jobs=args.inner_jobs)
jobs = []
for job in all_jobs:
diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh
index 6410646cd1..6ec0786c96 100755
--- a/tools/run_tests/sanity/check_submodules.sh
+++ b/tools/run_tests/sanity/check_submodules.sh
@@ -43,6 +43,7 @@ git submodule | awk '{ print $1 }' | sort > $submodules
cat << EOF | awk '{ print $1 }' | sort > $want_submodules
c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 third_party/boringssl (version_for_cocoapods_2.0-100-gc880e42)
05b155ff59114735ec8cd089f669c4c3d8f59029 third_party/gflags (v2.1.0-45-g05b155f)
+ 44c25c892a6229b20db7cd9dc05584ea865896de third_party/google_benchmark (v0.1.0-343-g44c25c8)
c99458533a9b4c743ed51537e25989ea55944908 third_party/googletest (release-1.7.0)
a428e42072765993ff674fda72863c9f1aa2d268 third_party/protobuf (v3.1.0)
50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8)
@@ -52,4 +53,3 @@ EOF
diff -u $submodules $want_submodules
rm $submodules $want_submodules
-
diff --git a/tools/run_tests/sanity/check_version.py b/tools/run_tests/sanity/check_version.py
index 41dd5efe38..e62f390818 100755
--- a/tools/run_tests/sanity/check_version.py
+++ b/tools/run_tests/sanity/check_version.py
@@ -83,15 +83,15 @@ if not check_version(top_version):
for tag, value in settings.iteritems():
if re.match(r'^[a-z]+_version$', tag):
value = Version(value)
- if value.major != top_version.major:
- errors += 1
- print 'major version mismatch on %s: %d vs %d' % (tag, value.major, top_version.major)
- if value.minor != top_version.minor:
- errors += 1
- print 'minor version mismatch on %s: %d vs %d' % (tag, value.minor, top_version.minor)
+ if tag != 'core_version':
+ if value.major != top_version.major:
+ errors += 1
+ print 'major version mismatch on %s: %d vs %d' % (tag, value.major, top_version.major)
+ if value.minor != top_version.minor:
+ errors += 1
+ print 'minor version mismatch on %s: %d vs %d' % (tag, value.minor, top_version.minor)
if not check_version(value):
errors += 1
print warning % (tag, value)
sys.exit(errors)
-
diff --git a/tools/run_tests/sanity/sanity_tests.yaml b/tools/run_tests/sanity/sanity_tests.yaml
index e699c5194d..c5945c602f 100644
--- a/tools/run_tests/sanity/sanity_tests.yaml
+++ b/tools/run_tests/sanity/sanity_tests.yaml
@@ -11,4 +11,3 @@
- script: tools/distrib/check_nanopb_output.sh
- script: tools/distrib/check_include_guards.py
- script: tools/distrib/python/check_grpcio_tools.py
-- script: tools/distrib/check_generated_pb_files.sh
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index 87ac8add3b..2faeed8d39 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -2072,6 +2072,23 @@
"headers": [],
"is_filegroup": false,
"language": "c",
+ "name": "transport_pid_controller_test",
+ "src": [
+ "test/core/transport/pid_controller_test.c"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "is_filegroup": false,
+ "language": "c",
"name": "transport_security_test",
"src": [
"test/core/tsi/transport_security_test.c"
@@ -2497,7 +2514,7 @@
"gpr",
"grpc",
"grpc++",
- "grpc++_reflection",
+ "grpc++_proto_reflection_desc_db",
"grpc++_test_config",
"grpc_cli_libs"
],
@@ -2616,8 +2633,9 @@
"grpc",
"grpc++",
"grpc++_codegen_proto",
- "grpc++_config_proto",
+ "grpc++_proto_reflection_desc_db",
"grpc++_reflection",
+ "grpc++_test_util",
"grpc_cli_libs",
"grpc_test_util"
],
@@ -2625,16 +2643,13 @@
"src/proto/grpc/testing/echo.grpc.pb.h",
"src/proto/grpc/testing/echo.pb.h",
"src/proto/grpc/testing/echo_messages.grpc.pb.h",
- "src/proto/grpc/testing/echo_messages.pb.h",
- "test/cpp/util/string_ref_helper.h"
+ "src/proto/grpc/testing/echo_messages.pb.h"
],
"is_filegroup": false,
"language": "c++",
"name": "grpc_tool_test",
"src": [
- "test/cpp/util/grpc_tool_test.cc",
- "test/cpp/util/string_ref_helper.cc",
- "test/cpp/util/string_ref_helper.h"
+ "test/cpp/util/grpc_tool_test.cc"
],
"third_party": false,
"type": "target"
@@ -2822,24 +2837,35 @@
},
{
"deps": [
+ "google_benchmark"
+ ],
+ "headers": [],
+ "is_filegroup": false,
+ "language": "c++",
+ "name": "noop-benchmark",
+ "src": [
+ "test/cpp/microbenchmarks/noop-benchmark.cc"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
"gpr",
"gpr_test_util",
"grpc",
"grpc++",
+ "grpc++_proto_reflection_desc_db",
"grpc++_reflection",
"grpc++_test_util",
"grpc_test_util"
],
- "headers": [
- "test/cpp/util/proto_reflection_descriptor_database.h"
- ],
+ "headers": [],
"is_filegroup": false,
"language": "c++",
"name": "proto_server_reflection_test",
"src": [
- "test/cpp/end2end/proto_server_reflection_test.cc",
- "test/cpp/util/proto_reflection_descriptor_database.cc",
- "test/cpp/util/proto_reflection_descriptor_database.h"
+ "test/cpp/end2end/proto_server_reflection_test.cc"
],
"third_party": false,
"type": "target"
@@ -3000,6 +3026,25 @@
"headers": [],
"is_filegroup": false,
"language": "c++",
+ "name": "round_robin_end2end_test",
+ "src": [
+ "test/cpp/end2end/round_robin_end2end_test.cc"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc++",
+ "grpc++_test_util",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "is_filegroup": false,
+ "language": "c++",
"name": "secure_auth_context_test",
"src": [
"test/cpp/common/secure_auth_context_test.cc"
@@ -4045,24 +4090,6 @@
"headers": [],
"is_filegroup": false,
"language": "c",
- "name": "h2_fake_resolver_test",
- "src": [
- "test/core/end2end/fixtures/h2_fake_resolver.c"
- ],
- "third_party": false,
- "type": "target"
- },
- {
- "deps": [
- "end2end_tests",
- "gpr",
- "gpr_test_util",
- "grpc",
- "grpc_test_util"
- ],
- "headers": [],
- "is_filegroup": false,
- "language": "c",
"name": "h2_fakesec_test",
"src": [
"test/core/end2end/fixtures/h2_fakesec.c"
@@ -4387,24 +4414,6 @@
"headers": [],
"is_filegroup": false,
"language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "src": [
- "test/core/end2end/fixtures/h2_fake_resolver.c"
- ],
- "third_party": false,
- "type": "target"
- },
- {
- "deps": [
- "end2end_nosec_tests",
- "gpr",
- "gpr_test_util",
- "grpc_test_util_unsecure",
- "grpc_unsecure"
- ],
- "headers": [],
- "is_filegroup": false,
- "language": "c",
"name": "h2_fd_nosec_test",
"src": [
"test/core/end2end/fixtures/h2_fd.c"
@@ -5060,34 +5069,40 @@
{
"deps": [
"grpc++",
+ "grpc++_config_proto",
"grpc++_reflection_proto"
],
"headers": [
- "include/grpc++/ext/proto_server_reflection_plugin.h",
- "src/cpp/ext/proto_server_reflection.h"
+ "test/cpp/util/proto_reflection_descriptor_database.h"
],
"is_filegroup": false,
"language": "c++",
- "name": "grpc++_reflection",
+ "name": "grpc++_proto_reflection_desc_db",
"src": [
- "include/grpc++/ext/proto_server_reflection_plugin.h",
- "src/cpp/ext/proto_server_reflection.cc",
- "src/cpp/ext/proto_server_reflection.h",
- "src/cpp/ext/proto_server_reflection_plugin.cc"
+ "test/cpp/util/proto_reflection_descriptor_database.cc",
+ "test/cpp/util/proto_reflection_descriptor_database.h"
],
"third_party": false,
"type": "lib"
},
{
- "deps": [],
+ "deps": [
+ "grpc++",
+ "grpc++_reflection_proto"
+ ],
"headers": [
- "src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h",
- "src/proto/grpc/reflection/v1alpha/reflection.pb.h"
+ "include/grpc++/ext/proto_server_reflection_plugin.h",
+ "src/cpp/ext/proto_server_reflection.h"
],
"is_filegroup": false,
"language": "c++",
- "name": "grpc++_reflection_codegen",
- "src": [],
+ "name": "grpc++_reflection",
+ "src": [
+ "include/grpc++/ext/proto_server_reflection_plugin.h",
+ "src/cpp/ext/proto_server_reflection.cc",
+ "src/cpp/ext/proto_server_reflection.h",
+ "src/cpp/ext/proto_server_reflection_plugin.cc"
+ ],
"third_party": false,
"type": "lib"
},
@@ -5190,7 +5205,9 @@
{
"deps": [
"grpc++",
- "grpc++_reflection"
+ "grpc++_config_proto",
+ "grpc++_proto_reflection_desc_db",
+ "grpc++_reflection_proto"
],
"headers": [
"test/cpp/util/cli_call.h",
@@ -5198,7 +5215,6 @@
"test/cpp/util/config_grpc_cli.h",
"test/cpp/util/grpc_tool.h",
"test/cpp/util/proto_file_parser.h",
- "test/cpp/util/proto_reflection_descriptor_database.h",
"test/cpp/util/service_describer.h"
],
"is_filegroup": false,
@@ -5214,8 +5230,6 @@
"test/cpp/util/grpc_tool.h",
"test/cpp/util/proto_file_parser.cc",
"test/cpp/util/proto_file_parser.h",
- "test/cpp/util/proto_reflection_descriptor_database.cc",
- "test/cpp/util/proto_reflection_descriptor_database.h",
"test/cpp/util/service_describer.cc",
"test/cpp/util/service_describer.h"
],
@@ -6096,6 +6110,37 @@
{
"deps": [],
"headers": [
+ "third_party/google_benchmark/include/benchmark/benchmark.h",
+ "third_party/google_benchmark/include/benchmark/benchmark_api.h",
+ "third_party/google_benchmark/include/benchmark/macros.h",
+ "third_party/google_benchmark/include/benchmark/reporter.h",
+ "third_party/google_benchmark/src/arraysize.h",
+ "third_party/google_benchmark/src/benchmark_api_internal.h",
+ "third_party/google_benchmark/src/check.h",
+ "third_party/google_benchmark/src/colorprint.h",
+ "third_party/google_benchmark/src/commandlineflags.h",
+ "third_party/google_benchmark/src/complexity.h",
+ "third_party/google_benchmark/src/cycleclock.h",
+ "third_party/google_benchmark/src/internal_macros.h",
+ "third_party/google_benchmark/src/log.h",
+ "third_party/google_benchmark/src/mutex.h",
+ "third_party/google_benchmark/src/re.h",
+ "third_party/google_benchmark/src/sleep.h",
+ "third_party/google_benchmark/src/stat.h",
+ "third_party/google_benchmark/src/string_util.h",
+ "third_party/google_benchmark/src/sysinfo.h",
+ "third_party/google_benchmark/src/timers.h"
+ ],
+ "is_filegroup": false,
+ "language": "c++",
+ "name": "google_benchmark",
+ "src": [],
+ "third_party": false,
+ "type": "lib"
+ },
+ {
+ "deps": [],
+ "headers": [
"third_party/zlib/crc32.h",
"third_party/zlib/deflate.h",
"third_party/zlib/gzguts.h",
@@ -6170,6 +6215,7 @@
"language": "c",
"name": "end2end_tests",
"src": [
+ "test/core/end2end/end2end_test_utils.c",
"test/core/end2end/end2end_tests.c",
"test/core/end2end/end2end_tests.h",
"test/core/end2end/tests/bad_hostname.c",
@@ -6238,6 +6284,7 @@
"name": "end2end_nosec_tests",
"src": [
"test/core/end2end/end2end_nosec_tests.c",
+ "test/core/end2end/end2end_test_utils.c",
"test/core/end2end/end2end_tests.h",
"test/core/end2end/tests/bad_hostname.c",
"test/core/end2end/tests/binary_metadata.c",
@@ -6622,6 +6669,7 @@
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/method_config.h",
+ "src/core/lib/transport/pid_controller.h",
"src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.h",
@@ -6831,6 +6879,8 @@
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/method_config.c",
"src/core/lib/transport/method_config.h",
+ "src/core/lib/transport/pid_controller.c",
+ "src/core/lib/transport/pid_controller.h",
"src/core/lib/transport/static_metadata.c",
"src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/timeout_encoding.c",
@@ -7386,8 +7436,7 @@
},
{
"deps": [
- "gpr",
- "grpc_base"
+ "gpr"
],
"headers": [
"src/core/lib/tsi/fake_transport_security.h",
@@ -7438,12 +7487,6 @@
"include/grpc++/impl/server_builder_plugin.h",
"include/grpc++/impl/server_initializer.h",
"include/grpc++/impl/service_type.h",
- "include/grpc++/impl/sync.h",
- "include/grpc++/impl/sync_cxx11.h",
- "include/grpc++/impl/sync_no_cxx11.h",
- "include/grpc++/impl/thd.h",
- "include/grpc++/impl/thd_cxx11.h",
- "include/grpc++/impl/thd_no_cxx11.h",
"include/grpc++/resource_quota.h",
"include/grpc++/security/auth_context.h",
"include/grpc++/security/auth_metadata_processor.h",
@@ -7496,12 +7539,6 @@
"include/grpc++/impl/server_builder_plugin.h",
"include/grpc++/impl/server_initializer.h",
"include/grpc++/impl/service_type.h",
- "include/grpc++/impl/sync.h",
- "include/grpc++/impl/sync_cxx11.h",
- "include/grpc++/impl/sync_no_cxx11.h",
- "include/grpc++/impl/thd.h",
- "include/grpc++/impl/thd_cxx11.h",
- "include/grpc++/impl/thd_no_cxx11.h",
"include/grpc++/resource_quota.h",
"include/grpc++/security/auth_context.h",
"include/grpc++/security/auth_metadata_processor.h",
@@ -7538,6 +7575,7 @@
"src/cpp/common/core_codegen.cc",
"src/cpp/common/resource_quota_cc.cc",
"src/cpp/common/rpc_method.cc",
+ "src/cpp/common/version_cc.cc",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
@@ -7590,9 +7628,6 @@
"include/grpc++/impl/codegen/status_helper.h",
"include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h",
- "include/grpc++/impl/codegen/sync.h",
- "include/grpc++/impl/codegen/sync_cxx11.h",
- "include/grpc++/impl/codegen/sync_no_cxx11.h",
"include/grpc++/impl/codegen/sync_stream.h",
"include/grpc++/impl/codegen/time.h"
],
@@ -7626,9 +7661,6 @@
"include/grpc++/impl/codegen/status_helper.h",
"include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h",
- "include/grpc++/impl/codegen/sync.h",
- "include/grpc++/impl/codegen/sync_cxx11.h",
- "include/grpc++/impl/codegen/sync_no_cxx11.h",
"include/grpc++/impl/codegen/sync_stream.h",
"include/grpc++/impl/codegen/time.h"
],
@@ -7681,22 +7713,15 @@
"type": "filegroup"
},
{
- "deps": [
- "grpc++_codegen_proto"
- ],
+ "deps": [],
"headers": [
- "include/grpc++/ext/reflection.grpc.pb.h",
- "include/grpc++/ext/reflection.pb.h"
+ "src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h",
+ "src/proto/grpc/reflection/v1alpha/reflection.pb.h"
],
"is_filegroup": true,
"language": "c++",
"name": "grpc++_reflection_proto",
- "src": [
- "include/grpc++/ext/reflection.grpc.pb.h",
- "include/grpc++/ext/reflection.pb.h",
- "src/cpp/ext/reflection.grpc.pb.cc",
- "src/cpp/ext/reflection.pb.cc"
- ],
+ "src": [],
"third_party": false,
"type": "filegroup"
},
diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json
index 1ec15f94f4..87a965409f 100644
--- a/tools/run_tests/tests.json
+++ b/tools/run_tests/tests.json
@@ -2198,6 +2198,28 @@
"ci_platforms": [
"linux",
"mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "exclude_iomgrs": [],
+ "flaky": false,
+ "gtest": false,
+ "language": "c",
+ "name": "transport_pid_controller_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ]
+ },
+ {
+ "args": [],
+ "ci_platforms": [
+ "linux",
+ "mac",
"posix"
],
"cpu_cost": 1.0,
@@ -2793,6 +2815,28 @@
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
+ "gtest": false,
+ "language": "c++",
+ "name": "noop-benchmark",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ]
+ },
+ {
+ "args": [],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "exclude_iomgrs": [],
+ "flaky": false,
"gtest": true,
"language": "c++",
"name": "proto_server_reflection_test",
@@ -2837,6 +2881,28 @@
"flaky": false,
"gtest": true,
"language": "c++",
+ "name": "round_robin_end2end_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ]
+ },
+ {
+ "args": [],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "exclude_iomgrs": [],
+ "flaky": false,
+ "gtest": true,
+ "language": "c++",
"name": "secure_auth_context_test",
"platforms": [
"linux",
@@ -6946,1043 +7012,6 @@
"ci_platforms": [
"windows",
"linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "binary_metadata"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "call_creds"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "cancel_after_accept"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "cancel_after_client_done"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "cancel_after_invoke"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "cancel_before_invoke"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "cancel_in_a_vacuum"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "cancel_with_status"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "compressed_payload"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "connectivity"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [
- "uv"
- ],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "default_host"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "disappearing_server"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": true,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "empty_batch"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "filter_call_init_fails"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "filter_causes_close"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "graceful_server_shutdown"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "high_initial_seqno"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "hpack_size"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "idempotent_request"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "invoke_large_request"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "large_metadata"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "load_reporting_hook"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "max_concurrent_streams"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "max_message_length"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "negative_deadline"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "network_status_change"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "no_logging"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "no_op"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "payload"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "ping"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "ping_pong_streaming"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "registered_call"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "request_with_flags"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "request_with_payload"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "resource_quota_server"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "server_finishes_request"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "shutdown_finishes_calls"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "shutdown_finishes_tags"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "simple_cacheable_request"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "simple_delayed_request"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "simple_metadata"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "simple_request"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "streaming_error_response"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "trailing_metadata"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "bad_hostname"
- ],
- "ci_platforms": [
- "windows",
- "linux",
"posix"
],
"cpu_cost": 1.0,
@@ -25773,1020 +24802,6 @@
"bad_hostname"
],
"ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "binary_metadata"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "cancel_after_accept"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "cancel_after_client_done"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "cancel_after_invoke"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "cancel_before_invoke"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "cancel_in_a_vacuum"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "cancel_with_status"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "compressed_payload"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "connectivity"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [
- "uv"
- ],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "default_host"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "disappearing_server"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": true,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "empty_batch"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "filter_call_init_fails"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "filter_causes_close"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "graceful_server_shutdown"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "high_initial_seqno"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "hpack_size"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "idempotent_request"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "invoke_large_request"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "large_metadata"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "load_reporting_hook"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "max_concurrent_streams"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "max_message_length"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "negative_deadline"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "network_status_change"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "no_logging"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "no_op"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "payload"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "ping"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "ping_pong_streaming"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "registered_call"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "request_with_flags"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "request_with_payload"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "resource_quota_server"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "server_finishes_request"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "shutdown_finishes_calls"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "shutdown_finishes_tags"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "simple_cacheable_request"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "simple_delayed_request"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "simple_metadata"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "simple_request"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "streaming_error_response"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "trailing_metadata"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "h2_fake_resolver_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "bad_hostname"
- ],
- "ci_platforms": [
"linux",
"mac",
"posix"
@@ -37251,7 +35266,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_ping_pong_secure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37272,7 +35287,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_secure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37293,7 +35308,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_secure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37314,7 +35329,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_secure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37335,7 +35350,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_secure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37356,7 +35371,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_ping_pong_secure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37377,7 +35392,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37398,7 +35413,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure_500kib_resource_quota",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37419,7 +35434,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_secure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37440,7 +35455,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37461,7 +35476,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure_500kib_resource_quota",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37482,7 +35497,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_ping_pong_secure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37503,7 +35518,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_secure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37524,7 +35539,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_secure_500kib_resource_quota",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37545,7 +35560,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_secure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37566,7 +35581,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_secure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37587,7 +35602,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_secure_500kib_resource_quota",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37608,7 +35623,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_ping_pong_insecure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37629,7 +35644,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_insecure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37650,7 +35665,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_insecure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37671,7 +35686,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_insecure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37692,7 +35707,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_insecure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37713,7 +35728,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_ping_pong_insecure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37734,7 +35749,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37755,7 +35770,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure_500kib_resource_quota",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37776,7 +35791,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_insecure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37797,7 +35812,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37818,7 +35833,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure_500kib_resource_quota",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37839,7 +35854,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_ping_pong_insecure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37860,7 +35875,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_insecure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37881,7 +35896,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_insecure_500kib_resource_quota",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37902,7 +35917,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_insecure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37923,7 +35938,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_insecure",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -37944,7 +35959,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_insecure_500kib_resource_quota",
- "timeout_seconds": 180
+ "timeout_seconds": 360
},
{
"args": [
@@ -94202,6 +92217,50 @@
},
{
"args": [
+ "test/core/end2end/fuzzers/client_fuzzer_corpus/server_hanging_response_1_header"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "exclude_iomgrs": [
+ "uv"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "client_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/end2end/fuzzers/client_fuzzer_corpus/server_hanging_response_2_header2"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "exclude_iomgrs": [
+ "uv"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "client_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
"test/core/end2end/fuzzers/client_fuzzer_corpus/settings_frame_1.bin"
],
"ci_platforms": [
diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln
index b1918809bf..ad5c8f2640 100644
--- a/vsprojects/buildtests_c.sln
+++ b/vsprojects/buildtests_c.sln
@@ -755,30 +755,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_compress_test", "vcxproj
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_fake_resolver_nosec_test", "vcxproj\test/end2end/fixtures\h2_fake_resolver_nosec_test\h2_fake_resolver_nosec_test.vcxproj", "{5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}"
- ProjectSection(myProperties) = preProject
- lib = "False"
- EndProjectSection
- ProjectSection(ProjectDependencies) = postProject
- {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}
- {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}
- {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}
- {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037}
- {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_fake_resolver_test", "vcxproj\test/end2end/fixtures\h2_fake_resolver_test\h2_fake_resolver_test.vcxproj", "{085ACF7D-D7CE-A9F1-576D-1AF901409FA4}"
- ProjectSection(myProperties) = preProject
- lib = "False"
- EndProjectSection
- ProjectSection(ProjectDependencies) = postProject
- {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4}
- {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}
- {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9}
- {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037}
- {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_fakesec_test", "vcxproj\test/end2end/fixtures\h2_fakesec_test\h2_fakesec_test.vcxproj", "{0E980562-3AA0-91B1-C590-85C9A899BE44}"
ProjectSection(myProperties) = preProject
lib = "False"
@@ -1518,6 +1494,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "transport_metadata_test", "
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "transport_pid_controller_test", "vcxproj\test\transport_pid_controller_test\transport_pid_controller_test.vcxproj", "{B8790A2E-1106-2510-9D95-32C1D68E72EE}"
+ ProjectSection(myProperties) = preProject
+ lib = "False"
+ EndProjectSection
+ ProjectSection(ProjectDependencies) = postProject
+ {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}
+ {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9}
+ {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037}
+ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
+ EndProjectSection
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unknown_frame_bad_client_test", "vcxproj\test\unknown_frame_bad_client_test\unknown_frame_bad_client_test.vcxproj", "{9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}"
ProjectSection(myProperties) = preProject
lib = "False"
@@ -2765,38 +2752,6 @@ Global
{C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release-DLL|Win32.Build.0 = Release|Win32
{C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release-DLL|x64.ActiveCfg = Release|x64
{C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release-DLL|x64.Build.0 = Release|x64
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug|Win32.ActiveCfg = Debug|Win32
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug|x64.ActiveCfg = Debug|x64
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release|Win32.ActiveCfg = Release|Win32
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release|x64.ActiveCfg = Release|x64
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug|Win32.Build.0 = Debug|Win32
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug|x64.Build.0 = Debug|x64
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release|Win32.Build.0 = Release|Win32
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release|x64.Build.0 = Release|x64
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug-DLL|Win32.ActiveCfg = Debug|Win32
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug-DLL|Win32.Build.0 = Debug|Win32
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug-DLL|x64.ActiveCfg = Debug|x64
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug-DLL|x64.Build.0 = Debug|x64
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release-DLL|Win32.ActiveCfg = Release|Win32
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release-DLL|Win32.Build.0 = Release|Win32
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release-DLL|x64.ActiveCfg = Release|x64
- {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release-DLL|x64.Build.0 = Release|x64
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug|Win32.ActiveCfg = Debug|Win32
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug|x64.ActiveCfg = Debug|x64
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release|Win32.ActiveCfg = Release|Win32
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release|x64.ActiveCfg = Release|x64
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug|Win32.Build.0 = Debug|Win32
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug|x64.Build.0 = Debug|x64
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release|Win32.Build.0 = Release|Win32
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release|x64.Build.0 = Release|x64
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug-DLL|Win32.ActiveCfg = Debug|Win32
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug-DLL|Win32.Build.0 = Debug|Win32
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug-DLL|x64.ActiveCfg = Debug|x64
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug-DLL|x64.Build.0 = Debug|x64
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release-DLL|Win32.ActiveCfg = Release|Win32
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release-DLL|Win32.Build.0 = Release|Win32
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release-DLL|x64.ActiveCfg = Release|x64
- {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release-DLL|x64.Build.0 = Release|x64
{0E980562-3AA0-91B1-C590-85C9A899BE44}.Debug|Win32.ActiveCfg = Debug|Win32
{0E980562-3AA0-91B1-C590-85C9A899BE44}.Debug|x64.ActiveCfg = Debug|x64
{0E980562-3AA0-91B1-C590-85C9A899BE44}.Release|Win32.ActiveCfg = Release|Win32
@@ -3837,6 +3792,22 @@ Global
{89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release-DLL|Win32.Build.0 = Release|Win32
{89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release-DLL|x64.ActiveCfg = Release|x64
{89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release-DLL|x64.Build.0 = Release|x64
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|x64.ActiveCfg = Debug|x64
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|Win32.ActiveCfg = Release|Win32
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|x64.ActiveCfg = Release|x64
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|Win32.Build.0 = Debug|Win32
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|x64.Build.0 = Debug|x64
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|Win32.Build.0 = Release|Win32
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|x64.Build.0 = Release|x64
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|Win32.Build.0 = Debug|Win32
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|x64.ActiveCfg = Debug|x64
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|x64.Build.0 = Debug|x64
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|Win32.ActiveCfg = Release|Win32
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|Win32.Build.0 = Release|Win32
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|x64.ActiveCfg = Release|x64
+ {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|x64.Build.0 = Release|x64
{9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug|Win32.ActiveCfg = Debug|Win32
{9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug|x64.ActiveCfg = Debug|x64
{9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Release|Win32.ActiveCfg = Release|Win32
diff --git a/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj b/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj
new file mode 100644
index 0000000000..52774e0802
--- /dev/null
+++ b/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{AAD4AEF3-DF1E-7A6D-EC35-233BD1031BF4}</ProjectGuid>
+ <IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
+ <IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration">
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration">
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration">
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration">
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(SolutionDir)\..\vsprojects\global.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'">
+ <TargetName>google_benchmark</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'">
+ <TargetName>google_benchmark</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\include\benchmark\benchmark.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\include\benchmark\benchmark_api.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\include\benchmark\macros.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\include\benchmark\reporter.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\arraysize.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\benchmark_api_internal.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\check.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\colorprint.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\commandlineflags.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\complexity.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\cycleclock.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\internal_macros.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\mutex.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\re.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\sleep.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\stat.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\string_util.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\sysinfo.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\timers.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\benchmark.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\benchmark_register.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\colorprint.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\commandlineflags.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\complexity.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\console_reporter.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\csv_reporter.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\json_reporter.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\reporter.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\sleep.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\string_util.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\sysinfo.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\timers.cc">
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>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}.</ErrorText>
+ </PropertyGroup>
+ </Target>
+</Project>
+
diff --git a/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj.filters b/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj.filters
new file mode 100644
index 0000000000..9db6ed4657
--- /dev/null
+++ b/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj.filters
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\benchmark.cc">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\benchmark_register.cc">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\colorprint.cc">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\commandlineflags.cc">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\complexity.cc">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\console_reporter.cc">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\csv_reporter.cc">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\json_reporter.cc">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\reporter.cc">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\sleep.cc">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\string_util.cc">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\sysinfo.cc">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\third_party\google_benchmark\src\timers.cc">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\include\benchmark\benchmark.h">
+ <Filter>third_party\google_benchmark\include\benchmark</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\include\benchmark\benchmark_api.h">
+ <Filter>third_party\google_benchmark\include\benchmark</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\include\benchmark\macros.h">
+ <Filter>third_party\google_benchmark\include\benchmark</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\include\benchmark\reporter.h">
+ <Filter>third_party\google_benchmark\include\benchmark</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\arraysize.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\benchmark_api_internal.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\check.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\colorprint.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\commandlineflags.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\complexity.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\cycleclock.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\internal_macros.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\log.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\mutex.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\re.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\sleep.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\stat.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\string_util.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\sysinfo.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\google_benchmark\src\timers.h">
+ <Filter>third_party\google_benchmark\src</Filter>
+ </ClInclude>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="third_party">
+ <UniqueIdentifier>{7458b63d-7ba4-103d-2bed-3e3ad30d8237}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="third_party\google_benchmark">
+ <UniqueIdentifier>{54a154e8-669b-a7c1-9b6e-bd1aab2f86e3}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="third_party\google_benchmark\include">
+ <UniqueIdentifier>{f54c3cb1-ec20-a651-6956-78379b51e1a5}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="third_party\google_benchmark\include\benchmark">
+ <UniqueIdentifier>{0483a457-8050-4565-bc15-09695bf7b822}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="third_party\google_benchmark\src">
+ <UniqueIdentifier>{c39ff2d1-691e-4614-4d75-4bc20db05e09}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj
index bf9c3a5c9d..f281db72b6 100644
--- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj
+++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj
@@ -279,12 +279,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_builder_plugin.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_initializer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\service_type.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\sync.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\sync_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\sync_no_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\thd.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\thd_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\thd_no_cxx11.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\resource_quota.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\security\auth_context.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\security\auth_metadata_processor.h" />
@@ -332,9 +326,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
@@ -409,6 +400,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\rpc_method.cc">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\version_cc.cc">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\async_generic_service.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\create_default_thread_pool.cc">
diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters
index b88a78ad92..f359e4ef31 100644
--- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters
@@ -64,6 +64,9 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\rpc_method.cc">
<Filter>src\cpp\common</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\version_cc.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\async_generic_service.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
@@ -174,24 +177,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\service_type.h">
<Filter>include\grpc++\impl</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\sync.h">
- <Filter>include\grpc++\impl</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\sync_cxx11.h">
- <Filter>include\grpc++\impl</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\sync_no_cxx11.h">
- <Filter>include\grpc++\impl</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\thd.h">
- <Filter>include\grpc++\impl</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\thd_cxx11.h">
- <Filter>include\grpc++\impl</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\thd_no_cxx11.h">
- <Filter>include\grpc++\impl</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\resource_quota.h">
<Filter>include\grpc++</Filter>
</ClInclude>
@@ -333,15 +318,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/grpc++_reflection_codegen/grpc++_reflection_codegen.vcxproj b/vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj
index d9e10c2d37..453b483fde 100644
--- a/vsprojects/vcxproj/grpc++_reflection_codegen/grpc++_reflection_codegen.vcxproj
+++ b/vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj
@@ -19,7 +19,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{C8A925BF-4373-D85D-60AE-96CDCBBF33F2}</ProjectGuid>
+ <ProjectGuid>{7B95AF96-915A-7132-AE45-9FA37769FACE}</ProjectGuid>
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
</PropertyGroup>
@@ -57,10 +57,10 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
- <TargetName>grpc++_reflection_codegen</TargetName>
+ <TargetName>grpc++_proto_reflection_desc_db</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
- <TargetName>grpc++_reflection_codegen</TargetName>
+ <TargetName>grpc++_proto_reflection_desc_db</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -147,6 +147,14 @@
</ItemDefinitionGroup>
<ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\test\cpp\util\proto_reflection_descriptor_database.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\util\proto_reflection_descriptor_database.cc">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.pb.cc">
</ClCompile>
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.pb.h">
@@ -156,6 +164,11 @@
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.grpc.pb.h">
</ClInclude>
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++\grpc++.vcxproj">
+ <Project>{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}</Project>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj.filters b/vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj.filters
new file mode 100644
index 0000000000..7e98918491
--- /dev/null
+++ b/vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj.filters
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\util\proto_reflection_descriptor_database.cc">
+ <Filter>test\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.proto">
+ <Filter>src\proto\grpc\reflection\v1alpha</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\test\cpp\util\proto_reflection_descriptor_database.h">
+ <Filter>test\cpp\util</Filter>
+ </ClInclude>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{9b233966-149a-36c4-89fb-11d63d8e00bb}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++">
+ <UniqueIdentifier>{1abcca00-34c5-513a-f372-4ef9b190910a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\impl">
+ <UniqueIdentifier>{0059fdd3-0e35-5500-b8a5-b2e573d7537c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\impl\codegen">
+ <UniqueIdentifier>{3f1b0e9e-802e-0535-bc3a-9685c2cf68d1}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{b479720c-6a7e-d0ca-bad6-db7cc12c9b0c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto">
+ <UniqueIdentifier>{d9aa2326-a033-5a44-a24b-25cdb4a58297}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc">
+ <UniqueIdentifier>{cdabe038-cb18-dc0f-8afa-0787627ebd55}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc\reflection">
+ <UniqueIdentifier>{3947956e-b4fb-30ce-fc28-da34aec087e7}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc\reflection\v1alpha">
+ <UniqueIdentifier>{79b4cc2b-5f94-0c9f-4754-1197647dd040}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test">
+ <UniqueIdentifier>{96bd243c-be93-569d-6a83-4a67ab8c1fa3}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\cpp">
+ <UniqueIdentifier>{1041430f-3c5a-c462-ccc6-adc845814dbe}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\cpp\util">
+ <UniqueIdentifier>{c84ddb0b-56a0-0d29-a5c0-6cb1a7a49119}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj
index 230128180a..da4c685776 100644
--- a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj
+++ b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj
@@ -148,58 +148,6 @@
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\proto_server_reflection_plugin.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\reflection.grpc.pb.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\reflection.pb.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\proto_utils.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_stream.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_unary_call.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call_hook.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\channel_interface.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_context.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_unary_call.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue_tag.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen_interface.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\create_auth_context.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\grpc_library.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\method_handler_impl.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_method.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_service_method.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\security\auth_context.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\serialization_traits.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_context.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_interface.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\src\cpp\ext\proto_server_reflection.h" />
@@ -209,10 +157,14 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\ext\proto_server_reflection_plugin.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\ext\reflection.grpc.pb.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.pb.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\ext\reflection.pb.cc">
+ <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.pb.h">
+ </ClInclude>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.grpc.pb.cc">
</ClCompile>
+ <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.grpc.pb.h">
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++\grpc++.vcxproj">
diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters
index 540e1c6e36..b292e06fd7 100644
--- a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters
@@ -7,173 +7,14 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\ext\proto_server_reflection_plugin.cc">
<Filter>src\cpp\ext</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\ext\reflection.grpc.pb.cc">
- <Filter>src\cpp\ext</Filter>
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\ext\reflection.pb.cc">
- <Filter>src\cpp\ext</Filter>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.proto">
+ <Filter>src\proto\grpc\reflection\v1alpha</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\proto_server_reflection_plugin.h">
<Filter>include\grpc++\ext</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\reflection.grpc.pb.h">
- <Filter>include\grpc++\ext</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\reflection.pb.h">
- <Filter>include\grpc++\ext</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\proto_utils.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_stream.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_unary_call.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call_hook.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\channel_interface.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_context.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_unary_call.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue_tag.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen_interface.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\create_auth_context.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\grpc_library.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\method_handler_impl.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_method.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_service_method.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\security\auth_context.h">
- <Filter>include\grpc++\impl\codegen\security</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\serialization_traits.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_context.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_interface.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\src\cpp\ext\proto_server_reflection.h">
@@ -185,30 +26,12 @@
<Filter Include="include">
<UniqueIdentifier>{e9441021-f78a-ec84-7efd-1883975feddb}</UniqueIdentifier>
</Filter>
- <Filter Include="include\grpc">
- <UniqueIdentifier>{3b19b259-3bf4-c0fa-8e20-ed79acd63ac3}</UniqueIdentifier>
- </Filter>
<Filter Include="include\grpc++">
<UniqueIdentifier>{c66e66b4-a64e-79bf-40e8-1a1bac124a3d}</UniqueIdentifier>
</Filter>
<Filter Include="include\grpc++\ext">
<UniqueIdentifier>{8d96203b-d3ce-2164-74a6-06e0ff2b09af}</UniqueIdentifier>
</Filter>
- <Filter Include="include\grpc++\impl">
- <UniqueIdentifier>{4e57d72c-762f-20b1-bdb9-bc7088ca6fda}</UniqueIdentifier>
- </Filter>
- <Filter Include="include\grpc++\impl\codegen">
- <UniqueIdentifier>{0f0f3943-7a9d-2b03-7eb1-2fbad4199428}</UniqueIdentifier>
- </Filter>
- <Filter Include="include\grpc++\impl\codegen\security">
- <UniqueIdentifier>{e1b8bc6d-2cd2-1283-868a-dfd64c3dbab8}</UniqueIdentifier>
- </Filter>
- <Filter Include="include\grpc\impl">
- <UniqueIdentifier>{7bccc379-84fb-c1aa-19aa-a0cc09ac59ac}</UniqueIdentifier>
- </Filter>
- <Filter Include="include\grpc\impl\codegen">
- <UniqueIdentifier>{a1f1904b-e820-dd3c-b4b0-14a6e0ff9d19}</UniqueIdentifier>
- </Filter>
<Filter Include="src">
<UniqueIdentifier>{5ec5476e-3d72-e3f9-4f05-3f7c31c13651}</UniqueIdentifier>
</Filter>
@@ -218,6 +41,18 @@
<Filter Include="src\cpp\ext">
<UniqueIdentifier>{d0204618-0f6a-dbc6-cf41-ffc04e76075a}</UniqueIdentifier>
</Filter>
+ <Filter Include="src\proto">
+ <UniqueIdentifier>{728e13e3-db36-9633-3cb9-a74c0f11470d}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc">
+ <UniqueIdentifier>{b49296ac-bc15-94ec-012b-5f8fe2ce2c1f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc\reflection">
+ <UniqueIdentifier>{d980f473-6242-4a95-556a-7d4c6d6a2a00}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc\reflection\v1alpha">
+ <UniqueIdentifier>{8c7d8658-ade7-6086-0e04-7e00380ddccf}</UniqueIdentifier>
+ </Filter>
</ItemGroup>
</Project>
diff --git a/vsprojects/vcxproj/grpc++_reflection_codegen/grpc++_reflection_codegen.vcxproj.filters b/vsprojects/vcxproj/grpc++_reflection_codegen/grpc++_reflection_codegen.vcxproj.filters
deleted file mode 100644
index 577dcc77d8..0000000000
--- a/vsprojects/vcxproj/grpc++_reflection_codegen/grpc++_reflection_codegen.vcxproj.filters
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.proto">
- <Filter>src\proto\grpc\reflection\v1alpha</Filter>
- </ClCompile>
- </ItemGroup>
-
- <ItemGroup>
- <Filter Include="src">
- <UniqueIdentifier>{d6f45d49-92db-00f7-3dd4-e53f5768d80c}</UniqueIdentifier>
- </Filter>
- <Filter Include="src\proto">
- <UniqueIdentifier>{32b951f4-cef1-24a3-ffb9-bb229f0cdd6a}</UniqueIdentifier>
- </Filter>
- <Filter Include="src\proto\grpc">
- <UniqueIdentifier>{8fdcb9f3-4d86-2f49-5c15-c92e0e0f4fba}</UniqueIdentifier>
- </Filter>
- <Filter Include="src\proto\grpc\reflection">
- <UniqueIdentifier>{098a074c-f3de-2840-8009-1a3840af1efc}</UniqueIdentifier>
- </Filter>
- <Filter Include="src\proto\grpc\reflection\v1alpha">
- <UniqueIdentifier>{219ff371-7d3a-130c-5792-be36514a4e98}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
-</Project>
-
diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj
index 17e9199554..d2305b2e25 100644
--- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj
+++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj
@@ -173,9 +173,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters
index 25a1752479..d1aaba7092 100644
--- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters
@@ -111,15 +111,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj
index 5d0759790c..1511a2cfe4 100644
--- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj
+++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj
@@ -279,12 +279,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_builder_plugin.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_initializer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\service_type.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\sync.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\sync_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\sync_no_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\thd.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\thd_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\thd_no_cxx11.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\resource_quota.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\security\auth_context.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\security\auth_metadata_processor.h" />
@@ -332,9 +326,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
@@ -395,6 +386,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\rpc_method.cc">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\version_cc.cc">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\async_generic_service.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\create_default_thread_pool.cc">
diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
index bdb7134081..bed77b25a4 100644
--- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
@@ -49,6 +49,9 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\rpc_method.cc">
<Filter>src\cpp\common</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\version_cc.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\async_generic_service.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
@@ -159,24 +162,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\service_type.h">
<Filter>include\grpc++\impl</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\sync.h">
- <Filter>include\grpc++\impl</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\sync_cxx11.h">
- <Filter>include\grpc++\impl</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\sync_no_cxx11.h">
- <Filter>include\grpc++\impl</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\thd.h">
- <Filter>include\grpc++\impl</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\thd_cxx11.h">
- <Filter>include\grpc++\impl</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\thd_no_cxx11.h">
- <Filter>include\grpc++\impl</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\resource_quota.h">
<Filter>include\grpc++</Filter>
</ClInclude>
@@ -318,15 +303,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj
index d9d0d42d67..138246668f 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj
@@ -385,6 +385,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata_batch.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\method_config.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h" />
@@ -679,6 +680,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\method_config.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.c">
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
index ab9b76073c..c7b9b6664a 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
@@ -313,6 +313,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\method_config.c">
<Filter>src\core\lib\transport</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c">
<Filter>src\core\lib\transport</Filter>
</ClCompile>
@@ -977,6 +980,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\method_config.h">
<Filter>src\core\lib\transport</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h">
<Filter>src\core\lib\transport</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj
index 4c61baa506..c97c7dcb3d 100644
--- a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj
+++ b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj
@@ -147,12 +147,14 @@
</ItemDefinitionGroup>
<ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h" />
+ </ItemGroup>
+ <ItemGroup>
<ClInclude Include="$(SolutionDir)\..\test\cpp\util\cli_call.h" />
<ClInclude Include="$(SolutionDir)\..\test\cpp\util\cli_credentials.h" />
<ClInclude Include="$(SolutionDir)\..\test\cpp\util\config_grpc_cli.h" />
<ClInclude Include="$(SolutionDir)\..\test\cpp\util\grpc_tool.h" />
<ClInclude Include="$(SolutionDir)\..\test\cpp\util\proto_file_parser.h" />
- <ClInclude Include="$(SolutionDir)\..\test\cpp\util\proto_reflection_descriptor_database.h" />
<ClInclude Include="$(SolutionDir)\..\test\cpp\util\service_describer.h" />
</ItemGroup>
<ItemGroup>
@@ -164,14 +166,20 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\cpp\util\proto_file_parser.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\test\cpp\util\proto_reflection_descriptor_database.cc">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\cpp\util\service_describer.cc">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.pb.cc">
+ </ClCompile>
+ <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.pb.h">
+ </ClInclude>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.grpc.pb.cc">
+ </ClCompile>
+ <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.grpc.pb.h">
+ </ClInclude>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_reflection\grpc++_reflection.vcxproj">
- <Project>{5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}</Project>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_proto_reflection_desc_db\grpc++_proto_reflection_desc_db.vcxproj">
+ <Project>{7B95AF96-915A-7132-AE45-9FA37769FACE}</Project>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++\grpc++.vcxproj">
<Project>{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}</Project>
diff --git a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj.filters b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj.filters
index d4d692766d..84a401a7bd 100644
--- a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj.filters
@@ -13,12 +13,17 @@
<ClCompile Include="$(SolutionDir)\..\test\cpp\util\proto_file_parser.cc">
<Filter>test\cpp\util</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\test\cpp\util\proto_reflection_descriptor_database.cc">
- <Filter>test\cpp\util</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\cpp\util\service_describer.cc">
<Filter>test\cpp\util</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\reflection\v1alpha\reflection.proto">
+ <Filter>src\proto\grpc\reflection\v1alpha</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\test\cpp\util\cli_call.h">
@@ -36,15 +41,39 @@
<ClInclude Include="$(SolutionDir)\..\test\cpp\util\proto_file_parser.h">
<Filter>test\cpp\util</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\test\cpp\util\proto_reflection_descriptor_database.h">
- <Filter>test\cpp\util</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\test\cpp\util\service_describer.h">
<Filter>test\cpp\util</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{09004fab-571d-4499-ea07-ab14a367b0e6}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++">
+ <UniqueIdentifier>{17074550-63b5-b955-9a30-33f983c6933a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\impl">
+ <UniqueIdentifier>{9d5cca3a-e3da-b197-ba07-8ef7649de092}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\impl\codegen">
+ <UniqueIdentifier>{12d6b95a-4072-e05e-8de7-79b0c2f7329f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{5cc1b6f3-ef01-62ac-9b0e-1fd776f42182}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto">
+ <UniqueIdentifier>{86bd3e99-8380-85fd-f297-1ac2f018ed51}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc">
+ <UniqueIdentifier>{10c2568e-5695-1c21-6c51-172889d406f8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc\reflection">
+ <UniqueIdentifier>{5213881a-59f9-2d2e-43aa-1433dc6f70af}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc\reflection\v1alpha">
+ <UniqueIdentifier>{8a66b2e3-477b-66e2-fba8-6987c6381367}</UniqueIdentifier>
+ </Filter>
<Filter Include="test">
<UniqueIdentifier>{16a32a9f-93aa-5812-5a5e-be659aaa76aa}</UniqueIdentifier>
</Filter>
diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
index 39c144d992..40ec6cc816 100644
--- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
+++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
@@ -278,6 +278,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata_batch.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\method_config.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h" />
@@ -530,6 +531,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\method_config.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.c">
diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
index 0fbfc3acd3..3a973616ec 100644
--- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
@@ -370,6 +370,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\method_config.c">
<Filter>src\core\lib\transport</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c">
<Filter>src\core\lib\transport</Filter>
</ClCompile>
@@ -773,6 +776,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\method_config.h">
<Filter>src\core\lib\transport</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h">
<Filter>src\core\lib\transport</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
index 87e3921ff9..5573fc5cde 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
@@ -375,6 +375,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata_batch.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\method_config.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h" />
@@ -647,6 +648,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\method_config.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.c">
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
index 1e719226fa..985abf7610 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
@@ -316,6 +316,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\method_config.c">
<Filter>src\core\lib\transport</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c">
<Filter>src\core\lib\transport</Filter>
</ClCompile>
@@ -890,6 +893,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\method_config.h">
<Filter>src\core\lib\transport</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h">
<Filter>src\core\lib\transport</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj
index 2d75735728..a2b2a1dfa0 100644
--- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj
+++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj
@@ -186,9 +186,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters
index dda79675fb..94b6c2530e 100644
--- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters
+++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters
@@ -99,15 +99,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj
index 270c2a3a06..1a3c157983 100644
--- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj
+++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj
@@ -186,9 +186,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters
index dc5e321649..1f4b60ca4d 100644
--- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters
+++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters
@@ -102,15 +102,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj.filters
deleted file mode 100644
index fa77558c9b..0000000000
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj.filters
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\h2_fake_resolver.c">
- <Filter>test\core\end2end\fixtures</Filter>
- </ClCompile>
- </ItemGroup>
-
- <ItemGroup>
- <Filter Include="test">
- <UniqueIdentifier>{d16c806f-b9ed-2fc4-d125-d2f213d24e94}</UniqueIdentifier>
- </Filter>
- <Filter Include="test\core">
- <UniqueIdentifier>{35eb96d1-e1d6-7d4f-1b67-58c90bbafc08}</UniqueIdentifier>
- </Filter>
- <Filter Include="test\core\end2end">
- <UniqueIdentifier>{c8a16f5b-264e-c0f0-122b-295477b396f0}</UniqueIdentifier>
- </Filter>
- <Filter Include="test\core\end2end\fixtures">
- <UniqueIdentifier>{cd25af84-98e8-39f6-6af3-c1a852a54156}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
-</Project>
-
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj.filters
deleted file mode 100644
index cb68d336f8..0000000000
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj.filters
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\h2_fake_resolver.c">
- <Filter>test\core\end2end\fixtures</Filter>
- </ClCompile>
- </ItemGroup>
-
- <ItemGroup>
- <Filter Include="test">
- <UniqueIdentifier>{3bb40091-0d52-0156-cc55-ce5f69e612a8}</UniqueIdentifier>
- </Filter>
- <Filter Include="test\core">
- <UniqueIdentifier>{cac8fdf8-f489-f1ff-2812-79c47527b524}</UniqueIdentifier>
- </Filter>
- <Filter Include="test\core\end2end">
- <UniqueIdentifier>{2fe5cc8d-2908-878f-3b45-50f8c2cfadea}</UniqueIdentifier>
- </Filter>
- <Filter Include="test\core\end2end\fixtures">
- <UniqueIdentifier>{f07f474f-9277-9b94-38b7-3f7d0c846fdb}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
-</Project>
-
diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj
index a47c40f0f7..3d510d5156 100644
--- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj
@@ -153,6 +153,8 @@
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\end2end_nosec_tests.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\end2end_test_utils.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\bad_hostname.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\binary_metadata.c">
diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters
index 71cf6838fe..a0b01ddbc8 100644
--- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters
+++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters
@@ -4,6 +4,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\end2end_nosec_tests.c">
<Filter>test\core\end2end</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\end2end_test_utils.c">
+ <Filter>test\core\end2end</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\bad_hostname.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj
index 68ff5f1ebd..5699e8308e 100644
--- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj
@@ -153,6 +153,8 @@
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\end2end_tests.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\end2end_test_utils.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\bad_hostname.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\binary_metadata.c">
diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters
index 7a620f61a5..bfb5e2b229 100644
--- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters
+++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters
@@ -4,6 +4,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\end2end_tests.c">
<Filter>test\core\end2end</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\end2end_test_utils.c">
+ <Filter>test\core\end2end</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\bad_hostname.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
diff --git a/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj b/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj
index 78a0a63b5d..fbb1bc8ab2 100644
--- a/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj
+++ b/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj
@@ -167,8 +167,8 @@
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_cli_libs\grpc_cli_libs.vcxproj">
<Project>{86E35862-43E8-F59E-F906-AFE0348AD3D2}</Project>
</ProjectReference>
- <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_reflection\grpc++_reflection.vcxproj">
- <Project>{5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}</Project>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_proto_reflection_desc_db\grpc++_proto_reflection_desc_db.vcxproj">
+ <Project>{7B95AF96-915A-7132-AE45-9FA37769FACE}</Project>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++\grpc++.vcxproj">
<Project>{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}</Project>
diff --git a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj
index bdf310db1b..1e3cc3ca04 100644
--- a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj
+++ b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj
@@ -187,9 +187,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
@@ -212,9 +209,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h" />
</ItemGroup>
<ItemGroup>
- <ClInclude Include="$(SolutionDir)\..\test\cpp\util\string_ref_helper.h" />
- </ItemGroup>
- <ItemGroup>
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\echo.pb.cc">
</ClCompile>
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\echo.pb.h">
@@ -233,16 +227,20 @@
</ClInclude>
<ClCompile Include="$(SolutionDir)\..\test\cpp\util\grpc_tool_test.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\test\cpp\util\string_ref_helper.cc">
- </ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_cli_libs\grpc_cli_libs.vcxproj">
<Project>{86E35862-43E8-F59E-F906-AFE0348AD3D2}</Project>
</ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_proto_reflection_desc_db\grpc++_proto_reflection_desc_db.vcxproj">
+ <Project>{7B95AF96-915A-7132-AE45-9FA37769FACE}</Project>
+ </ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_reflection\grpc++_reflection.vcxproj">
<Project>{5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}</Project>
</ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_test_util\grpc++_test_util.vcxproj">
+ <Project>{0BE77741-552A-929B-A497-4EF7ECE17A64}</Project>
+ </ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_test_util\grpc_test_util.vcxproj">
<Project>{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}</Project>
</ProjectReference>
diff --git a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters
index cd341e9eb1..1c308c5881 100644
--- a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters
+++ b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters
@@ -10,9 +10,6 @@
<ClCompile Include="$(SolutionDir)\..\test\cpp\util\grpc_tool_test.cc">
<Filter>test\cpp\util</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\test\cpp\util\string_ref_helper.cc">
- <Filter>test\cpp\util</Filter>
- </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\proto_utils.h">
@@ -96,15 +93,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h">
- <Filter>include\grpc++\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
@@ -166,11 +154,6 @@
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
</ItemGroup>
- <ItemGroup>
- <ClInclude Include="$(SolutionDir)\..\test\cpp\util\string_ref_helper.h">
- <Filter>test\cpp\util</Filter>
- </ClInclude>
- </ItemGroup>
<ItemGroup>
<Filter Include="include">
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj b/vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj
index 3e5f60dcba..99f33b2165 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj
+++ b/vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -19,7 +20,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}</ProjectGuid>
+ <ProjectGuid>{1A392E88-0696-AC23-F114-DA66E25F76AB}</ProjectGuid>
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
</PropertyGroup>
@@ -52,20 +53,27 @@
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(SolutionDir)\..\vsprojects\cpptest.props" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\protobuf.props" />
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
- <TargetName>h2_fake_resolver_nosec_test</TargetName>
+ <TargetName>noop-benchmark</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
+ <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
+ <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
- <TargetName>h2_fake_resolver_nosec_test</TargetName>
+ <TargetName>noop-benchmark</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
+ <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
+ <Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -152,24 +160,12 @@
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\h2_fake_resolver.c">
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\microbenchmarks\noop-benchmark.cc">
</ClCompile>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\test/end2end/tests\end2end_nosec_tests\end2end_nosec_tests.vcxproj">
- <Project>{47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}</Project>
- </ProjectReference>
- <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_test_util_unsecure\grpc_test_util_unsecure.vcxproj">
- <Project>{0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}</Project>
- </ProjectReference>
- <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_unsecure\grpc_unsecure.vcxproj">
- <Project>{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}</Project>
- </ProjectReference>
- <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr_test_util\gpr_test_util.vcxproj">
- <Project>{EAB0A629-17A9-44DB-B5FF-E91A721FE037}</Project>
- </ProjectReference>
- <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj">
- <Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\google_benchmark\google_benchmark.vcxproj">
+ <Project>{AAD4AEF3-DF1E-7A6D-EC35-233BD1031BF4}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@@ -179,6 +175,8 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
+ <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
+ <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@@ -186,6 +184,9 @@
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
+ <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
+ <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
+ <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
</Target>
</Project>
diff --git a/vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj.filters b/vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj.filters
new file mode 100644
index 0000000000..6c7cdc2f01
--- /dev/null
+++ b/vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj.filters
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\microbenchmarks\noop-benchmark.cc">
+ <Filter>test\cpp\microbenchmarks</Filter>
+ </ClCompile>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="test">
+ <UniqueIdentifier>{d56f990b-c6e5-d80a-9e07-4bcbfbb7d97e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\cpp">
+ <UniqueIdentifier>{15ba47e8-9d93-ffaf-d4e2-49262cfb4996}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\cpp\microbenchmarks">
+ <UniqueIdentifier>{d31456e0-6846-00f7-082a-30479a8b8a4f}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj b/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj
index 27fc168946..d3cd3f1e04 100644
--- a/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj
+++ b/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj
@@ -160,15 +160,13 @@
</ItemDefinitionGroup>
<ItemGroup>
- <ClInclude Include="$(SolutionDir)\..\test\cpp\util\proto_reflection_descriptor_database.h" />
- </ItemGroup>
- <ItemGroup>
<ClCompile Include="$(SolutionDir)\..\test\cpp\end2end\proto_server_reflection_test.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\test\cpp\util\proto_reflection_descriptor_database.cc">
- </ClCompile>
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_proto_reflection_desc_db\grpc++_proto_reflection_desc_db.vcxproj">
+ <Project>{7B95AF96-915A-7132-AE45-9FA37769FACE}</Project>
+ </ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_reflection\grpc++_reflection.vcxproj">
<Project>{5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}</Project>
</ProjectReference>
diff --git a/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj.filters b/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj.filters
index 6d6e5c1f32..ae0b05aa73 100644
--- a/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj.filters
+++ b/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj.filters
@@ -4,14 +4,6 @@
<ClCompile Include="$(SolutionDir)\..\test\cpp\end2end\proto_server_reflection_test.cc">
<Filter>test\cpp\end2end</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\test\cpp\util\proto_reflection_descriptor_database.cc">
- <Filter>test\cpp\util</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="$(SolutionDir)\..\test\cpp\util\proto_reflection_descriptor_database.h">
- <Filter>test\cpp\util</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
@@ -24,9 +16,6 @@
<Filter Include="test\cpp\end2end">
<UniqueIdentifier>{130f224c-89a5-54ea-7045-b54b4188c52b}</UniqueIdentifier>
</Filter>
- <Filter Include="test\cpp\util">
- <UniqueIdentifier>{aae81aad-5563-fceb-1461-10fdec84c5b0}</UniqueIdentifier>
- </Filter>
</ItemGroup>
</Project>
diff --git a/vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj b/vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj
new file mode 100644
index 0000000000..55e16f188d
--- /dev/null
+++ b/vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{54B15DF6-42BA-5347-C9B8-2D7F1F2921C6}</ProjectGuid>
+ <IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
+ <IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration">
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration">
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration">
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration">
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(SolutionDir)\..\vsprojects\cpptest.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\global.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\protobuf.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'">
+ <TargetName>round_robin_end2end_test</TargetName>
+ <Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
+ <Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
+ <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
+ <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'">
+ <TargetName>round_robin_end2end_test</TargetName>
+ <Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
+ <Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
+ <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
+ <Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\end2end\round_robin_end2end_test.cc">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_test_util\grpc++_test_util.vcxproj">
+ <Project>{0BE77741-552A-929B-A497-4EF7ECE17A64}</Project>
+ </ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_test_util\grpc_test_util.vcxproj">
+ <Project>{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}</Project>
+ </ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++\grpc++.vcxproj">
+ <Project>{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}</Project>
+ </ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc\grpc.vcxproj">
+ <Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project>
+ </ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr_test_util\gpr_test_util.vcxproj">
+ <Project>{EAB0A629-17A9-44DB-B5FF-E91A721FE037}</Project>
+ </ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj">
+ <Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
+ <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
+ <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
+ <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
+ </ImportGroup>
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>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}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
+ <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
+ <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
+ <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
+ <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
+ </Target>
+</Project>
+
diff --git a/vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj.filters b/vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj.filters
new file mode 100644
index 0000000000..95a149953f
--- /dev/null
+++ b/vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj.filters
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\end2end\round_robin_end2end_test.cc">
+ <Filter>test\cpp\end2end</Filter>
+ </ClCompile>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="test">
+ <UniqueIdentifier>{e151f47d-6563-5ef9-fae6-70708f9f8ee6}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\cpp">
+ <UniqueIdentifier>{07958594-fd93-28f7-9388-c67c952701b8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\cpp\end2end">
+ <UniqueIdentifier>{7596a0dd-caa4-b365-a59f-f7ffef38b10d}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj
index a3977f1740..b37310d7b0 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj
+++ b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj
@@ -20,7 +20,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{085ACF7D-D7CE-A9F1-576D-1AF901409FA4}</ProjectGuid>
+ <ProjectGuid>{B8790A2E-1106-2510-9D95-32C1D68E72EE}</ProjectGuid>
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
</PropertyGroup>
@@ -60,14 +60,14 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
- <TargetName>h2_fake_resolver_test</TargetName>
+ <TargetName>transport_pid_controller_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
<Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
- <TargetName>h2_fake_resolver_test</TargetName>
+ <TargetName>transport_pid_controller_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
@@ -158,13 +158,10 @@
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\h2_fake_resolver.c">
+ <ClCompile Include="$(SolutionDir)\..\test\core\transport\pid_controller_test.c">
</ClCompile>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\test/end2end/tests\end2end_tests\end2end_tests.vcxproj">
- <Project>{1F1F9084-2A93-B80E-364F-5754894AFAB4}</Project>
- </ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_test_util\grpc_test_util.vcxproj">
<Project>{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}</Project>
</ProjectReference>
diff --git a/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters
new file mode 100644
index 0000000000..bfc3b8baf1
--- /dev/null
+++ b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\test\core\transport\pid_controller_test.c">
+ <Filter>test\core\transport</Filter>
+ </ClCompile>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="test">
+ <UniqueIdentifier>{dd5fb527-8567-108a-e6d2-51380df8a82f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\core">
+ <UniqueIdentifier>{18437a81-c8a9-fd37-ad74-63e9ebf0eb7a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\core\transport">
+ <UniqueIdentifier>{6325372c-19b9-37ab-e8ff-16554de3bb3b}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+