aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--BUILD34
-rw-r--r--CMakeLists.txt795
-rw-r--r--INSTALL.md52
-rw-r--r--Makefile328
-rw-r--r--binding.gyp5
-rw-r--r--build.yaml50
-rw-r--r--config.m45
-rw-r--r--examples/cpp/helloworld/CMakeLists.txt49
-rw-r--r--examples/objective-c/auth_sample/Misc/GoogleService-Info.plist32
-rw-r--r--gRPC-Core.podspec27
-rw-r--r--grpc.def11
-rwxr-xr-xgrpc.gemspec10
-rw-r--r--include/grpc++/impl/codegen/async_stream.h27
-rw-r--r--include/grpc++/impl/codegen/async_unary_call.h9
-rw-r--r--include/grpc++/impl/codegen/call.h12
-rw-r--r--include/grpc++/impl/codegen/core_codegen.h5
-rw-r--r--include/grpc++/impl/codegen/method_handler_impl.h15
-rw-r--r--include/grpc++/impl/codegen/server_context.h9
-rw-r--r--include/grpc++/impl/codegen/sync_stream.h15
-rw-r--r--include/grpc/census.h136
-rw-r--r--package.xml29
-rw-r--r--src/compiler/ruby_generator_helpers-inl.h4
-rw-r--r--src/core/ext/census/base_resources.c71
-rw-r--r--src/core/ext/census/base_resources.h39
-rw-r--r--src/core/ext/census/gen/census.pb.c55
-rw-r--r--src/core/ext/census/gen/census.pb.h135
-rw-r--r--src/core/ext/census/grpc_filter.c18
-rw-r--r--src/core/ext/census/initialize.c20
-rw-r--r--src/core/ext/census/placeholders.c45
-rw-r--r--src/core/ext/census/resource.c312
-rw-r--r--src/core/ext/census/resource.h63
-rw-r--r--src/core/ext/client_config/client_channel.c8
-rw-r--r--src/core/ext/client_config/lb_policy.h11
-rw-r--r--src/core/ext/client_config/subchannel.c25
-rw-r--r--src/core/ext/client_config/subchannel.h4
-rw-r--r--src/core/ext/client_config/subchannel_call_holder.c38
-rw-r--r--src/core/ext/lb_policy/grpclb/grpclb.c1039
-rw-r--r--src/core/ext/lb_policy/grpclb/grpclb.h44
-rw-r--r--src/core/ext/lb_policy/grpclb/load_balancer_api.c141
-rw-r--r--src/core/ext/lb_policy/grpclb/load_balancer_api.h36
-rw-r--r--src/core/ext/load_reporting/load_reporting.c60
-rw-r--r--src/core/ext/load_reporting/load_reporting.h61
-rw-r--r--src/core/ext/load_reporting/load_reporting_filter.c160
-rw-r--r--src/core/ext/load_reporting/load_reporting_filter.h1
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.c2
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_encoder.c6
-rw-r--r--src/core/ext/transport/chttp2/transport/parsing.c6
-rw-r--r--src/core/ext/transport/chttp2/transport/writing.c6
-rw-r--r--src/core/lib/channel/channel_stack.c29
-rw-r--r--src/core/lib/channel/channel_stack.h36
-rw-r--r--src/core/lib/channel/compress_filter.c10
-rw-r--r--src/core/lib/channel/connected_channel.c14
-rw-r--r--src/core/lib/channel/http_client_filter.c9
-rw-r--r--src/core/lib/channel/http_server_filter.c9
-rw-r--r--src/core/lib/iomgr/error.h2
-rw-r--r--src/core/lib/iomgr/tcp_posix.c2
-rw-r--r--src/core/lib/json/json_reader.c14
-rw-r--r--src/core/lib/security/transport/client_auth_filter.c9
-rw-r--r--src/core/lib/security/transport/secure_endpoint.c4
-rw-r--r--src/core/lib/security/transport/server_auth_filter.c10
-rw-r--r--src/core/lib/surface/call.c76
-rw-r--r--src/core/lib/surface/lame_client.c9
-rw-r--r--src/core/lib/surface/server.c9
-rw-r--r--src/core/lib/transport/static_metadata.c33
-rw-r--r--src/core/lib/transport/static_metadata.h189
-rw-r--r--src/core/lib/transport/timeout_encoding.c (renamed from src/core/ext/transport/chttp2/transport/timeout_encoding.c)6
-rw-r--r--src/core/lib/transport/timeout_encoding.h (renamed from src/core/ext/transport/chttp2/transport/timeout_encoding.h)14
-rw-r--r--src/core/plugin_registry/grpc_plugin_registry.c4
-rw-r--r--src/core/plugin_registry/grpc_unsecure_plugin_registry.c4
-rw-r--r--src/cpp/server/server_context.cc15
-rw-r--r--src/csharp/.nuget/packages.config6
-rw-r--r--src/csharp/Grpc.Auth/project.json6
-rw-r--r--src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs2
-rw-r--r--src/csharp/Grpc.Core.Tests/NUnitMain.cs2
-rw-r--r--src/csharp/Grpc.Core.Tests/SanityTest.cs9
-rw-r--r--src/csharp/Grpc.Core.Tests/packages.config5
-rw-r--r--src/csharp/Grpc.Core.Tests/project.json10
-rw-r--r--src/csharp/Grpc.Core/project.json4
-rw-r--r--src/csharp/Grpc.Examples.MathClient/packages.config3
-rw-r--r--src/csharp/Grpc.Examples.MathClient/project.json5
-rw-r--r--src/csharp/Grpc.Examples.MathServer/packages.config3
-rw-r--r--src/csharp/Grpc.Examples.MathServer/project.json5
-rw-r--r--src/csharp/Grpc.Examples.Tests/NUnitMain.cs2
-rw-r--r--src/csharp/Grpc.Examples.Tests/project.json5
-rw-r--r--src/csharp/Grpc.Examples/project.json2
-rw-r--r--src/csharp/Grpc.HealthCheck.Tests/NUnitMain.cs2
-rw-r--r--src/csharp/Grpc.HealthCheck.Tests/project.json5
-rw-r--r--src/csharp/Grpc.HealthCheck/project.json2
-rw-r--r--src/csharp/Grpc.IntegrationTesting.Client/project.json5
-rw-r--r--src/csharp/Grpc.IntegrationTesting.QpsWorker/packages.config3
-rw-r--r--src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json5
-rw-r--r--src/csharp/Grpc.IntegrationTesting.Server/project.json5
-rw-r--r--src/csharp/Grpc.IntegrationTesting.StressClient/packages.config3
-rw-r--r--src/csharp/Grpc.IntegrationTesting.StressClient/project.json5
-rw-r--r--src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs2
-rw-r--r--src/csharp/Grpc.IntegrationTesting/InteropClient.cs10
-rw-r--r--src/csharp/Grpc.IntegrationTesting/NUnitMain.cs2
-rw-r--r--src/csharp/Grpc.IntegrationTesting/project.json7
-rw-r--r--src/node/ext/call_credentials.cc30
-rw-r--r--src/node/health_check/package.json4
-rw-r--r--src/node/src/credentials.js5
-rw-r--r--src/objective-c/GRPCClient/GRPCCall+ChannelArg.h5
-rw-r--r--src/objective-c/GRPCClient/GRPCCall+ChannelArg.m11
-rw-r--r--src/objective-c/GRPCClient/GRPCCall+Tests.h6
-rw-r--r--src/objective-c/GRPCClient/GRPCCall+Tests.m3
-rw-r--r--src/objective-c/GRPCClient/private/GRPCChannel.h4
-rw-r--r--src/objective-c/GRPCClient/private/GRPCChannel.m16
-rw-r--r--src/objective-c/GRPCClient/private/GRPCHost.h5
-rw-r--r--src/objective-c/GRPCClient/private/GRPCHost.m12
-rw-r--r--src/objective-c/tests/GRPCClientTests.m9
-rw-r--r--src/objective-c/tests/InteropTests.h7
-rw-r--r--src/objective-c/tests/InteropTests.m73
-rw-r--r--src/objective-c/tests/InteropTestsLocalCleartext.m8
-rw-r--r--src/objective-c/tests/InteropTestsLocalSSL.m8
-rw-r--r--src/objective-c/tests/InteropTestsRemote.m4
-rw-r--r--src/objective-c/tests/Podfile41
-rw-r--r--src/objective-c/tests/Tests.xcodeproj/project.pbxproj193
-rw-r--r--src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme6
-rw-r--r--src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemoteWithCronet.xcscheme10
-rw-r--r--src/php/ext/grpc/call.c3
-rw-r--r--src/php/ext/grpc/channel.c2
-rw-r--r--src/php/ext/grpc/package.xml156
-rw-r--r--src/php/ext/grpc/php7_wrapper.h3
-rw-r--r--src/proto/census/census.proto119
-rw-r--r--src/python/grpcio/grpc_core_dependencies.py5
-rw-r--r--src/ruby/.rubocop.yml4
-rwxr-xr-xsrc/ruby/bin/math_client.rb2
-rw-r--r--[-rwxr-xr-x]src/ruby/bin/math_pb.rb (renamed from src/ruby/bin/math.rb)0
-rwxr-xr-xsrc/ruby/bin/math_server.rb2
-rw-r--r--[-rwxr-xr-x]src/ruby/bin/math_services_pb.rb (renamed from src/ruby/bin/math_services.rb)2
-rw-r--r--src/ruby/ext/grpc/rb_grpc_imports.generated.c22
-rw-r--r--src/ruby/ext/grpc/rb_grpc_imports.generated.h33
-rw-r--r--src/ruby/pb/grpc/health/checker.rb2
-rw-r--r--src/ruby/pb/grpc/health/v1/health_pb.rb (renamed from src/ruby/pb/grpc/health/v1/health.rb)0
-rw-r--r--src/ruby/pb/grpc/health/v1/health_services_pb.rb (renamed from src/ruby/pb/grpc/health/v1/health_services.rb)2
-rw-r--r--src/ruby/pb/grpc/testing/duplicate/echo_duplicate_services_pb.rb (renamed from src/ruby/pb/grpc/testing/duplicate/echo_duplicate_services.rb)4
-rw-r--r--src/ruby/pb/grpc/testing/metrics_pb.rb (renamed from src/ruby/pb/grpc/testing/metrics.rb)2
-rw-r--r--src/ruby/pb/grpc/testing/metrics_services_pb.rb (renamed from src/ruby/pb/grpc/testing/metrics_services.rb)4
-rw-r--r--src/ruby/pb/src/proto/grpc/testing/empty_pb.rb (renamed from src/ruby/pb/src/proto/grpc/testing/empty.rb)0
-rw-r--r--src/ruby/pb/src/proto/grpc/testing/messages_pb.rb (renamed from src/ruby/pb/src/proto/grpc/testing/messages.rb)0
-rw-r--r--src/ruby/pb/src/proto/grpc/testing/test_pb.rb (renamed from src/ruby/pb/src/proto/grpc/testing/test.rb)4
-rw-r--r--src/ruby/pb/src/proto/grpc/testing/test_services_pb.rb (renamed from src/ruby/pb/src/proto/grpc/testing/test_services.rb)2
-rwxr-xr-xsrc/ruby/pb/test/client.rb6
-rwxr-xr-xsrc/ruby/pb/test/server.rb6
-rw-r--r--src/ruby/qps/client.rb2
-rw-r--r--src/ruby/qps/server.rb6
-rw-r--r--src/ruby/qps/src/proto/grpc/testing/control_pb.rb (renamed from src/ruby/qps/src/proto/grpc/testing/control.rb)6
-rw-r--r--src/ruby/qps/src/proto/grpc/testing/messages_pb.rb (renamed from src/ruby/qps/src/proto/grpc/testing/messages.rb)0
-rw-r--r--src/ruby/qps/src/proto/grpc/testing/payloads_pb.rb (renamed from src/ruby/qps/src/proto/grpc/testing/payloads.rb)0
-rw-r--r--src/ruby/qps/src/proto/grpc/testing/services_pb.rb (renamed from src/ruby/qps/src/proto/grpc/testing/services.rb)4
-rw-r--r--src/ruby/qps/src/proto/grpc/testing/services_services_pb.rb (renamed from src/ruby/qps/src/proto/grpc/testing/services_services.rb)2
-rw-r--r--src/ruby/qps/src/proto/grpc/testing/stats_pb.rb (renamed from src/ruby/qps/src/proto/grpc/testing/stats.rb)0
-rwxr-xr-xsrc/ruby/qps/worker.rb2
-rw-r--r--src/ruby/spec/pb/duplicate/codegen_spec.rb4
-rw-r--r--src/ruby/spec/pb/health/checker_spec.rb8
-rw-r--r--src/ruby/stress/metrics_server.rb4
-rwxr-xr-xsrc/ruby/tools/bin/grpc_tools_ruby_protoc (renamed from src/ruby/tools/bin/grpc_tools_ruby_protoc.rb)17
-rwxr-xr-xsrc/ruby/tools/bin/grpc_tools_ruby_protoc_plugin (renamed from src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin.rb)0
-rw-r--r--src/ruby/tools/grpc-tools.gemspec2
-rw-r--r--templates/CMakeLists.txt.template169
-rw-r--r--templates/gRPC-Core.podspec.template12
-rw-r--r--templates/package.xml.template19
-rw-r--r--templates/src/csharp/Grpc.Auth/project.json.template6
-rw-r--r--templates/src/csharp/Grpc.Core.Tests/project.json.template10
-rw-r--r--templates/src/csharp/Grpc.Core/project.json.template4
-rw-r--r--templates/src/csharp/Grpc.Examples.MathClient/project.json.template5
-rw-r--r--templates/src/csharp/Grpc.Examples.MathServer/project.json.template5
-rw-r--r--templates/src/csharp/Grpc.Examples.Tests/project.json.template5
-rw-r--r--templates/src/csharp/Grpc.Examples/project.json.template2
-rw-r--r--templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template5
-rw-r--r--templates/src/csharp/Grpc.HealthCheck/project.json.template2
-rw-r--r--templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template5
-rw-r--r--templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template5
-rw-r--r--templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template5
-rw-r--r--templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template5
-rw-r--r--templates/src/csharp/Grpc.IntegrationTesting/project.json.template7
-rw-r--r--templates/src/node/health_check/package.json.template4
-rw-r--r--test/core/census/README7
-rw-r--r--test/core/census/data/resource_empty_name.pb1
-rw-r--r--test/core/census/data/resource_empty_name.txt5
-rw-r--r--test/core/census/data/resource_full.pb2
-rw-r--r--test/core/census/data/resource_full.txt9
-rw-r--r--test/core/census/data/resource_minimal_good.pb2
-rw-r--r--test/core/census/data/resource_minimal_good.txt5
-rw-r--r--test/core/census/data/resource_no_name.pb1
-rw-r--r--test/core/census/data/resource_no_name.txt4
-rw-r--r--test/core/census/data/resource_no_numerator.pb2
-rw-r--r--test/core/census/data/resource_no_numerator.txt6
-rw-r--r--test/core/census/data/resource_no_unit.pb2
-rw-r--r--test/core/census/data/resource_no_unit.txt2
-rw-r--r--test/core/census/resource_test.c157
-rw-r--r--test/core/channel/channel_stack_test.c15
-rw-r--r--test/core/end2end/cq_verifier.c9
-rw-r--r--test/core/end2end/cq_verifier.h3
-rw-r--r--test/core/end2end/end2end_nosec_tests.c16
-rw-r--r--test/core/end2end/end2end_tests.c16
-rw-r--r--test/core/end2end/fixtures/h2_load_reporting.c (renamed from test/core/end2end/fixtures/h2_loadreporting.c)95
-rw-r--r--test/core/end2end/fuzzers/hpack.dictionary10
-rwxr-xr-xtest/core/end2end/gen_build_yaml.py4
-rw-r--r--test/core/end2end/tests/filter_call_init_fails.c273
-rw-r--r--test/core/end2end/tests/filter_causes_close.c9
-rw-r--r--test/core/end2end/tests/load_reporting_hook.c321
-rw-r--r--test/core/json/json_test.c2
-rw-r--r--test/core/nanopb/fuzzer_response.c6
-rw-r--r--test/core/transport/timeout_encoding_test.c (renamed from test/core/transport/chttp2/timeout_encoding_test.c)26
-rw-r--r--test/cpp/end2end/server_builder_plugin_test.cc7
-rw-r--r--test/cpp/grpclb/grpclb_api_test.cc18
-rw-r--r--test/cpp/grpclb/grpclb_test.cc689
-rw-r--r--test/cpp/interop/interop_server.cc23
-rw-r--r--test/cpp/interop/interop_server_bootstrap.cc54
-rw-r--r--test/cpp/interop/server_helper.h6
-rw-r--r--test/cpp/qps/limit_cores.cc4
-rw-r--r--tools/cmake/gRPCConfig.cmake.in7
-rw-r--r--tools/cmake/gRPCConfigVersion.cmake.in11
-rwxr-xr-xtools/codegen/core/gen_static_metadata.py7
-rwxr-xr-xtools/distrib/check_include_guards.py2
-rw-r--r--tools/doxygen/Doxyfile.core.internal10
-rwxr-xr-xtools/gce/create_linux_worker.sh3
-rwxr-xr-xtools/run_tests/build_csharp_coreclr.sh2
-rwxr-xr-xtools/run_tests/build_package_node.sh7
-rwxr-xr-xtools/run_tests/build_python.sh5
-rw-r--r--tools/run_tests/pre_build_csharp.bat55
-rwxr-xr-xtools/run_tests/pre_build_csharp.sh51
-rw-r--r--tools/run_tests/sources_and_headers.json85
-rw-r--r--tools/run_tests/tests.json1418
-rw-r--r--vsprojects/buildtests_c.sln95
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj15
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj.filters30
-rw-r--r--vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj287
-rw-r--r--vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters635
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj15
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters30
-rw-r--r--vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj212
-rw-r--r--vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj.filters42
-rw-r--r--vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj51
-rw-r--r--vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters23
-rw-r--r--vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj199
-rw-r--r--vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj.filters21
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj (renamed from vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj)8
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj.filters (renamed from vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj.filters)10
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj (renamed from vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj)8
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj.filters (renamed from vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj.filters)10
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj4
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters6
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj4
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters6
-rw-r--r--vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj215
-rw-r--r--vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters39
-rw-r--r--vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj2
-rw-r--r--vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj.filters7
251 files changed, 9661 insertions, 1664 deletions
diff --git a/.gitignore b/.gitignore
index 09223fa1ea..75a73a1e56 100644
--- a/.gitignore
+++ b/.gitignore
@@ -99,3 +99,6 @@ artifacts/
# Git generated files for conflicting
*.orig
+
+# IDE specific folder for JetBrains IDEs
+.idea/
diff --git a/BUILD b/BUILD
index 50438edd51..d19e2c23f4 100644
--- a/BUILD
+++ b/BUILD
@@ -236,6 +236,7 @@ cc_library(
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/static_metadata.h",
+ "src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
"src/core/ext/transport/chttp2/transport/bin_decoder.h",
@@ -257,7 +258,6 @@ cc_library(
"src/core/ext/transport/chttp2/transport/internal.h",
"src/core/ext/transport/chttp2/transport/status_conversion.h",
"src/core/ext/transport/chttp2/transport/stream_map.h",
- "src/core/ext/transport/chttp2/transport/timeout_encoding.h",
"src/core/ext/transport/chttp2/transport/varint.h",
"src/core/ext/transport/chttp2/alpn/alpn.h",
"src/core/lib/security/context/security_context.h",
@@ -300,17 +300,20 @@ cc_library(
"src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h",
+ "src/core/ext/lb_policy/grpclb/grpclb.h",
"src/core/ext/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h",
"src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h",
"src/core/ext/load_reporting/load_reporting.h",
"src/core/ext/load_reporting/load_reporting_filter.h",
"src/core/ext/census/aggregation.h",
+ "src/core/ext/census/base_resources.h",
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
+ "src/core/ext/census/resource.h",
"src/core/ext/census/rpc_metric_id.h",
"src/core/lib/surface/init.c",
"src/core/lib/channel/channel_args.c",
@@ -399,6 +402,7 @@ cc_library(
"src/core/lib/transport/metadata.c",
"src/core/lib/transport/metadata_batch.c",
"src/core/lib/transport/static_metadata.c",
+ "src/core/lib/transport/timeout_encoding.c",
"src/core/lib/transport/transport.c",
"src/core/lib/transport/transport_op_string.c",
"src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c",
@@ -421,7 +425,6 @@ cc_library(
"src/core/ext/transport/chttp2/transport/status_conversion.c",
"src/core/ext/transport/chttp2/transport/stream_lists.c",
"src/core/ext/transport/chttp2/transport/stream_map.c",
- "src/core/ext/transport/chttp2/transport/timeout_encoding.c",
"src/core/ext/transport/chttp2/transport/varint.c",
"src/core/ext/transport/chttp2/transport/writing.c",
"src/core/ext/transport/chttp2/alpn/alpn.c",
@@ -477,6 +480,7 @@ cc_library(
"src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c",
+ "src/core/ext/lb_policy/grpclb/grpclb.c",
"src/core/ext/lb_policy/grpclb/load_balancer_api.c",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
"src/core/ext/lb_policy/pick_first/pick_first.c",
@@ -487,6 +491,7 @@ cc_library(
"src/core/ext/load_reporting/load_reporting.c",
"src/core/ext/load_reporting/load_reporting_filter.c",
"src/core/ext/c-ares/wrapper.c",
+ "src/core/ext/census/base_resources.c",
"src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/grpc_context.c",
@@ -496,6 +501,7 @@ cc_library(
"src/core/ext/census/mlog.c",
"src/core/ext/census/operation.c",
"src/core/ext/census/placeholders.c",
+ "src/core/ext/census/resource.c",
"src/core/ext/census/tracing.c",
"src/core/plugin_registry/grpc_plugin_registry.c",
],
@@ -628,6 +634,7 @@ cc_library(
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/static_metadata.h",
+ "src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
"third_party/objective_c/Cronet/cronet_c_for_grpc.h",
@@ -650,7 +657,6 @@ cc_library(
"src/core/ext/transport/chttp2/transport/internal.h",
"src/core/ext/transport/chttp2/transport/status_conversion.h",
"src/core/ext/transport/chttp2/transport/stream_map.h",
- "src/core/ext/transport/chttp2/transport/timeout_encoding.h",
"src/core/ext/transport/chttp2/transport/varint.h",
"src/core/ext/transport/chttp2/alpn/alpn.h",
"src/core/ext/client_config/client_channel.h",
@@ -780,6 +786,7 @@ cc_library(
"src/core/lib/transport/metadata.c",
"src/core/lib/transport/metadata_batch.c",
"src/core/lib/transport/static_metadata.c",
+ "src/core/lib/transport/timeout_encoding.c",
"src/core/lib/transport/transport.c",
"src/core/lib/transport/transport_op_string.c",
"src/core/ext/transport/cronet/client/secure/cronet_channel_create.c",
@@ -805,7 +812,6 @@ cc_library(
"src/core/ext/transport/chttp2/transport/status_conversion.c",
"src/core/ext/transport/chttp2/transport/stream_lists.c",
"src/core/ext/transport/chttp2/transport/stream_map.c",
- "src/core/ext/transport/chttp2/transport/timeout_encoding.c",
"src/core/ext/transport/chttp2/transport/varint.c",
"src/core/ext/transport/chttp2/transport/writing.c",
"src/core/ext/transport/chttp2/alpn/alpn.c",
@@ -982,6 +988,7 @@ cc_library(
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/static_metadata.h",
+ "src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
"src/core/ext/transport/chttp2/transport/bin_decoder.h",
@@ -1003,7 +1010,6 @@ cc_library(
"src/core/ext/transport/chttp2/transport/internal.h",
"src/core/ext/transport/chttp2/transport/status_conversion.h",
"src/core/ext/transport/chttp2/transport/stream_map.h",
- "src/core/ext/transport/chttp2/transport/timeout_encoding.h",
"src/core/ext/transport/chttp2/transport/varint.h",
"src/core/ext/transport/chttp2/alpn/alpn.h",
"src/core/ext/client_config/client_channel.h",
@@ -1025,14 +1031,17 @@ cc_library(
"src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h",
"src/core/ext/load_reporting/load_reporting.h",
"src/core/ext/load_reporting/load_reporting_filter.h",
+ "src/core/ext/lb_policy/grpclb/grpclb.h",
"src/core/ext/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h",
"src/core/ext/census/aggregation.h",
+ "src/core/ext/census/base_resources.h",
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
+ "src/core/ext/census/resource.h",
"src/core/ext/census/rpc_metric_id.h",
"src/core/lib/surface/init.c",
"src/core/lib/surface/init_unsecure.c",
@@ -1122,6 +1131,7 @@ cc_library(
"src/core/lib/transport/metadata.c",
"src/core/lib/transport/metadata_batch.c",
"src/core/lib/transport/static_metadata.c",
+ "src/core/lib/transport/timeout_encoding.c",
"src/core/lib/transport/transport.c",
"src/core/lib/transport/transport_op_string.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
@@ -1145,7 +1155,6 @@ cc_library(
"src/core/ext/transport/chttp2/transport/status_conversion.c",
"src/core/ext/transport/chttp2/transport/stream_lists.c",
"src/core/ext/transport/chttp2/transport/stream_map.c",
- "src/core/ext/transport/chttp2/transport/timeout_encoding.c",
"src/core/ext/transport/chttp2/transport/varint.c",
"src/core/ext/transport/chttp2/transport/writing.c",
"src/core/ext/transport/chttp2/alpn/alpn.c",
@@ -1175,10 +1184,12 @@ cc_library(
"src/core/ext/resolver/sockaddr/sockaddr_resolver.c",
"src/core/ext/load_reporting/load_reporting.c",
"src/core/ext/load_reporting/load_reporting_filter.c",
+ "src/core/ext/lb_policy/grpclb/grpclb.c",
"src/core/ext/lb_policy/grpclb/load_balancer_api.c",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
"src/core/ext/lb_policy/pick_first/pick_first.c",
"src/core/ext/lb_policy/round_robin/round_robin.c",
+ "src/core/ext/census/base_resources.c",
"src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/grpc_context.c",
@@ -1188,6 +1199,7 @@ cc_library(
"src/core/ext/census/mlog.c",
"src/core/ext/census/operation.c",
"src/core/ext/census/placeholders.c",
+ "src/core/ext/census/resource.c",
"src/core/ext/census/tracing.c",
"src/core/plugin_registry/grpc_unsecure_plugin_registry.c",
],
@@ -1883,6 +1895,7 @@ objc_library(
"src/core/lib/transport/metadata.c",
"src/core/lib/transport/metadata_batch.c",
"src/core/lib/transport/static_metadata.c",
+ "src/core/lib/transport/timeout_encoding.c",
"src/core/lib/transport/transport.c",
"src/core/lib/transport/transport_op_string.c",
"src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c",
@@ -1905,7 +1918,6 @@ objc_library(
"src/core/ext/transport/chttp2/transport/status_conversion.c",
"src/core/ext/transport/chttp2/transport/stream_lists.c",
"src/core/ext/transport/chttp2/transport/stream_map.c",
- "src/core/ext/transport/chttp2/transport/timeout_encoding.c",
"src/core/ext/transport/chttp2/transport/varint.c",
"src/core/ext/transport/chttp2/transport/writing.c",
"src/core/ext/transport/chttp2/alpn/alpn.c",
@@ -1961,6 +1973,7 @@ objc_library(
"src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c",
+ "src/core/ext/lb_policy/grpclb/grpclb.c",
"src/core/ext/lb_policy/grpclb/load_balancer_api.c",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
"src/core/ext/lb_policy/pick_first/pick_first.c",
@@ -1971,6 +1984,7 @@ objc_library(
"src/core/ext/load_reporting/load_reporting.c",
"src/core/ext/load_reporting/load_reporting_filter.c",
"src/core/ext/c-ares/wrapper.c",
+ "src/core/ext/census/base_resources.c",
"src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/grpc_context.c",
@@ -1980,6 +1994,7 @@ objc_library(
"src/core/ext/census/mlog.c",
"src/core/ext/census/operation.c",
"src/core/ext/census/placeholders.c",
+ "src/core/ext/census/resource.c",
"src/core/ext/census/tracing.c",
"src/core/plugin_registry/grpc_plugin_registry.c",
],
@@ -2091,6 +2106,7 @@ objc_library(
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/static_metadata.h",
+ "src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
"src/core/ext/transport/chttp2/transport/bin_decoder.h",
@@ -2112,7 +2128,6 @@ objc_library(
"src/core/ext/transport/chttp2/transport/internal.h",
"src/core/ext/transport/chttp2/transport/status_conversion.h",
"src/core/ext/transport/chttp2/transport/stream_map.h",
- "src/core/ext/transport/chttp2/transport/timeout_encoding.h",
"src/core/ext/transport/chttp2/transport/varint.h",
"src/core/ext/transport/chttp2/alpn/alpn.h",
"src/core/lib/security/context/security_context.h",
@@ -2155,17 +2170,20 @@ objc_library(
"src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h",
+ "src/core/ext/lb_policy/grpclb/grpclb.h",
"src/core/ext/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h",
"src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h",
"src/core/ext/load_reporting/load_reporting.h",
"src/core/ext/load_reporting/load_reporting_filter.h",
"src/core/ext/census/aggregation.h",
+ "src/core/ext/census/base_resources.h",
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
+ "src/core/ext/census/resource.h",
"src/core/ext/census/rpc_metric_id.h",
],
includes = [
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f7f9d9a3ab..3d9893188e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,35 +48,114 @@ set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
project(${PACKAGE_NAME} C CXX)
-if(NOT BORINGSSL_ROOT_DIR)
- set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl)
+set(gRPC_ZLIB_PROVIDER "module" CACHE STRING "Provider of zlib library")
+set_property(CACHE gRPC_ZLIB_PROVIDER PROPERTY STRINGS "module" "package")
+
+set(gRPC_SSL_PROVIDER "module" CACHE STRING "Provider of ssl library")
+set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package")
+
+set(gRPC_PROTOBUF_PROVIDER "module" CACHE STRING "Provider of protobuf library")
+set_property(CACHE gRPC_PROTOBUF_PROVIDER PROPERTY STRINGS "module" "package")
+
+set(gRPC_USE_PROTO_LITE OFF CACHE BOOL "Use the protobuf-lite library")
+
+if (gRPC_USE_PROTO_LITE)
+ set(_gRPC_PROTOBUF_LIBRARY_NAME "libprotobuf-lite")
+ add_definitions("-DGRPC_USE_PROTO_LITE")
+else()
+ set(_gRPC_PROTOBUF_LIBRARY_NAME "libprotobuf")
endif()
-if(NOT PROTOBUF_ROOT_DIR)
- set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf)
+
+if("${gRPC_ZLIB_PROVIDER}" STREQUAL "module")
+ if(NOT ZLIB_ROOT_DIR)
+ set(ZLIB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib)
+ endif()
+ set(ZLIB_INCLUDE_DIR "${ZLIB_ROOT_DIR}")
+ if(EXISTS "${ZLIB_ROOT_DIR}/CMakeLists.txt")
+ add_subdirectory(${ZLIB_ROOT_DIR} third_party/zlib)
+ if(TARGET zlibstatic)
+ set(_gRPC_ZLIB_LIBRARIES zlibstatic)
+ endif()
+ else()
+ message(WARNING "gRPC_ZLIB_PROVIDER is \"module\" but ZLIB_ROOT_DIR is wrong")
+ endif()
+elseif("${gRPC_ZLIB_PROVIDER}" STREQUAL "package")
+ find_package(ZLIB)
+ if(TARGET ZLIB::ZLIB)
+ set(_gRPC_ZLIB_LIBRARIES ZLIB::ZLIB)
+ endif()
+ set(_gRPC_FIND_ZLIB "if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()")
endif()
-if(NOT ZLIB_ROOT_DIR)
- set(ZLIB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib)
+
+if("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "module")
+ # Building the protobuf tests require gmock what is not part of a standard protobuf checkout.
+ # Disable them unless they are explicitly requested from the cmake command line (when we assume
+ # gmock is downloaded to the right location inside protobuf).
+ if(NOT protobuf_BUILD_TESTS)
+ set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests")
+ endif()
+ if(NOT PROTOBUF_ROOT_DIR)
+ set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf)
+ endif()
+ if(EXISTS "${PROTOBUF_ROOT_DIR}/cmake/CMakeLists.txt")
+ add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf)
+ if(TARGET ${_gRPC_PROTOBUF_LIBRARY_NAME})
+ set(_gRPC_PROTOBUF_LIBRARIES ${_gRPC_PROTOBUF_LIBRARY_NAME})
+ endif()
+ if(TARGET libprotoc)
+ set(_gRPC_PROTOBUF_PROTOC_LIBRARIES libprotoc)
+ endif()
+ else()
+ message(WARNING "gRPC_PROTOBUF_PROVIDER is \"module\" but PROTOBUF_ROOT_DIR is wrong")
+ endif()
+elseif("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "package")
+ find_package(protobuf CONFIG)
+ if(protobuf_FOUND)
+ if(TARGET protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME})
+ set(_gRPC_PROTOBUF_LIBRARIES protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME})
+ endif()
+ if(TARGET protobuf::libprotoc)
+ set(_gRPC_PROTOBUF_PROTOC_LIBRARIES protobuf::libprotoc)
+ endif()
+ set(_gRPC_FIND_PROTOBUF "if(NOT protobuf_FOUND)\n find_package(protobuf CONFIG)\nendif()")
+ else()
+ find_package(Protobuf MODULE)
+ set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND)\n find_package(Protobuf)\nendif()")
+ endif()
endif()
-# Building the protobuf tests require gmock what is not part of a standard protobuf checkout.
-# Disable them unless they are explicitly requested from the cmake command line (when we assume
-# gmock is downloaded to the right location inside protobuf).
-if(NOT protobuf_BUILD_TESTS)
- set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests")
+if("${gRPC_SSL_PROVIDER}" STREQUAL "module")
+ if(NOT BORINGSSL_ROOT_DIR)
+ set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl)
+ endif()
+ if(EXISTS "${BORINGSSL_ROOT_DIR}/CMakeLists.txt")
+ add_subdirectory(${BORINGSSL_ROOT_DIR} third_party/boringssl)
+ if(TARGET ssl)
+ set(_gRPC_SSL_LIBRARIES ssl)
+ endif()
+ else()
+ message(WARNING "gRPC_SSL_PROVIDER is \"module\" but BORINGSSL_ROOT_DIR is wrong")
+ endif()
+elseif("${gRPC_SSL_PROVIDER}" STREQUAL "package")
+ find_package(OpenSSL)
+ if(TARGET OpenSSL::SSL)
+ set(_gRPC_SSL_LIBRARIES OpenSSL::SSL)
+ endif()
+ set(_gRPC_FIND_SSL "if(NOT OpenSSL_FOUND)\n find_package(OpenSSL)\nendif()")
endif()
-add_subdirectory(${BORINGSSL_ROOT_DIR} third_party/boringssl)
-add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf)
-add_subdirectory(${ZLIB_ROOT_DIR} third_party/zlib)
+if(NOT MSVC)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+endif()
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+if(WIN32 AND MSVC)
+ set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32)
+endif()
-if (GRPC_USE_PROTO_LITE)
- set(PROTOBUF_LIBRARY_NAME "libprotobuf-lite")
- add_definitions("-DGRPC_USE_PROTO_LITE")
-else()
- set(PROTOBUF_LIBRARY_NAME "libprotobuf")
+include(GNUInstallDirs)
+if(NOT DEFINED CMAKE_INSTALL_CMAKEDIR)
+ set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/gRPC")
endif()
@@ -133,11 +212,69 @@ target_include_directories(gpr
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${BORINGSSL_ROOT_DIR}/include
PRIVATE ${PROTOBUF_ROOT_DIR}/src
- PRIVATE ${ZLIB_ROOT_DIR}
+ PRIVATE ${ZLIB_INCLUDE_DIR}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
)
+foreach(_hdr
+ include/grpc/support/alloc.h
+ include/grpc/support/atm.h
+ include/grpc/support/atm_gcc_atomic.h
+ include/grpc/support/atm_gcc_sync.h
+ include/grpc/support/atm_windows.h
+ include/grpc/support/avl.h
+ include/grpc/support/cmdline.h
+ include/grpc/support/cpu.h
+ include/grpc/support/histogram.h
+ include/grpc/support/host_port.h
+ include/grpc/support/log.h
+ include/grpc/support/log_windows.h
+ include/grpc/support/port_platform.h
+ include/grpc/support/slice.h
+ include/grpc/support/slice_buffer.h
+ include/grpc/support/string_util.h
+ include/grpc/support/subprocess.h
+ include/grpc/support/sync.h
+ include/grpc/support/sync_generic.h
+ include/grpc/support/sync_posix.h
+ include/grpc/support/sync_windows.h
+ include/grpc/support/thd.h
+ include/grpc/support/time.h
+ include/grpc/support/tls.h
+ include/grpc/support/tls_gcc.h
+ include/grpc/support/tls_msvc.h
+ include/grpc/support/tls_pthread.h
+ include/grpc/support/useful.h
+ include/grpc/impl/codegen/alloc.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/log.h
+ include/grpc/impl/codegen/port_platform.h
+ include/grpc/impl/codegen/slice.h
+ include/grpc/impl/codegen/slice_buffer.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/time.h
+)
+ string(REPLACE "include/" "" _path ${_hdr})
+ get_filename_component(_path ${_path} PATH)
+ install(FILES ${_hdr}
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
+ )
+endforeach()
+
+
+install(TARGETS gpr EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
add_library(grpc
src/core/lib/surface/init.c
@@ -227,6 +364,7 @@ add_library(grpc
src/core/lib/transport/metadata.c
src/core/lib/transport/metadata_batch.c
src/core/lib/transport/static_metadata.c
+ src/core/lib/transport/timeout_encoding.c
src/core/lib/transport/transport.c
src/core/lib/transport/transport_op_string.c
src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c
@@ -249,7 +387,6 @@ add_library(grpc
src/core/ext/transport/chttp2/transport/status_conversion.c
src/core/ext/transport/chttp2/transport/stream_lists.c
src/core/ext/transport/chttp2/transport/stream_map.c
- src/core/ext/transport/chttp2/transport/timeout_encoding.c
src/core/ext/transport/chttp2/transport/varint.c
src/core/ext/transport/chttp2/transport/writing.c
src/core/ext/transport/chttp2/alpn/alpn.c
@@ -305,6 +442,7 @@ add_library(grpc
src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c
src/core/ext/transport/chttp2/client/insecure/channel_create.c
src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c
+ src/core/ext/lb_policy/grpclb/grpclb.c
src/core/ext/lb_policy/grpclb/load_balancer_api.c
src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
third_party/nanopb/pb_common.c
@@ -318,6 +456,7 @@ add_library(grpc
src/core/ext/load_reporting/load_reporting.c
src/core/ext/load_reporting/load_reporting_filter.c
src/core/ext/c-ares/wrapper.c
+ src/core/ext/census/base_resources.c
src/core/ext/census/context.c
src/core/ext/census/gen/census.pb.c
src/core/ext/census/grpc_context.c
@@ -327,6 +466,7 @@ add_library(grpc
src/core/ext/census/mlog.c
src/core/ext/census/operation.c
src/core/ext/census/placeholders.c
+ src/core/ext/census/resource.c
src/core/ext/census/tracing.c
src/core/plugin_registry/grpc_plugin_registry.c
)
@@ -336,16 +476,63 @@ target_include_directories(grpc
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${BORINGSSL_ROOT_DIR}/include
PRIVATE ${PROTOBUF_ROOT_DIR}/src
- PRIVATE ${ZLIB_ROOT_DIR}
+ PRIVATE ${ZLIB_INCLUDE_DIR}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
)
target_link_libraries(grpc
- ssl
- zlibstatic
+ ${_gRPC_BASELIB_LIBRARIES}
+ ${_gRPC_SSL_LIBRARIES}
+ ${_gRPC_ZLIB_LIBRARIES}
gpr
)
+foreach(_hdr
+ include/grpc/byte_buffer.h
+ include/grpc/byte_buffer_reader.h
+ include/grpc/compression.h
+ include/grpc/grpc.h
+ include/grpc/grpc_posix.h
+ include/grpc/status.h
+ include/grpc/impl/codegen/byte_buffer.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/alloc.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/log.h
+ include/grpc/impl/codegen/port_platform.h
+ include/grpc/impl/codegen/slice.h
+ include/grpc/impl/codegen/slice_buffer.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/time.h
+ include/grpc/grpc_security.h
+ include/grpc/grpc_security_constants.h
+ include/grpc/census.h
+)
+ string(REPLACE "include/" "" _path ${_hdr})
+ get_filename_component(_path ${_path} PATH)
+ install(FILES ${_hdr}
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
+ )
+endforeach()
+
+
+install(TARGETS grpc EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
add_library(grpc_cronet
src/core/lib/surface/init.c
@@ -435,6 +622,7 @@ add_library(grpc_cronet
src/core/lib/transport/metadata.c
src/core/lib/transport/metadata_batch.c
src/core/lib/transport/static_metadata.c
+ src/core/lib/transport/timeout_encoding.c
src/core/lib/transport/transport.c
src/core/lib/transport/transport_op_string.c
src/core/ext/transport/cronet/client/secure/cronet_channel_create.c
@@ -460,7 +648,6 @@ add_library(grpc_cronet
src/core/ext/transport/chttp2/transport/status_conversion.c
src/core/ext/transport/chttp2/transport/stream_lists.c
src/core/ext/transport/chttp2/transport/stream_map.c
- src/core/ext/transport/chttp2/transport/timeout_encoding.c
src/core/ext/transport/chttp2/transport/varint.c
src/core/ext/transport/chttp2/transport/writing.c
src/core/ext/transport/chttp2/alpn/alpn.c
@@ -519,15 +706,62 @@ target_include_directories(grpc_cronet
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${BORINGSSL_ROOT_DIR}/include
PRIVATE ${PROTOBUF_ROOT_DIR}/src
- PRIVATE ${ZLIB_ROOT_DIR}
+ PRIVATE ${ZLIB_INCLUDE_DIR}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
)
target_link_libraries(grpc_cronet
- ssl
+ ${_gRPC_BASELIB_LIBRARIES}
+ ${_gRPC_SSL_LIBRARIES}
gpr
)
+foreach(_hdr
+ include/grpc/byte_buffer.h
+ include/grpc/byte_buffer_reader.h
+ include/grpc/compression.h
+ include/grpc/grpc.h
+ include/grpc/grpc_posix.h
+ include/grpc/status.h
+ include/grpc/impl/codegen/byte_buffer.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/alloc.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/log.h
+ include/grpc/impl/codegen/port_platform.h
+ include/grpc/impl/codegen/slice.h
+ include/grpc/impl/codegen/slice_buffer.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/time.h
+ include/grpc/grpc_cronet.h
+ include/grpc/grpc_security.h
+ include/grpc/grpc_security_constants.h
+)
+ string(REPLACE "include/" "" _path ${_hdr})
+ get_filename_component(_path ${_path} PATH)
+ install(FILES ${_hdr}
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
+ )
+endforeach()
+
+
+install(TARGETS grpc_cronet EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
add_library(grpc_unsecure
src/core/lib/surface/init.c
@@ -618,6 +852,7 @@ add_library(grpc_unsecure
src/core/lib/transport/metadata.c
src/core/lib/transport/metadata_batch.c
src/core/lib/transport/static_metadata.c
+ src/core/lib/transport/timeout_encoding.c
src/core/lib/transport/transport.c
src/core/lib/transport/transport_op_string.c
src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
@@ -641,7 +876,6 @@ add_library(grpc_unsecure
src/core/ext/transport/chttp2/transport/status_conversion.c
src/core/ext/transport/chttp2/transport/stream_lists.c
src/core/ext/transport/chttp2/transport/stream_map.c
- src/core/ext/transport/chttp2/transport/timeout_encoding.c
src/core/ext/transport/chttp2/transport/varint.c
src/core/ext/transport/chttp2/transport/writing.c
src/core/ext/transport/chttp2/alpn/alpn.c
@@ -671,6 +905,7 @@ add_library(grpc_unsecure
src/core/ext/resolver/sockaddr/sockaddr_resolver.c
src/core/ext/load_reporting/load_reporting.c
src/core/ext/load_reporting/load_reporting_filter.c
+ src/core/ext/lb_policy/grpclb/grpclb.c
src/core/ext/lb_policy/grpclb/load_balancer_api.c
src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
third_party/nanopb/pb_common.c
@@ -678,6 +913,7 @@ add_library(grpc_unsecure
third_party/nanopb/pb_encode.c
src/core/ext/lb_policy/pick_first/pick_first.c
src/core/ext/lb_policy/round_robin/round_robin.c
+ src/core/ext/census/base_resources.c
src/core/ext/census/context.c
src/core/ext/census/gen/census.pb.c
src/core/ext/census/grpc_context.c
@@ -687,6 +923,7 @@ add_library(grpc_unsecure
src/core/ext/census/mlog.c
src/core/ext/census/operation.c
src/core/ext/census/placeholders.c
+ src/core/ext/census/resource.c
src/core/ext/census/tracing.c
src/core/plugin_registry/grpc_unsecure_plugin_registry.c
)
@@ -696,14 +933,59 @@ target_include_directories(grpc_unsecure
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${BORINGSSL_ROOT_DIR}/include
PRIVATE ${PROTOBUF_ROOT_DIR}/src
- PRIVATE ${ZLIB_ROOT_DIR}
+ PRIVATE ${ZLIB_INCLUDE_DIR}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
)
target_link_libraries(grpc_unsecure
+ ${_gRPC_BASELIB_LIBRARIES}
gpr
)
+foreach(_hdr
+ include/grpc/byte_buffer.h
+ include/grpc/byte_buffer_reader.h
+ include/grpc/compression.h
+ include/grpc/grpc.h
+ include/grpc/grpc_posix.h
+ include/grpc/status.h
+ include/grpc/impl/codegen/byte_buffer.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/alloc.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/log.h
+ include/grpc/impl/codegen/port_platform.h
+ include/grpc/impl/codegen/slice.h
+ include/grpc/impl/codegen/slice_buffer.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/time.h
+ include/grpc/census.h
+)
+ string(REPLACE "include/" "" _path ${_hdr})
+ get_filename_component(_path ${_path} PATH)
+ install(FILES ${_hdr}
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
+ )
+endforeach()
+
+
+install(TARGETS grpc_unsecure EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
add_library(grpc++
src/cpp/client/secure_credentials.cc
@@ -746,16 +1028,131 @@ target_include_directories(grpc++
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${BORINGSSL_ROOT_DIR}/include
PRIVATE ${PROTOBUF_ROOT_DIR}/src
- PRIVATE ${ZLIB_ROOT_DIR}
+ PRIVATE ${ZLIB_INCLUDE_DIR}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
)
target_link_libraries(grpc++
- ssl
- ${PROTOBUF_LIBRARY_NAME}
+ ${_gRPC_BASELIB_LIBRARIES}
+ ${_gRPC_SSL_LIBRARIES}
+ ${_gRPC_PROTOBUF_LIBRARIES}
grpc
)
+foreach(_hdr
+ include/grpc++/alarm.h
+ include/grpc++/channel.h
+ include/grpc++/client_context.h
+ include/grpc++/completion_queue.h
+ include/grpc++/create_channel.h
+ include/grpc++/create_channel_posix.h
+ include/grpc++/generic/async_generic_service.h
+ include/grpc++/generic/generic_stub.h
+ include/grpc++/grpc++.h
+ include/grpc++/impl/call.h
+ include/grpc++/impl/client_unary_call.h
+ include/grpc++/impl/codegen/core_codegen.h
+ include/grpc++/impl/grpc_library.h
+ include/grpc++/impl/method_handler_impl.h
+ include/grpc++/impl/rpc_method.h
+ include/grpc++/impl/rpc_service_method.h
+ include/grpc++/impl/serialization_traits.h
+ 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++/security/auth_context.h
+ include/grpc++/security/auth_metadata_processor.h
+ include/grpc++/security/credentials.h
+ include/grpc++/security/server_credentials.h
+ include/grpc++/server.h
+ include/grpc++/server_builder.h
+ include/grpc++/server_context.h
+ include/grpc++/server_posix.h
+ include/grpc++/support/async_stream.h
+ include/grpc++/support/async_unary_call.h
+ include/grpc++/support/byte_buffer.h
+ include/grpc++/support/channel_arguments.h
+ include/grpc++/support/config.h
+ include/grpc++/support/slice.h
+ include/grpc++/support/status.h
+ include/grpc++/support/status_code_enum.h
+ include/grpc++/support/string_ref.h
+ include/grpc++/support/stub_options.h
+ include/grpc++/support/sync_stream.h
+ include/grpc++/support/time.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/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.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/alloc.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/log.h
+ include/grpc/impl/codegen/port_platform.h
+ include/grpc/impl/codegen/slice.h
+ include/grpc/impl/codegen/slice_buffer.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/time.h
+)
+ string(REPLACE "include/" "" _path ${_hdr})
+ get_filename_component(_path ${_path} PATH)
+ install(FILES ${_hdr}
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
+ )
+endforeach()
+
+
+install(TARGETS grpc++ EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
add_library(grpc++_reflection
src/cpp/ext/proto_server_reflection.cc
@@ -769,7 +1166,7 @@ target_include_directories(grpc++_reflection
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${BORINGSSL_ROOT_DIR}/include
PRIVATE ${PROTOBUF_ROOT_DIR}/src
- PRIVATE ${ZLIB_ROOT_DIR}
+ PRIVATE ${ZLIB_INCLUDE_DIR}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
)
@@ -777,6 +1174,78 @@ target_link_libraries(grpc++_reflection
grpc++
)
+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/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.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/alloc.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/log.h
+ include/grpc/impl/codegen/port_platform.h
+ include/grpc/impl/codegen/slice.h
+ include/grpc/impl/codegen/slice_buffer.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/time.h
+ include/grpc++/impl/codegen/config_protobuf.h
+)
+ string(REPLACE "include/" "" _path ${_hdr})
+ get_filename_component(_path ${_path} PATH)
+ install(FILES ${_hdr}
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
+ )
+endforeach()
+
+
+install(TARGETS grpc++_reflection EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
add_library(grpc++_unsecure
src/cpp/common/insecure_create_auth_context.cc
@@ -814,17 +1283,132 @@ target_include_directories(grpc++_unsecure
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${BORINGSSL_ROOT_DIR}/include
PRIVATE ${PROTOBUF_ROOT_DIR}/src
- PRIVATE ${ZLIB_ROOT_DIR}
+ PRIVATE ${ZLIB_INCLUDE_DIR}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
)
target_link_libraries(grpc++_unsecure
- ${PROTOBUF_LIBRARY_NAME}
+ ${_gRPC_BASELIB_LIBRARIES}
+ ${_gRPC_PROTOBUF_LIBRARIES}
gpr
grpc_unsecure
grpc
)
+foreach(_hdr
+ include/grpc++/alarm.h
+ include/grpc++/channel.h
+ include/grpc++/client_context.h
+ include/grpc++/completion_queue.h
+ include/grpc++/create_channel.h
+ include/grpc++/create_channel_posix.h
+ include/grpc++/generic/async_generic_service.h
+ include/grpc++/generic/generic_stub.h
+ include/grpc++/grpc++.h
+ include/grpc++/impl/call.h
+ include/grpc++/impl/client_unary_call.h
+ include/grpc++/impl/codegen/core_codegen.h
+ include/grpc++/impl/grpc_library.h
+ include/grpc++/impl/method_handler_impl.h
+ include/grpc++/impl/rpc_method.h
+ include/grpc++/impl/rpc_service_method.h
+ include/grpc++/impl/serialization_traits.h
+ 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++/security/auth_context.h
+ include/grpc++/security/auth_metadata_processor.h
+ include/grpc++/security/credentials.h
+ include/grpc++/security/server_credentials.h
+ include/grpc++/server.h
+ include/grpc++/server_builder.h
+ include/grpc++/server_context.h
+ include/grpc++/server_posix.h
+ include/grpc++/support/async_stream.h
+ include/grpc++/support/async_unary_call.h
+ include/grpc++/support/byte_buffer.h
+ include/grpc++/support/channel_arguments.h
+ include/grpc++/support/config.h
+ include/grpc++/support/slice.h
+ include/grpc++/support/status.h
+ include/grpc++/support/status_code_enum.h
+ include/grpc++/support/string_ref.h
+ include/grpc++/support/stub_options.h
+ include/grpc++/support/sync_stream.h
+ include/grpc++/support/time.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/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.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/alloc.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/log.h
+ include/grpc/impl/codegen/port_platform.h
+ include/grpc/impl/codegen/slice.h
+ include/grpc/impl/codegen/slice_buffer.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/time.h
+)
+ string(REPLACE "include/" "" _path ${_hdr})
+ get_filename_component(_path ${_path} PATH)
+ install(FILES ${_hdr}
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
+ )
+endforeach()
+
+
+install(TARGETS grpc++_unsecure EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
add_library(grpc_plugin_support
src/compiler/cpp_generator.cc
@@ -840,12 +1424,29 @@ target_include_directories(grpc_plugin_support
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${BORINGSSL_ROOT_DIR}/include
PRIVATE ${PROTOBUF_ROOT_DIR}/src
- PRIVATE ${ZLIB_ROOT_DIR}
+ PRIVATE ${ZLIB_INCLUDE_DIR}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
)
target_link_libraries(grpc_plugin_support
- libprotoc
+ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
+)
+
+foreach(_hdr
+ include/grpc++/impl/codegen/config_protobuf.h
+)
+ string(REPLACE "include/" "" _path ${_hdr})
+ get_filename_component(_path ${_path} PATH)
+ install(FILES ${_hdr}
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
+ )
+endforeach()
+
+
+install(TARGETS grpc_plugin_support EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
@@ -858,7 +1459,7 @@ target_include_directories(grpc_csharp_ext
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${BORINGSSL_ROOT_DIR}/include
PRIVATE ${PROTOBUF_ROOT_DIR}/src
- PRIVATE ${ZLIB_ROOT_DIR}
+ PRIVATE ${ZLIB_INCLUDE_DIR}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
)
@@ -868,6 +1469,14 @@ target_link_libraries(grpc_csharp_ext
)
+
+install(TARGETS grpc_csharp_ext EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
add_executable(gen_hpack_tables
tools/codegen/core/gen_hpack_tables.c
@@ -888,6 +1497,13 @@ target_link_libraries(gen_hpack_tables
)
+install(TARGETS gen_hpack_tables EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
add_executable(gen_legal_metadata_characters
tools/codegen/core/gen_legal_metadata_characters.c
)
@@ -903,6 +1519,13 @@ target_include_directories(gen_legal_metadata_characters
+install(TARGETS gen_legal_metadata_characters EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
add_executable(grpc_create_jwt
test/core/security/create_jwt.c
)
@@ -917,12 +1540,19 @@ target_include_directories(grpc_create_jwt
)
target_link_libraries(grpc_create_jwt
- ssl
+ ${_gRPC_SSL_LIBRARIES}
grpc
gpr
)
+install(TARGETS grpc_create_jwt EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
add_executable(grpc_print_google_default_creds_token
test/core/security/print_google_default_creds_token.c
)
@@ -942,6 +1572,13 @@ target_link_libraries(grpc_print_google_default_creds_token
)
+install(TARGETS grpc_print_google_default_creds_token EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
add_executable(grpc_verify_jwt
test/core/security/verify_jwt.c
)
@@ -961,6 +1598,13 @@ target_link_libraries(grpc_verify_jwt
)
+install(TARGETS grpc_verify_jwt EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
add_executable(grpc_cpp_plugin
src/compiler/cpp_plugin.cc
)
@@ -975,11 +1619,18 @@ target_include_directories(grpc_cpp_plugin
)
target_link_libraries(grpc_cpp_plugin
- libprotoc
+ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
grpc_plugin_support
)
+install(TARGETS grpc_cpp_plugin EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
add_executable(grpc_csharp_plugin
src/compiler/csharp_plugin.cc
)
@@ -994,11 +1645,18 @@ target_include_directories(grpc_csharp_plugin
)
target_link_libraries(grpc_csharp_plugin
- libprotoc
+ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
grpc_plugin_support
)
+install(TARGETS grpc_csharp_plugin EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
add_executable(grpc_node_plugin
src/compiler/node_plugin.cc
)
@@ -1013,11 +1671,18 @@ target_include_directories(grpc_node_plugin
)
target_link_libraries(grpc_node_plugin
- libprotoc
+ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
grpc_plugin_support
)
+install(TARGETS grpc_node_plugin EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
add_executable(grpc_objective_c_plugin
src/compiler/objective_c_plugin.cc
)
@@ -1032,11 +1697,18 @@ target_include_directories(grpc_objective_c_plugin
)
target_link_libraries(grpc_objective_c_plugin
- libprotoc
+ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
grpc_plugin_support
)
+install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
add_executable(grpc_python_plugin
src/compiler/python_plugin.cc
)
@@ -1051,11 +1723,18 @@ target_include_directories(grpc_python_plugin
)
target_link_libraries(grpc_python_plugin
- libprotoc
+ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
grpc_plugin_support
)
+install(TARGETS grpc_python_plugin EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
add_executable(grpc_ruby_plugin
src/compiler/ruby_plugin.cc
)
@@ -1070,11 +1749,33 @@ target_include_directories(grpc_ruby_plugin
)
target_link_libraries(grpc_ruby_plugin
- libprotoc
+ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
grpc_plugin_support
)
+install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
+
+
+
+install(EXPORT gRPCTargets
+ DESTINATION ${CMAKE_INSTALL_CMAKEDIR}
+ NAMESPACE gRPC::
+)
+
+foreach(_config gRPCConfig gRPCConfigVersion)
+ configure_file(tools/cmake/${_config}.cmake.in
+ ${_config}.cmake @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_config}.cmake
+ DESTINATION ${CMAKE_INSTALL_CMAKEDIR}
+ )
+endforeach()
diff --git a/INSTALL.md b/INSTALL.md
index 6718aad120..7bdb9b273f 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -55,3 +55,55 @@ gRPC C Core library.
$ make
$ [sudo] make install
```
+
+##Windows
+
+There are several ways to build under Windows, of varying complexity depending
+on experience with the tools involved.
+
+<!--
+###Visual Studio
+
+Versions 2013 and 2015 are both supported. You can use [their respective
+community
+editions](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx).
+
+Building the C Core:
+- Open [grpc.sln](https://github.com/grpc/grpc/blob/master/vsprojects/grpc.sln).
+- Select your build target.
+- Build the `grpc` project.
+
+Building the C++ runtime:
+- You need [CMake](https://cmake.org/) on your path to build protobuf (see below
+ for building using solely CMake).
+- Run `vsprojects/build_protos.bat` (needs `cmake.exe` in your path).
+- Open [buildtests_cxx.sln]()
+- Select your build target.
+- build the `grpc++` project.
+-->
+
+###msys2
+
+This approach requires having [msys2](https://msys2.github.io/) installed.
+
+- The Makefile (and source code) should support msys2's mingw32 and mingw64
+ compilers. Building with msys2's native compiler is also possible, but
+ difficult.
+- The Makefile is expecting the Windows versions of OpenSSL (see
+ https://slproweb.com/products/Win32OpenSSL.html). It's also possible to build
+ the Windows version of OpenSSL from scratch. The output should be `libeay32`
+ and `ssleay32`.
+- If you are not installing the above files under msys2's path, you may specify
+ it, for instance, in the following way:
+ ```CPPFLAGS=â€-I/c/OpenSSL-Win32/include†LDFLAGS=â€-L/c/OpenSSL-Win32/lib†make static_c```
+- [protobuf3](https://github.com/google/protobuf/blob/master/src/README.md#c-installation---windows)
+ must be installed on the msys2 path.
+
+###Cmake (experimental)
+
+- Install [CMake](https://cmake.org/download/).
+- Run it over [grpc's
+ CMakeLists.txt](https://github.com/grpc/grpc/blob/master/CMakeLists.txt) to
+ generate "projects" for your compiler.
+- Build with your compiler of choice. The generated build files should have the
+ protobuf3 dependency baked in.
diff --git a/Makefile b/Makefile
index 5d998a6f55..ff1185792e 100644
--- a/Makefile
+++ b/Makefile
@@ -963,6 +963,7 @@ bad_server_response_test: $(BINDIR)/$(CONFIG)/bad_server_response_test
bin_decoder_test: $(BINDIR)/$(CONFIG)/bin_decoder_test
bin_encoder_test: $(BINDIR)/$(CONFIG)/bin_encoder_test
census_context_test: $(BINDIR)/$(CONFIG)/census_context_test
+census_resource_test: $(BINDIR)/$(CONFIG)/census_resource_test
channel_create_test: $(BINDIR)/$(CONFIG)/channel_create_test
chttp2_hpack_encoder_test: $(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test
chttp2_status_conversion_test: $(BINDIR)/$(CONFIG)/chttp2_status_conversion_test
@@ -1096,6 +1097,7 @@ grpc_objective_c_plugin: $(BINDIR)/$(CONFIG)/grpc_objective_c_plugin
grpc_python_plugin: $(BINDIR)/$(CONFIG)/grpc_python_plugin
grpc_ruby_plugin: $(BINDIR)/$(CONFIG)/grpc_ruby_plugin
grpclb_api_test: $(BINDIR)/$(CONFIG)/grpclb_api_test
+grpclb_test: $(BINDIR)/$(CONFIG)/grpclb_test
hybrid_end2end_test: $(BINDIR)/$(CONFIG)/hybrid_end2end_test
interop_client: $(BINDIR)/$(CONFIG)/interop_client
interop_server: $(BINDIR)/$(CONFIG)/interop_server
@@ -1180,7 +1182,7 @@ h2_fd_test: $(BINDIR)/$(CONFIG)/h2_fd_test
h2_full_test: $(BINDIR)/$(CONFIG)/h2_full_test
h2_full+pipe_test: $(BINDIR)/$(CONFIG)/h2_full+pipe_test
h2_full+trace_test: $(BINDIR)/$(CONFIG)/h2_full+trace_test
-h2_loadreporting_test: $(BINDIR)/$(CONFIG)/h2_loadreporting_test
+h2_load_reporting_test: $(BINDIR)/$(CONFIG)/h2_load_reporting_test
h2_oauth2_test: $(BINDIR)/$(CONFIG)/h2_oauth2_test
h2_proxy_test: $(BINDIR)/$(CONFIG)/h2_proxy_test
h2_sockpair_test: $(BINDIR)/$(CONFIG)/h2_sockpair_test
@@ -1196,7 +1198,7 @@ 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
h2_full+trace_nosec_test: $(BINDIR)/$(CONFIG)/h2_full+trace_nosec_test
-h2_loadreporting_nosec_test: $(BINDIR)/$(CONFIG)/h2_loadreporting_nosec_test
+h2_load_reporting_nosec_test: $(BINDIR)/$(CONFIG)/h2_load_reporting_nosec_test
h2_proxy_nosec_test: $(BINDIR)/$(CONFIG)/h2_proxy_nosec_test
h2_sockpair_nosec_test: $(BINDIR)/$(CONFIG)/h2_sockpair_nosec_test
h2_sockpair+trace_nosec_test: $(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test
@@ -1277,9 +1279,9 @@ pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc
pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc
ifeq ($(EMBED_OPENSSL),true)
-privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a
+privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a
else
-privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a
+privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection_codegen.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a
endif
@@ -1294,6 +1296,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/bin_decoder_test \
$(BINDIR)/$(CONFIG)/bin_encoder_test \
$(BINDIR)/$(CONFIG)/census_context_test \
+ $(BINDIR)/$(CONFIG)/census_resource_test \
$(BINDIR)/$(CONFIG)/channel_create_test \
$(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test \
$(BINDIR)/$(CONFIG)/chttp2_status_conversion_test \
@@ -1409,7 +1412,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/h2_full_test \
$(BINDIR)/$(CONFIG)/h2_full+pipe_test \
$(BINDIR)/$(CONFIG)/h2_full+trace_test \
- $(BINDIR)/$(CONFIG)/h2_loadreporting_test \
+ $(BINDIR)/$(CONFIG)/h2_load_reporting_test \
$(BINDIR)/$(CONFIG)/h2_oauth2_test \
$(BINDIR)/$(CONFIG)/h2_proxy_test \
$(BINDIR)/$(CONFIG)/h2_sockpair_test \
@@ -1425,7 +1428,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/h2_full_nosec_test \
$(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test \
$(BINDIR)/$(CONFIG)/h2_full+trace_nosec_test \
- $(BINDIR)/$(CONFIG)/h2_loadreporting_nosec_test \
+ $(BINDIR)/$(CONFIG)/h2_load_reporting_nosec_test \
$(BINDIR)/$(CONFIG)/h2_proxy_nosec_test \
$(BINDIR)/$(CONFIG)/h2_sockpair_nosec_test \
$(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test \
@@ -1464,6 +1467,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/golden_file_test \
$(BINDIR)/$(CONFIG)/grpc_cli \
$(BINDIR)/$(CONFIG)/grpclb_api_test \
+ $(BINDIR)/$(CONFIG)/grpclb_test \
$(BINDIR)/$(CONFIG)/hybrid_end2end_test \
$(BINDIR)/$(CONFIG)/interop_client \
$(BINDIR)/$(CONFIG)/interop_server \
@@ -1548,6 +1552,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/golden_file_test \
$(BINDIR)/$(CONFIG)/grpc_cli \
$(BINDIR)/$(CONFIG)/grpclb_api_test \
+ $(BINDIR)/$(CONFIG)/grpclb_test \
$(BINDIR)/$(CONFIG)/hybrid_end2end_test \
$(BINDIR)/$(CONFIG)/interop_client \
$(BINDIR)/$(CONFIG)/interop_server \
@@ -1597,6 +1602,8 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/bin_encoder_test || ( echo test bin_encoder_test failed ; exit 1 )
$(E) "[RUN] Testing census_context_test"
$(Q) $(BINDIR)/$(CONFIG)/census_context_test || ( echo test census_context_test failed ; exit 1 )
+ $(E) "[RUN] Testing census_resource_test"
+ $(Q) $(BINDIR)/$(CONFIG)/census_resource_test || ( echo test census_resource_test failed ; exit 1 )
$(E) "[RUN] Testing channel_create_test"
$(Q) $(BINDIR)/$(CONFIG)/channel_create_test || ( echo test channel_create_test failed ; exit 1 )
$(E) "[RUN] Testing chttp2_hpack_encoder_test"
@@ -1835,6 +1842,8 @@ test_cxx: buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/golden_file_test || ( echo test golden_file_test failed ; exit 1 )
$(E) "[RUN] Testing grpclb_api_test"
$(Q) $(BINDIR)/$(CONFIG)/grpclb_api_test || ( echo test grpclb_api_test failed ; exit 1 )
+ $(E) "[RUN] Testing grpclb_test"
+ $(Q) $(BINDIR)/$(CONFIG)/grpclb_test || ( echo test grpclb_test failed ; exit 1 )
$(E) "[RUN] Testing hybrid_end2end_test"
$(Q) $(BINDIR)/$(CONFIG)/hybrid_end2end_test || ( echo test hybrid_end2end_test failed ; exit 1 )
$(E) "[RUN] Testing interop_test"
@@ -2664,6 +2673,7 @@ LIBGRPC_SRC = \
src/core/lib/transport/metadata.c \
src/core/lib/transport/metadata_batch.c \
src/core/lib/transport/static_metadata.c \
+ src/core/lib/transport/timeout_encoding.c \
src/core/lib/transport/transport.c \
src/core/lib/transport/transport_op_string.c \
src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c \
@@ -2686,7 +2696,6 @@ LIBGRPC_SRC = \
src/core/ext/transport/chttp2/transport/status_conversion.c \
src/core/ext/transport/chttp2/transport/stream_lists.c \
src/core/ext/transport/chttp2/transport/stream_map.c \
- src/core/ext/transport/chttp2/transport/timeout_encoding.c \
src/core/ext/transport/chttp2/transport/varint.c \
src/core/ext/transport/chttp2/transport/writing.c \
src/core/ext/transport/chttp2/alpn/alpn.c \
@@ -2742,6 +2751,7 @@ LIBGRPC_SRC = \
src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \
src/core/ext/transport/chttp2/client/insecure/channel_create.c \
src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \
+ src/core/ext/lb_policy/grpclb/grpclb.c \
src/core/ext/lb_policy/grpclb/load_balancer_api.c \
src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
third_party/nanopb/pb_common.c \
@@ -2755,6 +2765,7 @@ LIBGRPC_SRC = \
src/core/ext/load_reporting/load_reporting.c \
src/core/ext/load_reporting/load_reporting_filter.c \
src/core/ext/c-ares/wrapper.c \
+ src/core/ext/census/base_resources.c \
src/core/ext/census/context.c \
src/core/ext/census/gen/census.pb.c \
src/core/ext/census/grpc_context.c \
@@ -2764,6 +2775,7 @@ LIBGRPC_SRC = \
src/core/ext/census/mlog.c \
src/core/ext/census/operation.c \
src/core/ext/census/placeholders.c \
+ src/core/ext/census/resource.c \
src/core/ext/census/tracing.c \
src/core/plugin_registry/grpc_plugin_registry.c \
@@ -2939,6 +2951,7 @@ LIBGRPC_CRONET_SRC = \
src/core/lib/transport/metadata.c \
src/core/lib/transport/metadata_batch.c \
src/core/lib/transport/static_metadata.c \
+ src/core/lib/transport/timeout_encoding.c \
src/core/lib/transport/transport.c \
src/core/lib/transport/transport_op_string.c \
src/core/ext/transport/cronet/client/secure/cronet_channel_create.c \
@@ -2964,7 +2977,6 @@ LIBGRPC_CRONET_SRC = \
src/core/ext/transport/chttp2/transport/status_conversion.c \
src/core/ext/transport/chttp2/transport/stream_lists.c \
src/core/ext/transport/chttp2/transport/stream_map.c \
- src/core/ext/transport/chttp2/transport/timeout_encoding.c \
src/core/ext/transport/chttp2/transport/varint.c \
src/core/ext/transport/chttp2/transport/writing.c \
src/core/ext/transport/chttp2/alpn/alpn.c \
@@ -3119,8 +3131,124 @@ LIBGRPC_TEST_UTIL_SRC = \
test/core/util/port_server_client.c \
test/core/util/port_windows.c \
test/core/util/slice_splitter.c \
+ src/core/lib/channel/channel_args.c \
+ src/core/lib/channel/channel_stack.c \
+ src/core/lib/channel/channel_stack_builder.c \
+ src/core/lib/channel/compress_filter.c \
+ src/core/lib/channel/connected_channel.c \
+ src/core/lib/channel/handshaker.c \
+ src/core/lib/channel/http_client_filter.c \
+ src/core/lib/channel/http_server_filter.c \
+ src/core/lib/compression/compression.c \
+ src/core/lib/compression/message_compress.c \
+ src/core/lib/debug/trace.c \
+ src/core/lib/http/format_request.c \
+ src/core/lib/http/httpcli.c \
+ src/core/lib/http/parser.c \
+ src/core/lib/iomgr/closure.c \
+ src/core/lib/iomgr/endpoint.c \
+ src/core/lib/iomgr/endpoint_pair_posix.c \
+ src/core/lib/iomgr/endpoint_pair_windows.c \
+ src/core/lib/iomgr/error.c \
+ src/core/lib/iomgr/ev_epoll_linux.c \
+ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \
+ src/core/lib/iomgr/ev_poll_posix.c \
+ src/core/lib/iomgr/ev_posix.c \
+ src/core/lib/iomgr/exec_ctx.c \
+ src/core/lib/iomgr/executor.c \
+ src/core/lib/iomgr/iocp_windows.c \
+ src/core/lib/iomgr/iomgr.c \
+ src/core/lib/iomgr/iomgr_posix.c \
+ src/core/lib/iomgr/iomgr_windows.c \
+ src/core/lib/iomgr/load_file.c \
+ src/core/lib/iomgr/network_status_tracker.c \
+ src/core/lib/iomgr/polling_entity.c \
+ src/core/lib/iomgr/pollset_set_windows.c \
+ src/core/lib/iomgr/pollset_windows.c \
+ src/core/lib/iomgr/resolve_address_posix.c \
+ src/core/lib/iomgr/resolve_address_windows.c \
+ src/core/lib/iomgr/sockaddr_utils.c \
+ src/core/lib/iomgr/socket_utils_common_posix.c \
+ src/core/lib/iomgr/socket_utils_linux.c \
+ src/core/lib/iomgr/socket_utils_posix.c \
+ src/core/lib/iomgr/socket_windows.c \
+ src/core/lib/iomgr/tcp_client_posix.c \
+ src/core/lib/iomgr/tcp_client_windows.c \
+ src/core/lib/iomgr/tcp_posix.c \
+ src/core/lib/iomgr/tcp_server_posix.c \
+ src/core/lib/iomgr/tcp_server_windows.c \
+ src/core/lib/iomgr/tcp_windows.c \
+ src/core/lib/iomgr/time_averaged_stats.c \
+ src/core/lib/iomgr/timer.c \
+ src/core/lib/iomgr/timer_heap.c \
+ src/core/lib/iomgr/udp_server.c \
+ src/core/lib/iomgr/unix_sockets_posix.c \
+ src/core/lib/iomgr/unix_sockets_posix_noop.c \
+ src/core/lib/iomgr/wakeup_fd_eventfd.c \
+ src/core/lib/iomgr/wakeup_fd_nospecial.c \
+ src/core/lib/iomgr/wakeup_fd_pipe.c \
+ src/core/lib/iomgr/wakeup_fd_posix.c \
+ src/core/lib/iomgr/workqueue_posix.c \
+ src/core/lib/iomgr/workqueue_windows.c \
+ src/core/lib/json/json.c \
+ src/core/lib/json/json_reader.c \
+ src/core/lib/json/json_string.c \
+ src/core/lib/json/json_writer.c \
+ src/core/lib/surface/alarm.c \
+ src/core/lib/surface/api_trace.c \
+ src/core/lib/surface/byte_buffer.c \
+ src/core/lib/surface/byte_buffer_reader.c \
+ src/core/lib/surface/call.c \
+ src/core/lib/surface/call_details.c \
+ src/core/lib/surface/call_log_batch.c \
+ src/core/lib/surface/channel.c \
+ src/core/lib/surface/channel_init.c \
+ src/core/lib/surface/channel_ping.c \
+ src/core/lib/surface/channel_stack_type.c \
+ src/core/lib/surface/completion_queue.c \
+ src/core/lib/surface/event_string.c \
+ src/core/lib/surface/lame_client.c \
+ src/core/lib/surface/metadata_array.c \
+ src/core/lib/surface/server.c \
+ src/core/lib/surface/validate_metadata.c \
+ src/core/lib/surface/version.c \
+ src/core/lib/transport/byte_stream.c \
+ src/core/lib/transport/connectivity_state.c \
+ src/core/lib/transport/metadata.c \
+ src/core/lib/transport/metadata_batch.c \
+ src/core/lib/transport/static_metadata.c \
+ src/core/lib/transport/timeout_encoding.c \
+ src/core/lib/transport/transport.c \
+ src/core/lib/transport/transport_op_string.c \
PUBLIC_HEADERS_C += \
+ include/grpc/byte_buffer.h \
+ include/grpc/byte_buffer_reader.h \
+ include/grpc/compression.h \
+ include/grpc/grpc.h \
+ include/grpc/grpc_posix.h \
+ include/grpc/status.h \
+ include/grpc/impl/codegen/byte_buffer.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/alloc.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/log.h \
+ include/grpc/impl/codegen/port_platform.h \
+ include/grpc/impl/codegen/slice.h \
+ include/grpc/impl/codegen/slice_buffer.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/time.h \
LIBGRPC_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_TEST_UTIL_SRC))))
@@ -3281,6 +3409,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/transport/metadata.c \
src/core/lib/transport/metadata_batch.c \
src/core/lib/transport/static_metadata.c \
+ src/core/lib/transport/timeout_encoding.c \
src/core/lib/transport/transport.c \
src/core/lib/transport/transport_op_string.c \
src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
@@ -3304,7 +3433,6 @@ LIBGRPC_UNSECURE_SRC = \
src/core/ext/transport/chttp2/transport/status_conversion.c \
src/core/ext/transport/chttp2/transport/stream_lists.c \
src/core/ext/transport/chttp2/transport/stream_map.c \
- src/core/ext/transport/chttp2/transport/timeout_encoding.c \
src/core/ext/transport/chttp2/transport/varint.c \
src/core/ext/transport/chttp2/transport/writing.c \
src/core/ext/transport/chttp2/alpn/alpn.c \
@@ -3334,6 +3462,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/ext/resolver/sockaddr/sockaddr_resolver.c \
src/core/ext/load_reporting/load_reporting.c \
src/core/ext/load_reporting/load_reporting_filter.c \
+ src/core/ext/lb_policy/grpclb/grpclb.c \
src/core/ext/lb_policy/grpclb/load_balancer_api.c \
src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
third_party/nanopb/pb_common.c \
@@ -3341,6 +3470,7 @@ LIBGRPC_UNSECURE_SRC = \
third_party/nanopb/pb_encode.c \
src/core/ext/lb_policy/pick_first/pick_first.c \
src/core/ext/lb_policy/round_robin/round_robin.c \
+ src/core/ext/census/base_resources.c \
src/core/ext/census/context.c \
src/core/ext/census/gen/census.pb.c \
src/core/ext/census/grpc_context.c \
@@ -3350,6 +3480,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/ext/census/mlog.c \
src/core/ext/census/operation.c \
src/core/ext/census/placeholders.c \
+ src/core/ext/census/resource.c \
src/core/ext/census/tracing.c \
src/core/plugin_registry/grpc_unsecure_plugin_registry.c \
@@ -4466,7 +4597,7 @@ endif
endif
-LIBINTEROP_SERVER_MAIN_SRC = \
+LIBINTEROP_SERVER_LIB_SRC = \
$(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 \
@@ -4474,6 +4605,56 @@ LIBINTEROP_SERVER_MAIN_SRC = \
PUBLIC_HEADERS_CXX += \
+LIBINTEROP_SERVER_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBINTEROP_SERVER_LIB_SRC))))
+
+
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure libraries if you don't have OpenSSL.
+
+$(LIBDIR)/$(CONFIG)/libinterop_server_lib.a: openssl_dep_error
+
+
+else
+
+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)/libinterop_server_lib.a: protobuf_dep_error
+
+
+else
+
+$(LIBDIR)/$(CONFIG)/libinterop_server_lib.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBINTEROP_SERVER_LIB_OBJS)
+ $(E) "[AR] Creating $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) rm -f $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a
+ $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBINTEROP_SERVER_LIB_OBJS)
+ifeq ($(SYSTEM),Darwin)
+ $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a
+endif
+
+
+
+
+endif
+
+endif
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(LIBINTEROP_SERVER_LIB_OBJS:.o=.dep)
+endif
+endif
+$(OBJDIR)/$(CONFIG)/test/cpp/interop/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
+
+
+LIBINTEROP_SERVER_MAIN_SRC = \
+ test/cpp/interop/interop_server_bootstrap.cc \
+
+PUBLIC_HEADERS_CXX += \
+
LIBINTEROP_SERVER_MAIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBINTEROP_SERVER_MAIN_SRC))))
@@ -4516,7 +4697,6 @@ ifneq ($(NO_DEPS),true)
-include $(LIBINTEROP_SERVER_MAIN_OBJS:.o=.dep)
endif
endif
-$(OBJDIR)/$(CONFIG)/test/cpp/interop/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
LIBQPS_SRC = \
@@ -6460,6 +6640,7 @@ LIBEND2END_TESTS_SRC = \
test/core/end2end/tests/default_host.c \
test/core/end2end/tests/disappearing_server.c \
test/core/end2end/tests/empty_batch.c \
+ test/core/end2end/tests/filter_call_init_fails.c \
test/core/end2end/tests/filter_causes_close.c \
test/core/end2end/tests/graceful_server_shutdown.c \
test/core/end2end/tests/high_initial_seqno.c \
@@ -6467,6 +6648,7 @@ LIBEND2END_TESTS_SRC = \
test/core/end2end/tests/idempotent_request.c \
test/core/end2end/tests/invoke_large_request.c \
test/core/end2end/tests/large_metadata.c \
+ test/core/end2end/tests/load_reporting_hook.c \
test/core/end2end/tests/max_concurrent_streams.c \
test/core/end2end/tests/max_message_length.c \
test/core/end2end/tests/negative_deadline.c \
@@ -6538,6 +6720,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \
test/core/end2end/tests/default_host.c \
test/core/end2end/tests/disappearing_server.c \
test/core/end2end/tests/empty_batch.c \
+ test/core/end2end/tests/filter_call_init_fails.c \
test/core/end2end/tests/filter_causes_close.c \
test/core/end2end/tests/graceful_server_shutdown.c \
test/core/end2end/tests/high_initial_seqno.c \
@@ -6545,6 +6728,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \
test/core/end2end/tests/idempotent_request.c \
test/core/end2end/tests/invoke_large_request.c \
test/core/end2end/tests/large_metadata.c \
+ test/core/end2end/tests/load_reporting_hook.c \
test/core/end2end/tests/max_concurrent_streams.c \
test/core/end2end/tests/max_message_length.c \
test/core/end2end/tests/negative_deadline.c \
@@ -6879,6 +7063,38 @@ endif
endif
+CENSUS_RESOURCE_TEST_SRC = \
+ test/core/census/resource_test.c \
+
+CENSUS_RESOURCE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_RESOURCE_TEST_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/census_resource_test: openssl_dep_error
+
+else
+
+
+
+$(BINDIR)/$(CONFIG)/census_resource_test: $(CENSUS_RESOURCE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(CARES_DEP)
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LD) $(LDFLAGS) $(CENSUS_RESOURCE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS_CARES) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/census_resource_test
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/core/census/resource_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+deps_census_resource_test: $(CENSUS_RESOURCE_TEST_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(CENSUS_RESOURCE_TEST_OBJS:.o=.dep)
+endif
+endif
+
+
CHANNEL_CREATE_TEST_SRC = \
test/core/surface/channel_create_test.c \
@@ -10048,7 +10264,7 @@ endif
TIMEOUT_ENCODING_TEST_SRC = \
- test/core/transport/chttp2/timeout_encoding_test.c \
+ test/core/transport/timeout_encoding_test.c \
TIMEOUT_ENCODING_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(TIMEOUT_ENCODING_TEST_SRC))))
ifeq ($(NO_SECURE),true)
@@ -10068,7 +10284,7 @@ $(BINDIR)/$(CONFIG)/timeout_encoding_test: $(TIMEOUT_ENCODING_TEST_OBJS) $(LIBDI
endif
-$(OBJDIR)/$(CONFIG)/test/core/transport/chttp2/timeout_encoding_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+$(OBJDIR)/$(CONFIG)/test/core/transport/timeout_encoding_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_timeout_encoding_test: $(TIMEOUT_ENCODING_TEST_OBJS:.o=.dep)
@@ -11382,6 +11598,53 @@ endif
$(OBJDIR)/$(CONFIG)/test/cpp/grpclb/grpclb_api_test.o: $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc
+GRPCLB_TEST_SRC = \
+ $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc \
+ test/cpp/grpclb/grpclb_test.cc \
+
+GRPCLB_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPCLB_TEST_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/grpclb_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)/grpclb_test: protobuf_dep_error
+
+else
+
+$(BINDIR)/$(CONFIG)/grpclb_test: $(PROTOBUF_DEP) $(GRPCLB_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(CARES_DEP)
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LDXX) $(LDFLAGS) $(GRPCLB_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LDLIBS_CARES) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/grpclb_test
+
+endif
+
+endif
+
+$(OBJDIR)/$(CONFIG)/src/proto/grpc/lb/v1/load_balancer.o: $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a
+
+$(OBJDIR)/$(CONFIG)/test/cpp/grpclb/grpclb_test.o: $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a
+
+deps_grpclb_test: $(GRPCLB_TEST_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(GRPCLB_TEST_OBJS:.o=.dep)
+endif
+endif
+$(OBJDIR)/$(CONFIG)/test/cpp/grpclb/grpclb_test.o: $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc
+
+
HYBRID_END2END_TEST_SRC = \
test/cpp/end2end/hybrid_end2end_test.cc \
@@ -11475,10 +11738,10 @@ $(BINDIR)/$(CONFIG)/interop_server: protobuf_dep_error
else
-$(BINDIR)/$(CONFIG)/interop_server: $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.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 $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(CARES_DEP)
+$(BINDIR)/$(CONFIG)/interop_server: $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.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 $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(CARES_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LDXX) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.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 $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBS_CARES) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/interop_server
+ $(Q) $(LDXX) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.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 $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBS_CARES) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/interop_server
endif
@@ -14056,34 +14319,34 @@ endif
endif
-H2_LOADREPORTING_TEST_SRC = \
- test/core/end2end/fixtures/h2_loadreporting.c \
+H2_LOAD_REPORTING_TEST_SRC = \
+ test/core/end2end/fixtures/h2_load_reporting.c \
-H2_LOADREPORTING_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_LOADREPORTING_TEST_SRC))))
+H2_LOAD_REPORTING_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_LOAD_REPORTING_TEST_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
-$(BINDIR)/$(CONFIG)/h2_loadreporting_test: openssl_dep_error
+$(BINDIR)/$(CONFIG)/h2_load_reporting_test: openssl_dep_error
else
-$(BINDIR)/$(CONFIG)/h2_loadreporting_test: $(H2_LOADREPORTING_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 $(CARES_DEP)
+$(BINDIR)/$(CONFIG)/h2_load_reporting_test: $(H2_LOAD_REPORTING_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 $(CARES_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LD) $(LDFLAGS) $(H2_LOADREPORTING_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_CARES) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_loadreporting_test
+ $(Q) $(LD) $(LDFLAGS) $(H2_LOAD_REPORTING_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_CARES) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_load_reporting_test
endif
-$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_loadreporting.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
+$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_load_reporting.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_loadreporting_test: $(H2_LOADREPORTING_TEST_OBJS:.o=.dep)
+deps_h2_load_reporting_test: $(H2_LOAD_REPORTING_TEST_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
--include $(H2_LOADREPORTING_TEST_OBJS:.o=.dep)
+-include $(H2_LOAD_REPORTING_TEST_OBJS:.o=.dep)
endif
endif
@@ -14496,23 +14759,23 @@ ifneq ($(NO_DEPS),true)
endif
-H2_LOADREPORTING_NOSEC_TEST_SRC = \
- test/core/end2end/fixtures/h2_loadreporting.c \
+H2_LOAD_REPORTING_NOSEC_TEST_SRC = \
+ test/core/end2end/fixtures/h2_load_reporting.c \
-H2_LOADREPORTING_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_LOADREPORTING_NOSEC_TEST_SRC))))
+H2_LOAD_REPORTING_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_LOAD_REPORTING_NOSEC_TEST_SRC))))
-$(BINDIR)/$(CONFIG)/h2_loadreporting_nosec_test: $(H2_LOADREPORTING_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 $(CARES_DEP)
+$(BINDIR)/$(CONFIG)/h2_load_reporting_nosec_test: $(H2_LOAD_REPORTING_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 $(CARES_DEP)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
- $(Q) $(LD) $(LDFLAGS) $(H2_LOADREPORTING_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_CARES) $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_loadreporting_nosec_test
+ $(Q) $(LD) $(LDFLAGS) $(H2_LOAD_REPORTING_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_CARES) $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_load_reporting_nosec_test
-$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_loadreporting.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
+$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_load_reporting.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_loadreporting_nosec_test: $(H2_LOADREPORTING_NOSEC_TEST_OBJS:.o=.dep)
+deps_h2_load_reporting_nosec_test: $(H2_LOAD_REPORTING_NOSEC_TEST_OBJS:.o=.dep)
ifneq ($(NO_DEPS),true)
--include $(H2_LOADREPORTING_NOSEC_TEST_OBJS:.o=.dep)
+-include $(H2_LOAD_REPORTING_NOSEC_TEST_OBJS:.o=.dep)
endif
@@ -15037,6 +15300,7 @@ test/cpp/interop/client.cc: $(OPENSSL_DEP)
test/cpp/interop/client_helper.cc: $(OPENSSL_DEP)
test/cpp/interop/interop_client.cc: $(OPENSSL_DEP)
test/cpp/interop/interop_server.cc: $(OPENSSL_DEP)
+test/cpp/interop/interop_server_bootstrap.cc: $(OPENSSL_DEP)
test/cpp/interop/server_helper.cc: $(OPENSSL_DEP)
test/cpp/qps/client_async.cc: $(OPENSSL_DEP)
test/cpp/qps/client_sync.cc: $(OPENSSL_DEP)
diff --git a/binding.gyp b/binding.gyp
index d47441b07a..620a5b4b83 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -649,6 +649,7 @@
'src/core/lib/transport/metadata.c',
'src/core/lib/transport/metadata_batch.c',
'src/core/lib/transport/static_metadata.c',
+ 'src/core/lib/transport/timeout_encoding.c',
'src/core/lib/transport/transport.c',
'src/core/lib/transport/transport_op_string.c',
'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c',
@@ -671,7 +672,6 @@
'src/core/ext/transport/chttp2/transport/status_conversion.c',
'src/core/ext/transport/chttp2/transport/stream_lists.c',
'src/core/ext/transport/chttp2/transport/stream_map.c',
- 'src/core/ext/transport/chttp2/transport/timeout_encoding.c',
'src/core/ext/transport/chttp2/transport/varint.c',
'src/core/ext/transport/chttp2/transport/writing.c',
'src/core/ext/transport/chttp2/alpn/alpn.c',
@@ -727,6 +727,7 @@
'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c',
+ 'src/core/ext/lb_policy/grpclb/grpclb.c',
'src/core/ext/lb_policy/grpclb/load_balancer_api.c',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'third_party/nanopb/pb_common.c',
@@ -740,6 +741,7 @@
'src/core/ext/load_reporting/load_reporting.c',
'src/core/ext/load_reporting/load_reporting_filter.c',
'src/core/ext/c-ares/wrapper.c',
+ 'src/core/ext/census/base_resources.c',
'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/grpc_context.c',
@@ -749,6 +751,7 @@
'src/core/ext/census/mlog.c',
'src/core/ext/census/operation.c',
'src/core/ext/census/placeholders.c',
+ 'src/core/ext/census/resource.c',
'src/core/ext/census/tracing.c',
'src/core/plugin_registry/grpc_plugin_registry.c',
],
diff --git a/build.yaml b/build.yaml
index 322a204806..82ccbf8236 100644
--- a/build.yaml
+++ b/build.yaml
@@ -17,13 +17,16 @@ filegroups:
- include/grpc/census.h
headers:
- src/core/ext/census/aggregation.h
+ - src/core/ext/census/base_resources.h
- src/core/ext/census/census_interface.h
- src/core/ext/census/census_rpc_stats.h
- src/core/ext/census/gen/census.pb.h
- src/core/ext/census/grpc_filter.h
- src/core/ext/census/mlog.h
+ - src/core/ext/census/resource.h
- src/core/ext/census/rpc_metric_id.h
src:
+ - src/core/ext/census/base_resources.c
- src/core/ext/census/context.c
- src/core/ext/census/gen/census.pb.c
- src/core/ext/census/grpc_context.c
@@ -33,6 +36,7 @@ filegroups:
- src/core/ext/census/mlog.c
- src/core/ext/census/operation.c
- src/core/ext/census/placeholders.c
+ - src/core/ext/census/resource.c
- src/core/ext/census/tracing.c
plugin: census_grpc_plugin
uses:
@@ -230,6 +234,7 @@ filegroups:
- src/core/lib/transport/metadata.h
- src/core/lib/transport/metadata_batch.h
- src/core/lib/transport/static_metadata.h
+ - src/core/lib/transport/timeout_encoding.h
- src/core/lib/transport/transport.h
- src/core/lib/transport/transport_impl.h
src:
@@ -319,6 +324,7 @@ filegroups:
- src/core/lib/transport/metadata.c
- src/core/lib/transport/metadata_batch.c
- src/core/lib/transport/static_metadata.c
+ - src/core/lib/transport/timeout_encoding.c
- src/core/lib/transport/transport.c
- src/core/lib/transport/transport_op_string.c
deps:
@@ -379,11 +385,14 @@ filegroups:
- gpr_codegen
- name: grpc_lb_policy_grpclb
headers:
+ - src/core/ext/lb_policy/grpclb/grpclb.h
- src/core/ext/lb_policy/grpclb/load_balancer_api.h
- src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h
src:
+ - src/core/ext/lb_policy/grpclb/grpclb.c
- src/core/ext/lb_policy/grpclb/load_balancer_api.c
- src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
+ plugin: grpc_lb_policy_grpclb
uses:
- grpc_base
- grpc_client_config
@@ -542,7 +551,6 @@ filegroups:
- src/core/ext/transport/chttp2/transport/internal.h
- src/core/ext/transport/chttp2/transport/status_conversion.h
- src/core/ext/transport/chttp2/transport/stream_map.h
- - src/core/ext/transport/chttp2/transport/timeout_encoding.h
- src/core/ext/transport/chttp2/transport/varint.h
src:
- src/core/ext/transport/chttp2/transport/bin_decoder.c
@@ -564,7 +572,6 @@ filegroups:
- src/core/ext/transport/chttp2/transport/status_conversion.c
- src/core/ext/transport/chttp2/transport/stream_lists.c
- src/core/ext/transport/chttp2/transport/stream_map.c
- - src/core/ext/transport/chttp2/transport/timeout_encoding.c
- src/core/ext/transport/chttp2/transport/varint.c
- src/core/ext/transport/chttp2/transport/writing.c
plugin: grpc_chttp2_plugin
@@ -830,6 +837,7 @@ libs:
- grpc_lb_policy_pick_first
- grpc_lb_policy_round_robin
- grpc_resolver_dns_ares
+ - grpc_lb_policy_grpclb
- grpc_resolver_sockaddr
- grpc_load_reporting
- cares_wrapper
@@ -896,6 +904,7 @@ libs:
- grpc
filegroups:
- grpc_test_util_base
+ - grpc_base
vs_project_guid: '{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}'
- name: grpc_test_util_unsecure
build: private
@@ -927,6 +936,7 @@ libs:
- grpc_lb_policy_grpclb
- grpc_lb_policy_pick_first
- grpc_lb_policy_round_robin
+ - grpc_lb_policy_grpclb
- census
generate_plugin_registry: true
secure: false
@@ -1144,7 +1154,7 @@ libs:
- grpc++
- grpc
- gpr
-- name: interop_server_main
+- name: interop_server_lib
build: private
language: c++
src:
@@ -1161,6 +1171,13 @@ libs:
- gpr_test_util
- gpr
- grpc++_test_config
+- name: interop_server_main
+ build: private
+ language: c++
+ src:
+ - test/cpp/interop/interop_server_bootstrap.cc
+ deps:
+ - interop_server_lib
- name: qps
build: private
language: c++
@@ -1309,6 +1326,16 @@ targets:
- grpc
- gpr_test_util
- gpr
+- name: census_resource_test
+ build: test
+ language: c
+ src:
+ - test/core/census/resource_test.c
+ deps:
+ - grpc_test_util
+ - grpc
+ - gpr_test_util
+ - gpr
- name: channel_create_test
build: test
language: c
@@ -2363,7 +2390,7 @@ targets:
build: test
language: c
src:
- - test/core/transport/chttp2/timeout_encoding_test.c
+ - test/core/transport/timeout_encoding_test.c
deps:
- grpc_test_util
- grpc
@@ -2764,6 +2791,20 @@ targets:
- grpc_test_util
- grpc++
- grpc
+- name: grpclb_test
+ gtest: false
+ build: test
+ language: c++
+ src:
+ - src/proto/grpc/lb/v1/load_balancer.proto
+ - test/cpp/grpclb/grpclb_test.cc
+ deps:
+ - gpr
+ - gpr_test_util
+ - grpc
+ - grpc++
+ - grpc++_test_util
+ - grpc_test_util
- name: hybrid_end2end_test
gtest: true
build: test
@@ -2804,6 +2845,7 @@ targets:
deps:
- interop_server_main
- interop_server_helper
+ - interop_server_lib
- grpc++_test_util
- grpc_test_util
- grpc++
diff --git a/config.m4 b/config.m4
index 814fc535e6..a02fa6d927 100644
--- a/config.m4
+++ b/config.m4
@@ -168,6 +168,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/transport/metadata.c \
src/core/lib/transport/metadata_batch.c \
src/core/lib/transport/static_metadata.c \
+ src/core/lib/transport/timeout_encoding.c \
src/core/lib/transport/transport.c \
src/core/lib/transport/transport_op_string.c \
src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c \
@@ -190,7 +191,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/transport/chttp2/transport/status_conversion.c \
src/core/ext/transport/chttp2/transport/stream_lists.c \
src/core/ext/transport/chttp2/transport/stream_map.c \
- src/core/ext/transport/chttp2/transport/timeout_encoding.c \
src/core/ext/transport/chttp2/transport/varint.c \
src/core/ext/transport/chttp2/transport/writing.c \
src/core/ext/transport/chttp2/alpn/alpn.c \
@@ -246,6 +246,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \
src/core/ext/transport/chttp2/client/insecure/channel_create.c \
src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \
+ src/core/ext/lb_policy/grpclb/grpclb.c \
src/core/ext/lb_policy/grpclb/load_balancer_api.c \
src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
third_party/nanopb/pb_common.c \
@@ -259,6 +260,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/load_reporting/load_reporting.c \
src/core/ext/load_reporting/load_reporting_filter.c \
src/core/ext/c-ares/wrapper.c \
+ src/core/ext/census/base_resources.c \
src/core/ext/census/context.c \
src/core/ext/census/gen/census.pb.c \
src/core/ext/census/grpc_context.c \
@@ -268,6 +270,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/census/mlog.c \
src/core/ext/census/operation.c \
src/core/ext/census/placeholders.c \
+ src/core/ext/census/resource.c \
src/core/ext/census/tracing.c \
src/core/plugin_registry/grpc_plugin_registry.c \
src/boringssl/err_data.c \
diff --git a/examples/cpp/helloworld/CMakeLists.txt b/examples/cpp/helloworld/CMakeLists.txt
new file mode 100644
index 0000000000..8f098c91a6
--- /dev/null
+++ b/examples/cpp/helloworld/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Minimum CMake required
+cmake_minimum_required(VERSION 2.8)
+
+# Project
+project(HelloWorld CXX)
+
+# Protobuf
+set(protobuf_MODULE_COMPATIBLE TRUE)
+find_package(protobuf CONFIG REQUIRED)
+message(STATUS "Using protobuf ${protobuf_VERSION}")
+
+# gRPC
+find_package(gRPC CONFIG REQUIRED)
+message(STATUS "Using gRPC ${gRPC_VERSION}")
+
+# gRPC C++ plugin
+get_target_property(gRPC_CPP_PLUGIN_EXECUTABLE gRPC::grpc_cpp_plugin
+ IMPORTED_LOCATION_RELEASE)
+
+# Proto file
+get_filename_component(hw_proto "../../protos/helloworld.proto" ABSOLUTE)
+get_filename_component(hw_proto_path "${hw_proto}" PATH)
+
+# Generated sources
+protobuf_generate_cpp(hw_proto_srcs hw_proto_hdrs "${hw_proto}")
+set(hw_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.cc")
+set(hw_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.h")
+add_custom_command(
+ OUTPUT "${hw_grpc_srcs}" "${hw_grpc_hdrs}"
+ COMMAND protobuf::protoc
+ ARGS --grpc_out "${CMAKE_CURRENT_BINARY_DIR}" -I "${hw_proto_path}"
+ --plugin=protoc-gen-grpc="${gRPC_CPP_PLUGIN_EXECUTABLE}"
+ "${hw_proto}"
+ DEPENDS "${hw_proto}")
+
+# Generated include directory
+include_directories("${CMAKE_CURRENT_BINARY_DIR}")
+
+# Targets greeter_[async_](client|server)
+foreach(_target
+ greeter_client greeter_server
+ greeter_async_client greeter_async_server)
+ add_executable(${_target} "${_target}.cc"
+ ${hw_proto_srcs}
+ ${hw_grpc_srcs})
+ target_link_libraries(${_target}
+ protobuf::libprotobuf
+ gRPC::grpc++_unsecure)
+endforeach()
diff --git a/examples/objective-c/auth_sample/Misc/GoogleService-Info.plist b/examples/objective-c/auth_sample/Misc/GoogleService-Info.plist
index 86909d84a3..ff22507423 100644
--- a/examples/objective-c/auth_sample/Misc/GoogleService-Info.plist
+++ b/examples/objective-c/auth_sample/Misc/GoogleService-Info.plist
@@ -2,9 +2,39 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
+ <key>AD_UNIT_ID_FOR_BANNER_TEST</key>
+ <string>redacted</string>
+ <key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
+ <string>redacted</string>
<key>CLIENT_ID</key>
<string>15087385131-lh9bpkiai9nls53uadju0if6k7un3uih.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.15087385131-lh9bpkiai9nls53uadju0if6k7un3uih</string>
+ <key>API_KEY</key>
+ <string>redacted</string>
+ <key>GCM_SENDER_ID</key>
+ <string>redacted</string>
+ <key>PLIST_VERSION</key>
+ <string>1</string>
+ <key>BUNDLE_ID</key>
+ <string>io.grpc.AuthSample</string>
+ <key>PROJECT_ID</key>
+ <string>grpc-authsample</string>
+ <key>STORAGE_BUCKET</key>
+ <string>grpc-authsample.appspot.com</string>
+ <key>IS_ADS_ENABLED</key>
+ <false/>
+ <key>IS_ANALYTICS_ENABLED</key>
+ <false/>
+ <key>IS_APPINVITE_ENABLED</key>
+ <false/>
+ <key>IS_GCM_ENABLED</key>
+ <false/>
+ <key>IS_SIGNIN_ENABLED</key>
+ <true/>
+ <key>GOOGLE_APP_ID</key>
+ <string>1:15087385131:ios:d547168abe3c362f</string>
+ <key>DATABASE_URL</key>
+ <string>https://grpc-authsample.firebaseio.com</string>
</dict>
-</plist> \ No newline at end of file
+</plist>
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index c8f8238f87..1e8d050227 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -329,6 +329,7 @@ Pod::Spec.new do |s|
'src/core/lib/transport/metadata.h',
'src/core/lib/transport/metadata_batch.h',
'src/core/lib/transport/static_metadata.h',
+ 'src/core/lib/transport/timeout_encoding.h',
'src/core/lib/transport/transport.h',
'src/core/lib/transport/transport_impl.h',
'src/core/ext/transport/chttp2/transport/bin_decoder.h',
@@ -350,7 +351,6 @@ Pod::Spec.new do |s|
'src/core/ext/transport/chttp2/transport/internal.h',
'src/core/ext/transport/chttp2/transport/status_conversion.h',
'src/core/ext/transport/chttp2/transport/stream_map.h',
- 'src/core/ext/transport/chttp2/transport/timeout_encoding.h',
'src/core/ext/transport/chttp2/transport/varint.h',
'src/core/ext/transport/chttp2/alpn/alpn.h',
'src/core/lib/security/context/security_context.h',
@@ -393,6 +393,7 @@ Pod::Spec.new do |s|
'src/core/ext/client_config/subchannel_call_holder.h',
'src/core/ext/client_config/subchannel_index.h',
'src/core/ext/client_config/uri_parser.h',
+ 'src/core/ext/lb_policy/grpclb/grpclb.h',
'src/core/ext/lb_policy/grpclb/load_balancer_api.h',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h',
'third_party/nanopb/pb.h',
@@ -403,11 +404,13 @@ Pod::Spec.new do |s|
'src/core/ext/load_reporting/load_reporting.h',
'src/core/ext/load_reporting/load_reporting_filter.h',
'src/core/ext/census/aggregation.h',
+ 'src/core/ext/census/base_resources.h',
'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h',
'src/core/ext/census/gen/census.pb.h',
'src/core/ext/census/grpc_filter.h',
'src/core/ext/census/mlog.h',
+ 'src/core/ext/census/resource.h',
'src/core/ext/census/rpc_metric_id.h',
'src/core/lib/surface/init.c',
'src/core/lib/channel/channel_args.c',
@@ -496,6 +499,7 @@ Pod::Spec.new do |s|
'src/core/lib/transport/metadata.c',
'src/core/lib/transport/metadata_batch.c',
'src/core/lib/transport/static_metadata.c',
+ 'src/core/lib/transport/timeout_encoding.c',
'src/core/lib/transport/transport.c',
'src/core/lib/transport/transport_op_string.c',
'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c',
@@ -518,7 +522,6 @@ Pod::Spec.new do |s|
'src/core/ext/transport/chttp2/transport/status_conversion.c',
'src/core/ext/transport/chttp2/transport/stream_lists.c',
'src/core/ext/transport/chttp2/transport/stream_map.c',
- 'src/core/ext/transport/chttp2/transport/timeout_encoding.c',
'src/core/ext/transport/chttp2/transport/varint.c',
'src/core/ext/transport/chttp2/transport/writing.c',
'src/core/ext/transport/chttp2/alpn/alpn.c',
@@ -574,6 +577,7 @@ Pod::Spec.new do |s|
'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c',
+ 'src/core/ext/lb_policy/grpclb/grpclb.c',
'src/core/ext/lb_policy/grpclb/load_balancer_api.c',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'third_party/nanopb/pb_common.c',
@@ -587,6 +591,7 @@ Pod::Spec.new do |s|
'src/core/ext/load_reporting/load_reporting.c',
'src/core/ext/load_reporting/load_reporting_filter.c',
'src/core/ext/c-ares/wrapper.c',
+ 'src/core/ext/census/base_resources.c',
'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/grpc_context.c',
@@ -596,6 +601,7 @@ Pod::Spec.new do |s|
'src/core/ext/census/mlog.c',
'src/core/ext/census/operation.c',
'src/core/ext/census/placeholders.c',
+ 'src/core/ext/census/resource.c',
'src/core/ext/census/tracing.c',
'src/core/plugin_registry/grpc_plugin_registry.c'
@@ -687,6 +693,7 @@ Pod::Spec.new do |s|
'src/core/lib/transport/metadata.h',
'src/core/lib/transport/metadata_batch.h',
'src/core/lib/transport/static_metadata.h',
+ 'src/core/lib/transport/timeout_encoding.h',
'src/core/lib/transport/transport.h',
'src/core/lib/transport/transport_impl.h',
'src/core/ext/transport/chttp2/transport/bin_decoder.h',
@@ -708,7 +715,6 @@ Pod::Spec.new do |s|
'src/core/ext/transport/chttp2/transport/internal.h',
'src/core/ext/transport/chttp2/transport/status_conversion.h',
'src/core/ext/transport/chttp2/transport/stream_map.h',
- 'src/core/ext/transport/chttp2/transport/timeout_encoding.h',
'src/core/ext/transport/chttp2/transport/varint.h',
'src/core/ext/transport/chttp2/alpn/alpn.h',
'src/core/lib/security/context/security_context.h',
@@ -751,6 +757,7 @@ Pod::Spec.new do |s|
'src/core/ext/client_config/subchannel_call_holder.h',
'src/core/ext/client_config/subchannel_index.h',
'src/core/ext/client_config/uri_parser.h',
+ 'src/core/ext/lb_policy/grpclb/grpclb.h',
'src/core/ext/lb_policy/grpclb/load_balancer_api.h',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h',
'third_party/nanopb/pb.h',
@@ -761,11 +768,13 @@ Pod::Spec.new do |s|
'src/core/ext/load_reporting/load_reporting.h',
'src/core/ext/load_reporting/load_reporting_filter.h',
'src/core/ext/census/aggregation.h',
+ 'src/core/ext/census/base_resources.h',
'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h',
'src/core/ext/census/gen/census.pb.h',
'src/core/ext/census/grpc_filter.h',
'src/core/ext/census/mlog.h',
+ 'src/core/ext/census/resource.h',
'src/core/ext/census/rpc_metric_id.h'
end
@@ -774,12 +783,16 @@ Pod::Spec.new do |s|
ss.source_files = 'include/grpc/grpc_cronet.h'
end
- s.subspec 'Cronet-Tests' do |ss|
+ s.subspec 'Cronet-Implementation' do |ss|
ss.header_mappings_dir = '.'
-
ss.source_files = 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c',
- 'src/core/ext/transport/cronet/transport/cronet_transport.c',
- 'test/core/end2end/cq_verifier.{c,h}',
+ 'src/core/ext/transport/cronet/transport/cronet_transport.c'
+ end
+
+ s.subspec 'Tests' do |ss|
+ ss.header_mappings_dir = '.'
+
+ ss.source_files = 'test/core/end2end/cq_verifier.{c,h}',
'test/core/end2end/end2end_tests.{c,h}',
'test/core/end2end/tests/*.{c,h}',
'test/core/end2end/data/*.{c,h}',
diff --git a/grpc.def b/grpc.def
index c2f83f577f..e2255df738 100644
--- a/grpc.def
+++ b/grpc.def
@@ -23,15 +23,10 @@ EXPORTS
census_trace_scan_start
census_get_trace_record
census_trace_scan_end
+ census_define_resource
+ census_delete_resource
+ census_resource_id
census_record_values
- census_view_create
- census_view_delete
- census_view_metric
- census_view_naggregations
- census_view_tags
- census_view_aggregrations
- census_view_get_data
- census_view_reset
grpc_compression_algorithm_parse
grpc_compression_algorithm_name
grpc_compression_algorithm_for_level
diff --git a/grpc.gemspec b/grpc.gemspec
index 98645d4ce6..07c2aeba90 100755
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -248,6 +248,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/static_metadata.h )
+ s.files += %w( src/core/lib/transport/timeout_encoding.h )
s.files += %w( src/core/lib/transport/transport.h )
s.files += %w( src/core/lib/transport/transport_impl.h )
s.files += %w( src/core/ext/transport/chttp2/transport/bin_decoder.h )
@@ -269,7 +270,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/transport/chttp2/transport/internal.h )
s.files += %w( src/core/ext/transport/chttp2/transport/status_conversion.h )
s.files += %w( src/core/ext/transport/chttp2/transport/stream_map.h )
- s.files += %w( src/core/ext/transport/chttp2/transport/timeout_encoding.h )
s.files += %w( src/core/ext/transport/chttp2/transport/varint.h )
s.files += %w( src/core/ext/transport/chttp2/alpn/alpn.h )
s.files += %w( src/core/lib/security/context/security_context.h )
@@ -312,6 +312,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/client_config/subchannel_call_holder.h )
s.files += %w( src/core/ext/client_config/subchannel_index.h )
s.files += %w( src/core/ext/client_config/uri_parser.h )
+ s.files += %w( src/core/ext/lb_policy/grpclb/grpclb.h )
s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.h )
s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h )
s.files += %w( third_party/nanopb/pb.h )
@@ -322,11 +323,13 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/load_reporting/load_reporting.h )
s.files += %w( src/core/ext/load_reporting/load_reporting_filter.h )
s.files += %w( src/core/ext/census/aggregation.h )
+ s.files += %w( src/core/ext/census/base_resources.h )
s.files += %w( src/core/ext/census/census_interface.h )
s.files += %w( src/core/ext/census/census_rpc_stats.h )
s.files += %w( src/core/ext/census/gen/census.pb.h )
s.files += %w( src/core/ext/census/grpc_filter.h )
s.files += %w( src/core/ext/census/mlog.h )
+ s.files += %w( src/core/ext/census/resource.h )
s.files += %w( src/core/ext/census/rpc_metric_id.h )
s.files += %w( src/core/lib/surface/init.c )
s.files += %w( src/core/lib/channel/channel_args.c )
@@ -415,6 +418,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/static_metadata.c )
+ s.files += %w( src/core/lib/transport/timeout_encoding.c )
s.files += %w( src/core/lib/transport/transport.c )
s.files += %w( src/core/lib/transport/transport_op_string.c )
s.files += %w( src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c )
@@ -437,7 +441,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/transport/chttp2/transport/status_conversion.c )
s.files += %w( src/core/ext/transport/chttp2/transport/stream_lists.c )
s.files += %w( src/core/ext/transport/chttp2/transport/stream_map.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/timeout_encoding.c )
s.files += %w( src/core/ext/transport/chttp2/transport/varint.c )
s.files += %w( src/core/ext/transport/chttp2/transport/writing.c )
s.files += %w( src/core/ext/transport/chttp2/alpn/alpn.c )
@@ -493,6 +496,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c )
s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c )
s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c )
+ s.files += %w( src/core/ext/lb_policy/grpclb/grpclb.c )
s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.c )
s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c )
s.files += %w( third_party/nanopb/pb_common.c )
@@ -506,6 +510,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/load_reporting/load_reporting.c )
s.files += %w( src/core/ext/load_reporting/load_reporting_filter.c )
s.files += %w( src/core/ext/c-ares/wrapper.c )
+ s.files += %w( src/core/ext/census/base_resources.c )
s.files += %w( src/core/ext/census/context.c )
s.files += %w( src/core/ext/census/gen/census.pb.c )
s.files += %w( src/core/ext/census/grpc_context.c )
@@ -515,6 +520,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/census/mlog.c )
s.files += %w( src/core/ext/census/operation.c )
s.files += %w( src/core/ext/census/placeholders.c )
+ s.files += %w( src/core/ext/census/resource.c )
s.files += %w( src/core/ext/census/tracing.c )
s.files += %w( src/core/plugin_registry/grpc_plugin_registry.c )
s.files += %w( third_party/boringssl/crypto/aes/internal.h )
diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h
index e96d224ddb..70533aa4d9 100644
--- a/include/grpc++/impl/codegen/async_stream.h
+++ b/include/grpc++/impl/codegen/async_stream.h
@@ -330,6 +330,9 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface<W, R> {
meta_ops_.set_output_tag(tag);
meta_ops_.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ meta_ops_.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
call_.PerformOps(&meta_ops_);
}
@@ -345,6 +348,9 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface<W, R> {
if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ finish_ops_.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
}
// The response is dropped if the status is not OK.
@@ -363,6 +369,9 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface<W, R> {
if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ finish_ops_.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
}
finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status);
@@ -400,6 +409,9 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface<W> {
meta_ops_.set_output_tag(tag);
meta_ops_.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ meta_ops_.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
call_.PerformOps(&meta_ops_);
}
@@ -409,6 +421,9 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface<W> {
if (!ctx_->sent_initial_metadata_) {
write_ops_.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ write_ops_.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
}
// TODO(ctiller): don't assert
@@ -421,6 +436,9 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface<W> {
if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ finish_ops_.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
}
finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status);
@@ -459,6 +477,9 @@ class ServerAsyncReaderWriter GRPC_FINAL
meta_ops_.set_output_tag(tag);
meta_ops_.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ meta_ops_.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
call_.PerformOps(&meta_ops_);
}
@@ -474,6 +495,9 @@ class ServerAsyncReaderWriter GRPC_FINAL
if (!ctx_->sent_initial_metadata_) {
write_ops_.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ write_ops_.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
}
// TODO(ctiller): don't assert
@@ -486,6 +510,9 @@ class ServerAsyncReaderWriter GRPC_FINAL
if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ finish_ops_.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
}
finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status);
diff --git a/include/grpc++/impl/codegen/async_unary_call.h b/include/grpc++/impl/codegen/async_unary_call.h
index 05681e2242..5ceab73cea 100644
--- a/include/grpc++/impl/codegen/async_unary_call.h
+++ b/include/grpc++/impl/codegen/async_unary_call.h
@@ -126,6 +126,9 @@ class ServerAsyncResponseWriter GRPC_FINAL
meta_buf_.set_output_tag(tag);
meta_buf_.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ meta_buf_.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
call_.PerformOps(&meta_buf_);
}
@@ -135,6 +138,9 @@ class ServerAsyncResponseWriter GRPC_FINAL
if (!ctx_->sent_initial_metadata_) {
finish_buf_.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ finish_buf_.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
}
// The response is dropped if the status is not OK.
@@ -153,6 +159,9 @@ class ServerAsyncResponseWriter GRPC_FINAL
if (!ctx_->sent_initial_metadata_) {
finish_buf_.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ finish_buf_.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
}
finish_buf_.ServerSendStatus(ctx_->trailing_metadata_, status);
diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h
index fab85d1517..dfac177970 100644
--- a/include/grpc++/impl/codegen/call.h
+++ b/include/grpc++/impl/codegen/call.h
@@ -180,17 +180,23 @@ class CallNoOp {
class CallOpSendInitialMetadata {
public:
- CallOpSendInitialMetadata() : send_(false) {}
+ CallOpSendInitialMetadata() : send_(false) {
+ maybe_compression_level_.is_set = false;
+ }
void SendInitialMetadata(
const std::multimap<grpc::string, grpc::string>& metadata,
uint32_t flags) {
+ maybe_compression_level_.is_set = false;
send_ = true;
flags_ = flags;
initial_metadata_count_ = metadata.size();
initial_metadata_ = FillMetadataArray(metadata);
- // TODO(dgq): expose compression level in API so it can be properly set.
- maybe_compression_level_.is_set = false;
+ }
+
+ void set_compression_level(grpc_compression_level level) {
+ maybe_compression_level_.is_set = true;
+ maybe_compression_level_.level = level;
}
protected:
diff --git a/include/grpc++/impl/codegen/core_codegen.h b/include/grpc++/impl/codegen/core_codegen.h
index 9699abfb43..2586b94504 100644
--- a/include/grpc++/impl/codegen/core_codegen.h
+++ b/include/grpc++/impl/codegen/core_codegen.h
@@ -31,6 +31,9 @@
*
*/
+#ifndef GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_H
+#define GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_H
+
// This file should be compiled as part of grpc++.
#include <grpc++/impl/codegen/core_codegen_interface.h>
@@ -83,3 +86,5 @@ class CoreCodegen : public CoreCodegenInterface {
};
} // namespace grpc
+
+#endif // GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_H
diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h
index 21ac6c4fb5..2f4be644ba 100644
--- a/include/grpc++/impl/codegen/method_handler_impl.h
+++ b/include/grpc++/impl/codegen/method_handler_impl.h
@@ -65,6 +65,9 @@ class RpcMethodHandler : public MethodHandler {
ops;
ops.SendInitialMetadata(param.server_context->initial_metadata_,
param.server_context->initial_metadata_flags());
+ if (param.server_context->compression_level_set()) {
+ ops.set_compression_level(param.server_context->compression_level());
+ }
if (status.ok()) {
status = ops.SendMessage(rsp);
}
@@ -104,6 +107,9 @@ class ClientStreamingHandler : public MethodHandler {
ops;
ops.SendInitialMetadata(param.server_context->initial_metadata_,
param.server_context->initial_metadata_flags());
+ if (param.server_context->compression_level_set()) {
+ ops.set_compression_level(param.server_context->compression_level());
+ }
if (status.ok()) {
status = ops.SendMessage(rsp);
}
@@ -144,6 +150,9 @@ class ServerStreamingHandler : public MethodHandler {
if (!param.server_context->sent_initial_metadata_) {
ops.SendInitialMetadata(param.server_context->initial_metadata_,
param.server_context->initial_metadata_flags());
+ if (param.server_context->compression_level_set()) {
+ ops.set_compression_level(param.server_context->compression_level());
+ }
}
ops.ServerSendStatus(param.server_context->trailing_metadata_, status);
param.call->PerformOps(&ops);
@@ -177,6 +186,9 @@ class BidiStreamingHandler : public MethodHandler {
if (!param.server_context->sent_initial_metadata_) {
ops.SendInitialMetadata(param.server_context->initial_metadata_,
param.server_context->initial_metadata_flags());
+ if (param.server_context->compression_level_set()) {
+ ops.set_compression_level(param.server_context->compression_level());
+ }
}
ops.ServerSendStatus(param.server_context->trailing_metadata_, status);
param.call->PerformOps(&ops);
@@ -199,6 +211,9 @@ class UnknownMethodHandler : public MethodHandler {
if (!context->sent_initial_metadata_) {
ops->SendInitialMetadata(context->initial_metadata_,
context->initial_metadata_flags());
+ if (context->compression_level_set()) {
+ ops->set_compression_level(context->compression_level());
+ }
context->sent_initial_metadata_ = true;
}
ops->ServerSendStatus(context->trailing_metadata_, status);
diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h
index cea13a513f..08212af861 100644
--- a/include/grpc++/impl/codegen/server_context.h
+++ b/include/grpc++/impl/codegen/server_context.h
@@ -130,7 +130,13 @@ class ServerContext {
grpc_compression_level compression_level() const {
return compression_level_;
}
- void set_compression_level(grpc_compression_level level);
+
+ void set_compression_level(grpc_compression_level level) {
+ compression_level_set_ = true;
+ compression_level_ = level;
+ }
+
+ bool compression_level_set() const { return compression_level_set_; }
grpc_compression_algorithm compression_algorithm() const {
return compression_algorithm_;
@@ -217,6 +223,7 @@ class ServerContext {
std::multimap<grpc::string, grpc::string> initial_metadata_;
std::multimap<grpc::string, grpc::string> trailing_metadata_;
+ bool compression_level_set_;
grpc_compression_level compression_level_;
grpc_compression_algorithm compression_algorithm_;
};
diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h
index cbfa410699..b2b972760d 100644
--- a/include/grpc++/impl/codegen/sync_stream.h
+++ b/include/grpc++/impl/codegen/sync_stream.h
@@ -347,6 +347,9 @@ class ServerReader GRPC_FINAL : public ReaderInterface<R> {
CallOpSet<CallOpSendInitialMetadata> ops;
ops.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ ops.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
call_->PerformOps(&ops);
call_->cq()->Pluck(&ops);
@@ -375,6 +378,9 @@ class ServerWriter GRPC_FINAL : public WriterInterface<W> {
CallOpSet<CallOpSendInitialMetadata> ops;
ops.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ ops.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
call_->PerformOps(&ops);
call_->cq()->Pluck(&ops);
@@ -389,6 +395,9 @@ class ServerWriter GRPC_FINAL : public WriterInterface<W> {
if (!ctx_->sent_initial_metadata_) {
ops.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ ops.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
}
call_->PerformOps(&ops);
@@ -413,6 +422,9 @@ class ServerReaderWriter GRPC_FINAL : public WriterInterface<W>,
CallOpSet<CallOpSendInitialMetadata> ops;
ops.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ ops.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
call_->PerformOps(&ops);
call_->cq()->Pluck(&ops);
@@ -434,6 +446,9 @@ class ServerReaderWriter GRPC_FINAL : public WriterInterface<W>,
if (!ctx_->sent_initial_metadata_) {
ops.SendInitialMetadata(ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
+ if (ctx_->compression_level_set()) {
+ ops.set_compression_level(ctx_->compression_level());
+ }
ctx_->sent_initial_metadata_ = true;
}
call_->PerformOps(&ops);
diff --git a/include/grpc/census.h b/include/grpc/census.h
index 39d87ba119..62ff45d894 100644
--- a/include/grpc/census.h
+++ b/include/grpc/census.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,9 +56,11 @@ enum census_features {
/** Shutdown and startup census subsystem. The 'features' argument should be
* the OR (|) of census_features values. If census fails to initialize, then
- * census_initialize() will return a non-zero value. It is an error to call
- * census_initialize() more than once (without an intervening
- * census_shutdown()). */
+ * census_initialize() will return -1, otherwise the set of enabled features
+ * (which may be smaller than that provided in the `features` argument, see
+ * census_supported()) is returned. It is an error to call census_initialize()
+ * more than once (without an intervening census_shutdown()). These functions
+ * are not thread-safe. */
CENSUSAPI int census_initialize(int features);
CENSUSAPI void census_shutdown(void);
@@ -430,30 +432,44 @@ CENSUSAPI int census_get_trace_record(census_trace_record *trace_record);
CENSUSAPI void census_trace_scan_end();
/* Core stats collection API's. The following concepts are used:
- * Aggregation: A collection of values. Census supports the following
- aggregation types:
- Sum - a single summation type. Typically used for keeping (e.g.)
- counts of events.
- Distribution - statistical distribution information, used for
- recording average, standard deviation etc.
- Histogram - a histogram of measurements falling in defined bucket
- boundaries.
- Window - a count of events that happen in reolling time window.
- New aggregation types can be added by the user, if desired (see
- census_register_aggregation()).
- * Metric: Each measurement is for a single metric. Examples include RPC
- latency, CPU seconds consumed, and bytes transmitted.
- * View: A view is a combination of a metric, a tag set (in which the tag
- values are regular expressions) and a set of aggregations. When a
- measurement for a metric matches the view tags, it is recorded (for each
- unique set of tags) against each aggregation. Each metric can have an
- arbitrary number of views by which it will be broken down.
+ * Resource: Users record measurements for a single resource. Examples
+ include RPC latency, CPU seconds consumed, and bytes transmitted.
+ * Aggregation: An aggregation of a set of measurements. Census supports the
+ following aggregation types:
+ * Distribution - statistical distribution information, used for
+ recording average, standard deviation etc. Can include a histogram.
+ * Interval - a count of events that happen in a rolling time window.
+ * View: A view is a combination of a Resource, a set of tag keys and an
+ Aggregation. When a measurement for a Resource matches the View tags, it is
+ recorded (for each unique set of tag values) using the Aggregation type.
+ Each resource can have an arbitrary number of views by which it will be
+ broken down.
+
+ Census uses protos to define each of the above, and output results. This
+ ensures unification across the different language and runtime
+ implementations. The proto definitions can be found in src/proto/census.
*/
+/* Define a new resource. `resource_pb` should contain an encoded Resource
+ protobuf, `resource_pb_size` being the size of the buffer. Returns a -ve
+ value on error, or a positive (>= 0) resource id (for use in
+ census_delete_resource() and census_record_values()). In order to be valid, a
+ resource must have a name, and at least one numerator in it's unit type. The
+ resource name must be unique, and an error will be returned if it is not. */
+CENSUSAPI int32_t census_define_resource(const uint8_t *resource_pb,
+ size_t resource_pb_size);
+
+/* Delete a resource created by census_define_resource(). */
+CENSUSAPI void census_delete_resource(int32_t resource_id);
+
+/* Determine the id of a resource, given it's name. returns -1 if the resource
+ does not exist. */
+CENSUSAPI int32_t census_resource_id(const char *name);
+
/* A single value to be recorded comprises two parts: an ID for the particular
- * metric and the value to be recorded against it. */
+ * resource and the value to be recorded against it. */
typedef struct {
- uint32_t metric_id;
+ int32_t resource_id;
double value;
} census_value;
@@ -461,78 +477,6 @@ typedef struct {
CENSUSAPI void census_record_values(census_context *context,
census_value *values, size_t nvalues);
-/** Type representing a particular aggregation */
-typedef struct census_aggregation_ops census_aggregation_ops;
-
-/* Predefined aggregation types, for use with census_view_create(). */
-extern census_aggregation_ops census_agg_sum;
-extern census_aggregation_ops census_agg_distribution;
-extern census_aggregation_ops census_agg_histogram;
-extern census_aggregation_ops census_agg_window;
-
-/** Information needed to instantiate a new aggregation. Used in view
- construction via census_define_view(). */
-typedef struct {
- const census_aggregation_ops *ops;
- const void *create_arg; /* Aaggregation initialization argument. */
-} census_aggregation;
-
-/** A census view type. Opaque. */
-typedef struct census_view census_view;
-
-/** Create a new view.
- @param metric_id Metric with which this view is associated.
- @param tags tags that define the view.
- @param aggregations aggregations to associate with the view
- @param naggregations number of aggregations
-
- @return A new census view
-*/
-
-/* TODO(aveitch): consider if context is the right argument type to pass in
- tags. */
-CENSUSAPI census_view *census_view_create(
- uint32_t metric_id, const census_context *tags,
- const census_aggregation *aggregations, size_t naggregations);
-
-/** Destroy a previously created view. */
-CENSUSAPI void census_view_delete(census_view *view);
-
-/** Metric ID associated with a view */
-CENSUSAPI size_t census_view_metric(const census_view *view);
-
-/** Number of aggregations associated with view. */
-CENSUSAPI size_t census_view_naggregations(const census_view *view);
-
-/** Get tags associated with view. */
-CENSUSAPI const census_context *census_view_tags(const census_view *view);
-
-/** Get aggregation descriptors associated with a view. */
-CENSUSAPI const census_aggregation *census_view_aggregrations(
- const census_view *view);
-
-/** Holds all the aggregation data for a particular view instantiation. Forms
- part of the data returned by census_view_data(). */
-typedef struct {
- const census_context *tags; /* Tags for this set of aggregations. */
- const void **data; /* One data set for every aggregation in the view. */
-} census_view_aggregation_data;
-
-/** Census view data as returned by census_view_get_data(). */
-typedef struct {
- size_t n_tag_sets; /* Number of unique tag sets that matched view. */
- const census_view_aggregation_data *data; /* n_tag_sets entries */
-} census_view_data;
-
-/** Get data from aggregations associated with a view.
- @param view View from which to get data.
- @return Full set of data for all aggregations for the view.
-*/
-CENSUSAPI const census_view_data *census_view_get_data(const census_view *view);
-
-/** Reset all view data to zero for the specified view */
-CENSUSAPI void census_view_reset(census_view *view);
-
#ifdef __cplusplus
}
#endif
diff --git a/package.xml b/package.xml
index ce1b92bed5..acd00b4f7a 100644
--- a/package.xml
+++ b/package.xml
@@ -10,7 +10,7 @@
<email>grpc-packages@google.com</email>
<active>yes</active>
</lead>
- <date>2016-07-21</date>
+ <date>2016-07-28</date>
<time>16:06:07</time>
<version>
<release>1.1.0</release>
@@ -22,7 +22,7 @@
</stability>
<license>BSD</license>
<notes>
-- PHP7 Support #7464
+- PHP7 Support continued, reduce code duplication #7543
</notes>
<contents>
<dir baseinstalldir="/" name="/">
@@ -256,6 +256,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/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" />
<file baseinstalldir="/" name="src/core/lib/transport/transport_impl.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/bin_decoder.h" role="src" />
@@ -277,7 +278,6 @@
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/internal.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/status_conversion.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/stream_map.h" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/timeout_encoding.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/varint.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/alpn/alpn.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/context/security_context.h" role="src" />
@@ -320,6 +320,7 @@
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel_call_holder.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel_index.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/uri_parser.h" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/grpclb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/load_balancer_api.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb.h" role="src" />
@@ -330,11 +331,13 @@
<file baseinstalldir="/" name="src/core/ext/load_reporting/load_reporting.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/load_reporting/load_reporting_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/aggregation.h" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/base_resources.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/census_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/census_rpc_stats.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/gen/census.pb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/mlog.h" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/resource.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/rpc_metric_id.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/init.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_args.c" role="src" />
@@ -423,6 +426,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/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" />
<file baseinstalldir="/" name="src/core/lib/transport/transport_op_string.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c" role="src" />
@@ -445,7 +449,6 @@
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/status_conversion.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/stream_lists.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/stream_map.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/timeout_encoding.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/varint.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/writing.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/alpn/alpn.c" role="src" />
@@ -501,6 +504,7 @@
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/insecure/channel_create.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/grpclb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/load_balancer_api.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_common.c" role="src" />
@@ -514,6 +518,7 @@
<file baseinstalldir="/" name="src/core/ext/load_reporting/load_reporting.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/load_reporting/load_reporting_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/c-ares/wrapper.c" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/base_resources.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/context.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/gen/census.pb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_context.c" role="src" />
@@ -523,6 +528,7 @@
<file baseinstalldir="/" name="src/core/ext/census/mlog.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/operation.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/placeholders.c" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/resource.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/tracing.c" role="src" />
<file baseinstalldir="/" name="src/core/plugin_registry/grpc_plugin_registry.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/aes/internal.h" role="src" />
@@ -1121,5 +1127,20 @@ Update to wrap gRPC C Core version 0.10.0
- PHP7 Support #7464
</notes>
</release>
+ <release>
+ <version>
+ <release>1.0.0RC3</release>
+ <api>1.0.0RC3</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2016-07-28</date>
+ <license>BSD</license>
+ <notes>
+- PHP7 Support continued, reduce code duplication #7543
+ </notes>
+ </release>
</changelog>
</package>
diff --git a/src/compiler/ruby_generator_helpers-inl.h b/src/compiler/ruby_generator_helpers-inl.h
index ff6939ed9f..aa3c22fea6 100644
--- a/src/compiler/ruby_generator_helpers-inl.h
+++ b/src/compiler/ruby_generator_helpers-inl.h
@@ -48,7 +48,7 @@ inline bool ServicesFilename(const grpc::protobuf::FileDescriptor *file,
file->name().find_last_of(".proto") == file->name().size() - 1) {
*file_name_or_error =
file->name().substr(0, file->name().size() - proto_suffix_length) +
- "_services.rb";
+ "_services_pb.rb";
return true;
} else {
*file_name_or_error = "Invalid proto file name: must end with .proto";
@@ -58,7 +58,7 @@ inline bool ServicesFilename(const grpc::protobuf::FileDescriptor *file,
inline grpc::string MessagesRequireName(
const grpc::protobuf::FileDescriptor *file) {
- return Replace(file->name(), ".proto", "");
+ return Replace(file->name(), ".proto", "_pb");
}
// Get leading or trailing comments in a string. Comment lines start with "# ".
diff --git a/src/core/ext/census/base_resources.c b/src/core/ext/census/base_resources.c
new file mode 100644
index 0000000000..f9aa4bb994
--- /dev/null
+++ b/src/core/ext/census/base_resources.c
@@ -0,0 +1,71 @@
+/*
+ * 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/ext/census/base_resources.h"
+
+#include <stdio.h>
+#include <string.h>
+
+#include <grpc/census.h>
+#include <grpc/support/log.h>
+
+#include "src/core/ext/census/resource.h"
+
+// Add base RPC resource definitions for use by RPC runtime.
+//
+// TODO(aveitch): All of these are currently hardwired definitions encoded in
+// the code in this file. These should be converted to use an external
+// configuration mechanism, in which these resources are defined in a text
+// file, which is compiled to .pb format and read by still-to-be-written
+// configuration functions.
+
+// Define all base resources. This should be called by census initialization.
+void define_base_resources() {
+ google_census_Resource_BasicUnit numerator =
+ google_census_Resource_BasicUnit_SECS;
+ resource r = {"client_rpc_latency", // name
+ "Client RPC latency in seconds", // description
+ 0, // prefix
+ 1, // n_numerators
+ &numerator, // numerators
+ 0, // n_denominators
+ NULL}; // denominators
+ define_resource(&r);
+ r = (resource){"server_rpc_latency", // name
+ "Server RPC latency in seconds", // description
+ 0, // prefix
+ 1, // n_numerators
+ &numerator, // numerators
+ 0, // n_denominators
+ NULL}; // denominators
+ define_resource(&r);
+}
diff --git a/src/core/ext/census/base_resources.h b/src/core/ext/census/base_resources.h
new file mode 100644
index 0000000000..e5a7696db4
--- /dev/null
+++ b/src/core/ext/census/base_resources.h
@@ -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.
+ *
+ */
+
+#ifndef GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H
+#define GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H
+
+/* Define all base resources. This should be called by census initialization. */
+void define_base_resources();
+
+#endif /* GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H */
diff --git a/src/core/ext/census/gen/census.pb.c b/src/core/ext/census/gen/census.pb.c
index d614636c90..647f0635b7 100644
--- a/src/core/ext/census/gen/census.pb.c
+++ b/src/core/ext/census/gen/census.pb.c
@@ -53,29 +53,24 @@ const pb_field_t google_census_Timestamp_fields[3] = {
PB_LAST_FIELD
};
-const pb_field_t google_census_Metric_fields[5] = {
- PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_Metric, name, name, 0),
- PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_Metric, description, name, 0),
- PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Metric, unit, description, &google_census_Metric_MeasurementUnit_fields),
- PB_FIELD( 4, INT32 , OPTIONAL, STATIC , OTHER, google_census_Metric, id, unit, 0),
+const pb_field_t google_census_Resource_fields[4] = {
+ PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_Resource, name, name, 0),
+ PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_Resource, description, name, 0),
+ PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Resource, unit, description, &google_census_Resource_MeasurementUnit_fields),
PB_LAST_FIELD
};
-const pb_field_t google_census_Metric_BasicUnit_fields[2] = {
- PB_FIELD( 1, UENUM , OPTIONAL, STATIC , FIRST, google_census_Metric_BasicUnit, type, type, 0),
+const pb_field_t google_census_Resource_MeasurementUnit_fields[4] = {
+ PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, google_census_Resource_MeasurementUnit, prefix, prefix, 0),
+ PB_FIELD( 2, UENUM , REPEATED, CALLBACK, OTHER, google_census_Resource_MeasurementUnit, numerator, prefix, 0),
+ PB_FIELD( 3, UENUM , REPEATED, CALLBACK, OTHER, google_census_Resource_MeasurementUnit, denominator, numerator, 0),
PB_LAST_FIELD
};
-const pb_field_t google_census_Metric_MeasurementUnit_fields[4] = {
- PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, google_census_Metric_MeasurementUnit, prefix, prefix, 0),
- PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Metric_MeasurementUnit, numerator, prefix, &google_census_Metric_BasicUnit_fields),
- PB_FIELD( 3, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Metric_MeasurementUnit, denominator, numerator, &google_census_Metric_BasicUnit_fields),
- PB_LAST_FIELD
-};
-
-const pb_field_t google_census_AggregationDescriptor_fields[3] = {
- PB_ONEOF_FIELD(options, 1, MESSAGE , ONEOF, STATIC , FIRST, google_census_AggregationDescriptor, bucket_boundaries, bucket_boundaries, &google_census_AggregationDescriptor_BucketBoundaries_fields),
- PB_ONEOF_FIELD(options, 2, MESSAGE , ONEOF, STATIC , FIRST, google_census_AggregationDescriptor, interval_boundaries, interval_boundaries, &google_census_AggregationDescriptor_IntervalBoundaries_fields),
+const pb_field_t google_census_AggregationDescriptor_fields[4] = {
+ PB_FIELD( 1, UENUM , OPTIONAL, STATIC , FIRST, google_census_AggregationDescriptor, type, type, 0),
+ PB_ONEOF_FIELD(options, 2, MESSAGE , ONEOF, STATIC , OTHER, google_census_AggregationDescriptor, bucket_boundaries, type, &google_census_AggregationDescriptor_BucketBoundaries_fields),
+ PB_ONEOF_FIELD(options, 3, MESSAGE , ONEOF, STATIC , OTHER, google_census_AggregationDescriptor, interval_boundaries, type, &google_census_AggregationDescriptor_IntervalBoundaries_fields),
PB_LAST_FIELD
};
@@ -124,25 +119,27 @@ const pb_field_t google_census_Tag_fields[3] = {
const pb_field_t google_census_View_fields[6] = {
PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_View, name, name, 0),
PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_View, description, name, 0),
- PB_FIELD( 3, INT32 , OPTIONAL, STATIC , OTHER, google_census_View, metric_id, description, 0),
- PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_View, aggregation, metric_id, &google_census_AggregationDescriptor_fields),
+ PB_FIELD( 3, STRING , OPTIONAL, CALLBACK, OTHER, google_census_View, resource_name, description, 0),
+ PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_View, aggregation, resource_name, &google_census_AggregationDescriptor_fields),
PB_FIELD( 5, STRING , REPEATED, CALLBACK, OTHER, google_census_View, tag_key, aggregation, 0),
PB_LAST_FIELD
};
-const pb_field_t google_census_Aggregation_fields[6] = {
+const pb_field_t google_census_Aggregation_fields[7] = {
PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_Aggregation, name, name, 0),
PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_Aggregation, description, name, 0),
- PB_ONEOF_FIELD(data, 3, MESSAGE , ONEOF, STATIC , OTHER, google_census_Aggregation, distribution, description, &google_census_Distribution_fields),
- PB_ONEOF_FIELD(data, 4, MESSAGE , ONEOF, STATIC , OTHER, google_census_Aggregation, interval_stats, description, &google_census_IntervalStats_fields),
- PB_FIELD( 5, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Aggregation, tag, data.interval_stats, &google_census_Tag_fields),
+ PB_ONEOF_FIELD(data, 3, UINT64 , ONEOF, STATIC , OTHER, google_census_Aggregation, count, description, 0),
+ PB_ONEOF_FIELD(data, 4, MESSAGE , ONEOF, STATIC , OTHER, google_census_Aggregation, distribution, description, &google_census_Distribution_fields),
+ PB_ONEOF_FIELD(data, 5, MESSAGE , ONEOF, STATIC , OTHER, google_census_Aggregation, interval_stats, description, &google_census_IntervalStats_fields),
+ PB_FIELD( 6, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Aggregation, tag, data.interval_stats, &google_census_Tag_fields),
PB_LAST_FIELD
};
-const pb_field_t google_census_ViewAggregations_fields[4] = {
- PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_census_ViewAggregations, aggregation, aggregation, &google_census_Aggregation_fields),
- PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_ViewAggregations, start, aggregation, &google_census_Timestamp_fields),
- PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_ViewAggregations, end, start, &google_census_Timestamp_fields),
+const pb_field_t google_census_Metric_fields[5] = {
+ PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_Metric, view_name, view_name, 0),
+ PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Metric, aggregation, view_name, &google_census_Aggregation_fields),
+ PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Metric, start, aggregation, &google_census_Timestamp_fields),
+ PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Metric, end, start, &google_census_Timestamp_fields),
PB_LAST_FIELD
};
@@ -156,7 +153,7 @@ const pb_field_t google_census_ViewAggregations_fields[4] = {
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
-PB_STATIC_ASSERT((pb_membersize(google_census_Metric, unit) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Metric, unit) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Distribution, range) < 65536 && pb_membersize(google_census_IntervalStats, window) < 65536 && pb_membersize(google_census_IntervalStats_Window, window_size) < 65536 && pb_membersize(google_census_View, aggregation) < 65536 && pb_membersize(google_census_Aggregation, data.distribution) < 65536 && pb_membersize(google_census_Aggregation, data.interval_stats) < 65536 && pb_membersize(google_census_Metric, unit) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Metric, unit) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Distribution, range) < 65536 && pb_membersize(google_census_IntervalStats, window) < 65536 && pb_membersize(google_census_IntervalStats_Window, window_size) < 65536 && pb_membersize(google_census_View, aggregation) < 65536 && pb_membersize(google_census_Aggregation, data.distribution) < 65536 && pb_membersize(google_census_Aggregation, data.interval_stats) < 65536 && pb_membersize(google_census_Aggregation, tag) < 65536 && pb_membersize(google_census_ViewAggregations, aggregation) < 65536 && pb_membersize(google_census_ViewAggregations, start) < 65536 && pb_membersize(google_census_ViewAggregations, end) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_census_Duration_google_census_Timestamp_google_census_Metric_google_census_Metric_BasicUnit_google_census_Metric_MeasurementUnit_google_census_AggregationDescriptor_google_census_AggregationDescriptor_BucketBoundaries_google_census_AggregationDescriptor_IntervalBoundaries_google_census_Distribution_google_census_Distribution_Range_google_census_IntervalStats_google_census_IntervalStats_Window_google_census_Tag_google_census_View_google_census_Aggregation_google_census_ViewAggregations)
+PB_STATIC_ASSERT((pb_membersize(google_census_Resource, unit) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Resource, unit) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Distribution, range) < 65536 && pb_membersize(google_census_IntervalStats, window) < 65536 && pb_membersize(google_census_IntervalStats_Window, window_size) < 65536 && pb_membersize(google_census_View, aggregation) < 65536 && pb_membersize(google_census_Aggregation, data.distribution) < 65536 && pb_membersize(google_census_Aggregation, data.interval_stats) < 65536 && pb_membersize(google_census_Resource, unit) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Resource, unit) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Distribution, range) < 65536 && pb_membersize(google_census_IntervalStats, window) < 65536 && pb_membersize(google_census_IntervalStats_Window, window_size) < 65536 && pb_membersize(google_census_View, aggregation) < 65536 && pb_membersize(google_census_Aggregation, data.distribution) < 65536 && pb_membersize(google_census_Aggregation, data.interval_stats) < 65536 && pb_membersize(google_census_Aggregation, tag) < 65536 && pb_membersize(google_census_Metric, aggregation) < 65536 && pb_membersize(google_census_Metric, start) < 65536 && pb_membersize(google_census_Metric, end) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_census_Duration_google_census_Timestamp_google_census_Resource_google_census_Resource_MeasurementUnit_google_census_AggregationDescriptor_google_census_AggregationDescriptor_BucketBoundaries_google_census_AggregationDescriptor_IntervalBoundaries_google_census_Distribution_google_census_Distribution_Range_google_census_IntervalStats_google_census_IntervalStats_Window_google_census_Tag_google_census_View_google_census_Aggregation_google_census_Metric)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
@@ -167,7 +164,7 @@ PB_STATIC_ASSERT((pb_membersize(google_census_Metric, unit) < 65536 && pb_member
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
-PB_STATIC_ASSERT((pb_membersize(google_census_Metric, unit) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Metric, unit) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Distribution, range) < 256 && pb_membersize(google_census_IntervalStats, window) < 256 && pb_membersize(google_census_IntervalStats_Window, window_size) < 256 && pb_membersize(google_census_View, aggregation) < 256 && pb_membersize(google_census_Aggregation, data.distribution) < 256 && pb_membersize(google_census_Aggregation, data.interval_stats) < 256 && pb_membersize(google_census_Metric, unit) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Metric, unit) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Distribution, range) < 256 && pb_membersize(google_census_IntervalStats, window) < 256 && pb_membersize(google_census_IntervalStats_Window, window_size) < 256 && pb_membersize(google_census_View, aggregation) < 256 && pb_membersize(google_census_Aggregation, data.distribution) < 256 && pb_membersize(google_census_Aggregation, data.interval_stats) < 256 && pb_membersize(google_census_Aggregation, tag) < 256 && pb_membersize(google_census_ViewAggregations, aggregation) < 256 && pb_membersize(google_census_ViewAggregations, start) < 256 && pb_membersize(google_census_ViewAggregations, end) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_census_Duration_google_census_Timestamp_google_census_Metric_google_census_Metric_BasicUnit_google_census_Metric_MeasurementUnit_google_census_AggregationDescriptor_google_census_AggregationDescriptor_BucketBoundaries_google_census_AggregationDescriptor_IntervalBoundaries_google_census_Distribution_google_census_Distribution_Range_google_census_IntervalStats_google_census_IntervalStats_Window_google_census_Tag_google_census_View_google_census_Aggregation_google_census_ViewAggregations)
+PB_STATIC_ASSERT((pb_membersize(google_census_Resource, unit) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Resource, unit) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Distribution, range) < 256 && pb_membersize(google_census_IntervalStats, window) < 256 && pb_membersize(google_census_IntervalStats_Window, window_size) < 256 && pb_membersize(google_census_View, aggregation) < 256 && pb_membersize(google_census_Aggregation, data.distribution) < 256 && pb_membersize(google_census_Aggregation, data.interval_stats) < 256 && pb_membersize(google_census_Resource, unit) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Resource, unit) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Distribution, range) < 256 && pb_membersize(google_census_IntervalStats, window) < 256 && pb_membersize(google_census_IntervalStats_Window, window_size) < 256 && pb_membersize(google_census_View, aggregation) < 256 && pb_membersize(google_census_Aggregation, data.distribution) < 256 && pb_membersize(google_census_Aggregation, data.interval_stats) < 256 && pb_membersize(google_census_Aggregation, tag) < 256 && pb_membersize(google_census_Metric, aggregation) < 256 && pb_membersize(google_census_Metric, start) < 256 && pb_membersize(google_census_Metric, end) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_census_Duration_google_census_Timestamp_google_census_Resource_google_census_Resource_MeasurementUnit_google_census_AggregationDescriptor_google_census_AggregationDescriptor_BucketBoundaries_google_census_AggregationDescriptor_IntervalBoundaries_google_census_Distribution_google_census_Distribution_Range_google_census_IntervalStats_google_census_IntervalStats_Window_google_census_Tag_google_census_View_google_census_Aggregation_google_census_Metric)
#endif
diff --git a/src/core/ext/census/gen/census.pb.h b/src/core/ext/census/gen/census.pb.h
index d040fe29e7..dae583f33d 100644
--- a/src/core/ext/census/gen/census.pb.h
+++ b/src/core/ext/census/gen/census.pb.h
@@ -45,14 +45,21 @@ extern "C" {
#endif
/* Enum definitions */
-typedef enum _google_census_Metric_BasicUnit_Measure {
- google_census_Metric_BasicUnit_Measure_UNKNOWN = 0,
- google_census_Metric_BasicUnit_Measure_BITS = 1,
- google_census_Metric_BasicUnit_Measure_BYTES = 2,
- google_census_Metric_BasicUnit_Measure_SECS = 3,
- google_census_Metric_BasicUnit_Measure_CORES = 4,
- google_census_Metric_BasicUnit_Measure_MAX_UNITS = 5
-} google_census_Metric_BasicUnit_Measure;
+typedef enum _google_census_Resource_BasicUnit {
+ google_census_Resource_BasicUnit_UNKNOWN = 0,
+ google_census_Resource_BasicUnit_BITS = 1,
+ google_census_Resource_BasicUnit_BYTES = 2,
+ google_census_Resource_BasicUnit_SECS = 3,
+ google_census_Resource_BasicUnit_CORES = 4,
+ google_census_Resource_BasicUnit_MAX_UNITS = 5
+} google_census_Resource_BasicUnit;
+
+typedef enum _google_census_AggregationDescriptor_AggregationType {
+ google_census_AggregationDescriptor_AggregationType_UNKNOWN = 0,
+ google_census_AggregationDescriptor_AggregationType_COUNT = 1,
+ google_census_AggregationDescriptor_AggregationType_DISTRIBUTION = 2,
+ google_census_AggregationDescriptor_AggregationType_INTERVAL = 3
+} google_census_AggregationDescriptor_AggregationType;
/* Struct definitions */
typedef struct _google_census_AggregationDescriptor_BucketBoundaries {
@@ -68,6 +75,8 @@ typedef struct _google_census_IntervalStats {
} google_census_IntervalStats;
typedef struct _google_census_AggregationDescriptor {
+ bool has_type;
+ google_census_AggregationDescriptor_AggregationType type;
pb_size_t which_options;
union {
google_census_AggregationDescriptor_BucketBoundaries bucket_boundaries;
@@ -89,17 +98,12 @@ typedef struct _google_census_Duration {
int32_t nanos;
} google_census_Duration;
-typedef struct _google_census_Metric_BasicUnit {
- bool has_type;
- google_census_Metric_BasicUnit_Measure type;
-} google_census_Metric_BasicUnit;
-
-typedef struct _google_census_Metric_MeasurementUnit {
+typedef struct _google_census_Resource_MeasurementUnit {
bool has_prefix;
int32_t prefix;
pb_callback_t numerator;
pb_callback_t denominator;
-} google_census_Metric_MeasurementUnit;
+} google_census_Resource_MeasurementUnit;
typedef struct _google_census_Tag {
bool has_key;
@@ -135,37 +139,36 @@ typedef struct _google_census_IntervalStats_Window {
} google_census_IntervalStats_Window;
typedef struct _google_census_Metric {
+ pb_callback_t view_name;
+ pb_callback_t aggregation;
+ bool has_start;
+ google_census_Timestamp start;
+ bool has_end;
+ google_census_Timestamp end;
+} google_census_Metric;
+
+typedef struct _google_census_Resource {
pb_callback_t name;
pb_callback_t description;
bool has_unit;
- google_census_Metric_MeasurementUnit unit;
- bool has_id;
- int32_t id;
-} google_census_Metric;
+ google_census_Resource_MeasurementUnit unit;
+} google_census_Resource;
typedef struct _google_census_View {
pb_callback_t name;
pb_callback_t description;
- bool has_metric_id;
- int32_t metric_id;
+ pb_callback_t resource_name;
bool has_aggregation;
google_census_AggregationDescriptor aggregation;
pb_callback_t tag_key;
} google_census_View;
-typedef struct _google_census_ViewAggregations {
- pb_callback_t aggregation;
- bool has_start;
- google_census_Timestamp start;
- bool has_end;
- google_census_Timestamp end;
-} google_census_ViewAggregations;
-
typedef struct _google_census_Aggregation {
pb_callback_t name;
pb_callback_t description;
pb_size_t which_data;
union {
+ uint64_t count;
google_census_Distribution distribution;
google_census_IntervalStats interval_stats;
} data;
@@ -177,10 +180,9 @@ typedef struct _google_census_Aggregation {
/* Initializer values for message structs */
#define google_census_Duration_init_default {false, 0, false, 0}
#define google_census_Timestamp_init_default {false, 0, false, 0}
-#define google_census_Metric_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Metric_MeasurementUnit_init_default, false, 0}
-#define google_census_Metric_BasicUnit_init_default {false, (google_census_Metric_BasicUnit_Measure)0}
-#define google_census_Metric_MeasurementUnit_init_default {false, 0, {{NULL}, NULL}, {{NULL}, NULL}}
-#define google_census_AggregationDescriptor_init_default {0, {google_census_AggregationDescriptor_BucketBoundaries_init_default}}
+#define google_census_Resource_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Resource_MeasurementUnit_init_default}
+#define google_census_Resource_MeasurementUnit_init_default {false, 0, {{NULL}, NULL}, {{NULL}, NULL}}
+#define google_census_AggregationDescriptor_init_default {false, (google_census_AggregationDescriptor_AggregationType)0, 0, {google_census_AggregationDescriptor_BucketBoundaries_init_default}}
#define google_census_AggregationDescriptor_BucketBoundaries_init_default {{{NULL}, NULL}}
#define google_census_AggregationDescriptor_IntervalBoundaries_init_default {{{NULL}, NULL}}
#define google_census_Distribution_init_default {false, 0, false, 0, false, google_census_Distribution_Range_init_default, {{NULL}, NULL}}
@@ -188,15 +190,14 @@ typedef struct _google_census_Aggregation {
#define google_census_IntervalStats_init_default {{{NULL}, NULL}}
#define google_census_IntervalStats_Window_init_default {false, google_census_Duration_init_default, false, 0, false, 0}
#define google_census_Tag_init_default {false, "", false, ""}
-#define google_census_View_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, 0, false, google_census_AggregationDescriptor_init_default, {{NULL}, NULL}}
-#define google_census_Aggregation_init_default {{{NULL}, NULL}, {{NULL}, NULL}, 0, {google_census_Distribution_init_default}, {{NULL}, NULL}}
-#define google_census_ViewAggregations_init_default {{{NULL}, NULL}, false, google_census_Timestamp_init_default, false, google_census_Timestamp_init_default}
+#define google_census_View_init_default {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, false, google_census_AggregationDescriptor_init_default, {{NULL}, NULL}}
+#define google_census_Aggregation_init_default {{{NULL}, NULL}, {{NULL}, NULL}, 0, {0}, {{NULL}, NULL}}
+#define google_census_Metric_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Timestamp_init_default, false, google_census_Timestamp_init_default}
#define google_census_Duration_init_zero {false, 0, false, 0}
#define google_census_Timestamp_init_zero {false, 0, false, 0}
-#define google_census_Metric_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Metric_MeasurementUnit_init_zero, false, 0}
-#define google_census_Metric_BasicUnit_init_zero {false, (google_census_Metric_BasicUnit_Measure)0}
-#define google_census_Metric_MeasurementUnit_init_zero {false, 0, {{NULL}, NULL}, {{NULL}, NULL}}
-#define google_census_AggregationDescriptor_init_zero {0, {google_census_AggregationDescriptor_BucketBoundaries_init_zero}}
+#define google_census_Resource_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Resource_MeasurementUnit_init_zero}
+#define google_census_Resource_MeasurementUnit_init_zero {false, 0, {{NULL}, NULL}, {{NULL}, NULL}}
+#define google_census_AggregationDescriptor_init_zero {false, (google_census_AggregationDescriptor_AggregationType)0, 0, {google_census_AggregationDescriptor_BucketBoundaries_init_zero}}
#define google_census_AggregationDescriptor_BucketBoundaries_init_zero {{{NULL}, NULL}}
#define google_census_AggregationDescriptor_IntervalBoundaries_init_zero {{{NULL}, NULL}}
#define google_census_Distribution_init_zero {false, 0, false, 0, false, google_census_Distribution_Range_init_zero, {{NULL}, NULL}}
@@ -204,25 +205,25 @@ typedef struct _google_census_Aggregation {
#define google_census_IntervalStats_init_zero {{{NULL}, NULL}}
#define google_census_IntervalStats_Window_init_zero {false, google_census_Duration_init_zero, false, 0, false, 0}
#define google_census_Tag_init_zero {false, "", false, ""}
-#define google_census_View_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, 0, false, google_census_AggregationDescriptor_init_zero, {{NULL}, NULL}}
-#define google_census_Aggregation_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, 0, {google_census_Distribution_init_zero}, {{NULL}, NULL}}
-#define google_census_ViewAggregations_init_zero {{{NULL}, NULL}, false, google_census_Timestamp_init_zero, false, google_census_Timestamp_init_zero}
+#define google_census_View_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, false, google_census_AggregationDescriptor_init_zero, {{NULL}, NULL}}
+#define google_census_Aggregation_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, 0, {0}, {{NULL}, NULL}}
+#define google_census_Metric_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Timestamp_init_zero, false, google_census_Timestamp_init_zero}
/* Field tags (for use in manual encoding/decoding) */
#define google_census_AggregationDescriptor_BucketBoundaries_bounds_tag 1
#define google_census_AggregationDescriptor_IntervalBoundaries_window_size_tag 1
#define google_census_IntervalStats_window_tag 1
-#define google_census_AggregationDescriptor_bucket_boundaries_tag 1
+#define google_census_AggregationDescriptor_bucket_boundaries_tag 2
-#define google_census_AggregationDescriptor_interval_boundaries_tag 2
+#define google_census_AggregationDescriptor_interval_boundaries_tag 3
+#define google_census_AggregationDescriptor_type_tag 1
#define google_census_Distribution_Range_min_tag 1
#define google_census_Distribution_Range_max_tag 2
#define google_census_Duration_seconds_tag 1
#define google_census_Duration_nanos_tag 2
-#define google_census_Metric_BasicUnit_type_tag 1
-#define google_census_Metric_MeasurementUnit_prefix_tag 1
-#define google_census_Metric_MeasurementUnit_numerator_tag 2
-#define google_census_Metric_MeasurementUnit_denominator_tag 3
+#define google_census_Resource_MeasurementUnit_prefix_tag 1
+#define google_census_Resource_MeasurementUnit_numerator_tag 2
+#define google_census_Resource_MeasurementUnit_denominator_tag 3
#define google_census_Tag_key_tag 1
#define google_census_Tag_value_tag 2
#define google_census_Timestamp_seconds_tag 1
@@ -234,32 +235,33 @@ typedef struct _google_census_Aggregation {
#define google_census_IntervalStats_Window_window_size_tag 1
#define google_census_IntervalStats_Window_count_tag 2
#define google_census_IntervalStats_Window_mean_tag 3
-#define google_census_Metric_name_tag 1
-#define google_census_Metric_description_tag 2
-#define google_census_Metric_unit_tag 3
-#define google_census_Metric_id_tag 4
+#define google_census_Metric_view_name_tag 1
+#define google_census_Metric_aggregation_tag 2
+#define google_census_Metric_start_tag 3
+#define google_census_Metric_end_tag 4
+#define google_census_Resource_name_tag 1
+#define google_census_Resource_description_tag 2
+#define google_census_Resource_unit_tag 3
#define google_census_View_name_tag 1
#define google_census_View_description_tag 2
-#define google_census_View_metric_id_tag 3
+#define google_census_View_resource_name_tag 3
#define google_census_View_aggregation_tag 4
#define google_census_View_tag_key_tag 5
-#define google_census_ViewAggregations_aggregation_tag 1
-#define google_census_ViewAggregations_start_tag 2
-#define google_census_ViewAggregations_end_tag 3
-#define google_census_Aggregation_distribution_tag 3
+#define google_census_Aggregation_count_tag 3
+
+#define google_census_Aggregation_distribution_tag 4
-#define google_census_Aggregation_interval_stats_tag 4
+#define google_census_Aggregation_interval_stats_tag 5
#define google_census_Aggregation_name_tag 1
#define google_census_Aggregation_description_tag 2
-#define google_census_Aggregation_tag_tag 5
+#define google_census_Aggregation_tag_tag 6
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_census_Duration_fields[3];
extern const pb_field_t google_census_Timestamp_fields[3];
-extern const pb_field_t google_census_Metric_fields[5];
-extern const pb_field_t google_census_Metric_BasicUnit_fields[2];
-extern const pb_field_t google_census_Metric_MeasurementUnit_fields[4];
-extern const pb_field_t google_census_AggregationDescriptor_fields[3];
+extern const pb_field_t google_census_Resource_fields[4];
+extern const pb_field_t google_census_Resource_MeasurementUnit_fields[4];
+extern const pb_field_t google_census_AggregationDescriptor_fields[4];
extern const pb_field_t google_census_AggregationDescriptor_BucketBoundaries_fields[2];
extern const pb_field_t google_census_AggregationDescriptor_IntervalBoundaries_fields[2];
extern const pb_field_t google_census_Distribution_fields[5];
@@ -268,13 +270,12 @@ extern const pb_field_t google_census_IntervalStats_fields[2];
extern const pb_field_t google_census_IntervalStats_Window_fields[4];
extern const pb_field_t google_census_Tag_fields[3];
extern const pb_field_t google_census_View_fields[6];
-extern const pb_field_t google_census_Aggregation_fields[6];
-extern const pb_field_t google_census_ViewAggregations_fields[4];
+extern const pb_field_t google_census_Aggregation_fields[7];
+extern const pb_field_t google_census_Metric_fields[5];
/* Maximum encoded size of messages (where known) */
#define google_census_Duration_size 22
#define google_census_Timestamp_size 22
-#define google_census_Metric_BasicUnit_size 2
#define google_census_Distribution_Range_size 18
#define google_census_IntervalStats_Window_size 44
#define google_census_Tag_size 516
diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c
index f51d850e01..9dacc17eb4 100644
--- a/src/core/ext/census/grpc_filter.c
+++ b/src/core/ext/census/grpc_filter.c
@@ -127,38 +127,40 @@ static void server_start_transport_op(grpc_exec_ctx *exec_ctx,
grpc_call_next_op(exec_ctx, elem, op);
}
-static void client_init_call_elem(grpc_exec_ctx *exec_ctx,
- grpc_call_element *elem,
- grpc_call_element_args *args) {
+static grpc_error *client_init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
call_data *d = elem->call_data;
GPR_ASSERT(d != NULL);
memset(d, 0, sizeof(*d));
d->start_ts = gpr_now(GPR_CLOCK_REALTIME);
+ return GRPC_ERROR_NONE;
}
static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
- const grpc_call_stats *stats,
+ const grpc_call_final_info *final_info,
void *ignored) {
call_data *d = elem->call_data;
GPR_ASSERT(d != NULL);
/* TODO(hongyu): record rpc client stats and census_rpc_end_op here */
}
-static void server_init_call_elem(grpc_exec_ctx *exec_ctx,
- grpc_call_element *elem,
- grpc_call_element_args *args) {
+static grpc_error *server_init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
call_data *d = elem->call_data;
GPR_ASSERT(d != NULL);
memset(d, 0, sizeof(*d));
d->start_ts = gpr_now(GPR_CLOCK_REALTIME);
/* TODO(hongyu): call census_tracing_start_op here. */
grpc_closure_init(&d->finish_recv, server_on_done_recv, elem);
+ return GRPC_ERROR_NONE;
}
static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
- const grpc_call_stats *stats,
+ const grpc_call_final_info *final_info,
void *ignored) {
call_data *d = elem->call_data;
GPR_ASSERT(d != NULL);
diff --git a/src/core/ext/census/initialize.c b/src/core/ext/census/initialize.c
index 896276e44a..55cbbe8e95 100644
--- a/src/core/ext/census/initialize.c
+++ b/src/core/ext/census/initialize.c
@@ -32,19 +32,31 @@
*/
#include <grpc/census.h>
+#include "src/core/ext/census/base_resources.h"
+#include "src/core/ext/census/resource.h"
static int features_enabled = CENSUS_FEATURE_NONE;
int census_initialize(int features) {
if (features_enabled != CENSUS_FEATURE_NONE) {
// Must have been a previous call to census_initialize; return error
- return 1;
+ return -1;
}
- features_enabled = features;
- return 0;
+ features_enabled = features & CENSUS_FEATURE_ALL;
+ if (features & CENSUS_FEATURE_STATS) {
+ initialize_resources();
+ define_base_resources();
+ }
+
+ return features_enabled;
}
-void census_shutdown(void) { features_enabled = CENSUS_FEATURE_NONE; }
+void census_shutdown(void) {
+ if (features_enabled & CENSUS_FEATURE_STATS) {
+ shutdown_resources();
+ }
+ features_enabled = CENSUS_FEATURE_NONE;
+}
int census_supported(void) {
/* TODO(aveitch): improve this as we implement features... */
diff --git a/src/core/ext/census/placeholders.c b/src/core/ext/census/placeholders.c
index fe23d13971..9f99c5bdcf 100644
--- a/src/core/ext/census/placeholders.c
+++ b/src/core/ext/census/placeholders.c
@@ -62,48 +62,3 @@ int census_trace_scan_start(int consume) {
(void)consume;
abort();
}
-
-const census_aggregation *census_view_aggregrations(const census_view *view) {
- (void)view;
- abort();
-}
-
-census_view *census_view_create(uint32_t metric_id, const census_context *tags,
- const census_aggregation *aggregations,
- size_t naggregations) {
- (void)metric_id;
- (void)tags;
- (void)aggregations;
- (void)naggregations;
- abort();
-}
-
-const census_context *census_view_tags(const census_view *view) {
- (void)view;
- abort();
-}
-
-void census_view_delete(census_view *view) {
- (void)view;
- abort();
-}
-
-const census_view_data *census_view_get_data(const census_view *view) {
- (void)view;
- abort();
-}
-
-size_t census_view_metric(const census_view *view) {
- (void)view;
- abort();
-}
-
-size_t census_view_naggregations(const census_view *view) {
- (void)view;
- abort();
-}
-
-void census_view_reset(census_view *view) {
- (void)view;
- abort();
-}
diff --git a/src/core/ext/census/resource.c b/src/core/ext/census/resource.c
new file mode 100644
index 0000000000..ed44f004f9
--- /dev/null
+++ b/src/core/ext/census/resource.c
@@ -0,0 +1,312 @@
+/*
+ *
+ * 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/ext/census/resource.h"
+#include "third_party/nanopb/pb_decode.h"
+
+#include <grpc/census.h>
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+#include <grpc/support/sync.h>
+
+#include <stdbool.h>
+#include <string.h>
+
+// Protect local resource data structures.
+static gpr_mu resource_lock;
+
+// Deleteing and creating resources are relatively rare events, and should not
+// be done in the critical path of performance sensitive code. We record
+// current resource id's used in a simple array, and just search it each time
+// we need to assign a new id, or look up a resource.
+static resource **resources = NULL;
+
+// Number of entries in *resources
+static size_t n_resources = 0;
+
+// Number of defined resources
+static size_t n_defined_resources = 0;
+
+void initialize_resources(void) {
+ gpr_mu_init(&resource_lock);
+ gpr_mu_lock(&resource_lock);
+ GPR_ASSERT(resources == NULL && n_resources == 0 && n_defined_resources == 0);
+ gpr_mu_unlock(&resource_lock);
+}
+
+// Delete a resource given it's ID. The ID must be a valid resource ID. Must be
+// called with resource_lock held.
+static void delete_resource_locked(size_t rid) {
+ GPR_ASSERT(resources[rid] != NULL);
+ gpr_free(resources[rid]->name);
+ gpr_free(resources[rid]->description);
+ gpr_free(resources[rid]->numerators);
+ gpr_free(resources[rid]->denominators);
+ gpr_free(resources[rid]);
+ resources[rid] = NULL;
+ n_defined_resources--;
+}
+
+void shutdown_resources(void) {
+ gpr_mu_lock(&resource_lock);
+ for (size_t i = 0; i < n_resources; i++) {
+ if (resources[i] != NULL) {
+ delete_resource_locked(i);
+ }
+ }
+ GPR_ASSERT(n_defined_resources == 0);
+ gpr_free(resources);
+ resources = NULL;
+ n_resources = 0;
+ gpr_mu_unlock(&resource_lock);
+}
+
+// Check the contents of string fields in a resource proto.
+static bool validate_string(pb_istream_t *stream, const pb_field_t *field,
+ void **arg) {
+ resource *vresource = (resource *)*arg;
+ switch (field->tag) {
+ case google_census_Resource_name_tag:
+ // Name must have at least one character
+ if (stream->bytes_left == 0) {
+ gpr_log(GPR_INFO, "Zero-length Resource name.");
+ return false;
+ }
+ vresource->name = gpr_malloc(stream->bytes_left + 1);
+ vresource->name[stream->bytes_left] = '\0';
+ if (!pb_read(stream, (uint8_t *)vresource->name, stream->bytes_left)) {
+ return false;
+ }
+ // Can't have same name as an existing resource.
+ for (size_t i = 0; i < n_resources; i++) {
+ resource *compare = resources[i];
+ if (compare == vresource || compare == NULL) continue;
+ if (strcmp(compare->name, vresource->name) == 0) {
+ gpr_log(GPR_INFO, "Duplicate Resource name %s.", vresource->name);
+ return false;
+ }
+ }
+ break;
+ case google_census_Resource_description_tag:
+ if (stream->bytes_left == 0) {
+ return true;
+ }
+ vresource->description = gpr_malloc(stream->bytes_left + 1);
+ vresource->description[stream->bytes_left] = '\0';
+ if (!pb_read(stream, (uint8_t *)vresource->description,
+ stream->bytes_left)) {
+ return false;
+ }
+ break;
+ default:
+ // No other string fields in Resource. Print warning and skip.
+ gpr_log(GPR_INFO, "Unknown string field type in Resource protobuf.");
+ if (!pb_read(stream, NULL, stream->bytes_left)) {
+ return false;
+ }
+ break;
+ }
+ return true;
+}
+
+// Decode numerators/denominators in a stream. The `count` and `bup`
+// (BasicUnit pointer) are pointers to the approriate fields in a resource
+// struct.
+static bool validate_units_helper(pb_istream_t *stream, int *count,
+ google_census_Resource_BasicUnit **bup) {
+ while (stream->bytes_left) {
+ (*count)++;
+ // Have to allocate a new array of values. Normal case is 0 or 1, so
+ // this should normally not be an issue.
+ google_census_Resource_BasicUnit *new_bup =
+ gpr_malloc((size_t)*count * sizeof(google_census_Resource_BasicUnit));
+ if (*count != 1) {
+ memcpy(new_bup, *bup,
+ (size_t)(*count - 1) * sizeof(google_census_Resource_BasicUnit));
+ gpr_free(*bup);
+ }
+ *bup = new_bup;
+ uint64_t value;
+ if (!pb_decode_varint(stream, &value)) {
+ return false;
+ }
+ *(*bup + *count - 1) = (google_census_Resource_BasicUnit)value;
+ }
+ return true;
+}
+
+// Validate units field of a Resource proto.
+static bool validate_units(pb_istream_t *stream, const pb_field_t *field,
+ void **arg) {
+ resource *vresource = (resource *)(*arg);
+ switch (field->tag) {
+ case google_census_Resource_MeasurementUnit_numerator_tag:
+ return validate_units_helper(stream, &vresource->n_numerators,
+ &vresource->numerators);
+ break;
+ case google_census_Resource_MeasurementUnit_denominator_tag:
+ return validate_units_helper(stream, &vresource->n_denominators,
+ &vresource->denominators);
+ break;
+ default:
+ gpr_log(GPR_ERROR, "Unknown field type.");
+ return false;
+ break;
+ }
+ return true;
+}
+
+// Validate the contents of a Resource proto. `id` is the intended resource id.
+static bool validate_resource_pb(const uint8_t *resource_pb,
+ size_t resource_pb_size, size_t id) {
+ GPR_ASSERT(id < n_resources);
+ if (resource_pb == NULL) {
+ return false;
+ }
+ google_census_Resource vresource;
+ vresource.name.funcs.decode = &validate_string;
+ vresource.name.arg = resources[id];
+ vresource.description.funcs.decode = &validate_string;
+ vresource.description.arg = resources[id];
+ vresource.unit.numerator.funcs.decode = &validate_units;
+ vresource.unit.numerator.arg = resources[id];
+ vresource.unit.denominator.funcs.decode = &validate_units;
+ vresource.unit.denominator.arg = resources[id];
+
+ pb_istream_t stream =
+ pb_istream_from_buffer((uint8_t *)resource_pb, resource_pb_size);
+ if (!pb_decode(&stream, google_census_Resource_fields, &vresource)) {
+ return false;
+ }
+ // A Resource must have a name, a unit, with at least one numerator.
+ return (resources[id]->name != NULL && vresource.has_unit &&
+ resources[id]->n_numerators > 0);
+}
+
+// Allocate a blank resource, and return associated ID. Must be called with
+// resource_lock held.
+size_t allocate_resource(void) {
+ // use next_id to optimize expected placement of next new resource.
+ static size_t next_id = 0;
+ size_t id = n_resources; // resource ID - initialize to invalid value.
+ // Expand resources if needed.
+ if (n_resources == n_defined_resources) {
+ size_t new_n_resources = n_resources ? n_resources * 2 : 2;
+ resource **new_resources = gpr_malloc(new_n_resources * sizeof(resource *));
+ memcpy(new_resources, resources, n_resources * sizeof(resource *));
+ memset(new_resources + n_resources, 0,
+ (new_n_resources - n_resources) * sizeof(resource *));
+ gpr_free(resources);
+ resources = new_resources;
+ n_resources = new_n_resources;
+ id = n_defined_resources;
+ } else {
+ GPR_ASSERT(n_defined_resources < n_resources);
+ // Find a free id.
+ for (size_t base = 0; base < n_resources; base++) {
+ id = (next_id + base) % n_resources;
+ if (resources[id] == NULL) break;
+ }
+ }
+ GPR_ASSERT(id < n_resources && resources[id] == NULL);
+ resources[id] = gpr_malloc(sizeof(resource));
+ memset(resources[id], 0, sizeof(resource));
+ n_defined_resources++;
+ next_id = (id + 1) % n_resources;
+ return id;
+}
+
+int32_t census_define_resource(const uint8_t *resource_pb,
+ size_t resource_pb_size) {
+ if (resource_pb == NULL) {
+ return -1;
+ }
+ gpr_mu_lock(&resource_lock);
+ size_t id = allocate_resource();
+ // Validate pb, extract name.
+ if (!validate_resource_pb(resource_pb, resource_pb_size, id)) {
+ delete_resource_locked(id);
+ gpr_mu_unlock(&resource_lock);
+ return -1;
+ }
+ gpr_mu_unlock(&resource_lock);
+ return (int32_t)id;
+}
+
+void census_delete_resource(int32_t rid) {
+ gpr_mu_lock(&resource_lock);
+ if (rid >= 0 && (size_t)rid < n_resources && resources[rid] != NULL) {
+ delete_resource_locked((size_t)rid);
+ }
+ gpr_mu_unlock(&resource_lock);
+}
+
+int32_t census_resource_id(const char *name) {
+ gpr_mu_lock(&resource_lock);
+ for (int32_t id = 0; (size_t)id < n_resources; id++) {
+ if (resources[id] != NULL && strcmp(resources[id]->name, name) == 0) {
+ gpr_mu_unlock(&resource_lock);
+ return id;
+ }
+ }
+ gpr_mu_unlock(&resource_lock);
+ return -1;
+}
+
+int32_t define_resource(const resource *base) {
+ GPR_ASSERT(base != NULL && base->name != NULL && base->n_numerators > 0 &&
+ base->numerators != NULL);
+ gpr_mu_lock(&resource_lock);
+ size_t id = allocate_resource();
+ size_t len = strlen(base->name) + 1;
+ resources[id]->name = gpr_malloc(len);
+ memcpy(resources[id]->name, base->name, len);
+ if (base->description) {
+ len = strlen(base->description) + 1;
+ resources[id]->description = gpr_malloc(len);
+ memcpy(resources[id]->description, base->description, len);
+ }
+ resources[id]->prefix = base->prefix;
+ resources[id]->n_numerators = base->n_numerators;
+ len = (size_t)base->n_numerators * sizeof(*base->numerators);
+ resources[id]->numerators = gpr_malloc(len);
+ memcpy(resources[id]->numerators, base->numerators, len);
+ resources[id]->n_denominators = base->n_denominators;
+ if (base->n_denominators != 0) {
+ len = (size_t)base->n_denominators * sizeof(*base->denominators);
+ resources[id]->denominators = gpr_malloc(len);
+ memcpy(resources[id]->denominators, base->denominators, len);
+ }
+ gpr_mu_unlock(&resource_lock);
+ return (int32_t)id;
+}
diff --git a/src/core/ext/census/resource.h b/src/core/ext/census/resource.h
new file mode 100644
index 0000000000..591bff07da
--- /dev/null
+++ b/src/core/ext/census/resource.h
@@ -0,0 +1,63 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+/* Census-internal resource definition and manipluation functions. */
+#ifndef GRPC_CORE_EXT_CENSUS_RESOURCE_H
+#define GRPC_CORE_EXT_CENSUS_RESOURCE_H
+
+#include <grpc/grpc.h>
+#include "src/core/ext/census/gen/census.pb.h"
+
+/* Internal representation of a resource. */
+typedef struct {
+ char *name;
+ char *description;
+ int32_t prefix;
+ int n_numerators;
+ google_census_Resource_BasicUnit *numerators;
+ int n_denominators;
+ google_census_Resource_BasicUnit *denominators;
+} resource;
+
+/* Initialize and shutdown the resources subsystem. */
+void initialize_resources(void);
+void shutdown_resources(void);
+
+/* Add a new resource, given a proposed resource structure. Returns the
+ resource ID, or -ve on failure.
+ TODO(aveitch): this function exists to support addition of the base
+ resources. It should be removed when we have the ability to add resources
+ from configuration files. */
+int32_t define_resource(const resource *base);
+
+#endif /* GRPC_CORE_EXT_CENSUS_RESOURCE_H */
diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c
index 0c7aa86871..1fd8fd9bb3 100644
--- a/src/core/ext/client_config/client_channel.c
+++ b/src/core/ext/client_config/client_channel.c
@@ -457,15 +457,17 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp,
}
/* Constructor for call_data */
-static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args) {
+static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
grpc_subchannel_call_holder_init(elem->call_data, cc_pick_subchannel, elem,
args->call_stack);
+ return GRPC_ERROR_NONE;
}
/* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_stats *stats,
+ const grpc_call_final_info *final_info,
void *and_free_memory) {
grpc_subchannel_call_holder_destroy(exec_ctx, elem->call_data);
gpr_free(and_free_memory);
diff --git a/src/core/ext/client_config/lb_policy.h b/src/core/ext/client_config/lb_policy.h
index 3cfd041d3a..a2f5446fc6 100644
--- a/src/core/ext/client_config/lb_policy.h
+++ b/src/core/ext/client_config/lb_policy.h
@@ -73,7 +73,7 @@ struct grpc_lb_policy_vtable {
void (*ping_one)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
grpc_closure *closure);
- /** try to enter a READY connectivity state */
+ /** Try to enter a READY connectivity state */
void (*exit_idle)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy);
/** check the current connectivity of the lb_policy */
@@ -82,7 +82,9 @@ struct grpc_lb_policy_vtable {
grpc_error **connectivity_error);
/** call notify when the connectivity state of a channel changes from *state.
- Updates *state with the new state of the policy */
+ Updates *state with the new state of the policy. Calling with a NULL \a
+ state cancels the subscription.
+ */
void (*notify_on_state_change)(grpc_exec_ctx *exec_ctx,
grpc_lb_policy *policy,
grpc_connectivity_state *state,
@@ -125,7 +127,7 @@ void grpc_lb_policy_init(grpc_lb_policy *policy,
/** Given initial metadata in \a initial_metadata, find an appropriate
target for this rpc, and 'return' it by calling \a on_complete after setting
\a target.
- Picking can be asynchronous. Any IO should be done under \a pollset. */
+ Picking can be asynchronous. Any IO should be done under \a pollent. */
int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
grpc_polling_entity *pollent,
grpc_metadata_batch *initial_metadata,
@@ -147,8 +149,11 @@ void grpc_lb_policy_cancel_picks(grpc_exec_ctx *exec_ctx,
uint32_t initial_metadata_flags_mask,
uint32_t initial_metadata_flags_eq);
+/** Try to enter a READY connectivity state */
void grpc_lb_policy_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy);
+/* Call notify when the connectivity state of a channel changes from \a *state.
+ * Updates \a *state with the new state of the policy */
void grpc_lb_policy_notify_on_state_change(grpc_exec_ctx *exec_ctx,
grpc_lb_policy *policy,
grpc_connectivity_state *state,
diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c
index d089cd4399..df35904b85 100644
--- a/src/core/ext/client_config/subchannel.c
+++ b/src/core/ext/client_config/subchannel.c
@@ -702,19 +702,26 @@ grpc_connected_subchannel *grpc_subchannel_get_connected_subchannel(
return GET_CONNECTED_SUBCHANNEL(c, acq);
}
-grpc_subchannel_call *grpc_connected_subchannel_create_call(
+grpc_error *grpc_connected_subchannel_create_call(
grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *con,
- grpc_polling_entity *pollent) {
+ grpc_polling_entity *pollent, grpc_subchannel_call **call) {
grpc_channel_stack *chanstk = CHANNEL_STACK_FROM_CONNECTION(con);
- grpc_subchannel_call *call =
- gpr_malloc(sizeof(grpc_subchannel_call) + chanstk->call_stack_size);
- grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(call);
- call->connection = con;
+ *call = gpr_malloc(sizeof(grpc_subchannel_call) + chanstk->call_stack_size);
+ grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(*call);
+ (*call)->connection = con; // Ref is added below.
+ grpc_error *error =
+ grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, *call,
+ NULL, NULL, callstk);
+ if (error != GRPC_ERROR_NONE) {
+ const char *error_string = grpc_error_string(error);
+ gpr_log(GPR_ERROR, "error: %s", error_string);
+ grpc_error_free_string(error_string);
+ gpr_free(*call);
+ return error;
+ }
GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call");
- grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, call,
- NULL, NULL, callstk);
grpc_call_stack_set_pollset_or_pollset_set(exec_ctx, callstk, pollent);
- return call;
+ return GRPC_ERROR_NONE;
}
grpc_call_stack *grpc_subchannel_call_get_call_stack(
diff --git a/src/core/ext/client_config/subchannel.h b/src/core/ext/client_config/subchannel.h
index b6d39f5dc5..ae1d96e640 100644
--- a/src/core/ext/client_config/subchannel.h
+++ b/src/core/ext/client_config/subchannel.h
@@ -108,9 +108,9 @@ void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx,
GRPC_SUBCHANNEL_REF_EXTRA_ARGS);
/** construct a subchannel call */
-grpc_subchannel_call *grpc_connected_subchannel_create_call(
+grpc_error *grpc_connected_subchannel_create_call(
grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *connected_subchannel,
- grpc_polling_entity *pollent);
+ grpc_polling_entity *pollent, grpc_subchannel_call **subchannel_call);
/** process a transport level op */
void grpc_connected_subchannel_process_transport_op(
diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c
index b96a0ad093..be6d054af4 100644
--- a/src/core/ext/client_config/subchannel_call_holder.c
+++ b/src/core/ext/client_config/subchannel_call_holder.c
@@ -84,6 +84,11 @@ void grpc_subchannel_call_holder_destroy(grpc_exec_ctx *exec_ctx,
gpr_free(holder->waiting_ops);
}
+// The logic here is fairly complicated, due to (a) the fact that we
+// need to handle the case where we receive the send op before the
+// initial metadata op, and (b) the need for efficiency, especially in
+// the streaming case.
+// TODO(ctiller): Explain this more thoroughly.
void grpc_subchannel_call_holder_perform_op(grpc_exec_ctx *exec_ctx,
grpc_subchannel_call_holder *holder,
grpc_transport_stream_op *op) {
@@ -121,7 +126,8 @@ retry:
}
/* if this is a cancellation, then we can raise our cancelled flag */
if (op->cancel_error != GRPC_ERROR_NONE) {
- if (!gpr_atm_rel_cas(&holder->subchannel_call, 0, 1)) {
+ if (!gpr_atm_rel_cas(&holder->subchannel_call, 0,
+ (gpr_atm)(uintptr_t)CANCELLED_CALL)) {
goto retry;
} else {
switch (holder->creation_phase) {
@@ -158,10 +164,17 @@ retry:
/* if we've got a subchannel, then let's ask it to create a call */
if (holder->creation_phase == GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING &&
holder->connected_subchannel != NULL) {
- gpr_atm_rel_store(
- &holder->subchannel_call,
- (gpr_atm)(uintptr_t)grpc_connected_subchannel_create_call(
- exec_ctx, holder->connected_subchannel, holder->pollent));
+ grpc_subchannel_call *subchannel_call = NULL;
+ grpc_error *error = grpc_connected_subchannel_create_call(
+ exec_ctx, holder->connected_subchannel, holder->pollent,
+ &subchannel_call);
+ if (error != GRPC_ERROR_NONE) {
+ subchannel_call = CANCELLED_CALL;
+ fail_locked(exec_ctx, holder, GRPC_ERROR_REF(error));
+ grpc_transport_stream_op_finish_with_failure(exec_ctx, op, error);
+ }
+ gpr_atm_rel_store(&holder->subchannel_call,
+ (gpr_atm)(uintptr_t)subchannel_call);
retry_waiting_locked(exec_ctx, holder);
goto retry;
}
@@ -189,10 +202,17 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg,
GRPC_ERROR_CREATE_REFERENCING(
"Cancelled before creating subchannel", &error, 1));
} else {
- gpr_atm_rel_store(
- &holder->subchannel_call,
- (gpr_atm)(uintptr_t)grpc_connected_subchannel_create_call(
- exec_ctx, holder->connected_subchannel, holder->pollent));
+ grpc_subchannel_call *subchannel_call = NULL;
+ grpc_error *new_error = grpc_connected_subchannel_create_call(
+ exec_ctx, holder->connected_subchannel, holder->pollent,
+ &subchannel_call);
+ if (new_error != GRPC_ERROR_NONE) {
+ new_error = grpc_error_add_child(new_error, error);
+ subchannel_call = CANCELLED_CALL;
+ fail_locked(exec_ctx, holder, new_error);
+ }
+ gpr_atm_rel_store(&holder->subchannel_call,
+ (gpr_atm)(uintptr_t)subchannel_call);
retry_waiting_locked(exec_ctx, holder);
}
gpr_mu_unlock(&holder->mu);
diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c
new file mode 100644
index 0000000000..dec25efe61
--- /dev/null
+++ b/src/core/ext/lb_policy/grpclb/grpclb.c
@@ -0,0 +1,1039 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+/** Implementation of the gRPC LB policy.
+ *
+ * This policy takes as input a set of resolved addresses {a1..an} for which the
+ * LB set was set (it's the resolver's responsibility to ensure this). That is
+ * to say, {a1..an} represent a collection of LB servers.
+ *
+ * An internal channel (\a glb_lb_policy.lb_channel) is created over {a1..an}.
+ * This channel behaves just like a regular channel. In particular, the
+ * constructed URI over the addresses a1..an will use the default pick first
+ * 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.
+ *
+ * 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:
+ *
+ * 1. This is the first server list received. There was no previous instance of
+ * the Round Robin policy. \a rr_handover() will instantiate the RR policy
+ * and perform all the pending operations over it.
+ * 2. There's already a RR policy instance active. We need to introduce the new
+ * one build from the new serverlist, but taking care not to disrupt the
+ * operations in progress over the old RR instance. This is done by
+ * decreasing the reference count on the old policy. The moment no more
+ * references are held on the old RR policy, it'll be destroyed and \a
+ * rr_connectivity_changed notified with a \a GRPC_CHANNEL_SHUTDOWN state.
+ * At this point we can transition to a new RR instance safely, which is done
+ * once again via \a rr_handover().
+ *
+ *
+ * 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() 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. */
+
+/* TODO(dgq):
+ * - Implement LB service forwarding (point 2c. in the doc's diagram).
+ */
+
+#include <string.h>
+
+#include <grpc/byte_buffer_reader.h>
+#include <grpc/grpc.h>
+#include <grpc/support/alloc.h>
+#include <grpc/support/host_port.h>
+#include <grpc/support/string_util.h>
+
+#include "src/core/ext/client_config/client_channel_factory.h"
+#include "src/core/ext/client_config/lb_policy_registry.h"
+#include "src/core/ext/client_config/parse_address.h"
+#include "src/core/ext/lb_policy/grpclb/grpclb.h"
+#include "src/core/ext/lb_policy/grpclb/load_balancer_api.h"
+#include "src/core/lib/iomgr/sockaddr_utils.h"
+#include "src/core/lib/support/string.h"
+#include "src/core/lib/surface/call.h"
+#include "src/core/lib/surface/channel.h"
+
+int grpc_lb_glb_trace = 0;
+
+typedef struct wrapped_rr_closure_arg {
+ /* the original closure. Usually a on_complete/notify cb for pick() and ping()
+ * calls against the internal RR instance, respectively. */
+ grpc_closure *wrapped_closure;
+
+ /* The RR instance related to the closure */
+ grpc_lb_policy *rr_policy;
+
+ /* when not NULL, represents a pending_{pick,ping} node to be freed upon
+ * closure execution */
+ void *owning_pending_node; /* to be freed if not NULL */
+} wrapped_rr_closure_arg;
+
+/* The \a on_complete closure passed as part of the pick requires keeping a
+ * reference to its associated round robin instance. We wrap this closure in
+ * order to unref the round robin instance upon its invocation */
+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, error, NULL);
+ gpr_free(wc_arg->owning_pending_node);
+}
+
+/* Linked list of pending pick requests. It stores all information needed to
+ * eventually call (Round Robin's) pick() on them. They mainly stay pending
+ * waiting for the RR policy to be created/updated.
+ *
+ * One particularity is the wrapping of the user-provided \a on_complete closure
+ * (in \a wrapped_on_complete and \a wrapped_on_complete_arg). This is needed in
+ * order to correctly unref the RR policy instance upon completion of the pick.
+ * See \a wrapped_rr_closure for details. */
+typedef struct pending_pick {
+ struct pending_pick *next;
+
+ /* polling entity for the pick()'s async notification */
+ grpc_polling_entity *pollent;
+
+ /* the initial metadata for the pick. See grpc_lb_policy_pick() */
+ grpc_metadata_batch *initial_metadata;
+
+ /* bitmask passed to pick() and used for selective cancelling. See
+ * grpc_lb_policy_cancel_picks() */
+ uint32_t initial_metadata_flags;
+
+ /* output argument where to store the pick()ed connected subchannel, or NULL
+ * upon error. */
+ grpc_connected_subchannel **target;
+
+ /* a closure wrapping the original on_complete one to be invoked once the
+ * pick() has completed (regardless of success) */
+ grpc_closure wrapped_on_complete;
+
+ /* args for wrapped_on_complete */
+ wrapped_rr_closure_arg wrapped_on_complete_arg;
+} pending_pick;
+
+static void add_pending_pick(pending_pick **root, grpc_polling_entity *pollent,
+ grpc_metadata_batch *initial_metadata,
+ uint32_t initial_metadata_flags,
+ grpc_connected_subchannel **target,
+ grpc_closure *on_complete) {
+ pending_pick *pp = gpr_malloc(sizeof(*pp));
+ memset(pp, 0, sizeof(pending_pick));
+ memset(&pp->wrapped_on_complete_arg, 0, sizeof(wrapped_rr_closure_arg));
+ pp->next = *root;
+ pp->pollent = pollent;
+ pp->target = target;
+ pp->initial_metadata = initial_metadata;
+ pp->initial_metadata_flags = initial_metadata_flags;
+ pp->wrapped_on_complete_arg.wrapped_closure = on_complete;
+ grpc_closure_init(&pp->wrapped_on_complete, wrapped_rr_closure,
+ &pp->wrapped_on_complete_arg);
+ *root = pp;
+}
+
+/* Same as the \a pending_pick struct but for ping operations */
+typedef struct pending_ping {
+ struct pending_ping *next;
+
+ /* a closure wrapping the original on_complete one to be invoked once the
+ * ping() has completed (regardless of success) */
+ grpc_closure wrapped_notify;
+
+ /* args for wrapped_notify */
+ wrapped_rr_closure_arg wrapped_notify_arg;
+} pending_ping;
+
+static void add_pending_ping(pending_ping **root, grpc_closure *notify) {
+ pending_ping *pping = gpr_malloc(sizeof(*pping));
+ memset(pping, 0, sizeof(pending_ping));
+ memset(&pping->wrapped_notify_arg, 0, sizeof(wrapped_rr_closure_arg));
+ pping->next = *root;
+ grpc_closure_init(&pping->wrapped_notify, wrapped_rr_closure,
+ &pping->wrapped_notify_arg);
+ pping->wrapped_notify_arg.wrapped_closure = notify;
+ *root = pping;
+}
+
+/*
+ * 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 */
+ grpc_lb_policy base;
+
+ /** mutex protecting remaining members */
+ gpr_mu mu;
+
+ grpc_client_channel_factory *cc_factory;
+
+ /** for communicating with the LB server */
+ grpc_channel *lb_channel;
+
+ /** the RR policy to use of the backend servers returned by the LB server */
+ grpc_lb_policy *rr_policy;
+
+ bool started_picking;
+
+ /** our connectivity state tracker */
+ grpc_connectivity_state_tracker state_tracker;
+
+ /** stores the deserialized response from the LB. May be NULL until one such
+ * response has arrived. */
+ grpc_grpclb_serverlist *serverlist;
+
+ /** 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;
+
+ /** for tracking of the RR connectivity */
+ rr_connectivity_data *rr_connectivity;
+
+ /* a wrapped (see \a wrapped_rr_closure) on-complete closure for readily
+ * available RR picks */
+ grpc_closure wrapped_on_complete;
+
+ /* arguments for the wrapped_on_complete closure */
+ wrapped_rr_closure_arg wc_arg;
+} glb_lb_policy;
+
+/* Keeps track and reacts to changes in connectivity of the RR instance */
+struct rr_connectivity_data {
+ grpc_closure on_change;
+ grpc_connectivity_state state;
+ glb_lb_policy *glb_policy;
+};
+
+static grpc_lb_policy *create_rr(grpc_exec_ctx *exec_ctx,
+ const grpc_grpclb_serverlist *serverlist,
+ glb_lb_policy *glb_policy) {
+ /* TODO(dgq): support mixed ip version */
+ GPR_ASSERT(serverlist != NULL && serverlist->num_servers > 0);
+ char **host_ports = gpr_malloc(sizeof(char *) * serverlist->num_servers);
+ for (size_t i = 0; i < serverlist->num_servers; ++i) {
+ gpr_join_host_port(&host_ports[i], serverlist->servers[i]->ip_address,
+ serverlist->servers[i]->port);
+ }
+
+ size_t uri_path_len;
+ char *concat_ipports = gpr_strjoin_sep(
+ (const char **)host_ports, serverlist->num_servers, ",", &uri_path_len);
+
+ grpc_lb_policy_args args;
+ args.client_channel_factory = glb_policy->cc_factory;
+ args.addresses = gpr_malloc(sizeof(grpc_resolved_addresses));
+ args.addresses->naddrs = serverlist->num_servers;
+ args.addresses->addrs =
+ gpr_malloc(sizeof(grpc_resolved_address) * args.addresses->naddrs);
+ size_t out_addrs_idx = 0;
+ for (size_t i = 0; i < serverlist->num_servers; ++i) {
+ grpc_uri uri;
+ struct sockaddr_storage sa;
+ size_t sa_len;
+ uri.path = host_ports[i];
+ if (parse_ipv4(&uri, &sa, &sa_len)) { /* TODO(dgq): add support for ipv6 */
+ memcpy(args.addresses->addrs[out_addrs_idx].addr, &sa, sa_len);
+ args.addresses->addrs[out_addrs_idx].len = sa_len;
+ ++out_addrs_idx;
+ } else {
+ gpr_log(GPR_ERROR, "Invalid LB service address '%s', ignoring.",
+ host_ports[i]);
+ }
+ }
+
+ grpc_lb_policy *rr = grpc_lb_policy_create(exec_ctx, "round_robin", &args);
+
+ gpr_free(concat_ipports);
+ for (size_t i = 0; i < serverlist->num_servers; i++) {
+ gpr_free(host_ports[i]);
+ }
+ gpr_free(host_ports);
+ gpr_free(args.addresses->addrs);
+ gpr_free(args.addresses);
+ return rr;
+}
+
+static void rr_handover(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy,
+ grpc_error *error) {
+ GRPC_ERROR_REF(error);
+ glb_policy->rr_policy =
+ create_rr(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_ASSERT(glb_policy->rr_policy != NULL);
+ 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, error,
+ "rr_handover");
+ grpc_lb_policy_exit_idle(exec_ctx, glb_policy->rr_policy);
+
+ /* flush pending ops */
+ pending_pick *pp;
+ while ((pp = glb_policy->pending_picks)) {
+ glb_policy->pending_picks = pp->next;
+ GRPC_LB_POLICY_REF(glb_policy->rr_policy, "rr_handover_pending_pick");
+ pp->wrapped_on_complete_arg.rr_policy = glb_policy->rr_policy;
+ if (grpc_lb_glb_trace) {
+ gpr_log(GPR_INFO, "Pending pick about to PICK from 0x%" PRIxPTR "",
+ (intptr_t)glb_policy->rr_policy);
+ }
+ grpc_lb_policy_pick(exec_ctx, glb_policy->rr_policy, pp->pollent,
+ pp->initial_metadata, pp->initial_metadata_flags,
+ pp->target, &pp->wrapped_on_complete);
+ pp->wrapped_on_complete_arg.owning_pending_node = pp;
+ }
+
+ pending_ping *pping;
+ while ((pping = glb_policy->pending_pings)) {
+ glb_policy->pending_pings = pping->next;
+ GRPC_LB_POLICY_REF(glb_policy->rr_policy, "rr_handover_pending_ping");
+ pping->wrapped_notify_arg.rr_policy = glb_policy->rr_policy;
+ if (grpc_lb_glb_trace) {
+ gpr_log(GPR_INFO, "Pending ping about to PING from 0x%" PRIxPTR "",
+ (intptr_t)glb_policy->rr_policy);
+ }
+ grpc_lb_policy_ping_one(exec_ctx, glb_policy->rr_policy,
+ &pping->wrapped_notify);
+ pping->wrapped_notify_arg.owning_pending_node = pping;
+ }
+ GRPC_ERROR_UNREF(error);
+}
+
+static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error) {
+ 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 */
+ rr_handover(exec_ctx, glb_policy, error);
+ } else {
+ /* shutting down and no new serverlist available. Bail out. */
+ gpr_free(rr_conn_data);
+ }
+ } else {
+ if (error == GRPC_ERROR_NONE) {
+ /* RR not shutting down. Mimic the RR's policy state */
+ grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker,
+ rr_conn_data->state, error,
+ "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);
+ } else { /* error */
+ gpr_free(rr_conn_data);
+ }
+ }
+ GRPC_ERROR_UNREF(error);
+}
+
+static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx,
+ grpc_lb_policy_factory *factory,
+ grpc_lb_policy_args *args) {
+ glb_lb_policy *glb_policy = gpr_malloc(sizeof(*glb_policy));
+ memset(glb_policy, 0, sizeof(*glb_policy));
+
+ /* All input addresses in args->addresses come from a resolver that claims
+ * they are LB services. It's the resolver's responsibility to make sure this
+ * policy is only instantiated and used in that case.
+ *
+ * Create a client channel over them to communicate with a LB service */
+ glb_policy->cc_factory = args->client_channel_factory;
+ GPR_ASSERT(glb_policy->cc_factory != NULL);
+ if (args->addresses->naddrs == 0) {
+ return NULL;
+ }
+
+ /* construct a target from the args->addresses, in the form
+ * ipvX://ip1:port1,ip2:port2,...
+ * TODO(dgq): support mixed ip version */
+ char **addr_strs = gpr_malloc(sizeof(char *) * args->addresses->naddrs);
+ addr_strs[0] =
+ grpc_sockaddr_to_uri((const struct sockaddr *)&args->addresses->addrs[0]);
+ for (size_t i = 1; i < args->addresses->naddrs; i++) {
+ GPR_ASSERT(grpc_sockaddr_to_string(
+ &addr_strs[i],
+ (const struct sockaddr *)&args->addresses->addrs[i],
+ true) == 0);
+ }
+ size_t uri_path_len;
+ char *target_uri_str = gpr_strjoin_sep(
+ (const char **)addr_strs, args->addresses->naddrs, ",", &uri_path_len);
+
+ /* will pick using pick_first */
+ glb_policy->lb_channel = grpc_client_channel_factory_create_channel(
+ exec_ctx, glb_policy->cc_factory, target_uri_str,
+ GRPC_CLIENT_CHANNEL_TYPE_LOAD_BALANCING, NULL);
+
+ gpr_free(target_uri_str);
+ for (size_t i = 0; i < args->addresses->naddrs; i++) {
+ gpr_free(addr_strs[i]);
+ }
+ gpr_free(addr_strs);
+
+ if (glb_policy->lb_channel == NULL) {
+ gpr_free(glb_policy);
+ 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, 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;
+}
+
+static void glb_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
+ glb_lb_policy *glb_policy = (glb_lb_policy *)pol;
+ GPR_ASSERT(glb_policy->pending_picks == NULL);
+ GPR_ASSERT(glb_policy->pending_pings == NULL);
+ grpc_channel_destroy(glb_policy->lb_channel);
+ glb_policy->lb_channel = NULL;
+ grpc_connectivity_state_destroy(exec_ctx, &glb_policy->state_tracker);
+ if (glb_policy->serverlist != NULL) {
+ grpc_grpclb_destroy_serverlist(glb_policy->serverlist);
+ }
+ gpr_mu_destroy(&glb_policy->mu);
+ 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);
+
+ pending_pick *pp = glb_policy->pending_picks;
+ glb_policy->pending_picks = NULL;
+ pending_ping *pping = glb_policy->pending_pings;
+ glb_policy->pending_pings = NULL;
+ gpr_mu_unlock(&glb_policy->mu);
+
+ while (pp != NULL) {
+ pending_pick *next = pp->next;
+ *pp->target = NULL;
+ grpc_exec_ctx_sched(exec_ctx, &pp->wrapped_on_complete, GRPC_ERROR_NONE,
+ NULL);
+ gpr_free(pp);
+ pp = next;
+ }
+
+ while (pping != NULL) {
+ pending_ping *next = pping->next;
+ grpc_exec_ctx_sched(exec_ctx, &pping->wrapped_notify, 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,
+ grpc_connected_subchannel **target) {
+ glb_lb_policy *glb_policy = (glb_lb_policy *)pol;
+ gpr_mu_lock(&glb_policy->mu);
+ pending_pick *pp = glb_policy->pending_picks;
+ glb_policy->pending_picks = NULL;
+ while (pp != NULL) {
+ pending_pick *next = pp->next;
+ if (pp->target == target) {
+ grpc_polling_entity_del_from_pollset_set(
+ exec_ctx, pp->pollent, glb_policy->base.interested_parties);
+ *target = NULL;
+ grpc_exec_ctx_sched(exec_ctx, &pp->wrapped_on_complete,
+ GRPC_ERROR_CANCELLED, NULL);
+ gpr_free(pp);
+ } else {
+ pp->next = glb_policy->pending_picks;
+ glb_policy->pending_picks = pp;
+ }
+ pp = next;
+ }
+ gpr_mu_unlock(&glb_policy->mu);
+}
+
+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) {
+ 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) {
+ pending_pick *next = pp->next;
+ if ((pp->initial_metadata_flags & initial_metadata_flags_mask) ==
+ initial_metadata_flags_eq) {
+ grpc_polling_entity_del_from_pollset_set(
+ exec_ctx, pp->pollent, glb_policy->base.interested_parties);
+ grpc_exec_ctx_sched(exec_ctx, &pp->wrapped_on_complete,
+ GRPC_ERROR_CANCELLED, NULL);
+ gpr_free(pp);
+ } else {
+ pp->next = glb_policy->pending_picks;
+ glb_policy->pending_picks = pp;
+ }
+ pp = next;
+ }
+ gpr_mu_unlock(&glb_policy->mu);
+}
+
+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) {
+ glb_policy->started_picking = true;
+ query_for_backends(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);
+ }
+ gpr_mu_unlock(&glb_policy->mu);
+}
+
+static int glb_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
+ grpc_polling_entity *pollent,
+ grpc_metadata_batch *initial_metadata,
+ uint32_t initial_metadata_flags,
+ grpc_connected_subchannel **target,
+ grpc_closure *on_complete) {
+ glb_lb_policy *glb_policy = (glb_lb_policy *)pol;
+ gpr_mu_lock(&glb_policy->mu);
+ int r;
+
+ 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);
+ }
+ GRPC_LB_POLICY_REF(glb_policy->rr_policy, "glb_pick");
+ memset(&glb_policy->wc_arg, 0, sizeof(wrapped_rr_closure_arg));
+ glb_policy->wc_arg.rr_policy = glb_policy->rr_policy;
+ glb_policy->wc_arg.wrapped_closure = on_complete;
+ grpc_closure_init(&glb_policy->wrapped_on_complete, wrapped_rr_closure,
+ &glb_policy->wc_arg);
+ r = grpc_lb_policy_pick(exec_ctx, glb_policy->rr_policy, pollent,
+ initial_metadata, initial_metadata_flags, target,
+ &glb_policy->wrapped_on_complete);
+ if (r != 0) {
+ /* the call to grpc_lb_policy_pick has been sychronous. Unreffing the RR
+ * policy and notify the original callback */
+ glb_policy->wc_arg.wrapped_closure = NULL;
+ if (grpc_lb_glb_trace) {
+ gpr_log(GPR_INFO, "Unreffing RR (0x%" PRIxPTR ")",
+ (intptr_t)glb_policy->wc_arg.rr_policy);
+ }
+ GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->wc_arg.rr_policy, "glb_pick");
+ grpc_exec_ctx_sched(exec_ctx, glb_policy->wc_arg.wrapped_closure,
+ GRPC_ERROR_NONE, NULL);
+ }
+ } else {
+ grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent,
+ glb_policy->base.interested_parties);
+ add_pending_pick(&glb_policy->pending_picks, pollent, initial_metadata,
+ initial_metadata_flags, target, on_complete);
+
+ if (!glb_policy->started_picking) {
+ start_picking(exec_ctx, glb_policy);
+ }
+ r = 0;
+ }
+ gpr_mu_unlock(&glb_policy->mu);
+ return r;
+}
+
+static grpc_connectivity_state glb_check_connectivity(
+ grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
+ grpc_error **connectivity_error) {
+ glb_lb_policy *glb_policy = (glb_lb_policy *)pol;
+ grpc_connectivity_state st;
+ gpr_mu_lock(&glb_policy->mu);
+ st = grpc_connectivity_state_check(&glb_policy->state_tracker,
+ connectivity_error);
+ gpr_mu_unlock(&glb_policy->mu);
+ return st;
+}
+
+static void glb_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
+ grpc_closure *closure) {
+ glb_lb_policy *glb_policy = (glb_lb_policy *)pol;
+ gpr_mu_lock(&glb_policy->mu);
+ if (glb_policy->rr_policy) {
+ grpc_lb_policy_ping_one(exec_ctx, glb_policy->rr_policy, closure);
+ } else {
+ add_pending_ping(&glb_policy->pending_pings, closure);
+ if (!glb_policy->started_picking) {
+ start_picking(exec_ctx, glb_policy);
+ }
+ }
+ gpr_mu_unlock(&glb_policy->mu);
+}
+
+static void glb_notify_on_state_change(grpc_exec_ctx *exec_ctx,
+ grpc_lb_policy *pol,
+ grpc_connectivity_state *current,
+ grpc_closure *notify) {
+ glb_lb_policy *glb_policy = (glb_lb_policy *)pol;
+ gpr_mu_lock(&glb_policy->mu);
+ grpc_connectivity_state_notify_on_state_change(
+ exec_ctx, &glb_policy->state_tracker, current, notify);
+
+ 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 initial metadata's been received */
+ grpc_closure md_rcvd;
+
+ /* 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 md_recv_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) {
+ 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->md_rcvd, md_recv_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);
+
+ /* TODO(dgq): get the deadline from the client config instead of fabricating
+ * one here. */
+ lb_client->deadline = gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
+ gpr_time_from_seconds(3, GPR_TIMESPAN));
+
+ lb_client->lb_call = grpc_channel_create_pollset_set_call(
+ glb_policy->lb_channel, NULL, GRPC_PROPAGATE_DEFAULTS,
+ glb_policy->base.interested_parties, "/BalanceLoad",
+ NULL, /* FIXME(dgq): which "host" value to use? */
+ lb_client->deadline, NULL);
+
+ grpc_metadata_array_init(&lb_client->initial_metadata_recv);
+ grpc_metadata_array_init(&lb_client->trailing_metadata_recv);
+
+ grpc_grpclb_request *request = grpc_grpclb_request_create(
+ "load.balanced.service.name"); /* FIXME(dgq): get the name of the load
+ balanced service from the resolver */
+ gpr_slice request_payload_slice = grpc_grpclb_request_encode(request);
+ lb_client->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;
+}
+
+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);
+
+ grpc_byte_buffer_destroy(lb_client->request_payload);
+
+ 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;
+}
+
+/*
+ * Auxiliary functions and LB client callbacks.
+ */
+static void query_for_backends(grpc_exec_ctx *exec_ctx,
+ glb_lb_policy *glb_policy) {
+ GPR_ASSERT(glb_policy->lb_channel != NULL);
+
+ glb_policy->lb_client = lb_client_data_create(glb_policy);
+ grpc_call_error call_error;
+ grpc_op ops[1];
+ 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->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;
+ op->op = GRPC_OP_RECV_INITIAL_METADATA;
+ op->data.recv_initial_metadata = &lb_client->initial_metadata_recv;
+ 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->md_rcvd);
+ GPR_ASSERT(GRPC_CALL_OK == call_error);
+}
+
+static void md_recv_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;
+
+ op->op = GRPC_OP_SEND_MESSAGE;
+ op->data.send_message = lb_client->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;
+
+ grpc_op ops[1];
+ memset(ops, 0, sizeof(ops));
+ grpc_op *op = ops;
+
+ op->op = GRPC_OP_RECV_MESSAGE;
+ op->data.recv_message = &lb_client->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);
+ 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;
+ grpc_op ops[2];
+ memset(ops, 0, sizeof(ops));
+ grpc_op *op = ops;
+ if (lb_client->response_payload != NULL) {
+ /* Received data from the LB server. Look inside
+ * lb_client->response_payload, for
+ * a serverlist. */
+ grpc_byte_buffer_reader bbr;
+ grpc_byte_buffer_reader_init(&bbr, lb_client->response_payload);
+ gpr_slice response_slice = grpc_byte_buffer_reader_readall(&bbr);
+ grpc_byte_buffer_destroy(lb_client->response_payload);
+ grpc_grpclb_serverlist *serverlist =
+ grpc_grpclb_response_parse_serverlist(response_slice);
+ if (serverlist != NULL) {
+ gpr_slice_unref(response_slice);
+ if (grpc_lb_glb_trace) {
+ gpr_log(GPR_INFO, "Serverlist with %zu servers received",
+ serverlist->num_servers);
+ }
+
+ /* update serverlist */
+ if (serverlist->num_servers > 0) {
+ if (grpc_grpclb_serverlist_equals(lb_client->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) {
+ /* dispose of the old serverlist */
+ grpc_grpclb_destroy_serverlist(lb_client->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(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
+ * rr_connectivity_changed) */
+ GRPC_LB_POLICY_UNREF(exec_ctx, lb_client->glb_policy->rr_policy,
+ "serverlist_received");
+ }
+ } else {
+ if (grpc_lb_glb_trace) {
+ gpr_log(GPR_INFO,
+ "Received empty server list. Picks will stay pending until a "
+ "response with > 0 servers is received");
+ }
+ }
+
+ /* keep listening for serverlist updates */
+ op->op = GRPC_OP_RECV_MESSAGE;
+ op->data.recv_message = &lb_client->response_payload;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ 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 */
+ 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);
+ }
+ /* 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 srv_status_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error) {
+ lb_client_data *lb_client = arg;
+ if (grpc_lb_glb_trace) {
+ gpr_log(GPR_INFO,
+ "status from lb server received. Status = %d, Details = '%s', "
+ "Capaticy "
+ "= %zu",
+ lb_client->status, lb_client->status_details,
+ lb_client->status_details_capacity);
+ }
+ /* TODO(dgq): deal with stream termination properly (fire up another one? fail
+ * the original call?) */
+}
+
+/* Code wiring the policy with the rest of the core */
+static const grpc_lb_policy_vtable glb_lb_policy_vtable = {
+ glb_destroy, glb_shutdown, glb_pick,
+ glb_cancel_pick, glb_cancel_picks, glb_ping_one,
+ glb_exit_idle, glb_check_connectivity, glb_notify_on_state_change};
+
+static void glb_factory_ref(grpc_lb_policy_factory *factory) {}
+
+static void glb_factory_unref(grpc_lb_policy_factory *factory) {}
+
+static const grpc_lb_policy_factory_vtable glb_factory_vtable = {
+ glb_factory_ref, glb_factory_unref, glb_create, "grpclb"};
+
+static grpc_lb_policy_factory glb_lb_policy_factory = {&glb_factory_vtable};
+
+grpc_lb_policy_factory *grpc_glb_lb_factory_create() {
+ return &glb_lb_policy_factory;
+}
+
+/* Plugin registration */
+void grpc_lb_policy_grpclb_init() {
+ grpc_register_lb_policy(grpc_glb_lb_factory_create());
+ grpc_register_tracer("glb", &grpc_lb_glb_trace);
+}
+
+void grpc_lb_policy_grpclb_shutdown() {}
diff --git a/src/core/ext/lb_policy/grpclb/grpclb.h b/src/core/ext/lb_policy/grpclb/grpclb.h
new file mode 100644
index 0000000000..83552b4fa0
--- /dev/null
+++ b/src/core/ext/lb_policy/grpclb/grpclb.h
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+#ifndef GRPC_CORE_EXT_LB_POLICY_GRPCLB_GRPCLB_H
+#define GRPC_CORE_EXT_LB_POLICY_GRPCLB_GRPCLB_H
+
+#include "src/core/ext/client_config/lb_policy_factory.h"
+
+/** Returns a load balancing factory for the glb policy, which tries to connect
+ * to a load balancing server to decide the next successfully connected
+ * subchannel to pick. */
+grpc_lb_policy_factory *grpc_glb_lb_factory_create();
+
+#endif /* GRPC_CORE_EXT_LB_POLICY_GRPCLB_GRPCLB_H */
diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.c b/src/core/ext/lb_policy/grpclb/load_balancer_api.c
index 59b89997dd..f4720a1345 100644
--- a/src/core/ext/lb_policy/grpclb/load_balancer_api.c
+++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.c
@@ -38,9 +38,15 @@
#include <grpc/support/alloc.h>
typedef struct decode_serverlist_arg {
- int first_pass;
- int i;
+ /* The first pass counts the number of servers in the server list. The second
+ * one allocates and decodes. */
+ bool first_pass;
+ /* The decoding callback is invoked once per server in serverlist. Remember
+ * which index of the serverlist are we currently decoding */
+ size_t decoding_idx;
+ /* Populated after the first pass. Number of server in the input serverlist */
size_t num_servers;
+ /* The decoded serverlist */
grpc_grpclb_server **servers;
} decode_serverlist_arg;
@@ -48,23 +54,24 @@ typedef struct decode_serverlist_arg {
static bool decode_serverlist(pb_istream_t *stream, const pb_field_t *field,
void **arg) {
decode_serverlist_arg *dec_arg = *arg;
- if (dec_arg->first_pass != 0) { /* first pass */
+ if (dec_arg->first_pass) { /* count how many server do we have */
grpc_grpclb_server server;
if (!pb_decode(stream, grpc_lb_v1_Server_fields, &server)) {
return false;
}
dec_arg->num_servers++;
- } else { /* second pass */
+ } else { /* second pass. Actually decode. */
grpc_grpclb_server *server = gpr_malloc(sizeof(grpc_grpclb_server));
+ memset(server, 0, sizeof(grpc_grpclb_server));
GPR_ASSERT(dec_arg->num_servers > 0);
- if (dec_arg->i == 0) { /* first iteration of second pass */
+ if (dec_arg->decoding_idx == 0) { /* first iteration of second pass */
dec_arg->servers =
gpr_malloc(sizeof(grpc_grpclb_server *) * dec_arg->num_servers);
}
if (!pb_decode(stream, grpc_lb_v1_Server_fields, server)) {
return false;
}
- dec_arg->servers[dec_arg->i++] = server;
+ dec_arg->servers[dec_arg->decoding_idx++] = server;
}
return true;
@@ -102,57 +109,59 @@ void grpc_grpclb_request_destroy(grpc_grpclb_request *request) {
gpr_free(request);
}
-grpc_grpclb_response *grpc_grpclb_response_parse(gpr_slice encoded_response) {
- bool status;
+typedef grpc_lb_v1_LoadBalanceResponse grpc_grpclb_response;
+grpc_grpclb_initial_response *grpc_grpclb_initial_response_parse(
+ gpr_slice encoded_grpc_grpclb_response) {
pb_istream_t stream =
- pb_istream_from_buffer(GPR_SLICE_START_PTR(encoded_response),
- GPR_SLICE_LENGTH(encoded_response));
- grpc_grpclb_response *res = gpr_malloc(sizeof(grpc_grpclb_response));
- memset(res, 0, sizeof(*res));
- status = pb_decode(&stream, grpc_lb_v1_LoadBalanceResponse_fields, res);
- if (!status) {
- grpc_grpclb_response_destroy(res);
+ pb_istream_from_buffer(GPR_SLICE_START_PTR(encoded_grpc_grpclb_response),
+ GPR_SLICE_LENGTH(encoded_grpc_grpclb_response));
+ grpc_grpclb_response res;
+ memset(&res, 0, sizeof(grpc_grpclb_response));
+ if (!pb_decode(&stream, grpc_lb_v1_LoadBalanceResponse_fields, &res)) {
return NULL;
}
- return res;
+ grpc_grpclb_initial_response *initial_res =
+ gpr_malloc(sizeof(grpc_grpclb_initial_response));
+ memcpy(initial_res, &res.initial_response,
+ sizeof(grpc_grpclb_initial_response));
+
+ return initial_res;
}
grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist(
- gpr_slice encoded_response) {
+ gpr_slice encoded_grpc_grpclb_response) {
bool status;
decode_serverlist_arg arg;
pb_istream_t stream =
- pb_istream_from_buffer(GPR_SLICE_START_PTR(encoded_response),
- GPR_SLICE_LENGTH(encoded_response));
+ pb_istream_from_buffer(GPR_SLICE_START_PTR(encoded_grpc_grpclb_response),
+ GPR_SLICE_LENGTH(encoded_grpc_grpclb_response));
pb_istream_t stream_at_start = stream;
- grpc_grpclb_response *res = gpr_malloc(sizeof(grpc_grpclb_response));
- memset(res, 0, sizeof(*res));
+ grpc_grpclb_response res;
+ memset(&res, 0, sizeof(grpc_grpclb_response));
memset(&arg, 0, sizeof(decode_serverlist_arg));
- res->server_list.servers.funcs.decode = decode_serverlist;
- res->server_list.servers.arg = &arg;
- arg.first_pass = 1;
- status = pb_decode(&stream, grpc_lb_v1_LoadBalanceResponse_fields, res);
+ res.server_list.servers.funcs.decode = decode_serverlist;
+ res.server_list.servers.arg = &arg;
+ arg.first_pass = true;
+ status = pb_decode(&stream, grpc_lb_v1_LoadBalanceResponse_fields, &res);
if (!status) {
- grpc_grpclb_response_destroy(res);
return NULL;
}
- arg.first_pass = 0;
+ arg.first_pass = false;
status =
- pb_decode(&stream_at_start, grpc_lb_v1_LoadBalanceResponse_fields, res);
+ pb_decode(&stream_at_start, grpc_lb_v1_LoadBalanceResponse_fields, &res);
if (!status) {
- grpc_grpclb_response_destroy(res);
return NULL;
}
grpc_grpclb_serverlist *sl = gpr_malloc(sizeof(grpc_grpclb_serverlist));
+ memset(sl, 0, sizeof(*sl));
sl->num_servers = arg.num_servers;
sl->servers = arg.servers;
- if (res->server_list.has_expiration_interval) {
- sl->expiration_interval = res->server_list.expiration_interval;
+ if (res.server_list.has_expiration_interval) {
+ sl->expiration_interval = res.server_list.expiration_interval;
}
- grpc_grpclb_response_destroy(res);
return sl;
}
@@ -167,6 +176,72 @@ void grpc_grpclb_destroy_serverlist(grpc_grpclb_serverlist *serverlist) {
gpr_free(serverlist);
}
-void grpc_grpclb_response_destroy(grpc_grpclb_response *response) {
+grpc_grpclb_serverlist *grpc_grpclb_serverlist_copy(
+ const grpc_grpclb_serverlist *sl) {
+ grpc_grpclb_serverlist *copy = gpr_malloc(sizeof(grpc_grpclb_serverlist));
+ memset(copy, 0, sizeof(grpc_grpclb_serverlist));
+ copy->num_servers = sl->num_servers;
+ memcpy(&copy->expiration_interval, &sl->expiration_interval,
+ sizeof(grpc_grpclb_duration));
+ copy->servers = gpr_malloc(sizeof(grpc_grpclb_server *) * sl->num_servers);
+ for (size_t i = 0; i < sl->num_servers; i++) {
+ copy->servers[i] = gpr_malloc(sizeof(grpc_grpclb_server));
+ memcpy(copy->servers[i], sl->servers[i], sizeof(grpc_grpclb_server));
+ }
+ return copy;
+}
+
+bool grpc_grpclb_serverlist_equals(const grpc_grpclb_serverlist *lhs,
+ const grpc_grpclb_serverlist *rhs) {
+ if ((lhs == NULL) || (rhs == NULL)) {
+ return false;
+ }
+ if (lhs->num_servers != rhs->num_servers) {
+ return false;
+ }
+ if (grpc_grpclb_duration_compare(&lhs->expiration_interval,
+ &rhs->expiration_interval) != 0) {
+ return false;
+ }
+ for (size_t i = 0; i < lhs->num_servers; i++) {
+ if (!grpc_grpclb_server_equals(lhs->servers[i], rhs->servers[i])) {
+ return false;
+ }
+ }
+ return true;
+}
+
+bool grpc_grpclb_server_equals(const grpc_grpclb_server *lhs,
+ const grpc_grpclb_server *rhs) {
+ return memcmp(lhs, rhs, sizeof(grpc_grpclb_server)) == 0;
+}
+
+int grpc_grpclb_duration_compare(const grpc_grpclb_duration *lhs,
+ const grpc_grpclb_duration *rhs) {
+ GPR_ASSERT(lhs && rhs);
+ if (lhs->has_seconds && rhs->has_seconds) {
+ if (lhs->seconds < rhs->seconds) return -1;
+ if (lhs->seconds > rhs->seconds) return 1;
+ } else if (lhs->has_seconds) {
+ return 1;
+ } else if (rhs->has_seconds) {
+ return -1;
+ }
+
+ GPR_ASSERT(lhs->seconds == rhs->seconds);
+ if (lhs->has_nanos && rhs->has_nanos) {
+ if (lhs->nanos < rhs->nanos) return -1;
+ if (lhs->nanos > rhs->nanos) return 1;
+ } else if (lhs->has_nanos) {
+ return 1;
+ } else if (rhs->has_nanos) {
+ return -1;
+ }
+
+ return 0;
+}
+
+void grpc_grpclb_initial_response_destroy(
+ grpc_grpclb_initial_response *response) {
gpr_free(response);
}
diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.h b/src/core/ext/lb_policy/grpclb/load_balancer_api.h
index 71b5616d0c..9726c87a37 100644
--- a/src/core/ext/lb_policy/grpclb/load_balancer_api.h
+++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.h
@@ -46,7 +46,7 @@ extern "C" {
#define GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH 128
typedef grpc_lb_v1_LoadBalanceRequest grpc_grpclb_request;
-typedef grpc_lb_v1_LoadBalanceResponse grpc_grpclb_response;
+typedef grpc_lb_v1_InitialLoadBalanceResponse grpc_grpclb_initial_response;
typedef grpc_lb_v1_Server grpc_grpclb_server;
typedef grpc_lb_v1_Duration grpc_grpclb_duration;
typedef struct grpc_grpclb_serverlist {
@@ -64,19 +64,37 @@ gpr_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request);
/** Destroy \a request */
void grpc_grpclb_request_destroy(grpc_grpclb_request *request);
-/** Parse (ie, decode) the bytes in \a encoded_response as a \a
- * grpc_grpclb_response */
-grpc_grpclb_response *grpc_grpclb_response_parse(gpr_slice encoded_response);
+/** Parse (ie, decode) the bytes in \a encoded_grpc_grpclb_response as a \a
+ * grpc_grpclb_initial_response */
+grpc_grpclb_initial_response *grpc_grpclb_initial_response_parse(
+ gpr_slice encoded_grpc_grpclb_response);
+
+/** Parse the list of servers from an encoded \a grpc_grpclb_response */
+grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist(
+ gpr_slice encoded_grpc_grpclb_response);
+
+/** Return a copy of \a sl. The caller is responsible for calling \a
+ * grpc_grpclb_destroy_serverlist on the returned copy. */
+grpc_grpclb_serverlist *grpc_grpclb_serverlist_copy(
+ const grpc_grpclb_serverlist *sl);
+
+bool grpc_grpclb_serverlist_equals(const grpc_grpclb_serverlist *lhs,
+ const grpc_grpclb_serverlist *rhs);
+
+bool grpc_grpclb_server_equals(const grpc_grpclb_server *lhs,
+ const grpc_grpclb_server *rhs);
/** Destroy \a serverlist */
void grpc_grpclb_destroy_serverlist(grpc_grpclb_serverlist *serverlist);
-/** Parse the list of servers from an encoded \a grpc_grpclb_response */
-grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist(
- gpr_slice encoded_response);
+/** Compare \a lhs against \a rhs and return 0 if \a lhs and \a rhs are equal,
+ * < 0 if \a lhs represents a duration shorter than \a rhs and > 0 otherwise */
+int grpc_grpclb_duration_compare(const grpc_grpclb_duration *lhs,
+ const grpc_grpclb_duration *rhs);
-/** Destroy \a response */
-void grpc_grpclb_response_destroy(grpc_grpclb_response *response);
+/** Destroy \a initial_response */
+void grpc_grpclb_initial_response_destroy(
+ grpc_grpclb_initial_response *response);
#ifdef __cplusplus
}
diff --git a/src/core/ext/load_reporting/load_reporting.c b/src/core/ext/load_reporting/load_reporting.c
index 9e4d32676f..df1ea0ec9a 100644
--- a/src/core/ext/load_reporting/load_reporting.c
+++ b/src/core/ext/load_reporting/load_reporting.c
@@ -42,42 +42,12 @@
#include "src/core/lib/channel/channel_stack_builder.h"
#include "src/core/lib/surface/channel_init.h"
-struct grpc_load_reporting_config {
- grpc_load_reporting_fn fn;
- void *user_data;
-};
-
-grpc_load_reporting_config *grpc_load_reporting_config_create(
- grpc_load_reporting_fn fn, void *user_data) {
- GPR_ASSERT(fn != NULL);
- grpc_load_reporting_config *lrc =
- gpr_malloc(sizeof(grpc_load_reporting_config));
- lrc->fn = fn;
- lrc->user_data = user_data;
- return lrc;
-}
-
-grpc_load_reporting_config *grpc_load_reporting_config_copy(
- grpc_load_reporting_config *src) {
- return grpc_load_reporting_config_create(src->fn, src->user_data);
-}
-
-void grpc_load_reporting_config_destroy(grpc_load_reporting_config *lrc) {
- gpr_free(lrc);
-}
-
-void grpc_load_reporting_config_call(
- grpc_load_reporting_config *lrc,
- const grpc_load_reporting_call_data *call_data) {
- lrc->fn(call_data, lrc->user_data);
-}
-
static bool is_load_reporting_enabled(const grpc_channel_args *a) {
if (a == NULL) return false;
for (size_t i = 0; i < a->num_args; i++) {
if (0 == strcmp(a->args[i].key, GRPC_ARG_ENABLE_LOAD_REPORTING)) {
- return a->args[i].type == GRPC_ARG_POINTER &&
- a->args[i].value.pointer.p != NULL;
+ return a->args[i].type == GRPC_ARG_INTEGER &&
+ a->args[i].value.integer != 0;
}
}
return false;
@@ -94,37 +64,17 @@ static bool maybe_add_load_reporting_filter(grpc_channel_stack_builder *builder,
return true;
}
-static void lrd_arg_destroy(void *p) { grpc_load_reporting_config_destroy(p); }
-
-static void *lrd_arg_copy(void *p) {
- return grpc_load_reporting_config_copy(p);
-}
-
-static int lrd_arg_cmp(void *a, void *b) {
- grpc_load_reporting_config *lhs = a;
- grpc_load_reporting_config *rhs = b;
- return !(lhs->fn == rhs->fn && lhs->user_data == rhs->user_data);
-}
-
-static const grpc_arg_pointer_vtable lrd_ptr_vtable = {
- lrd_arg_copy, lrd_arg_destroy, lrd_arg_cmp};
-
-grpc_arg grpc_load_reporting_config_create_arg(
- grpc_load_reporting_config *lrc) {
+grpc_arg grpc_load_reporting_enable_arg() {
grpc_arg arg;
- arg.type = GRPC_ARG_POINTER;
+ arg.type = GRPC_ARG_INTEGER;
arg.key = GRPC_ARG_ENABLE_LOAD_REPORTING;
- arg.value.pointer.p = lrc;
- arg.value.pointer.vtable = &lrd_ptr_vtable;
+ arg.value.integer = 1;
return arg;
}
/* Plugin registration */
void grpc_load_reporting_plugin_init(void) {
- grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX,
- maybe_add_load_reporting_filter,
- (void *)&grpc_load_reporting_filter);
grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX,
maybe_add_load_reporting_filter,
(void *)&grpc_load_reporting_filter);
diff --git a/src/core/ext/load_reporting/load_reporting.h b/src/core/ext/load_reporting/load_reporting.h
index 316cd89bd7..e37817d8c2 100644
--- a/src/core/ext/load_reporting/load_reporting.h
+++ b/src/core/ext/load_reporting/load_reporting.h
@@ -34,42 +34,47 @@
#ifndef GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_H
#define GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_H
-#include "src/core/lib/iomgr/closure.h"
-#include "src/core/lib/surface/call.h"
+#include <grpc/impl/codegen/grpc_types.h>
+#include "src/core/lib/channel/channel_stack.h"
-typedef struct grpc_load_reporting_config grpc_load_reporting_config;
+/** Metadata key for initial metadata coming from clients */
+/* TODO(dgq): change to the final value TBD */
+#define GRPC_LOAD_REPORTING_INITIAL_MD_KEY "load-reporting-initial"
-/** Call information to be passed to the provided load reporting function upon
- * completion of the call */
-typedef struct grpc_load_reporting_call_data {
- const grpc_call_stats *stats; /**< Stats for the call */
- const char *trailing_md_string; /**< LR trailing metadata info */
-} grpc_load_reporting_call_data;
+/** Metadata key for trailing metadata from servers */
+/* TODO(dgq): change to the final value TBD */
+#define GRPC_LOAD_REPORTING_TRAILING_MD_KEY "load-reporting-trailing"
-/** Custom function to be called by the load reporting filter. */
-typedef void (*grpc_load_reporting_fn)(
- const grpc_load_reporting_call_data *call_data, void *user_data);
+/** Identifiers for the invocation point of the users LR callback */
+typedef enum grpc_load_reporting_source {
+ GRPC_LR_POINT_UNKNOWN = 0,
+ GRPC_LR_POINT_CHANNEL_CREATION,
+ GRPC_LR_POINT_CHANNEL_DESTRUCTION,
+ GRPC_LR_POINT_CALL_CREATION,
+ GRPC_LR_POINT_CALL_DESTRUCTION
+} grpc_load_reporting_source;
-/** Register \a fn as the function to be invoked by the load reporting filter.
- * \a fn will be invoked at the beginning and at the end of the call.
- *
- * For the first invocation, \a fn's first argument
- * (grpc_load_reporting_call_data*) will be NULL. \a user_data is always passed
- * as-is. */
-grpc_load_reporting_config *grpc_load_reporting_config_create(
- grpc_load_reporting_fn fn, void *user_data);
+/** Call information to be passed to the provided LR callback. */
+typedef struct grpc_load_reporting_call_data {
+ const grpc_load_reporting_source source; /**< point of last data update. */
+
+ /** Unique identifier for the channel associated with the data */
+ intptr_t channel_id;
-grpc_load_reporting_config *grpc_load_reporting_config_copy(
- grpc_load_reporting_config *src);
+ /** Unique identifier for the call associated with the data. If the call
+ * hasn't been created yet, it'll have a value of zero. */
+ intptr_t call_id;
-void grpc_load_reporting_config_destroy(grpc_load_reporting_config *lrc);
+ /** Only valid when \a source is \a GRPC_LR_POINT_CALL_DESTRUCTION, that is,
+ * once the call has completed */
+ const grpc_call_final_info *final_info;
-/** Invoke the function registered by \a grpc_load_reporting_init. */
-void grpc_load_reporting_config_call(
- grpc_load_reporting_config *lrc,
- const grpc_load_reporting_call_data *call_data);
+ const char *initial_md_string; /**< value string for LR's initial md key */
+ const char *trailing_md_string; /**< value string for LR's trailing md key */
+ const char *method_name; /**< Corresponds to :path header */
+} grpc_load_reporting_call_data;
/** Return a \a grpc_arg enabling load reporting */
-grpc_arg grpc_load_reporting_config_create_arg(grpc_load_reporting_config *lrc);
+grpc_arg grpc_load_reporting_enable_arg();
#endif /* GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_H */
diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c
index f372f88c3a..394f0cb832 100644
--- a/src/core/ext/load_reporting/load_reporting_filter.c
+++ b/src/core/ext/load_reporting/load_reporting_filter.c
@@ -31,6 +31,7 @@
*
*/
+#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
@@ -42,38 +43,112 @@
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/transport/static_metadata.h"
-typedef struct call_data { const char *trailing_md_string; } call_data;
+typedef struct call_data {
+ intptr_t id; /**< an id unique to the call */
+ char *trailing_md_string;
+ char *initial_md_string;
+ const char *service_method;
+
+ /* stores the recv_initial_metadata op's ready closure, which we wrap with our
+ * own (on_initial_md_ready) in order to capture the incoming initial metadata
+ * */
+ grpc_closure *ops_recv_initial_metadata_ready;
+
+ /* to get notified of the availability of the incoming initial metadata. */
+ grpc_closure on_initial_md_ready;
+ grpc_metadata_batch *recv_initial_metadata;
+} call_data;
+
typedef struct channel_data {
- gpr_mu mu;
- grpc_load_reporting_config *lrc;
+ intptr_t id; /**< an id unique to the channel */
} channel_data;
-static void invoke_lr_fn_locked(grpc_load_reporting_config *lrc,
- grpc_load_reporting_call_data *lr_call_data) {
- GPR_TIMER_BEGIN("load_reporting_config_fn", 0);
- grpc_load_reporting_config_call(lrc, lr_call_data);
- GPR_TIMER_END("load_reporting_config_fn", 0);
+typedef struct {
+ grpc_call_element *elem;
+ grpc_exec_ctx *exec_ctx;
+} recv_md_filter_args;
+
+static grpc_mdelem *recv_md_filter(void *user_data, grpc_mdelem *md) {
+ recv_md_filter_args *a = user_data;
+ grpc_call_element *elem = a->elem;
+ call_data *calld = elem->call_data;
+
+ if (md->key == GRPC_MDSTR_PATH) {
+ calld->service_method = grpc_mdstr_as_c_string(md->value);
+ } else if (md->key == GRPC_MDSTR_LOAD_REPORTING_INITIAL) {
+ calld->initial_md_string = gpr_strdup(grpc_mdstr_as_c_string(md->value));
+ return NULL;
+ }
+
+ return md;
+}
+
+static void on_initial_md_ready(grpc_exec_ctx *exec_ctx, void *user_data,
+ grpc_error *err) {
+ grpc_call_element *elem = user_data;
+ call_data *calld = elem->call_data;
+
+ if (err == GRPC_ERROR_NONE) {
+ recv_md_filter_args a;
+ a.elem = elem;
+ a.exec_ctx = exec_ctx;
+ grpc_metadata_batch_filter(calld->recv_initial_metadata, recv_md_filter,
+ &a);
+ if (calld->service_method == NULL) {
+ err =
+ grpc_error_add_child(err, GRPC_ERROR_CREATE("Missing :path header"));
+ }
+ } else {
+ GRPC_ERROR_REF(err);
+ }
+ calld->ops_recv_initial_metadata_ready->cb(
+ exec_ctx, calld->ops_recv_initial_metadata_ready->cb_arg, err);
+ GRPC_ERROR_UNREF(err);
}
/* Constructor for call_data */
-static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args) {
+static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
call_data *calld = elem->call_data;
memset(calld, 0, sizeof(call_data));
+
+ calld->id = (intptr_t)args->call_stack;
+ grpc_closure_init(&calld->on_initial_md_ready, on_initial_md_ready, elem);
+
+ /* TODO(dgq): do something with the data
+ channel_data *chand = elem->channel_data;
+ grpc_load_reporting_call_data lr_call_data = {GRPC_LR_POINT_CALL_CREATION,
+ (intptr_t)chand->id,
+ (intptr_t)calld->id,
+ NULL,
+ NULL,
+ NULL,
+ NULL};
+ */
+
+ return GRPC_ERROR_NONE;
}
/* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_stats *stats, void *ignored) {
- channel_data *chand = elem->channel_data;
+ const grpc_call_final_info *final_info,
+ void *ignored) {
call_data *calld = elem->call_data;
- grpc_load_reporting_call_data lr_call_data = {stats,
- calld->trailing_md_string};
-
- gpr_mu_lock(&chand->mu);
- invoke_lr_fn_locked(chand->lrc, &lr_call_data);
- gpr_mu_unlock(&chand->mu);
+ /* TODO(dgq): do something with the data
+ channel_data *chand = elem->channel_data;
+ grpc_load_reporting_call_data lr_call_data = {GRPC_LR_POINT_CALL_DESTRUCTION,
+ (intptr_t)chand->id,
+ (intptr_t)calld->id,
+ final_info,
+ calld->initial_md_string,
+ calld->trailing_md_string,
+ calld->service_method};
+ */
+
+ gpr_free(calld->initial_md_string);
+ gpr_free(calld->trailing_md_string);
}
/* Constructor for channel_data */
@@ -85,37 +160,40 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx,
channel_data *chand = elem->channel_data;
memset(chand, 0, sizeof(channel_data));
- gpr_mu_init(&chand->mu);
- for (size_t i = 0; i < args->channel_args->num_args; i++) {
- if (0 == strcmp(args->channel_args->args[i].key,
- GRPC_ARG_ENABLE_LOAD_REPORTING)) {
- grpc_load_reporting_config *arg_lrc =
- args->channel_args->args[i].value.pointer.p;
- chand->lrc = grpc_load_reporting_config_copy(arg_lrc);
- GPR_ASSERT(chand->lrc != NULL);
- break;
- }
- }
- GPR_ASSERT(chand->lrc != NULL); /* arg actually found */
-
- gpr_mu_lock(&chand->mu);
- invoke_lr_fn_locked(chand->lrc, NULL);
- gpr_mu_unlock(&chand->mu);
+ chand->id = (intptr_t)args->channel_stack;
+
+ /* TODO(dgq): do something with the data
+ grpc_load_reporting_call_data lr_call_data = {GRPC_LR_POINT_CHANNEL_CREATION,
+ (intptr_t)chand,
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ NULL};
+ */
}
/* Destructor for channel data */
static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
grpc_channel_element *elem) {
+ /* TODO(dgq): do something with the data
channel_data *chand = elem->channel_data;
- gpr_mu_destroy(&chand->mu);
- grpc_load_reporting_config_destroy(chand->lrc);
+ grpc_load_reporting_call_data lr_call_data = {
+ GRPC_LR_POINT_CHANNEL_DESTRUCTION,
+ (intptr_t)chand->id,
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ NULL};
+ */
}
static grpc_mdelem *lr_trailing_md_filter(void *user_data, grpc_mdelem *md) {
grpc_call_element *elem = user_data;
call_data *calld = elem->call_data;
- if (md->key == GRPC_MDSTR_LOAD_REPORTING) {
+ if (md->key == GRPC_MDSTR_LOAD_REPORTING_TRAILING) {
calld->trailing_md_string = gpr_strdup(grpc_mdstr_as_c_string(md->value));
return NULL;
}
@@ -127,8 +205,14 @@ static void lr_start_transport_stream_op(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_transport_stream_op *op) {
GPR_TIMER_BEGIN("lr_start_transport_stream_op", 0);
+ call_data *calld = elem->call_data;
- if (op->send_trailing_metadata) {
+ if (op->recv_initial_metadata) {
+ calld->recv_initial_metadata = op->recv_initial_metadata;
+ /* substitute our callback for the higher callback */
+ calld->ops_recv_initial_metadata_ready = op->recv_initial_metadata_ready;
+ op->recv_initial_metadata_ready = &calld->on_initial_md_ready;
+ } else if (op->send_trailing_metadata) {
grpc_metadata_batch_filter(op->send_trailing_metadata,
lr_trailing_md_filter, elem);
}
diff --git a/src/core/ext/load_reporting/load_reporting_filter.h b/src/core/ext/load_reporting/load_reporting_filter.h
index f69cd6fdc6..160ed32af9 100644
--- a/src/core/ext/load_reporting/load_reporting_filter.h
+++ b/src/core/ext/load_reporting/load_reporting_filter.h
@@ -34,6 +34,7 @@
#ifndef GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_FILTER_H
#define GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_FILTER_H
+#include "src/core/ext/load_reporting/load_reporting.h"
#include "src/core/lib/channel/channel_stack.h"
extern const grpc_channel_filter grpc_load_reporting_filter;
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
index d050467a02..6bd65cea02 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
@@ -46,12 +46,12 @@
#include "src/core/ext/transport/chttp2/transport/http2_errors.h"
#include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/ext/transport/chttp2/transport/status_conversion.h"
-#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h"
#include "src/core/lib/http/parser.h"
#include "src/core/lib/iomgr/workqueue.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/support/string.h"
#include "src/core/lib/transport/static_metadata.h"
+#include "src/core/lib/transport/timeout_encoding.h"
#include "src/core/lib/transport/transport_impl.h"
#define DEFAULT_WINDOW 65535
diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.c
index ebeee37f0d..2cb8205d94 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_encoder.c
+++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.c
@@ -47,10 +47,10 @@
#include "src/core/ext/transport/chttp2/transport/bin_encoder.h"
#include "src/core/ext/transport/chttp2/transport/hpack_table.h"
-#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h"
#include "src/core/ext/transport/chttp2/transport/varint.h"
#include "src/core/lib/transport/metadata.h"
#include "src/core/lib/transport/static_metadata.h"
+#include "src/core/lib/transport/timeout_encoding.h"
#define HASH_FRAGMENT_1(x) ((x)&255)
#define HASH_FRAGMENT_2(x) ((x >> 8) & 255)
@@ -456,9 +456,9 @@ static void hpack_enc(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem,
static void deadline_enc(grpc_chttp2_hpack_compressor *c, gpr_timespec deadline,
framer_state *st) {
- char timeout_str[GRPC_CHTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE];
+ char timeout_str[GRPC_HTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE];
grpc_mdelem *mdelem;
- grpc_chttp2_encode_timeout(
+ grpc_http2_encode_timeout(
gpr_time_sub(deadline, gpr_now(deadline.clock_type)), timeout_str);
mdelem = grpc_mdelem_from_metadata_strings(
GRPC_MDSTR_GRPC_TIMEOUT, grpc_mdstr_from_string(timeout_str));
diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c
index e1fc0ddee2..482cd55c44 100644
--- a/src/core/ext/transport/chttp2/transport/parsing.c
+++ b/src/core/ext/transport/chttp2/transport/parsing.c
@@ -41,9 +41,9 @@
#include "src/core/ext/transport/chttp2/transport/http2_errors.h"
#include "src/core/ext/transport/chttp2/transport/status_conversion.h"
-#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/transport/static_metadata.h"
+#include "src/core/lib/transport/timeout_encoding.h"
#define TRANSPORT_FROM_PARSING(tp) \
((grpc_chttp2_transport *)((char *)(tp)-offsetof(grpc_chttp2_transport, \
@@ -668,8 +668,8 @@ static void on_initial_header(void *tp, grpc_mdelem *md) {
if (!cached_timeout) {
/* not already parsed: parse it now, and store the result away */
cached_timeout = gpr_malloc(sizeof(gpr_timespec));
- if (!grpc_chttp2_decode_timeout(grpc_mdstr_as_c_string(md->value),
- cached_timeout)) {
+ if (!grpc_http2_decode_timeout(grpc_mdstr_as_c_string(md->value),
+ cached_timeout)) {
gpr_log(GPR_ERROR, "Ignoring bad timeout value '%s'",
grpc_mdstr_as_c_string(md->value));
*cached_timeout = gpr_inf_future(GPR_TIMESPAN);
diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c
index e0d87725e9..8f7a1f55c6 100644
--- a/src/core/ext/transport/chttp2/transport/writing.c
+++ b/src/core/ext/transport/chttp2/transport/writing.c
@@ -202,6 +202,7 @@ static void finalize_outbuf(grpc_exec_ctx *exec_ctx,
GPR_TIMER_BEGIN("finalize_outbuf", 0);
+ bool is_first_data_frame = true;
while (
grpc_chttp2_list_pop_writing_stream(transport_writing, &stream_writing)) {
uint32_t max_outgoing =
@@ -266,6 +267,11 @@ static void finalize_outbuf(grpc_exec_ctx *exec_ctx,
stream_writing->id, &stream_writing->flow_controlled_buffer,
send_bytes, is_last_frame, &stream_writing->stats,
&transport_writing->outbuf);
+ if (is_first_data_frame) {
+ /* TODO(dgq): this is a hack. It'll be fix in a future refactoring */
+ stream_writing->stats.data_bytes -= 5; /* discount grpc framing */
+ is_first_data_frame = false;
+ }
GRPC_CHTTP2_FLOW_DEBIT_STREAM("write", transport_writing,
stream_writing, outgoing_window,
send_bytes);
diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c
index 87175d7943..98f304f2da 100644
--- a/src/core/lib/channel/channel_stack.c
+++ b/src/core/lib/channel/channel_stack.c
@@ -157,12 +157,13 @@ void grpc_channel_stack_destroy(grpc_exec_ctx *exec_ctx,
}
}
-void grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
- grpc_channel_stack *channel_stack, int initial_refs,
- grpc_iomgr_cb_func destroy, void *destroy_arg,
- grpc_call_context_element *context,
- const void *transport_server_data,
- grpc_call_stack *call_stack) {
+grpc_error *grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
+ grpc_channel_stack *channel_stack,
+ int initial_refs, grpc_iomgr_cb_func destroy,
+ void *destroy_arg,
+ grpc_call_context_element *context,
+ const void *transport_server_data,
+ grpc_call_stack *call_stack) {
grpc_channel_element *channel_elems = CHANNEL_ELEMS_FROM_STACK(channel_stack);
grpc_call_element_args args;
size_t count = channel_stack->count;
@@ -178,6 +179,7 @@ void grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
ROUND_UP_TO_ALIGNMENT_SIZE(count * sizeof(grpc_call_element));
/* init per-filter data */
+ grpc_error *first_error = GRPC_ERROR_NONE;
for (i = 0; i < count; i++) {
args.call_stack = call_stack;
args.server_transport_data = transport_server_data;
@@ -185,10 +187,19 @@ void grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
call_elems[i].filter = channel_elems[i].filter;
call_elems[i].channel_data = channel_elems[i].channel_data;
call_elems[i].call_data = user_data;
- call_elems[i].filter->init_call_elem(exec_ctx, &call_elems[i], &args);
+ grpc_error *error =
+ call_elems[i].filter->init_call_elem(exec_ctx, &call_elems[i], &args);
+ if (error != GRPC_ERROR_NONE) {
+ if (first_error == GRPC_ERROR_NONE) {
+ first_error = error;
+ } else {
+ GRPC_ERROR_UNREF(error);
+ }
+ }
user_data +=
ROUND_UP_TO_ALIGNMENT_SIZE(call_elems[i].filter->sizeof_call_data);
}
+ return first_error;
}
void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
@@ -217,7 +228,7 @@ void grpc_call_stack_ignore_set_pollset_or_pollset_set(
grpc_polling_entity *pollent) {}
void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack,
- const grpc_call_stats *call_stats,
+ const grpc_call_final_info *final_info,
void *and_free_memory) {
grpc_call_element *elems = CALL_ELEMS_FROM_STACK(stack);
size_t count = stack->count;
@@ -225,7 +236,7 @@ void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack,
/* destroy per-filter data */
for (i = 0; i < count; i++) {
- elems[i].filter->destroy_call_elem(exec_ctx, &elems[i], call_stats,
+ elems[i].filter->destroy_call_elem(exec_ctx, &elems[i], final_info,
i == count - 1 ? and_free_memory : NULL);
}
}
diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h
index d72c015b67..ee68701456 100644
--- a/src/core/lib/channel/channel_stack.h
+++ b/src/core/lib/channel/channel_stack.h
@@ -75,9 +75,14 @@ typedef struct {
typedef struct {
grpc_transport_stream_stats transport_stream_stats;
gpr_timespec latency; /* From call creating to enqueing of received status */
- grpc_status_code final_status;
} grpc_call_stats;
+/** Information about the call upon completion. */
+typedef struct {
+ grpc_call_stats stats;
+ grpc_status_code final_status;
+} grpc_call_final_info;
+
/* Channel filters specify:
1. the amount of memory needed in the channel & call (via the sizeof_XXX
members)
@@ -110,8 +115,9 @@ typedef struct {
on a client; if it is non-NULL, then it points to memory owned by the
transport and is on the server. Most filters want to ignore this
argument. */
- void (*init_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args);
+ grpc_error *(*init_call_elem)(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args);
void (*set_pollset_or_pollset_set)(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_polling_entity *pollent);
@@ -119,16 +125,17 @@ typedef struct {
The filter does not need to do any chaining.
The bottom filter of a stack will be passed a non-NULL pointer to
\a and_free_memory that should be passed to gpr_free when destruction
- is complete. */
+ is complete. \a final_info contains data about the completed call, mainly
+ for reporting purposes. */
void (*destroy_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_stats *stats,
+ const grpc_call_final_info *final_info,
void *and_free_memory);
/* sizeof(per channel data) */
size_t sizeof_channel_data;
/* Initialize per-channel data.
- elem is initialized at the start of the call, and elem->channel_data is
- what needs initializing.
+ elem is initialized at the creating of the channel, and elem->channel_data
+ is what needs initializing.
is_first, is_last designate this elements position in the stack, and are
useful for asserting correct configuration by upper layer code.
The filter does not need to do any chaining */
@@ -209,12 +216,13 @@ void grpc_channel_stack_destroy(grpc_exec_ctx *exec_ctx,
/* Initialize a call stack given a channel stack. transport_server_data is
expected to be NULL on a client, or an opaque transport owned pointer on the
server. */
-void grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
- grpc_channel_stack *channel_stack, int initial_refs,
- grpc_iomgr_cb_func destroy, void *destroy_arg,
- grpc_call_context_element *context,
- const void *transport_server_data,
- grpc_call_stack *call_stack);
+grpc_error *grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
+ grpc_channel_stack *channel_stack,
+ int initial_refs, grpc_iomgr_cb_func destroy,
+ void *destroy_arg,
+ grpc_call_context_element *context,
+ const void *transport_server_data,
+ grpc_call_stack *call_stack);
/* Set a pollset or a pollset_set for a call stack: must occur before the first
* op is started */
void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
@@ -243,7 +251,7 @@ void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
/* Destroy a call stack */
void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack,
- const grpc_call_stats *call_stats,
+ const grpc_call_final_info *final_info,
void *and_free_memory);
/* Ignore set pollset{_set} - used by filters if they don't care about pollsets
diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c
index 32ebe53ee6..134180e619 100644
--- a/src/core/lib/channel/compress_filter.c
+++ b/src/core/lib/channel/compress_filter.c
@@ -256,8 +256,9 @@ static void compress_start_transport_stream_op(grpc_exec_ctx *exec_ctx,
}
/* Constructor for call_data */
-static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args) {
+static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
/* grab pointers to our data from the call element */
call_data *calld = elem->call_data;
@@ -266,11 +267,14 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
calld->has_compression_algorithm = 0;
grpc_closure_init(&calld->got_slice, got_slice, elem);
grpc_closure_init(&calld->send_done, send_done, elem);
+
+ return GRPC_ERROR_NONE;
}
/* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_stats *stats, void *ignored) {
+ const grpc_call_final_info *final_info,
+ void *ignored) {
/* grab pointers to our data from the call element */
call_data *calld = elem->call_data;
gpr_slice_buffer_destroy(&calld->slices);
diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c
index 0a7d27a1dc..918379c845 100644
--- a/src/core/lib/channel/connected_channel.c
+++ b/src/core/lib/channel/connected_channel.c
@@ -81,16 +81,16 @@ static void con_start_transport_op(grpc_exec_ctx *exec_ctx,
}
/* Constructor for call_data */
-static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args) {
+static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
call_data *calld = elem->call_data;
channel_data *chand = elem->channel_data;
- int r;
-
- r = grpc_transport_init_stream(
+ int r = grpc_transport_init_stream(
exec_ctx, chand->transport, TRANSPORT_STREAM_FROM_CALL_DATA(calld),
&args->call_stack->refcount, args->server_transport_data);
- GPR_ASSERT(r == 0);
+ return r == 0 ? GRPC_ERROR_NONE
+ : GRPC_ERROR_CREATE("transport stream initialization failed");
}
static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
@@ -104,7 +104,7 @@ static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
/* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_stats *stats,
+ const grpc_call_final_info *final_info,
void *and_free_memory) {
call_data *calld = elem->call_data;
channel_data *chand = elem->channel_data;
diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c
index 8057e251f0..a7a775cc53 100644
--- a/src/core/lib/channel/http_client_filter.c
+++ b/src/core/lib/channel/http_client_filter.c
@@ -175,16 +175,19 @@ static void hc_start_transport_op(grpc_exec_ctx *exec_ctx,
}
/* Constructor for call_data */
-static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args) {
+static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
call_data *calld = elem->call_data;
calld->on_done_recv = NULL;
grpc_closure_init(&calld->hc_on_recv, hc_on_recv, elem);
+ return GRPC_ERROR_NONE;
}
/* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_stats *stats, void *ignored) {}
+ const grpc_call_final_info *final_info,
+ void *ignored) {}
static grpc_mdelem *scheme_from_args(const grpc_channel_args *args) {
unsigned i;
diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c
index d0beebd817..5ce51f9016 100644
--- a/src/core/lib/channel/http_server_filter.c
+++ b/src/core/lib/channel/http_server_filter.c
@@ -224,18 +224,21 @@ static void hs_start_transport_op(grpc_exec_ctx *exec_ctx,
}
/* Constructor for call_data */
-static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args) {
+static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
/* grab pointers to our data from the call element */
call_data *calld = elem->call_data;
/* initialize members */
memset(calld, 0, sizeof(*calld));
grpc_closure_init(&calld->hs_on_recv, hs_on_recv, elem);
+ return GRPC_ERROR_NONE;
}
/* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_stats *stats, void *ignored) {}
+ const grpc_call_final_info *final_info,
+ void *ignored) {}
/* Constructor for channel_data */
static void init_channel_elem(grpc_exec_ctx *exec_ctx,
diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h
index 13f898e31a..bc7781250e 100644
--- a/src/core/lib/iomgr/error.h
+++ b/src/core/lib/iomgr/error.h
@@ -171,6 +171,8 @@ grpc_error *grpc_error_set_time(grpc_error *src, grpc_error_times which,
gpr_timespec value) GRPC_MUST_USE_RESULT;
grpc_error *grpc_error_set_str(grpc_error *src, grpc_error_strs which,
const char *value) GRPC_MUST_USE_RESULT;
+/// Returns NULL if the specified string is not set.
+/// Caller does NOT own return value.
const char *grpc_error_get_str(grpc_error *error, grpc_error_strs which);
/// Add a child error: an error that is believed to have contributed to this
/// error occurring. Allows root causing high level errors from lower level
diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c
index ec21e03944..974d5ae479 100644
--- a/src/core/lib/iomgr/tcp_posix.c
+++ b/src/core/lib/iomgr/tcp_posix.c
@@ -284,7 +284,7 @@ static void tcp_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
}
/* returns true if done, false if pending; if returning true, *error is set */
-#define MAX_WRITE_IOVEC 1024
+#define MAX_WRITE_IOVEC 1000
static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) {
struct msghdr msg;
struct iovec iov[MAX_WRITE_IOVEC];
diff --git a/src/core/lib/json/json_reader.c b/src/core/lib/json/json_reader.c
index bc04bccc65..5b42ca53ff 100644
--- a/src/core/lib/json/json_reader.c
+++ b/src/core/lib/json/json_reader.c
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -171,8 +171,9 @@ grpc_json_reader_status grpc_json_reader_run(grpc_json_reader *reader) {
switch (reader->state) {
case GRPC_JSON_STATE_OBJECT_KEY_STRING:
case GRPC_JSON_STATE_VALUE_STRING:
- if (reader->unicode_high_surrogate != 0)
+ if (reader->unicode_high_surrogate != 0) {
return GRPC_JSON_PARSE_ERROR;
+ }
json_reader_string_add_char(reader, c);
break;
@@ -289,8 +290,9 @@ grpc_json_reader_status grpc_json_reader_run(grpc_json_reader *reader) {
break;
case GRPC_JSON_STATE_OBJECT_KEY_STRING:
- if (reader->unicode_high_surrogate != 0)
+ if (reader->unicode_high_surrogate != 0) {
return GRPC_JSON_PARSE_ERROR;
+ }
if (c == '"') {
reader->state = GRPC_JSON_STATE_OBJECT_KEY_END;
json_reader_set_key(reader);
@@ -302,8 +304,9 @@ grpc_json_reader_status grpc_json_reader_run(grpc_json_reader *reader) {
break;
case GRPC_JSON_STATE_VALUE_STRING:
- if (reader->unicode_high_surrogate != 0)
+ if (reader->unicode_high_surrogate != 0) {
return GRPC_JSON_PARSE_ERROR;
+ }
if (c == '"') {
reader->state = GRPC_JSON_STATE_VALUE_END;
json_reader_set_string(reader);
@@ -383,8 +386,9 @@ grpc_json_reader_status grpc_json_reader_run(grpc_json_reader *reader) {
} else {
reader->state = GRPC_JSON_STATE_VALUE_STRING;
}
- if (reader->unicode_high_surrogate && c != 'u')
+ if (reader->unicode_high_surrogate && c != 'u') {
return GRPC_JSON_PARSE_ERROR;
+ }
switch (c) {
case '"':
case '/':
diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c
index ed7929aa27..2a1bf4d4e3 100644
--- a/src/core/lib/security/transport/client_auth_filter.c
+++ b/src/core/lib/security/transport/client_auth_filter.c
@@ -267,10 +267,12 @@ static void auth_start_transport_op(grpc_exec_ctx *exec_ctx,
}
/* Constructor for call_data */
-static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args) {
+static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
call_data *calld = elem->call_data;
memset(calld, 0, sizeof(*calld));
+ return GRPC_ERROR_NONE;
}
static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
@@ -282,7 +284,8 @@ static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
/* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_stats *stats, void *ignored) {
+ const grpc_call_final_info *final_info,
+ void *ignored) {
call_data *calld = elem->call_data;
grpc_call_credentials_unref(calld->creds);
if (calld->host != NULL) {
diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c
index bc50f9d1b0..0169ccd9ef 100644
--- a/src/core/lib/security/transport/secure_endpoint.c
+++ b/src/core/lib/security/transport/secure_endpoint.c
@@ -128,7 +128,7 @@ static void flush_read_staging_buffer(secure_endpoint *ep, uint8_t **cur,
static void call_read_cb(grpc_exec_ctx *exec_ctx, secure_endpoint *ep,
grpc_error *error) {
- if (false && grpc_trace_secure_endpoint) {
+ if (grpc_trace_secure_endpoint) {
size_t i;
for (i = 0; i < ep->read_buffer->count; i++) {
char *data = gpr_dump_slice(ep->read_buffer->slices[i],
@@ -256,7 +256,7 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep,
gpr_slice_buffer_reset_and_unref(&ep->output_buffer);
- if (false && grpc_trace_secure_endpoint) {
+ if (grpc_trace_secure_endpoint) {
for (i = 0; i < slices->count; i++) {
char *data =
gpr_dump_slice(slices->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII);
diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c
index 12e789bde9..def16c8229 100644
--- a/src/core/lib/security/transport/server_auth_filter.c
+++ b/src/core/lib/security/transport/server_auth_filter.c
@@ -199,8 +199,9 @@ static void auth_start_transport_op(grpc_exec_ctx *exec_ctx,
}
/* Constructor for call_data */
-static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args) {
+static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
/* grab pointers to our data from the call element */
call_data *calld = elem->call_data;
channel_data *chand = elem->channel_data;
@@ -222,11 +223,14 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
args->context[GRPC_CONTEXT_SECURITY].value = server_ctx;
args->context[GRPC_CONTEXT_SECURITY].destroy =
grpc_server_security_context_destroy;
+
+ return GRPC_ERROR_NONE;
}
/* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_stats *stats, void *ignored) {}
+ const grpc_call_final_info *final_info,
+ void *ignored) {}
/* Constructor for channel_data */
static void init_channel_elem(grpc_exec_ctx *exec_ctx,
diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c
index fc9df76dc1..772681109a 100644
--- a/src/core/lib/surface/call.c
+++ b/src/core/lib/surface/call.c
@@ -154,8 +154,9 @@ struct grpc_call {
/* Received call statuses from various sources */
received_status status[STATUS_SOURCE_COUNT];
- /* Call stats: only valid after trailing metadata received */
- grpc_call_stats stats;
+ /* Call data useful used for reporting. Only valid after the call has
+ * completed */
+ grpc_call_final_info final_info;
/* Compression algorithm for *incoming* data */
grpc_compression_algorithm incoming_compression_algorithm;
@@ -263,9 +264,19 @@ grpc_call *grpc_call_create(
gpr_convert_clock_type(send_deadline, GPR_CLOCK_MONOTONIC);
GRPC_CHANNEL_INTERNAL_REF(channel, "call");
/* initial refcount dropped by grpc_call_destroy */
- grpc_call_stack_init(&exec_ctx, channel_stack, 1, destroy_call, call,
- call->context, server_transport_data,
- CALL_STACK_FROM_CALL(call));
+ grpc_error *error = grpc_call_stack_init(
+ &exec_ctx, channel_stack, 1, destroy_call, call, call->context,
+ server_transport_data, CALL_STACK_FROM_CALL(call));
+ if (error != GRPC_ERROR_NONE) {
+ intptr_t status;
+ if (!grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &status))
+ status = GRPC_STATUS_UNKNOWN;
+ const char *error_str =
+ grpc_error_get_str(error, GRPC_ERROR_STR_DESCRIPTION);
+ close_with_status(&exec_ctx, call, (grpc_status_code)status,
+ error_str == NULL ? "unknown error" : error_str);
+ GRPC_ERROR_UNREF(error);
+ }
if (cq != NULL) {
GPR_ASSERT(
pollset_set_alternative == NULL &&
@@ -361,6 +372,25 @@ void grpc_call_internal_unref(grpc_exec_ctx *exec_ctx, grpc_call *c REF_ARG) {
GRPC_CALL_STACK_UNREF(exec_ctx, CALL_STACK_FROM_CALL(c), REF_REASON);
}
+static void get_final_status(grpc_call *call,
+ void (*set_value)(grpc_status_code code,
+ void *user_data),
+ void *set_value_user_data) {
+ int i;
+ for (i = 0; i < STATUS_SOURCE_COUNT; i++) {
+ if (call->status[i].is_set) {
+ set_value(call->status[i].code, set_value_user_data);
+ return;
+ }
+ }
+ if (call->is_client) {
+ set_value(GRPC_STATUS_UNKNOWN, set_value_user_data);
+ } else {
+ set_value(GRPC_STATUS_OK, set_value_user_data);
+ }
+}
+
+static void set_status_value_directly(grpc_status_code status, void *dest);
static void destroy_call(grpc_exec_ctx *exec_ctx, void *call,
grpc_error *error) {
size_t i;
@@ -392,7 +422,11 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call,
GRPC_CQ_INTERNAL_UNREF(c->cq, "bind");
}
grpc_channel *channel = c->channel;
- grpc_call_stack_destroy(exec_ctx, CALL_STACK_FROM_CALL(c), &c->stats, c);
+
+ get_final_status(call, set_status_value_directly,
+ &c->final_info.final_status);
+
+ grpc_call_stack_destroy(exec_ctx, CALL_STACK_FROM_CALL(c), &c->final_info, c);
GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, "call");
GPR_TIMER_END("destroy_call", 0);
}
@@ -414,24 +448,6 @@ static void set_status_details(grpc_call *call, status_source source,
}
}
-static void get_final_status(grpc_call *call,
- void (*set_value)(grpc_status_code code,
- void *user_data),
- void *set_value_user_data) {
- int i;
- for (i = 0; i < STATUS_SOURCE_COUNT; i++) {
- if (call->status[i].is_set) {
- set_value(call->status[i].code, set_value_user_data);
- return;
- }
- }
- if (call->is_client) {
- set_value(GRPC_STATUS_UNKNOWN, set_value_user_data);
- } else {
- set_value(GRPC_STATUS_OK, set_value_user_data);
- }
-}
-
static void set_status_from_error(grpc_call *call, status_source source,
grpc_error *error) {
intptr_t status;
@@ -1361,6 +1377,9 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
int num_completion_callbacks_needed = 1;
grpc_call_error error = GRPC_CALL_OK;
+ // sent_initial_metadata guards against variable reuse.
+ grpc_metadata compression_md;
+
GPR_TIMER_BEGIN("grpc_call_start_batch", 0);
GRPC_CALL_LOG_BATCH(GPR_INFO, call, ops, nops, notify_tag);
@@ -1406,8 +1425,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
goto done_with_error;
}
/* process compression level */
- grpc_metadata compression_md;
- memset(&compression_md, 0, sizeof(grpc_metadata));
+ memset(&compression_md, 0, sizeof(compression_md));
size_t additional_metadata_count = 0;
grpc_compression_level effective_compression_level;
bool level_set = false;
@@ -1608,7 +1626,8 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
bctl->recv_final_op = 1;
stream_op.recv_trailing_metadata =
&call->metadata_batch[1 /* is_receiving */][1 /* is_trailing */];
- stream_op.collect_stats = &call->stats.transport_stream_stats;
+ stream_op.collect_stats =
+ &call->final_info.stats.transport_stream_stats;
break;
case GRPC_OP_RECV_CLOSE_ON_SERVER:
/* Flag validation: currently allow no flags */
@@ -1630,7 +1649,8 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
bctl->recv_final_op = 1;
stream_op.recv_trailing_metadata =
&call->metadata_batch[1 /* is_receiving */][1 /* is_trailing */];
- stream_op.collect_stats = &call->stats.transport_stream_stats;
+ stream_op.collect_stats =
+ &call->final_info.stats.transport_stream_stats;
break;
}
}
diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c
index 5ea4cba5d1..19b78369dd 100644
--- a/src/core/lib/surface/lame_client.c
+++ b/src/core/lib/surface/lame_client.c
@@ -107,11 +107,14 @@ static void lame_start_transport_op(grpc_exec_ctx *exec_ctx,
GRPC_ERROR_UNREF(op->disconnect_with_error);
}
-static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args) {}
+static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
+ return GRPC_ERROR_NONE;
+}
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_stats *stats,
+ const grpc_call_final_info *final_info,
void *and_free_memory) {
gpr_free(and_free_memory);
}
diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c
index 2f108af48a..1d61ec3bbb 100644
--- a/src/core/lib/surface/server.c
+++ b/src/core/lib/surface/server.c
@@ -856,8 +856,9 @@ static void channel_connectivity_changed(grpc_exec_ctx *exec_ctx, void *cd,
}
}
-static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args) {
+static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
call_data *calld = elem->call_data;
channel_data *chand = elem->channel_data;
memset(calld, 0, sizeof(call_data));
@@ -869,10 +870,12 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
server_on_recv_initial_metadata, elem);
server_ref(chand->server);
+ return GRPC_ERROR_NONE;
}
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_stats *stats, void *ignored) {
+ const grpc_call_final_info *final_info,
+ void *ignored) {
channel_data *chand = elem->channel_data;
call_data *calld = elem->call_data;
diff --git a/src/core/lib/transport/static_metadata.c b/src/core/lib/transport/static_metadata.c
index c5f16e530d..8f3e5b5b40 100644
--- a/src/core/lib/transport/static_metadata.c
+++ b/src/core/lib/transport/static_metadata.c
@@ -45,21 +45,21 @@ grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];
uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 4, 8, 6, 2, 4, 8, 6, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4, 8, 6, 2, 4, 8, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
const uint8_t grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2] =
- {11, 35, 10, 35, 12, 35, 12, 49, 13, 35, 14, 35, 15, 35, 16, 35, 17, 35,
- 19, 35, 20, 35, 21, 35, 24, 35, 25, 35, 26, 35, 27, 35, 28, 35, 29, 35,
- 30, 18, 30, 35, 31, 35, 32, 35, 36, 35, 37, 35, 38, 35, 39, 35, 42, 33,
- 42, 34, 42, 48, 42, 53, 42, 54, 42, 55, 42, 56, 43, 33, 43, 48, 43, 53,
- 46, 0, 46, 1, 46, 2, 50, 35, 57, 35, 58, 35, 59, 35, 60, 35, 61, 35,
- 62, 35, 63, 35, 64, 35, 65, 35, 66, 35, 67, 40, 67, 69, 67, 72, 68, 80,
- 68, 81, 70, 35, 71, 35, 73, 35, 74, 35, 75, 35, 76, 35, 77, 41, 77, 51,
- 77, 52, 78, 35, 79, 35, 82, 3, 82, 4, 82, 5, 82, 6, 82, 7, 82, 8,
- 82, 9, 83, 35, 84, 85, 86, 35, 87, 35, 88, 35, 89, 35, 90, 35};
+ {11, 33, 10, 33, 12, 33, 12, 49, 13, 33, 14, 33, 15, 33, 16, 33, 17, 33,
+ 19, 33, 20, 33, 21, 33, 22, 33, 23, 33, 24, 33, 25, 33, 26, 33, 27, 33,
+ 28, 18, 28, 33, 29, 33, 30, 33, 34, 33, 35, 33, 36, 33, 37, 33, 40, 31,
+ 40, 32, 40, 48, 40, 53, 40, 54, 40, 55, 40, 56, 42, 31, 42, 48, 42, 53,
+ 45, 0, 45, 1, 45, 2, 50, 33, 57, 33, 58, 33, 59, 33, 60, 33, 61, 33,
+ 62, 33, 63, 33, 64, 33, 65, 33, 66, 33, 67, 33, 68, 38, 68, 70, 68, 73,
+ 69, 81, 69, 82, 71, 33, 72, 33, 74, 33, 75, 33, 76, 33, 77, 33, 78, 39,
+ 78, 51, 78, 52, 79, 33, 80, 33, 83, 3, 83, 4, 83, 5, 83, 6, 83, 7,
+ 83, 8, 83, 9, 84, 33, 85, 86, 87, 33, 88, 33, 89, 33, 90, 33, 91, 33};
const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {
"0",
@@ -84,8 +84,6 @@ const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {
":authority",
"authorization",
"cache-control",
- "census-bin",
- "census-binary-bin",
"content-disposition",
"content-encoding",
"content-language",
@@ -105,11 +103,13 @@ const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {
"GET",
"grpc",
"grpc-accept-encoding",
+ "grpc-census-bin",
"grpc-encoding",
"grpc-internal-encoding-request",
"grpc-message",
"grpc-status",
"grpc-timeout",
+ "grpc-tracing-bin",
"gzip",
"gzip, deflate",
"host",
@@ -126,7 +126,8 @@ const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {
"if-unmodified-since",
"last-modified",
"link",
- "load-reporting",
+ "load-reporting-initial",
+ "load-reporting-trailing",
"location",
"max-forwards",
":method",
diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h
index 5ff0d2f3bc..b51bacac50 100644
--- a/src/core/lib/transport/static_metadata.h
+++ b/src/core/lib/transport/static_metadata.h
@@ -44,7 +44,7 @@
#include "src/core/lib/transport/metadata.h"
-#define GRPC_STATIC_MDSTR_COUNT 91
+#define GRPC_STATIC_MDSTR_COUNT 92
extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
/* "0" */
#define GRPC_MDSTR_0 (&grpc_static_mdstr_table[0])
@@ -90,58 +90,58 @@ extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
#define GRPC_MDSTR_AUTHORIZATION (&grpc_static_mdstr_table[20])
/* "cache-control" */
#define GRPC_MDSTR_CACHE_CONTROL (&grpc_static_mdstr_table[21])
-/* "census-bin" */
-#define GRPC_MDSTR_CENSUS_BIN (&grpc_static_mdstr_table[22])
-/* "census-binary-bin" */
-#define GRPC_MDSTR_CENSUS_BINARY_BIN (&grpc_static_mdstr_table[23])
/* "content-disposition" */
-#define GRPC_MDSTR_CONTENT_DISPOSITION (&grpc_static_mdstr_table[24])
+#define GRPC_MDSTR_CONTENT_DISPOSITION (&grpc_static_mdstr_table[22])
/* "content-encoding" */
-#define GRPC_MDSTR_CONTENT_ENCODING (&grpc_static_mdstr_table[25])
+#define GRPC_MDSTR_CONTENT_ENCODING (&grpc_static_mdstr_table[23])
/* "content-language" */
-#define GRPC_MDSTR_CONTENT_LANGUAGE (&grpc_static_mdstr_table[26])
+#define GRPC_MDSTR_CONTENT_LANGUAGE (&grpc_static_mdstr_table[24])
/* "content-length" */
-#define GRPC_MDSTR_CONTENT_LENGTH (&grpc_static_mdstr_table[27])
+#define GRPC_MDSTR_CONTENT_LENGTH (&grpc_static_mdstr_table[25])
/* "content-location" */
-#define GRPC_MDSTR_CONTENT_LOCATION (&grpc_static_mdstr_table[28])
+#define GRPC_MDSTR_CONTENT_LOCATION (&grpc_static_mdstr_table[26])
/* "content-range" */
-#define GRPC_MDSTR_CONTENT_RANGE (&grpc_static_mdstr_table[29])
+#define GRPC_MDSTR_CONTENT_RANGE (&grpc_static_mdstr_table[27])
/* "content-type" */
-#define GRPC_MDSTR_CONTENT_TYPE (&grpc_static_mdstr_table[30])
+#define GRPC_MDSTR_CONTENT_TYPE (&grpc_static_mdstr_table[28])
/* "cookie" */
-#define GRPC_MDSTR_COOKIE (&grpc_static_mdstr_table[31])
+#define GRPC_MDSTR_COOKIE (&grpc_static_mdstr_table[29])
/* "date" */
-#define GRPC_MDSTR_DATE (&grpc_static_mdstr_table[32])
+#define GRPC_MDSTR_DATE (&grpc_static_mdstr_table[30])
/* "deflate" */
-#define GRPC_MDSTR_DEFLATE (&grpc_static_mdstr_table[33])
+#define GRPC_MDSTR_DEFLATE (&grpc_static_mdstr_table[31])
/* "deflate,gzip" */
-#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (&grpc_static_mdstr_table[34])
+#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (&grpc_static_mdstr_table[32])
/* "" */
-#define GRPC_MDSTR_EMPTY (&grpc_static_mdstr_table[35])
+#define GRPC_MDSTR_EMPTY (&grpc_static_mdstr_table[33])
/* "etag" */
-#define GRPC_MDSTR_ETAG (&grpc_static_mdstr_table[36])
+#define GRPC_MDSTR_ETAG (&grpc_static_mdstr_table[34])
/* "expect" */
-#define GRPC_MDSTR_EXPECT (&grpc_static_mdstr_table[37])
+#define GRPC_MDSTR_EXPECT (&grpc_static_mdstr_table[35])
/* "expires" */
-#define GRPC_MDSTR_EXPIRES (&grpc_static_mdstr_table[38])
+#define GRPC_MDSTR_EXPIRES (&grpc_static_mdstr_table[36])
/* "from" */
-#define GRPC_MDSTR_FROM (&grpc_static_mdstr_table[39])
+#define GRPC_MDSTR_FROM (&grpc_static_mdstr_table[37])
/* "GET" */
-#define GRPC_MDSTR_GET (&grpc_static_mdstr_table[40])
+#define GRPC_MDSTR_GET (&grpc_static_mdstr_table[38])
/* "grpc" */
-#define GRPC_MDSTR_GRPC (&grpc_static_mdstr_table[41])
+#define GRPC_MDSTR_GRPC (&grpc_static_mdstr_table[39])
/* "grpc-accept-encoding" */
-#define GRPC_MDSTR_GRPC_ACCEPT_ENCODING (&grpc_static_mdstr_table[42])
+#define GRPC_MDSTR_GRPC_ACCEPT_ENCODING (&grpc_static_mdstr_table[40])
+/* "grpc-census-bin" */
+#define GRPC_MDSTR_GRPC_CENSUS_BIN (&grpc_static_mdstr_table[41])
/* "grpc-encoding" */
-#define GRPC_MDSTR_GRPC_ENCODING (&grpc_static_mdstr_table[43])
+#define GRPC_MDSTR_GRPC_ENCODING (&grpc_static_mdstr_table[42])
/* "grpc-internal-encoding-request" */
-#define GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST (&grpc_static_mdstr_table[44])
+#define GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST (&grpc_static_mdstr_table[43])
/* "grpc-message" */
-#define GRPC_MDSTR_GRPC_MESSAGE (&grpc_static_mdstr_table[45])
+#define GRPC_MDSTR_GRPC_MESSAGE (&grpc_static_mdstr_table[44])
/* "grpc-status" */
-#define GRPC_MDSTR_GRPC_STATUS (&grpc_static_mdstr_table[46])
+#define GRPC_MDSTR_GRPC_STATUS (&grpc_static_mdstr_table[45])
/* "grpc-timeout" */
-#define GRPC_MDSTR_GRPC_TIMEOUT (&grpc_static_mdstr_table[47])
+#define GRPC_MDSTR_GRPC_TIMEOUT (&grpc_static_mdstr_table[46])
+/* "grpc-tracing-bin" */
+#define GRPC_MDSTR_GRPC_TRACING_BIN (&grpc_static_mdstr_table[47])
/* "gzip" */
#define GRPC_MDSTR_GZIP (&grpc_static_mdstr_table[48])
/* "gzip, deflate" */
@@ -175,62 +175,64 @@ extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
#define GRPC_MDSTR_LAST_MODIFIED (&grpc_static_mdstr_table[62])
/* "link" */
#define GRPC_MDSTR_LINK (&grpc_static_mdstr_table[63])
-/* "load-reporting" */
-#define GRPC_MDSTR_LOAD_REPORTING (&grpc_static_mdstr_table[64])
+/* "load-reporting-initial" */
+#define GRPC_MDSTR_LOAD_REPORTING_INITIAL (&grpc_static_mdstr_table[64])
+/* "load-reporting-trailing" */
+#define GRPC_MDSTR_LOAD_REPORTING_TRAILING (&grpc_static_mdstr_table[65])
/* "location" */
-#define GRPC_MDSTR_LOCATION (&grpc_static_mdstr_table[65])
+#define GRPC_MDSTR_LOCATION (&grpc_static_mdstr_table[66])
/* "max-forwards" */
-#define GRPC_MDSTR_MAX_FORWARDS (&grpc_static_mdstr_table[66])
+#define GRPC_MDSTR_MAX_FORWARDS (&grpc_static_mdstr_table[67])
/* ":method" */
-#define GRPC_MDSTR_METHOD (&grpc_static_mdstr_table[67])
+#define GRPC_MDSTR_METHOD (&grpc_static_mdstr_table[68])
/* ":path" */
-#define GRPC_MDSTR_PATH (&grpc_static_mdstr_table[68])
+#define GRPC_MDSTR_PATH (&grpc_static_mdstr_table[69])
/* "POST" */
-#define GRPC_MDSTR_POST (&grpc_static_mdstr_table[69])
+#define GRPC_MDSTR_POST (&grpc_static_mdstr_table[70])
/* "proxy-authenticate" */
-#define GRPC_MDSTR_PROXY_AUTHENTICATE (&grpc_static_mdstr_table[70])
+#define GRPC_MDSTR_PROXY_AUTHENTICATE (&grpc_static_mdstr_table[71])
/* "proxy-authorization" */
-#define GRPC_MDSTR_PROXY_AUTHORIZATION (&grpc_static_mdstr_table[71])
+#define GRPC_MDSTR_PROXY_AUTHORIZATION (&grpc_static_mdstr_table[72])
/* "PUT" */
-#define GRPC_MDSTR_PUT (&grpc_static_mdstr_table[72])
+#define GRPC_MDSTR_PUT (&grpc_static_mdstr_table[73])
/* "range" */
-#define GRPC_MDSTR_RANGE (&grpc_static_mdstr_table[73])
+#define GRPC_MDSTR_RANGE (&grpc_static_mdstr_table[74])
/* "referer" */
-#define GRPC_MDSTR_REFERER (&grpc_static_mdstr_table[74])
+#define GRPC_MDSTR_REFERER (&grpc_static_mdstr_table[75])
/* "refresh" */
-#define GRPC_MDSTR_REFRESH (&grpc_static_mdstr_table[75])
+#define GRPC_MDSTR_REFRESH (&grpc_static_mdstr_table[76])
/* "retry-after" */
-#define GRPC_MDSTR_RETRY_AFTER (&grpc_static_mdstr_table[76])
+#define GRPC_MDSTR_RETRY_AFTER (&grpc_static_mdstr_table[77])
/* ":scheme" */
-#define GRPC_MDSTR_SCHEME (&grpc_static_mdstr_table[77])
+#define GRPC_MDSTR_SCHEME (&grpc_static_mdstr_table[78])
/* "server" */
-#define GRPC_MDSTR_SERVER (&grpc_static_mdstr_table[78])
+#define GRPC_MDSTR_SERVER (&grpc_static_mdstr_table[79])
/* "set-cookie" */
-#define GRPC_MDSTR_SET_COOKIE (&grpc_static_mdstr_table[79])
+#define GRPC_MDSTR_SET_COOKIE (&grpc_static_mdstr_table[80])
/* "/" */
-#define GRPC_MDSTR_SLASH (&grpc_static_mdstr_table[80])
+#define GRPC_MDSTR_SLASH (&grpc_static_mdstr_table[81])
/* "/index.html" */
-#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (&grpc_static_mdstr_table[81])
+#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (&grpc_static_mdstr_table[82])
/* ":status" */
-#define GRPC_MDSTR_STATUS (&grpc_static_mdstr_table[82])
+#define GRPC_MDSTR_STATUS (&grpc_static_mdstr_table[83])
/* "strict-transport-security" */
-#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (&grpc_static_mdstr_table[83])
+#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (&grpc_static_mdstr_table[84])
/* "te" */
-#define GRPC_MDSTR_TE (&grpc_static_mdstr_table[84])
+#define GRPC_MDSTR_TE (&grpc_static_mdstr_table[85])
/* "trailers" */
-#define GRPC_MDSTR_TRAILERS (&grpc_static_mdstr_table[85])
+#define GRPC_MDSTR_TRAILERS (&grpc_static_mdstr_table[86])
/* "transfer-encoding" */
-#define GRPC_MDSTR_TRANSFER_ENCODING (&grpc_static_mdstr_table[86])
+#define GRPC_MDSTR_TRANSFER_ENCODING (&grpc_static_mdstr_table[87])
/* "user-agent" */
-#define GRPC_MDSTR_USER_AGENT (&grpc_static_mdstr_table[87])
+#define GRPC_MDSTR_USER_AGENT (&grpc_static_mdstr_table[88])
/* "vary" */
-#define GRPC_MDSTR_VARY (&grpc_static_mdstr_table[88])
+#define GRPC_MDSTR_VARY (&grpc_static_mdstr_table[89])
/* "via" */
-#define GRPC_MDSTR_VIA (&grpc_static_mdstr_table[89])
+#define GRPC_MDSTR_VIA (&grpc_static_mdstr_table[90])
/* "www-authenticate" */
-#define GRPC_MDSTR_WWW_AUTHENTICATE (&grpc_static_mdstr_table[90])
+#define GRPC_MDSTR_WWW_AUTHENTICATE (&grpc_static_mdstr_table[91])
-#define GRPC_STATIC_MDELEM_COUNT 80
+#define GRPC_STATIC_MDELEM_COUNT 81
extern grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];
extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];
/* "accept-charset": "" */
@@ -335,73 +337,76 @@ extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];
#define GRPC_MDELEM_LAST_MODIFIED_EMPTY (&grpc_static_mdelem_table[45])
/* "link": "" */
#define GRPC_MDELEM_LINK_EMPTY (&grpc_static_mdelem_table[46])
-/* "load-reporting": "" */
-#define GRPC_MDELEM_LOAD_REPORTING_EMPTY (&grpc_static_mdelem_table[47])
+/* "load-reporting-initial": "" */
+#define GRPC_MDELEM_LOAD_REPORTING_INITIAL_EMPTY (&grpc_static_mdelem_table[47])
+/* "load-reporting-trailing": "" */
+#define GRPC_MDELEM_LOAD_REPORTING_TRAILING_EMPTY \
+ (&grpc_static_mdelem_table[48])
/* "location": "" */
-#define GRPC_MDELEM_LOCATION_EMPTY (&grpc_static_mdelem_table[48])
+#define GRPC_MDELEM_LOCATION_EMPTY (&grpc_static_mdelem_table[49])
/* "max-forwards": "" */
-#define GRPC_MDELEM_MAX_FORWARDS_EMPTY (&grpc_static_mdelem_table[49])
+#define GRPC_MDELEM_MAX_FORWARDS_EMPTY (&grpc_static_mdelem_table[50])
/* ":method": "GET" */
-#define GRPC_MDELEM_METHOD_GET (&grpc_static_mdelem_table[50])
+#define GRPC_MDELEM_METHOD_GET (&grpc_static_mdelem_table[51])
/* ":method": "POST" */
-#define GRPC_MDELEM_METHOD_POST (&grpc_static_mdelem_table[51])
+#define GRPC_MDELEM_METHOD_POST (&grpc_static_mdelem_table[52])
/* ":method": "PUT" */
-#define GRPC_MDELEM_METHOD_PUT (&grpc_static_mdelem_table[52])
+#define GRPC_MDELEM_METHOD_PUT (&grpc_static_mdelem_table[53])
/* ":path": "/" */
-#define GRPC_MDELEM_PATH_SLASH (&grpc_static_mdelem_table[53])
+#define GRPC_MDELEM_PATH_SLASH (&grpc_static_mdelem_table[54])
/* ":path": "/index.html" */
-#define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML (&grpc_static_mdelem_table[54])
+#define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML (&grpc_static_mdelem_table[55])
/* "proxy-authenticate": "" */
-#define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[55])
+#define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[56])
/* "proxy-authorization": "" */
-#define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY (&grpc_static_mdelem_table[56])
+#define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY (&grpc_static_mdelem_table[57])
/* "range": "" */
-#define GRPC_MDELEM_RANGE_EMPTY (&grpc_static_mdelem_table[57])
+#define GRPC_MDELEM_RANGE_EMPTY (&grpc_static_mdelem_table[58])
/* "referer": "" */
-#define GRPC_MDELEM_REFERER_EMPTY (&grpc_static_mdelem_table[58])
+#define GRPC_MDELEM_REFERER_EMPTY (&grpc_static_mdelem_table[59])
/* "refresh": "" */
-#define GRPC_MDELEM_REFRESH_EMPTY (&grpc_static_mdelem_table[59])
+#define GRPC_MDELEM_REFRESH_EMPTY (&grpc_static_mdelem_table[60])
/* "retry-after": "" */
-#define GRPC_MDELEM_RETRY_AFTER_EMPTY (&grpc_static_mdelem_table[60])
+#define GRPC_MDELEM_RETRY_AFTER_EMPTY (&grpc_static_mdelem_table[61])
/* ":scheme": "grpc" */
-#define GRPC_MDELEM_SCHEME_GRPC (&grpc_static_mdelem_table[61])
+#define GRPC_MDELEM_SCHEME_GRPC (&grpc_static_mdelem_table[62])
/* ":scheme": "http" */
-#define GRPC_MDELEM_SCHEME_HTTP (&grpc_static_mdelem_table[62])
+#define GRPC_MDELEM_SCHEME_HTTP (&grpc_static_mdelem_table[63])
/* ":scheme": "https" */
-#define GRPC_MDELEM_SCHEME_HTTPS (&grpc_static_mdelem_table[63])
+#define GRPC_MDELEM_SCHEME_HTTPS (&grpc_static_mdelem_table[64])
/* "server": "" */
-#define GRPC_MDELEM_SERVER_EMPTY (&grpc_static_mdelem_table[64])
+#define GRPC_MDELEM_SERVER_EMPTY (&grpc_static_mdelem_table[65])
/* "set-cookie": "" */
-#define GRPC_MDELEM_SET_COOKIE_EMPTY (&grpc_static_mdelem_table[65])
+#define GRPC_MDELEM_SET_COOKIE_EMPTY (&grpc_static_mdelem_table[66])
/* ":status": "200" */
-#define GRPC_MDELEM_STATUS_200 (&grpc_static_mdelem_table[66])
+#define GRPC_MDELEM_STATUS_200 (&grpc_static_mdelem_table[67])
/* ":status": "204" */
-#define GRPC_MDELEM_STATUS_204 (&grpc_static_mdelem_table[67])
+#define GRPC_MDELEM_STATUS_204 (&grpc_static_mdelem_table[68])
/* ":status": "206" */
-#define GRPC_MDELEM_STATUS_206 (&grpc_static_mdelem_table[68])
+#define GRPC_MDELEM_STATUS_206 (&grpc_static_mdelem_table[69])
/* ":status": "304" */
-#define GRPC_MDELEM_STATUS_304 (&grpc_static_mdelem_table[69])
+#define GRPC_MDELEM_STATUS_304 (&grpc_static_mdelem_table[70])
/* ":status": "400" */
-#define GRPC_MDELEM_STATUS_400 (&grpc_static_mdelem_table[70])
+#define GRPC_MDELEM_STATUS_400 (&grpc_static_mdelem_table[71])
/* ":status": "404" */
-#define GRPC_MDELEM_STATUS_404 (&grpc_static_mdelem_table[71])
+#define GRPC_MDELEM_STATUS_404 (&grpc_static_mdelem_table[72])
/* ":status": "500" */
-#define GRPC_MDELEM_STATUS_500 (&grpc_static_mdelem_table[72])
+#define GRPC_MDELEM_STATUS_500 (&grpc_static_mdelem_table[73])
/* "strict-transport-security": "" */
#define GRPC_MDELEM_STRICT_TRANSPORT_SECURITY_EMPTY \
- (&grpc_static_mdelem_table[73])
+ (&grpc_static_mdelem_table[74])
/* "te": "trailers" */
-#define GRPC_MDELEM_TE_TRAILERS (&grpc_static_mdelem_table[74])
+#define GRPC_MDELEM_TE_TRAILERS (&grpc_static_mdelem_table[75])
/* "transfer-encoding": "" */
-#define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY (&grpc_static_mdelem_table[75])
+#define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY (&grpc_static_mdelem_table[76])
/* "user-agent": "" */
-#define GRPC_MDELEM_USER_AGENT_EMPTY (&grpc_static_mdelem_table[76])
+#define GRPC_MDELEM_USER_AGENT_EMPTY (&grpc_static_mdelem_table[77])
/* "vary": "" */
-#define GRPC_MDELEM_VARY_EMPTY (&grpc_static_mdelem_table[77])
+#define GRPC_MDELEM_VARY_EMPTY (&grpc_static_mdelem_table[78])
/* "via": "" */
-#define GRPC_MDELEM_VIA_EMPTY (&grpc_static_mdelem_table[78])
+#define GRPC_MDELEM_VIA_EMPTY (&grpc_static_mdelem_table[79])
/* "www-authenticate": "" */
-#define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[79])
+#define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[80])
extern const uint8_t
grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2];
diff --git a/src/core/ext/transport/chttp2/transport/timeout_encoding.c b/src/core/lib/transport/timeout_encoding.c
index b7f7912493..b58ebbd0a8 100644
--- a/src/core/ext/transport/chttp2/transport/timeout_encoding.c
+++ b/src/core/lib/transport/timeout_encoding.c
@@ -31,7 +31,7 @@
*
*/
-#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h"
+#include "src/core/lib/transport/timeout_encoding.h"
#include <stdio.h>
#include <string.h>
@@ -117,7 +117,7 @@ static void enc_micros(char *buffer, int64_t x) {
}
}
-void grpc_chttp2_encode_timeout(gpr_timespec timeout, char *buffer) {
+void grpc_http2_encode_timeout(gpr_timespec timeout, char *buffer) {
if (timeout.tv_sec < 0) {
enc_tiny(buffer);
} else if (timeout.tv_sec == 0) {
@@ -136,7 +136,7 @@ static int is_all_whitespace(const char *p) {
return *p == 0;
}
-int grpc_chttp2_decode_timeout(const char *buffer, gpr_timespec *timeout) {
+int grpc_http2_decode_timeout(const char *buffer, gpr_timespec *timeout) {
int32_t x = 0;
const uint8_t *p = (const uint8_t *)buffer;
int have_digit = 0;
diff --git a/src/core/ext/transport/chttp2/transport/timeout_encoding.h b/src/core/lib/transport/timeout_encoding.h
index df2324c791..92f02f6ecd 100644
--- a/src/core/ext/transport/chttp2/transport/timeout_encoding.h
+++ b/src/core/lib/transport/timeout_encoding.h
@@ -31,17 +31,17 @@
*
*/
-#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_TIMEOUT_ENCODING_H
-#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_TIMEOUT_ENCODING_H
+#ifndef GRPC_CORE_LIB_TRANSPORT_TIMEOUT_ENCODING_H
+#define GRPC_CORE_LIB_TRANSPORT_TIMEOUT_ENCODING_H
#include <grpc/support/time.h>
#include "src/core/lib/support/string.h"
-#define GRPC_CHTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE (GPR_LTOA_MIN_BUFSIZE + 1)
+#define GRPC_HTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE (GPR_LTOA_MIN_BUFSIZE + 1)
-/* Encode/decode timeouts to the GRPC over HTTP2 format;
+/* Encode/decode timeouts to the GRPC over HTTP/2 format;
encoding may round up arbitrarily */
-void grpc_chttp2_encode_timeout(gpr_timespec timeout, char *buffer);
-int grpc_chttp2_decode_timeout(const char *buffer, gpr_timespec *timeout);
+void grpc_http2_encode_timeout(gpr_timespec timeout, char *buffer);
+int grpc_http2_decode_timeout(const char *buffer, gpr_timespec *timeout);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_TIMEOUT_ENCODING_H */
+#endif /* GRPC_CORE_LIB_TRANSPORT_TIMEOUT_ENCODING_H */
diff --git a/src/core/plugin_registry/grpc_plugin_registry.c b/src/core/plugin_registry/grpc_plugin_registry.c
index cda0f9857f..7ebd312b5a 100644
--- a/src/core/plugin_registry/grpc_plugin_registry.c
+++ b/src/core/plugin_registry/grpc_plugin_registry.c
@@ -37,6 +37,8 @@ extern void grpc_chttp2_plugin_init(void);
extern void grpc_chttp2_plugin_shutdown(void);
extern void grpc_client_config_init(void);
extern void grpc_client_config_shutdown(void);
+extern void grpc_lb_policy_grpclb_init(void);
+extern void grpc_lb_policy_grpclb_shutdown(void);
extern void grpc_lb_policy_pick_first_init(void);
extern void grpc_lb_policy_pick_first_shutdown(void);
extern void grpc_lb_policy_round_robin_init(void);
@@ -55,6 +57,8 @@ void grpc_register_built_in_plugins(void) {
grpc_chttp2_plugin_shutdown);
grpc_register_plugin(grpc_client_config_init,
grpc_client_config_shutdown);
+ grpc_register_plugin(grpc_lb_policy_grpclb_init,
+ grpc_lb_policy_grpclb_shutdown);
grpc_register_plugin(grpc_lb_policy_pick_first_init,
grpc_lb_policy_pick_first_shutdown);
grpc_register_plugin(grpc_lb_policy_round_robin_init,
diff --git a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c
index 68c4afdae9..72dc10e77f 100644
--- a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c
+++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c
@@ -43,6 +43,8 @@ extern void grpc_resolver_sockaddr_init(void);
extern void grpc_resolver_sockaddr_shutdown(void);
extern void grpc_load_reporting_plugin_init(void);
extern void grpc_load_reporting_plugin_shutdown(void);
+extern void grpc_lb_policy_grpclb_init(void);
+extern void grpc_lb_policy_grpclb_shutdown(void);
extern void grpc_lb_policy_pick_first_init(void);
extern void grpc_lb_policy_pick_first_shutdown(void);
extern void grpc_lb_policy_round_robin_init(void);
@@ -61,6 +63,8 @@ void grpc_register_built_in_plugins(void) {
grpc_resolver_sockaddr_shutdown);
grpc_register_plugin(grpc_load_reporting_plugin_init,
grpc_load_reporting_plugin_shutdown);
+ grpc_register_plugin(grpc_lb_policy_grpclb_init,
+ grpc_lb_policy_grpclb_shutdown);
grpc_register_plugin(grpc_lb_policy_pick_first_init,
grpc_lb_policy_pick_first_shutdown);
grpc_register_plugin(grpc_lb_policy_round_robin_init,
diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc
index 43117fd1e9..1ca6a2b906 100644
--- a/src/cpp/server/server_context.cc
+++ b/src/cpp/server/server_context.cc
@@ -129,7 +129,8 @@ ServerContext::ServerContext()
deadline_(gpr_inf_future(GPR_CLOCK_REALTIME)),
call_(nullptr),
cq_(nullptr),
- sent_initial_metadata_(false) {}
+ sent_initial_metadata_(false),
+ compression_level_set_(false) {}
ServerContext::ServerContext(gpr_timespec deadline, grpc_metadata* metadata,
size_t metadata_count)
@@ -139,7 +140,8 @@ ServerContext::ServerContext(gpr_timespec deadline, grpc_metadata* metadata,
deadline_(deadline),
call_(nullptr),
cq_(nullptr),
- sent_initial_metadata_(false) {
+ sent_initial_metadata_(false),
+ compression_level_set_(false) {
for (size_t i = 0; i < metadata_count; i++) {
client_metadata_.insert(std::pair<grpc::string_ref, grpc::string_ref>(
metadata[i].key,
@@ -194,15 +196,6 @@ bool ServerContext::IsCancelled() const {
}
}
-void ServerContext::set_compression_level(grpc_compression_level level) {
- // TODO(dgq): get rid of grpc_call_compression_for_level and propagate the
- // compression level by adding a new argument to
- // CallOpSendInitialMetadata::SendInitialMetadata.
- const grpc_compression_algorithm algorithm_for_level =
- grpc_call_compression_for_level(call_, level);
- set_compression_algorithm(algorithm_for_level);
-}
-
void ServerContext::set_compression_algorithm(
grpc_compression_algorithm algorithm) {
char* algorithm_name = NULL;
diff --git a/src/csharp/.nuget/packages.config b/src/csharp/.nuget/packages.config
deleted file mode 100644
index 6154b3561f..0000000000
--- a/src/csharp/.nuget/packages.config
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="NUnit.ConsoleRunner" version="3.2.0" />
- <package id="OpenCover" version="4.6.519" />
- <package id="ReportGenerator" version="2.4.4.0" />
-</packages> \ No newline at end of file
diff --git a/src/csharp/Grpc.Auth/project.json b/src/csharp/Grpc.Auth/project.json
index 08429f1d46..6215ca3585 100644
--- a/src/csharp/Grpc.Auth/project.json
+++ b/src/csharp/Grpc.Auth/project.json
@@ -32,9 +32,9 @@
"net45"
],
"dependencies": {
- "Microsoft.NETCore.Portable.Compatibility": "1.0.1-rc2-24027",
- "NETStandard.Library": "1.5.0-rc2-24027",
- "System.Threading.Tasks": "4.0.11-rc2-24027"
+ "Microsoft.NETCore.Portable.Compatibility": "1.0.1",
+ "NETStandard.Library": "1.6.0",
+ "System.Threading.Tasks": "4.0.11"
}
}
}
diff --git a/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs b/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs
index 064bc13cab..d7ebdb4201 100644
--- a/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs
+++ b/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs
@@ -40,7 +40,7 @@ namespace Grpc.Core.Tests
{
public class AppDomainUnloadTest
{
-#if NETSTANDARD1_5
+#if NETCOREAPP1_0
[Test]
[Ignore("Not supported for CoreCLR")]
public void AppDomainUnloadHookCanCleanupAbandonedCall()
diff --git a/src/csharp/Grpc.Core.Tests/NUnitMain.cs b/src/csharp/Grpc.Core.Tests/NUnitMain.cs
index 24a9f846d1..870c726ac0 100644
--- a/src/csharp/Grpc.Core.Tests/NUnitMain.cs
+++ b/src/csharp/Grpc.Core.Tests/NUnitMain.cs
@@ -49,7 +49,7 @@ namespace Grpc.Core.Tests
{
// Make logger immune to NUnit capturing stdout and stderr to workaround https://github.com/nunit/nunit/issues/1406.
GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error));
-#if NETSTANDARD1_5
+#if NETCOREAPP1_0
return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
#else
return new AutoRun().Execute(args);
diff --git a/src/csharp/Grpc.Core.Tests/SanityTest.cs b/src/csharp/Grpc.Core.Tests/SanityTest.cs
index 501992c569..df887d82b3 100644
--- a/src/csharp/Grpc.Core.Tests/SanityTest.cs
+++ b/src/csharp/Grpc.Core.Tests/SanityTest.cs
@@ -46,7 +46,7 @@ namespace Grpc.Core.Tests
public class SanityTest
{
// TODO: make sanity test work for CoreCLR as well
-#if !NETSTANDARD1_5
+#if !NETCOREAPP1_0
/// <summary>
/// Because we depend on a native library, sometimes when things go wrong, the
/// entire NUnit test process crashes. To be able to track down problems better,
@@ -58,10 +58,11 @@ namespace Grpc.Core.Tests
[Test]
public void TestsJsonUpToDate()
{
- var discoveredTests = DiscoverAllTestClasses();
- string discoveredTestsJson = JsonConvert.SerializeObject(discoveredTests, Formatting.Indented);
+ Dictionary<string, List<string>> discoveredTests = DiscoverAllTestClasses();
+ Dictionary<string, List<string>> testsFromFile
+ = JsonConvert.DeserializeObject<Dictionary<string, List<string>>>(ReadTestsJson());
- Assert.AreEqual(discoveredTestsJson, ReadTestsJson());
+ Assert.AreEqual(discoveredTests, testsFromFile);
}
/// <summary>
diff --git a/src/csharp/Grpc.Core.Tests/packages.config b/src/csharp/Grpc.Core.Tests/packages.config
index aa7d951fdc..6a930c17ee 100644
--- a/src/csharp/Grpc.Core.Tests/packages.config
+++ b/src/csharp/Grpc.Core.Tests/packages.config
@@ -4,4 +4,7 @@
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="NUnit" version="3.2.0" targetFramework="net45" />
<package id="NUnitLite" version="3.2.0" targetFramework="net45" />
-</packages> \ No newline at end of file
+ <package id="NUnit.ConsoleRunner" version="3.2.0" />
+ <package id="OpenCover" version="4.6.519" />
+ <package id="ReportGenerator" version="2.4.4.0" />
+</packages>
diff --git a/src/csharp/Grpc.Core.Tests/project.json b/src/csharp/Grpc.Core.Tests/project.json
index d4c9a2ef31..014e2262e9 100644
--- a/src/csharp/Grpc.Core.Tests/project.json
+++ b/src/csharp/Grpc.Core.Tests/project.json
@@ -54,16 +54,20 @@
},
"Newtonsoft.Json": "8.0.3",
"NUnit": "3.2.0",
- "NUnitLite": "3.2.0-*"
+ "NUnitLite": "3.2.0-*",
+ "NUnit.ConsoleRunner": "3.2.0",
+ "OpenCover": "4.6.519",
+ "ReportGenerator": "2.4.4.0"
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
},
diff --git a/src/csharp/Grpc.Core/project.json b/src/csharp/Grpc.Core/project.json
index 807508896a..901b0ce5d0 100644
--- a/src/csharp/Grpc.Core/project.json
+++ b/src/csharp/Grpc.Core/project.json
@@ -40,8 +40,8 @@
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027",
- "System.Threading.Thread": "4.0.0-rc2-24027"
+ "NETStandard.Library": "1.6.0",
+ "System.Threading.Thread": "4.0.0"
}
}
}
diff --git a/src/csharp/Grpc.Examples.MathClient/packages.config b/src/csharp/Grpc.Examples.MathClient/packages.config
new file mode 100644
index 0000000000..79ece06bef
--- /dev/null
+++ b/src/csharp/Grpc.Examples.MathClient/packages.config
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+</packages>
diff --git a/src/csharp/Grpc.Examples.MathClient/project.json b/src/csharp/Grpc.Examples.MathClient/project.json
index 206d6c5982..ad319478ab 100644
--- a/src/csharp/Grpc.Examples.MathClient/project.json
+++ b/src/csharp/Grpc.Examples.MathClient/project.json
@@ -55,12 +55,13 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/src/csharp/Grpc.Examples.MathServer/packages.config b/src/csharp/Grpc.Examples.MathServer/packages.config
new file mode 100644
index 0000000000..79ece06bef
--- /dev/null
+++ b/src/csharp/Grpc.Examples.MathServer/packages.config
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+</packages>
diff --git a/src/csharp/Grpc.Examples.MathServer/project.json b/src/csharp/Grpc.Examples.MathServer/project.json
index 206d6c5982..ad319478ab 100644
--- a/src/csharp/Grpc.Examples.MathServer/project.json
+++ b/src/csharp/Grpc.Examples.MathServer/project.json
@@ -55,12 +55,13 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/src/csharp/Grpc.Examples.Tests/NUnitMain.cs b/src/csharp/Grpc.Examples.Tests/NUnitMain.cs
index 1a522cab93..7ba1074d44 100644
--- a/src/csharp/Grpc.Examples.Tests/NUnitMain.cs
+++ b/src/csharp/Grpc.Examples.Tests/NUnitMain.cs
@@ -49,7 +49,7 @@ namespace Grpc.Examples.Tests
{
// Make logger immune to NUnit capturing stdout and stderr to workaround https://github.com/nunit/nunit/issues/1406.
GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error));
-#if NETSTANDARD1_5
+#if NETCOREAPP1_0
return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
#else
return new AutoRun().Execute(args);
diff --git a/src/csharp/Grpc.Examples.Tests/project.json b/src/csharp/Grpc.Examples.Tests/project.json
index b4c4c5f691..1cd1848e99 100644
--- a/src/csharp/Grpc.Examples.Tests/project.json
+++ b/src/csharp/Grpc.Examples.Tests/project.json
@@ -57,12 +57,13 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/src/csharp/Grpc.Examples/project.json b/src/csharp/Grpc.Examples/project.json
index 7d3f4dcbb1..48ec530abb 100644
--- a/src/csharp/Grpc.Examples/project.json
+++ b/src/csharp/Grpc.Examples/project.json
@@ -20,7 +20,7 @@
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/src/csharp/Grpc.HealthCheck.Tests/NUnitMain.cs b/src/csharp/Grpc.HealthCheck.Tests/NUnitMain.cs
index 44634671ce..dca61e3f96 100644
--- a/src/csharp/Grpc.HealthCheck.Tests/NUnitMain.cs
+++ b/src/csharp/Grpc.HealthCheck.Tests/NUnitMain.cs
@@ -49,7 +49,7 @@ namespace Grpc.HealthCheck.Tests
{
// Make logger immune to NUnit capturing stdout and stderr to workaround https://github.com/nunit/nunit/issues/1406.
GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error));
-#if NETSTANDARD1_5
+#if NETCOREAPP1_0
return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
#else
return new AutoRun().Execute(args);
diff --git a/src/csharp/Grpc.HealthCheck.Tests/project.json b/src/csharp/Grpc.HealthCheck.Tests/project.json
index f44a3225ae..faa4400304 100644
--- a/src/csharp/Grpc.HealthCheck.Tests/project.json
+++ b/src/csharp/Grpc.HealthCheck.Tests/project.json
@@ -57,12 +57,13 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/src/csharp/Grpc.HealthCheck/project.json b/src/csharp/Grpc.HealthCheck/project.json
index 0e03e89d6a..7c062a7e40 100644
--- a/src/csharp/Grpc.HealthCheck/project.json
+++ b/src/csharp/Grpc.HealthCheck/project.json
@@ -37,7 +37,7 @@
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/src/csharp/Grpc.IntegrationTesting.Client/project.json b/src/csharp/Grpc.IntegrationTesting.Client/project.json
index 6b61a4b76e..287950720f 100644
--- a/src/csharp/Grpc.IntegrationTesting.Client/project.json
+++ b/src/csharp/Grpc.IntegrationTesting.Client/project.json
@@ -57,13 +57,14 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45",
"net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/packages.config b/src/csharp/Grpc.IntegrationTesting.QpsWorker/packages.config
new file mode 100644
index 0000000000..79ece06bef
--- /dev/null
+++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/packages.config
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+</packages>
diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json
index 6b61a4b76e..287950720f 100644
--- a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json
+++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json
@@ -57,13 +57,14 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45",
"net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/src/csharp/Grpc.IntegrationTesting.Server/project.json b/src/csharp/Grpc.IntegrationTesting.Server/project.json
index 6b61a4b76e..287950720f 100644
--- a/src/csharp/Grpc.IntegrationTesting.Server/project.json
+++ b/src/csharp/Grpc.IntegrationTesting.Server/project.json
@@ -57,13 +57,14 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45",
"net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/src/csharp/Grpc.IntegrationTesting.StressClient/packages.config b/src/csharp/Grpc.IntegrationTesting.StressClient/packages.config
new file mode 100644
index 0000000000..79ece06bef
--- /dev/null
+++ b/src/csharp/Grpc.IntegrationTesting.StressClient/packages.config
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+</packages>
diff --git a/src/csharp/Grpc.IntegrationTesting.StressClient/project.json b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json
index 6b61a4b76e..287950720f 100644
--- a/src/csharp/Grpc.IntegrationTesting.StressClient/project.json
+++ b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json
@@ -57,13 +57,14 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45",
"net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs b/src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs
index eb7b55a286..c17ede7561 100644
--- a/src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs
+++ b/src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs
@@ -49,7 +49,7 @@ namespace Grpc.IntegrationTesting
TestService.TestServiceClient unimplementedClient = new UnimplementedTestServiceClient();
// TODO: replace Moq by some mocking library with CoreCLR support.
-#if !NETSTANDARD1_5
+#if !NETCOREAPP1_0
[Test]
public void ExpandedParamOverloadCanBeMocked()
{
diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs
index e27fe5b3d8..ec407d3fcf 100644
--- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs
+++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs
@@ -145,7 +145,7 @@ namespace Grpc.IntegrationTesting
if (options.TestCase == "jwt_token_creds")
{
-#if !NETSTANDARD1_5
+#if !NETCOREAPP1_0
var googleCredential = await GoogleCredential.GetApplicationDefaultAsync();
Assert.IsTrue(googleCredential.IsCreateScopedRequired);
credentials = ChannelCredentials.Create(credentials, googleCredential.ToCallCredentials());
@@ -157,7 +157,7 @@ namespace Grpc.IntegrationTesting
if (options.TestCase == "compute_engine_creds")
{
-#if !NETSTANDARD1_5
+#if !NETCOREAPP1_0
var googleCredential = await GoogleCredential.GetApplicationDefaultAsync();
Assert.IsFalse(googleCredential.IsCreateScopedRequired);
credentials = ChannelCredentials.Create(credentials, googleCredential.ToCallCredentials());
@@ -395,7 +395,7 @@ namespace Grpc.IntegrationTesting
public static async Task RunOAuth2AuthTokenAsync(TestService.TestServiceClient client, string oauthScope)
{
-#if !NETSTANDARD1_5
+#if !NETCOREAPP1_0
Console.WriteLine("running oauth2_auth_token");
ITokenAccess credential = (await GoogleCredential.GetApplicationDefaultAsync()).CreateScoped(new[] { oauthScope });
string oauth2Token = await credential.GetAccessTokenForRequestAsync();
@@ -421,7 +421,7 @@ namespace Grpc.IntegrationTesting
public static async Task RunPerRpcCredsAsync(TestService.TestServiceClient client, string oauthScope)
{
-#if !NETSTANDARD1_5
+#if !NETCOREAPP1_0
Console.WriteLine("running per_rpc_creds");
ITokenAccess googleCredential = await GoogleCredential.GetApplicationDefaultAsync();
@@ -731,7 +731,7 @@ namespace Grpc.IntegrationTesting
// extracts the client_email field from service account file used for auth test cases
private static string GetEmailFromServiceAccountFile()
{
-#if !NETSTANDARD1_5
+#if !NETCOREAPP1_0
string keyFile = Environment.GetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS");
Assert.IsNotNull(keyFile);
var jobject = JObject.Parse(File.ReadAllText(keyFile));
diff --git a/src/csharp/Grpc.IntegrationTesting/NUnitMain.cs b/src/csharp/Grpc.IntegrationTesting/NUnitMain.cs
index 100ff0b5de..21c8adb45c 100644
--- a/src/csharp/Grpc.IntegrationTesting/NUnitMain.cs
+++ b/src/csharp/Grpc.IntegrationTesting/NUnitMain.cs
@@ -49,7 +49,7 @@ namespace Grpc.IntegrationTesting
{
// Make logger immune to NUnit capturing stdout and stderr to workaround https://github.com/nunit/nunit/issues/1406.
GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error));
-#if NETSTANDARD1_5
+#if NETCOREAPP1_0
return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
#else
return new AutoRun().Execute(args);
diff --git a/src/csharp/Grpc.IntegrationTesting/project.json b/src/csharp/Grpc.IntegrationTesting/project.json
index dcd9ccabd2..bb61a679c1 100644
--- a/src/csharp/Grpc.IntegrationTesting/project.json
+++ b/src/csharp/Grpc.IntegrationTesting/project.json
@@ -72,14 +72,15 @@
"System.IO": ""
}
},
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45",
"net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027",
- "System.Linq.Expressions": "4.0.11-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0",
+ "System.Linq.Expressions": "4.1.0"
}
}
}
diff --git a/src/node/ext/call_credentials.cc b/src/node/ext/call_credentials.cc
index 3c8f0c56da..81fc552fd1 100644
--- a/src/node/ext/call_credentials.cc
+++ b/src/node/ext/call_credentials.cc
@@ -68,6 +68,8 @@ using v8::Value;
Nan::Callback *CallCredentials::constructor;
Persistent<FunctionTemplate> CallCredentials::fun_tpl;
+static Callback *plugin_callback;
+
CallCredentials::CallCredentials(grpc_call_credentials *credentials)
: wrapped_credentials(credentials) {}
@@ -88,6 +90,11 @@ void CallCredentials::Init(Local<Object> exports) {
Nan::New<FunctionTemplate>(CreateFromPlugin)).ToLocalChecked());
Nan::Set(exports, Nan::New("CallCredentials").ToLocalChecked(), ctr);
constructor = new Nan::Callback(ctr);
+
+ Local<FunctionTemplate> callback_tpl =
+ Nan::New<FunctionTemplate>(PluginCallback);
+ plugin_callback = new Callback(
+ Nan::GetFunction(callback_tpl).ToLocalChecked());
}
bool CallCredentials::HasInstance(Local<Value> val) {
@@ -195,23 +202,28 @@ NAN_METHOD(PluginCallback) {
return Nan::ThrowTypeError(
"The callback's third argument must be an object");
}
+ if (!info[3]->IsObject()) {
+ return Nan::ThrowTypeError(
+ "The callback's fourth argument must be an object");
+ }
shared_ptr<Resources> resources(new Resources);
grpc_status_code code = static_cast<grpc_status_code>(
Nan::To<uint32_t>(info[0]).FromJust());
Utf8String details_utf8_str(info[1]);
char *details = *details_utf8_str;
grpc_metadata_array array;
+ Local<Object> callback_data = Nan::To<Object>(info[3]).ToLocalChecked();
if (!CreateMetadataArray(Nan::To<Object>(info[2]).ToLocalChecked(),
&array, resources)){
return Nan::ThrowError("Failed to parse metadata");
}
grpc_credentials_plugin_metadata_cb cb =
reinterpret_cast<grpc_credentials_plugin_metadata_cb>(
- Nan::Get(info.Callee(),
+ Nan::Get(callback_data,
Nan::New("cb").ToLocalChecked()
).ToLocalChecked().As<External>()->Value());
void *user_data =
- Nan::Get(info.Callee(),
+ Nan::Get(callback_data,
Nan::New("user_data").ToLocalChecked()
).ToLocalChecked().As<External>()->Value();
cb(user_data, array.metadata, array.count, code, details);
@@ -227,17 +239,17 @@ NAUV_WORK_CB(SendPluginCallback) {
while (!callbacks.empty()) {
plugin_callback_data *data = callbacks.front();
callbacks.pop_front();
- // Attach cb and user_data to plugin_callback so that it can access them later
- v8::Local<v8::Function> plugin_callback = Nan::GetFunction(
- Nan::New<v8::FunctionTemplate>(PluginCallback)).ToLocalChecked();
- Nan::Set(plugin_callback, Nan::New("cb").ToLocalChecked(),
+ Local<Object> callback_data = Nan::New<Object>();
+ Nan::Set(callback_data, Nan::New("cb").ToLocalChecked(),
Nan::New<v8::External>(reinterpret_cast<void*>(data->cb)));
- Nan::Set(plugin_callback, Nan::New("user_data").ToLocalChecked(),
+ Nan::Set(callback_data, Nan::New("user_data").ToLocalChecked(),
Nan::New<v8::External>(data->user_data));
- const int argc = 2;
+ const int argc = 3;
v8::Local<v8::Value> argv[argc] = {
Nan::New(data->service_url).ToLocalChecked(),
- plugin_callback
+ callback_data,
+ // Get Local<Function> from Nan::Callback*
+ **plugin_callback
};
Nan::Callback *callback = state->callback;
callback->Call(argc, argv);
diff --git a/src/node/health_check/package.json b/src/node/health_check/package.json
index 67f5301df7..40e276055b 100644
--- a/src/node/health_check/package.json
+++ b/src/node/health_check/package.json
@@ -19,11 +19,11 @@
"lodash": "^3.9.3",
"google-protobuf": "^3.0.0-alpha.5"
},
- "files": {
+ "files": [
"LICENSE",
"health.js",
"v1"
- },
+ ],
"main": "src/node/index.js",
"license": "BSD-3-Clause"
}
diff --git a/src/node/src/credentials.js b/src/node/src/credentials.js
index b746d0625d..043df06a66 100644
--- a/src/node/src/credentials.js
+++ b/src/node/src/credentials.js
@@ -92,7 +92,8 @@ exports.createSsl = ChannelCredentials.createSsl;
* @return {CallCredentials} The credentials object
*/
exports.createFromMetadataGenerator = function(metadata_generator) {
- return CallCredentials.createFromPlugin(function(service_url, callback) {
+ return CallCredentials.createFromPlugin(function(service_url, cb_data,
+ callback) {
metadata_generator({service_url: service_url}, function(error, metadata) {
var code = grpc.status.OK;
var message = '';
@@ -107,7 +108,7 @@ exports.createFromMetadataGenerator = function(metadata_generator) {
metadata = new Metadata();
}
}
- callback(code, message, metadata._getCoreRepresentation());
+ callback(code, message, metadata._getCoreRepresentation(), cb_data);
});
});
};
diff --git a/src/objective-c/GRPCClient/GRPCCall+ChannelArg.h b/src/objective-c/GRPCClient/GRPCCall+ChannelArg.h
index 646bf43b54..4a3f3fa4a1 100644
--- a/src/objective-c/GRPCClient/GRPCCall+ChannelArg.h
+++ b/src/objective-c/GRPCClient/GRPCCall+ChannelArg.h
@@ -43,7 +43,10 @@
* Use the provided @c userAgentPrefix at the beginning of the HTTP User Agent string for all calls
* to the specified @c host.
*/
-+ (void)setUserAgentPrefix:(NSString *)userAgentPrefix forHost:(NSString *)host;
++ (void)setUserAgentPrefix:(nonnull NSString *)userAgentPrefix forHost:(nonnull NSString *)host;
+
+/** 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 "
diff --git a/src/objective-c/GRPCClient/GRPCCall+ChannelArg.m b/src/objective-c/GRPCClient/GRPCCall+ChannelArg.m
index bcc3b91507..7fab357e93 100644
--- a/src/objective-c/GRPCClient/GRPCCall+ChannelArg.m
+++ b/src/objective-c/GRPCClient/GRPCCall+ChannelArg.m
@@ -37,15 +37,16 @@
@implementation GRPCCall (ChannelArg)
-+ (void)setUserAgentPrefix:(NSString *)userAgentPrefix forHost:(NSString *)host {
- if (!host) {
- [NSException raise:NSInvalidArgumentException
- format:@"host and userAgentPrefix must be provided."];
- }
++ (void)setUserAgentPrefix:(nonnull NSString *)userAgentPrefix forHost:(nonnull NSString *)host {
GRPCHost *hostConfig = [GRPCHost hostWithAddress:host];
hostConfig.userAgentPrefix = userAgentPrefix;
}
++ (void)setResponseSizeLimit:(NSUInteger)limit forHost:(nonnull NSString *)host {
+ GRPCHost *hostConfig = [GRPCHost hostWithAddress:host];
+ hostConfig.responseSizeLimitOverride = @(limit);
+}
+
+ (void)closeOpenConnections {
[GRPCHost flushChannelCache];
}
diff --git a/src/objective-c/GRPCClient/GRPCCall+Tests.h b/src/objective-c/GRPCClient/GRPCCall+Tests.h
index ccc5723ec7..184ad09c5c 100644
--- a/src/objective-c/GRPCClient/GRPCCall+Tests.h
+++ b/src/objective-c/GRPCClient/GRPCCall+Tests.h
@@ -57,4 +57,10 @@
* 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.
+ */
++ (void)resetHostSettings;
@end
diff --git a/src/objective-c/GRPCClient/GRPCCall+Tests.m b/src/objective-c/GRPCClient/GRPCCall+Tests.m
index b9456691bd..656cba8fec 100644
--- a/src/objective-c/GRPCClient/GRPCCall+Tests.m
+++ b/src/objective-c/GRPCClient/GRPCCall+Tests.m
@@ -61,4 +61,7 @@
hostConfig.secure = NO;
}
++ (void)resetHostSettings {
+ [GRPCHost resetAllHostSettings];
+}
@end
diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.h b/src/objective-c/GRPCClient/private/GRPCChannel.h
index 40e78a92d6..5bada2dd50 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannel.h
+++ b/src/objective-c/GRPCClient/private/GRPCChannel.h
@@ -59,8 +59,8 @@ struct grpc_channel_credentials;
* Creates a secure channel to the specified @c host using Cronet as a transport mechanism.
*/
#ifdef GRPC_COMPILE_WITH_CRONET
-+ (nullable GRPCChannel *)secureCronetChannelWithHost:(NSString *)host
- channelArgs:(NSDictionary *)channelArgs;
++ (nullable GRPCChannel *)secureCronetChannelWithHost:(nonnull NSString *)host
+ channelArgs:(nonnull NSDictionary *)channelArgs;
#endif
/**
* Creates a secure channel to the specified @c host using the specified @c credentials and
diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m
index 7b7b79e1c6..e49aceefe1 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannel.m
+++ b/src/objective-c/GRPCClient/private/GRPCChannel.m
@@ -47,7 +47,7 @@
#endif
#import "GRPCCompletionQueue.h"
-void freeChannelArgs(grpc_channel_args *channel_args) {
+static void FreeChannelArgs(grpc_channel_args *channel_args) {
for (size_t i = 0; i < channel_args->num_args; ++i) {
grpc_arg *arg = &channel_args->args[i];
gpr_free(arg->key);
@@ -65,7 +65,7 @@ void freeChannelArgs(grpc_channel_args *channel_args) {
* value responds to @c @selector(intValue). Otherwise, an exception will be raised. The caller of
* this function is responsible for calling @c freeChannelArgs on a non-NULL returned value.
*/
-grpc_channel_args * buildChannelArgs(NSDictionary *dictionary) {
+static grpc_channel_args *BuildChannelArgs(NSDictionary *dictionary) {
if (!dictionary) {
return NULL;
}
@@ -115,10 +115,12 @@ grpc_channel_args * buildChannelArgs(NSDictionary *dictionary) {
}
if (self = [super init]) {
- _channelArgs = buildChannelArgs(channelArgs);
+ _channelArgs = BuildChannelArgs(channelArgs);
_host = [host copy];
- _unmanagedChannel = grpc_cronet_secure_channel_create(cronetEngine, _host.UTF8String, _channelArgs,
- NULL);
+ _unmanagedChannel = grpc_cronet_secure_channel_create(cronetEngine,
+ _host.UTF8String,
+ _channelArgs,
+ NULL);
}
return self;
@@ -138,7 +140,7 @@ grpc_channel_args * buildChannelArgs(NSDictionary *dictionary) {
}
if (self = [super init]) {
- _channelArgs = buildChannelArgs(channelArgs);
+ _channelArgs = BuildChannelArgs(channelArgs);
_host = [host copy];
if (secure) {
_unmanagedChannel = grpc_secure_channel_create(credentials, _host.UTF8String, _channelArgs,
@@ -155,7 +157,7 @@ grpc_channel_args * buildChannelArgs(NSDictionary *dictionary) {
// TODO(jcanizales): Be sure to add a test with a server that closes the connection prematurely,
// as in the past that made this call to crash.
grpc_channel_destroy(_unmanagedChannel);
- freeChannelArgs(_channelArgs);
+ FreeChannelArgs(_channelArgs);
}
#ifdef GRPC_COMPILE_WITH_CRONET
diff --git a/src/objective-c/GRPCClient/private/GRPCHost.h b/src/objective-c/GRPCClient/private/GRPCHost.h
index 350c69bf8e..c8b5dd315b 100644
--- a/src/objective-c/GRPCClient/private/GRPCHost.h
+++ b/src/objective-c/GRPCClient/private/GRPCHost.h
@@ -42,6 +42,7 @@ struct grpc_channel_credentials;
@interface GRPCHost : NSObject
+ (void)flushChannelCache;
++ (void)resetAllHostSettings;
@property(nonatomic, readonly) NSString *address;
@property(nonatomic, copy, nullable) NSString *userAgentPrefix;
@@ -53,6 +54,10 @@ struct grpc_channel_credentials;
@property(nonatomic, copy, nullable) NSString *hostNameOverride;
+/** The default response size limit is 4MB. Set this to override that default. */
+@property(nonatomic, strong, nullable) NSNumber *responseSizeLimitOverride;
+
+
- (nullable instancetype)init NS_UNAVAILABLE;
/** Host objects initialized with the same address are the same. */
+ (nullable instancetype)hostWithAddress:(NSString *)address;
diff --git a/src/objective-c/GRPCClient/private/GRPCHost.m b/src/objective-c/GRPCClient/private/GRPCHost.m
index 08c699f99e..477ddf51d9 100644
--- a/src/objective-c/GRPCClient/private/GRPCHost.m
+++ b/src/objective-c/GRPCClient/private/GRPCHost.m
@@ -49,7 +49,7 @@ NS_ASSUME_NONNULL_BEGIN
// TODO(jcanizales): Generate the version in a standalone header, from templates. Like
// templates/src/core/surface/version.c.template .
-#define GRPC_OBJC_VERSION_STRING @"0.13.0"
+#define GRPC_OBJC_VERSION_STRING @"1.0.0-pre1"
static NSMutableDictionary *kHostCache;
@@ -113,6 +113,12 @@ static NSMutableDictionary *kHostCache;
}
}
++ (void)resetAllHostSettings {
+ @synchronized (kHostCache) {
+ kHostCache = [NSMutableDictionary dictionary];
+ }
+}
+
- (nullable grpc_call *)unmanagedCallWithPath:(NSString *)path
completionQueue:(GRPCCompletionQueue *)queue {
GRPCChannel *channel;
@@ -209,6 +215,10 @@ static NSMutableDictionary *kHostCache;
if (_secure && _hostNameOverride) {
args[@GRPC_SSL_TARGET_NAME_OVERRIDE_ARG] = _hostNameOverride;
}
+
+ if (_responseSizeLimitOverride) {
+ args[@GRPC_ARG_MAX_MESSAGE_LENGTH] = _responseSizeLimitOverride;
+ }
return args;
}
diff --git a/src/objective-c/tests/GRPCClientTests.m b/src/objective-c/tests/GRPCClientTests.m
index 1167a715bb..916a335802 100644
--- a/src/objective-c/tests/GRPCClientTests.m
+++ b/src/objective-c/tests/GRPCClientTests.m
@@ -292,15 +292,6 @@ static GRPCProtoMethod *kUnaryCallMethod;
// TODO(makarandd): Move to a different file that contains only unit tests
- (void)testExceptions {
- // Try to set userAgentPrefix for host that is nil. This should cause
- // an exception.
- @try {
- [GRPCCall setUserAgentPrefix:@"Foo" forHost:nil];
- XCTFail(@"Did not receive an exception when host is nil");
- } @catch(NSException *theException) {
- NSLog(@"Received exception as expected: %@", theException.name);
- }
-
// Try to set parameters to nil for GRPCCall. This should cause an exception
@try {
(void)[[GRPCCall alloc] initWithHost:nil
diff --git a/src/objective-c/tests/InteropTests.h b/src/objective-c/tests/InteropTests.h
index 6d54343b13..ecab606a78 100644
--- a/src/objective-c/tests/InteropTests.h
+++ b/src/objective-c/tests/InteropTests.h
@@ -46,4 +46,11 @@
* Override in a subclass to perform these tests against a specific address.
*/
+ (NSString *)host;
+
+/**
+ * Bytes of overhead of test proto responses due to encoding. This is used to excercise the behavior
+ * when responses are just above or below the max response size. For some reason, the local and
+ * remote servers enconde responses with different overhead (?), so this is defined per-subclass.
+ */
+- (int32_t)encodingOverhead;
@end
diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m
index 494743d604..f04a7e6441 100644
--- a/src/objective-c/tests/InteropTests.m
+++ b/src/objective-c/tests/InteropTests.m
@@ -80,10 +80,6 @@
#pragma mark Tests
-#ifdef GRPC_COMPILE_WITH_CRONET
-static cronet_engine *cronetEngine = NULL;
-#endif
-
@implementation InteropTests {
RMTTestService *_service;
}
@@ -92,15 +88,22 @@ static cronet_engine *cronetEngine = NULL;
return nil;
}
+- (int32_t)encodingOverhead {
+ return 0;
+}
+
- (void)setUp {
+ self.continueAfterFailure = NO;
+
+ [GRPCCall resetHostSettings];
+
_service = self.class.host ? [RMTTestService serviceWithHost:self.class.host] : nil;
#ifdef GRPC_COMPILE_WITH_CRONET
if (cronetEngine == NULL) {
// Cronet setup
[Cronet setHttp2Enabled:YES];
[Cronet start];
- cronetEngine = [Cronet getGlobalEngine];
- [GRPCCall useCronetWithEngine:cronetEngine];
+ [GRPCCall useCronetWithEngine:[Cronet getGlobalEngine]];
}
#endif
}
@@ -146,6 +149,64 @@ static cronet_engine *cronetEngine = NULL;
[self waitForExpectationsWithTimeout:16 handler:nil];
}
+- (void)test4MBResponsesAreAccepted {
+ XCTAssertNotNil(self.class.host);
+ __weak XCTestExpectation *expectation = [self expectationWithDescription:@"MaxResponseSize"];
+
+ RMTSimpleRequest *request = [RMTSimpleRequest message];
+ const int32_t kPayloadSize = 4 * 1024 * 1024 - self.encodingOverhead; // 4MB - encoding overhead
+ request.responseSize = kPayloadSize;
+
+ [_service unaryCallWithRequest:request handler:^(RMTSimpleResponse *response, NSError *error) {
+ XCTAssertNil(error, @"Finished with unexpected error: %@", error);
+ XCTAssertEqual(response.payload.body.length, kPayloadSize);
+ [expectation fulfill];
+ }];
+
+ [self waitForExpectationsWithTimeout:16 handler:nil];
+}
+
+- (void)testResponsesOverMaxSizeFailWithActionableMessage {
+ XCTAssertNotNil(self.class.host);
+ __weak XCTestExpectation *expectation = [self expectationWithDescription:@"ResponseOverMaxSize"];
+
+ RMTSimpleRequest *request = [RMTSimpleRequest message];
+ const int32_t kPayloadSize = 4 * 1024 * 1024 - self.encodingOverhead + 1; // 1B over max size
+ request.responseSize = kPayloadSize;
+
+ [_service unaryCallWithRequest:request handler:^(RMTSimpleResponse *response, NSError *error) {
+ // TODO(jcanizales): Catch the error and rethrow it with an actionable message:
+ // - Use +[GRPCCall setResponseSizeLimit:forHost:] to set a higher limit.
+ // - If you're developing the server, consider using response streaming, or let clients filter
+ // responses by setting a google.protobuf.FieldMask in the request:
+ // https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto
+ XCTAssertEqualObjects(error.localizedDescription, @"Max message size exceeded");
+ [expectation fulfill];
+ }];
+
+ [self waitForExpectationsWithTimeout:16 handler:nil];
+}
+
+- (void)testResponsesOver4MBAreAcceptedIfOptedIn {
+ XCTAssertNotNil(self.class.host);
+ __weak XCTestExpectation *expectation =
+ [self expectationWithDescription:@"HigherResponseSizeLimit"];
+
+ RMTSimpleRequest *request = [RMTSimpleRequest message];
+ const size_t kPayloadSize = 5 * 1024 * 1024; // 5MB
+ request.responseSize = kPayloadSize;
+
+ [GRPCCall setResponseSizeLimit:6 * 1024 * 1024 forHost:self.class.host];
+
+ [_service unaryCallWithRequest:request handler:^(RMTSimpleResponse *response, NSError *error) {
+ XCTAssertNil(error, @"Finished with unexpected error: %@", error);
+ XCTAssertEqual(response.payload.body.length, kPayloadSize);
+ [expectation fulfill];
+ }];
+
+ [self waitForExpectationsWithTimeout:16 handler:nil];
+}
+
- (void)testClientStreamingRPC {
XCTAssertNotNil(self.class.host);
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"ClientStreaming"];
diff --git a/src/objective-c/tests/InteropTestsLocalCleartext.m b/src/objective-c/tests/InteropTestsLocalCleartext.m
index 56927a8af6..b41210f50f 100644
--- a/src/objective-c/tests/InteropTestsLocalCleartext.m
+++ b/src/objective-c/tests/InteropTestsLocalCleartext.m
@@ -47,11 +47,15 @@ static NSString * const kLocalCleartextHost = @"localhost:5050";
return kLocalCleartextHost;
}
+- (int32_t)encodingOverhead {
+ return 10; // bytes
+}
+
- (void)setUp {
+ [super setUp];
+
// Register test server as non-SSL.
[GRPCCall useInsecureConnectionsForHost:kLocalCleartextHost];
-
- [super setUp];
}
@end
diff --git a/src/objective-c/tests/InteropTestsLocalSSL.m b/src/objective-c/tests/InteropTestsLocalSSL.m
index f0f4b1d71f..1479c5896c 100644
--- a/src/objective-c/tests/InteropTestsLocalSSL.m
+++ b/src/objective-c/tests/InteropTestsLocalSSL.m
@@ -47,14 +47,18 @@ static NSString * const kLocalSSLHost = @"localhost:5051";
return kLocalSSLHost;
}
+- (int32_t)encodingOverhead {
+ return 10; // bytes
+}
+
- (void)setUp {
+ [super setUp];
+
// Register test server certificates and name.
NSBundle *bundle = [NSBundle bundleForClass:self.class];
NSString *certsPath = [bundle pathForResource:@"TestCertificates.bundle/test-certificates"
ofType:@"pem"];
[GRPCCall useTestCertsPath:certsPath testName:@"foo.test.google.fr" forHost:kLocalSSLHost];
-
- [super setUp];
}
- (void)testExceptions {
diff --git a/src/objective-c/tests/InteropTestsRemote.m b/src/objective-c/tests/InteropTestsRemote.m
index 758cc9346a..70f84753bb 100644
--- a/src/objective-c/tests/InteropTestsRemote.m
+++ b/src/objective-c/tests/InteropTestsRemote.m
@@ -47,4 +47,8 @@ static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com";
return kRemoteSSLHost;
}
+- (int32_t)encodingOverhead {
+ return 12; // bytes
+}
+
@end
diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile
index 3d0664a04f..17478fab12 100644
--- a/src/objective-c/tests/Podfile
+++ b/src/objective-c/tests/Podfile
@@ -14,6 +14,7 @@ GRPC_LOCAL_SRC = '../../..'
InteropTestsRemote
InteropTestsLocalSSL
InteropTestsLocalCleartext
+ InteropTestsRemoteWithCronet
).each do |target_name|
target target_name do
pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf", :inhibit_warnings => true
@@ -28,6 +29,11 @@ GRPC_LOCAL_SRC = '../../..'
pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC
pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC
pod 'RemoteTest', :path => "RemoteTestClient"
+
+ if target_name == 'InteropTestsRemoteWithCronet'
+ pod 'gRPC-Core/Cronet-Implementation', :path => GRPC_LOCAL_SRC
+ pod 'CronetFramework', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c"
+ end
end
end
@@ -36,23 +42,8 @@ target 'CoreCronetEnd2EndTests' do
pod 'CronetFramework', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c"
pod 'gRPC-Core', :path => GRPC_LOCAL_SRC
pod 'gRPC-Core/Cronet-Interface', :path => GRPC_LOCAL_SRC
- pod 'gRPC-Core/Cronet-Tests', :path => GRPC_LOCAL_SRC
-end
-
-target 'InteropTestsRemoteWithCronet' do
- pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf", :inhibit_warnings => true
-
- pod '!ProtoCompiler', :path => "#{GRPC_LOCAL_SRC}/src/objective-c"
- pod '!ProtoCompiler-gRPCPlugin', :path => "#{GRPC_LOCAL_SRC}/src/objective-c"
-
- pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true
- pod 'CronetFramework', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c"
-
- pod 'gRPC', :path => GRPC_LOCAL_SRC
- pod 'gRPC-Core', :path => GRPC_LOCAL_SRC
- pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC
- pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC
- pod 'RemoteTest', :path => "RemoteTestClient"
+ pod 'gRPC-Core/Cronet-Implementation', :path => GRPC_LOCAL_SRC
+ pod 'gRPC-Core/Tests', :path => GRPC_LOCAL_SRC
end
# gRPC-Core.podspec needs to be modified to be successfully used for local development. A Podfile's
@@ -91,7 +82,11 @@ post_install do |installer|
target.build_configurations.each do |config|
config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'YES'
end
- if target.name == 'gRPC-Core' or target.name == 'gRPC-Core.default-Cronet-Interface-Cronet-Tests'
+
+ # CocoaPods creates duplicated library targets of gRPC-Core when the test targets include
+ # non-default subspecs of gRPC-Core. All of these library targets start with prefix 'gRPC-Core.'
+ # and require the same error suppresion.
+ if target.name == 'gRPC-Core' or target.name.start_with?('gRPC-Core.')
target.build_configurations.each do |config|
# TODO(zyc): Remove this setting after the issue is resolved
# GPR_UNREACHABLE_CODE causes "Control may reach end of non-void
@@ -99,5 +94,15 @@ post_install do |installer|
config.build_settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'NO'
end
end
+
+ # Activate Cronet for the dedicated build configuration 'Cronet', which will be used solely by
+ # the test target 'InteropTestsRemoteWithCronet'
+ if target.name == 'gRPC'
+ target.build_configurations.each do |config|
+ if config.name == 'Cronet'
+ config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) COCOAPODS=1 GRPC_COMPILE_WITH_CRONET=1'
+ end
+ end
+ end
end
end
diff --git a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj
index 1d903478fd..c4a6567ae0 100644
--- a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj
+++ b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj
@@ -113,13 +113,17 @@
07D10A965323BEA7FE59A74B /* Pods-RxLibraryUnitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxLibraryUnitTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RxLibraryUnitTests/Pods-RxLibraryUnitTests.debug.xcconfig"; sourceTree = "<group>"; };
0A4F89D9C90E9C30990218F0 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
0D2284C3DF7E57F0ED504E39 /* Pods-CoreCronetEnd2EndTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CoreCronetEnd2EndTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CoreCronetEnd2EndTests/Pods-CoreCronetEnd2EndTests.debug.xcconfig"; sourceTree = "<group>"; };
+ 14B09A58FEE53A7A6B838920 /* Pods-InteropTestsLocalSSL.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalSSL.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalSSL/Pods-InteropTestsLocalSSL.cronet.xcconfig"; sourceTree = "<group>"; };
17F60BF2871F6AF85FB3FA12 /* Pods-InteropTestsRemoteWithCronet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsRemoteWithCronet.debug.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsRemoteWithCronet/Pods-InteropTestsRemoteWithCronet.debug.xcconfig"; sourceTree = "<group>"; };
20DFF2F3C97EF098FE5A3171 /* libPods-Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
35F2B6BF3BAE8F0DC4AFD76E /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
3B0861FC805389C52DB260D4 /* Pods-RxLibraryUnitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxLibraryUnitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RxLibraryUnitTests/Pods-RxLibraryUnitTests.release.xcconfig"; sourceTree = "<group>"; };
+ 3F27B2E744482771EB93C394 /* Pods-InteropTestsRemoteWithCronet.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsRemoteWithCronet.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsRemoteWithCronet/Pods-InteropTestsRemoteWithCronet.cronet.xcconfig"; sourceTree = "<group>"; };
4AD97096D13D7416DC91A72A /* Pods-CoreCronetEnd2EndTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CoreCronetEnd2EndTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-CoreCronetEnd2EndTests/Pods-CoreCronetEnd2EndTests.release.xcconfig"; sourceTree = "<group>"; };
+ 4ADEA1C8BBE10D90940AC68E /* Pods-InteropTestsRemote.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsRemote.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsRemote/Pods-InteropTestsRemote.cronet.xcconfig"; sourceTree = "<group>"; };
51A275E86C141416ED63FF76 /* Pods-InteropTestsLocalCleartext.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalCleartext.release.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalCleartext/Pods-InteropTestsLocalCleartext.release.xcconfig"; sourceTree = "<group>"; };
553BBBED24E4162D1F769D65 /* Pods-InteropTestsLocalSSL.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalSSL.debug.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalSSL/Pods-InteropTestsLocalSSL.debug.xcconfig"; sourceTree = "<group>"; };
+ 573450F334B331D0BED8B961 /* Pods-CoreCronetEnd2EndTests.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CoreCronetEnd2EndTests.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-CoreCronetEnd2EndTests/Pods-CoreCronetEnd2EndTests.cronet.xcconfig"; sourceTree = "<group>"; };
5761E98978DDDF136A58CB7E /* Pods-AllTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AllTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AllTests/Pods-AllTests.release.xcconfig"; sourceTree = "<group>"; };
5E8A5DA41D3840B4000F8BC4 /* CoreCronetEnd2EndTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CoreCronetEnd2EndTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
5E8A5DA61D3840B4000F8BC4 /* CoreCronetEnd2EndTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CoreCronetEnd2EndTests.m; sourceTree = "<group>"; };
@@ -142,9 +146,11 @@
63E240CC1B6C4D3A005F3B0E /* InteropTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InteropTests.h; sourceTree = "<group>"; };
63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteropTestsLocalSSL.m; sourceTree = "<group>"; };
63E240CF1B6C63DC005F3B0E /* TestCertificates.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = TestCertificates.bundle; sourceTree = "<group>"; };
+ 79C68EFFCB5533475D810B79 /* Pods-RxLibraryUnitTests.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxLibraryUnitTests.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-RxLibraryUnitTests/Pods-RxLibraryUnitTests.cronet.xcconfig"; sourceTree = "<group>"; };
7A2E97E3F469CC2A758D77DE /* Pods-InteropTestsLocalSSL.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalSSL.release.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalSSL/Pods-InteropTestsLocalSSL.release.xcconfig"; sourceTree = "<group>"; };
9E9444C764F0FFF64A7EB58E /* libPods-InteropTestsRemoteWithCronet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InteropTestsRemoteWithCronet.a"; sourceTree = BUILT_PRODUCTS_DIR; };
A58BE6DF1C62D1739EBB2C78 /* libPods-RxLibraryUnitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RxLibraryUnitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+ AA7CB64B4DD9915AE7C03163 /* Pods-InteropTestsLocalCleartext.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalCleartext.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalCleartext/Pods-InteropTestsLocalCleartext.cronet.xcconfig"; sourceTree = "<group>"; };
AC414EF7A6BF76ED02B6E480 /* Pods-InteropTestsRemoteWithCronet.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsRemoteWithCronet.release.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsRemoteWithCronet/Pods-InteropTestsRemoteWithCronet.release.xcconfig"; sourceTree = "<group>"; };
B94C27C06733CF98CE1B2757 /* Pods-AllTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AllTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AllTests/Pods-AllTests.debug.xcconfig"; sourceTree = "<group>"; };
CAE086D5B470DA367D415AB0 /* libPods-AllTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AllTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -154,6 +160,8 @@
E1486220285AF123EB124008 /* Pods-InteropTestsLocalCleartext.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalCleartext.debug.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalCleartext/Pods-InteropTestsLocalCleartext.debug.xcconfig"; sourceTree = "<group>"; };
E4275A759BDBDF143B9B438F /* Pods-InteropTestsRemote.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsRemote.release.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsRemote/Pods-InteropTestsRemote.release.xcconfig"; sourceTree = "<group>"; };
E6733B838B28453434B556E2 /* Pods-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Tests/Pods-Tests.release.xcconfig"; sourceTree = "<group>"; };
+ E7E4D3FD76E3B745D992AF5F /* Pods-AllTests.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AllTests.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-AllTests/Pods-AllTests.cronet.xcconfig"; sourceTree = "<group>"; };
+ F671D4CAD2864FB203B920B4 /* Pods-Tests.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-Tests/Pods-Tests.cronet.xcconfig"; sourceTree = "<group>"; };
FBD98AC417B9882D32B19F28 /* libPods-CoreCronetEnd2EndTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-CoreCronetEnd2EndTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
FD346DB2C23F676C4842F3FF /* libPods-InteropTestsLocalCleartext.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InteropTestsLocalCleartext.a"; sourceTree = BUILT_PRODUCTS_DIR; };
FF7B5489BCFE40111D768DD0 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
@@ -271,6 +279,14 @@
4AD97096D13D7416DC91A72A /* Pods-CoreCronetEnd2EndTests.release.xcconfig */,
17F60BF2871F6AF85FB3FA12 /* Pods-InteropTestsRemoteWithCronet.debug.xcconfig */,
AC414EF7A6BF76ED02B6E480 /* Pods-InteropTestsRemoteWithCronet.release.xcconfig */,
+ E7E4D3FD76E3B745D992AF5F /* Pods-AllTests.cronet.xcconfig */,
+ 573450F334B331D0BED8B961 /* Pods-CoreCronetEnd2EndTests.cronet.xcconfig */,
+ AA7CB64B4DD9915AE7C03163 /* Pods-InteropTestsLocalCleartext.cronet.xcconfig */,
+ 14B09A58FEE53A7A6B838920 /* Pods-InteropTestsLocalSSL.cronet.xcconfig */,
+ 4ADEA1C8BBE10D90940AC68E /* Pods-InteropTestsRemote.cronet.xcconfig */,
+ 3F27B2E744482771EB93C394 /* Pods-InteropTestsRemoteWithCronet.cronet.xcconfig */,
+ 79C68EFFCB5533475D810B79 /* Pods-RxLibraryUnitTests.cronet.xcconfig */,
+ F671D4CAD2864FB203B920B4 /* Pods-Tests.cronet.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
@@ -1122,6 +1138,173 @@
};
name = Release;
};
+ 5EC3C7A01D4FC18C000330E2 /* Cronet */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.3;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ };
+ name = Cronet;
+ };
+ 5EC3C7A11D4FC18C000330E2 /* Cronet */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = F671D4CAD2864FB203B920B4 /* Pods-Tests.cronet.xcconfig */;
+ buildSettings = {
+ GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ };
+ name = Cronet;
+ };
+ 5EC3C7A21D4FC18C000330E2 /* Cronet */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = E7E4D3FD76E3B745D992AF5F /* Pods-AllTests.cronet.xcconfig */;
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(inherited)",
+ );
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ INFOPLIST_FILE = Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Cronet;
+ };
+ 5EC3C7A31D4FC18C000330E2 /* Cronet */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 79C68EFFCB5533475D810B79 /* Pods-RxLibraryUnitTests.cronet.xcconfig */;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_TESTABILITY = YES;
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.RxLibraryUnitTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Cronet;
+ };
+ 5EC3C7A41D4FC18C000330E2 /* Cronet */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 4ADEA1C8BBE10D90940AC68E /* Pods-InteropTestsRemote.cronet.xcconfig */;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_TESTABILITY = YES;
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Cronet;
+ };
+ 5EC3C7A51D4FC18C000330E2 /* Cronet */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 14B09A58FEE53A7A6B838920 /* Pods-InteropTestsLocalSSL.cronet.xcconfig */;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_TESTABILITY = YES;
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalSSL;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Cronet;
+ };
+ 5EC3C7A61D4FC18C000330E2 /* Cronet */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = AA7CB64B4DD9915AE7C03163 /* Pods-InteropTestsLocalCleartext.cronet.xcconfig */;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_TESTABILITY = YES;
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalCleartext;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Cronet;
+ };
+ 5EC3C7A71D4FC18C000330E2 /* Cronet */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 573450F334B331D0BED8B961 /* Pods-CoreCronetEnd2EndTests.cronet.xcconfig */;
+ buildSettings = {
+ CLANG_ANALYZER_NONNULL = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_TESTABILITY = YES;
+ INFOPLIST_FILE = CoreCronetEnd2EndTests/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.3;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CoreCronetEnd2EndTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ USER_HEADER_SEARCH_PATHS = "$(inherited) \"${PODS_ROOT}/../../../..\"";
+ };
+ name = Cronet;
+ };
+ 5EC3C7A81D4FC18C000330E2 /* Cronet */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 3F27B2E744482771EB93C394 /* Pods-InteropTestsRemoteWithCronet.cronet.xcconfig */;
+ buildSettings = {
+ CLANG_ANALYZER_NONNULL = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_TESTABILITY = YES;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "$(inherited)",
+ "COCOAPODS=1",
+ "$(inherited)",
+ "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1",
+ "GRPC_COMPILE_WITH_CRONET=1",
+ );
+ INFOPLIST_FILE = InteropTestsRemoteWithCronet/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.3;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsRemoteWithCronet;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Cronet;
+ };
5EE84BF91D4717E40050C6CC /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 17F60BF2871F6AF85FB3FA12 /* Pods-InteropTestsRemoteWithCronet.debug.xcconfig */;
@@ -1135,7 +1318,6 @@
"COCOAPODS=1",
"$(inherited)",
"GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1",
- "GRPC_COMPILE_WITH_CRONET=1",
);
INFOPLIST_FILE = InteropTestsRemoteWithCronet/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
@@ -1409,6 +1591,7 @@
isa = XCConfigurationList;
buildConfigurations = (
5E8A5DAC1D3840B4000F8BC4 /* Debug */,
+ 5EC3C7A71D4FC18C000330E2 /* Cronet */,
5E8A5DAD1D3840B4000F8BC4 /* Release */,
);
defaultConfigurationIsVisible = 0;
@@ -1418,6 +1601,7 @@
isa = XCConfigurationList;
buildConfigurations = (
5EE84BF91D4717E40050C6CC /* Debug */,
+ 5EC3C7A81D4FC18C000330E2 /* Cronet */,
5EE84BFA1D4717E40050C6CC /* Release */,
);
defaultConfigurationIsVisible = 0;
@@ -1427,6 +1611,7 @@
isa = XCConfigurationList;
buildConfigurations = (
63423F4E1B150A5F006CF63C /* Debug */,
+ 5EC3C7A21D4FC18C000330E2 /* Cronet */,
63423F4F1B150A5F006CF63C /* Release */,
);
defaultConfigurationIsVisible = 0;
@@ -1436,6 +1621,7 @@
isa = XCConfigurationList;
buildConfigurations = (
635697D91B14FC11007A7283 /* Debug */,
+ 5EC3C7A01D4FC18C000330E2 /* Cronet */,
635697DA1B14FC11007A7283 /* Release */,
);
defaultConfigurationIsVisible = 0;
@@ -1445,6 +1631,7 @@
isa = XCConfigurationList;
buildConfigurations = (
635697DC1B14FC11007A7283 /* Debug */,
+ 5EC3C7A11D4FC18C000330E2 /* Cronet */,
635697DD1B14FC11007A7283 /* Release */,
);
defaultConfigurationIsVisible = 0;
@@ -1454,6 +1641,7 @@
isa = XCConfigurationList;
buildConfigurations = (
63DC841C1BE15179000708E8 /* Debug */,
+ 5EC3C7A31D4FC18C000330E2 /* Cronet */,
63DC841D1BE15179000708E8 /* Release */,
);
defaultConfigurationIsVisible = 0;
@@ -1463,6 +1651,7 @@
isa = XCConfigurationList;
buildConfigurations = (
63DC842C1BE15267000708E8 /* Debug */,
+ 5EC3C7A41D4FC18C000330E2 /* Cronet */,
63DC842D1BE15267000708E8 /* Release */,
);
defaultConfigurationIsVisible = 0;
@@ -1472,6 +1661,7 @@
isa = XCConfigurationList;
buildConfigurations = (
63DC843D1BE15294000708E8 /* Debug */,
+ 5EC3C7A51D4FC18C000330E2 /* Cronet */,
63DC843E1BE15294000708E8 /* Release */,
);
defaultConfigurationIsVisible = 0;
@@ -1481,6 +1671,7 @@
isa = XCConfigurationList;
buildConfigurations = (
63DC844C1BE152B5000708E8 /* Debug */,
+ 5EC3C7A61D4FC18C000330E2 /* Cronet */,
63DC844D1BE152B5000708E8 /* Release */,
);
defaultConfigurationIsVisible = 0;
diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme
index e6a052a8ce..d1d616c4cf 100644
--- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme
+++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme
@@ -39,12 +39,6 @@
</BuildableReference>
<SkippedTests>
<Test
- Identifier = "GRPCClientTests/testConnectionToRemoteServer">
- </Test>
- <Test
- Identifier = "GRPCClientTests/testMetadata">
- </Test>
- <Test
Identifier = "InteropTests">
</Test>
<Test
diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemoteWithCronet.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemoteWithCronet.xcscheme
index 6d92be8b3d..1d211115f7 100644
--- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemoteWithCronet.xcscheme
+++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemoteWithCronet.xcscheme
@@ -23,7 +23,7 @@
</BuildActionEntries>
</BuildAction>
<TestAction
- buildConfiguration = "Debug"
+ buildConfiguration = "Cronet"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
@@ -57,7 +57,7 @@
</AdditionalOptions>
</TestAction>
<LaunchAction
- buildConfiguration = "Debug"
+ buildConfiguration = "Cronet"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
@@ -79,7 +79,7 @@
</AdditionalOptions>
</LaunchAction>
<ProfileAction
- buildConfiguration = "Release"
+ buildConfiguration = "Cronet"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
@@ -95,10 +95,10 @@
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
- buildConfiguration = "Debug">
+ buildConfiguration = "Cronet">
</AnalyzeAction>
<ArchiveAction
- buildConfiguration = "Release"
+ buildConfiguration = "Cronet"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c
index 429dbf52d0..66ca1513ed 100644
--- a/src/php/ext/grpc/call.c
+++ b/src/php/ext/grpc/call.c
@@ -470,7 +470,8 @@ PHP_METHOD(Call, startBatch) {
#endif
PHP_GRPC_DELREF(array);
add_property_long(recv_status, "code", status);
- php_grpc_add_property_string(recv_status, "details", status_details, true);
+ php_grpc_add_property_string(recv_status, "details", status_details,
+ true);
add_property_zval(result, "status", recv_status);
PHP_GRPC_DELREF(recv_status);
break;
diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c
index e96ead582f..b5a2c9f6ba 100644
--- a/src/php/ext/grpc/channel.c
+++ b/src/php/ext/grpc/channel.c
@@ -84,7 +84,7 @@ void php_grpc_read_args_array(zval *args_array,
array_hash = Z_ARRVAL_P(args_array);
if (!array_hash) {
zend_throw_exception(spl_ce_InvalidArgumentException,
- "array_hash is NULL", 1);
+ "array_hash is NULL", 1 TSRMLS_CC);
return;
}
args->num_args = zend_hash_num_elements(array_hash);
diff --git a/src/php/ext/grpc/package.xml b/src/php/ext/grpc/package.xml
deleted file mode 100644
index daf2ee5a53..0000000000
--- a/src/php/ext/grpc/package.xml
+++ /dev/null
@@ -1,156 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<package packagerversion="1.9.5" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
- <name>grpc</name>
- <channel>pecl.php.net</channel>
- <summary>A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.</summary>
- <description>Remote Procedure Calls (RPCs) provide a useful abstraction for building distributed applications and services. The libraries in this repository provide a concrete implementation of the gRPC protocol, layered over HTTP/2. These libraries enable communication between clients and servers using any combination of the supported languages.</description>
- <lead>
- <name>Stanley Cheung</name>
- <user>stanleycheung</user>
- <email>grpc-packages@google.com</email>
- <active>yes</active>
- </lead>
- <date>2016-01-13</date>
- <time>16:06:07</time>
- <version>
- <release>0.7.0</release>
- <api>0.7.0</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <license>BSD</license>
- <notes>
-- Breaking change to Credentials class (removed) #3765
-- Replaced by ChannelCredentials and CallCredentials class #3765
-- New plugin based metadata auth API #4394
-- Explicit ChannelCredentials::createInsecure() call
- </notes>
- <contents>
- <dir baseinstalldir="/" name="/">
- <file baseinstalldir="/" md5sum="f201d644fdbd8228ffd1d4a69cc44f1f" name="tests/grpc-basic.phpt" role="test" />
- <file baseinstalldir="/" md5sum="6f19828fb869b7b8a590cbb76b4f996d" name="byte_buffer.c" role="src" />
- <file baseinstalldir="/" md5sum="c8de0f819499c48adfc8d7f472c0196b" name="byte_buffer.h" role="src" />
- <file baseinstalldir="/" md5sum="ee7eb7757f9e6f0e36f8f616b6bd0af5" name="call.c" role="src" />
- <file baseinstalldir="/" md5sum="44c56bd9912d2538cbd6059e3e0452b6" name="call.h" role="src" />
- <file baseinstalldir="/" md5sum="ff90f6c03ed44b5f4170bf3259a6704e" name="call_credentials.c" role="src" />
- <file baseinstalldir="/" md5sum="3c3860e1d84f43cb6b2fbaa8d2ae1ab7" name="call_credentials.h" role="src" />
- <file baseinstalldir="/" md5sum="aee9b63f790522aec2c682055240cc61" name="channel.c" role="src" />
- <file baseinstalldir="/" md5sum="ed4b00c0cf3702b115d0cfa87450dc09" name="channel.h" role="src" />
- <file baseinstalldir="/" md5sum="1a51c76d0b7b7d3ab570ed7d60c2ea46" name="channel_credentials.c" role="src" />
- <file baseinstalldir="/" md5sum="a86250e03f610ce6c2c7595a84e08821" name="channel_credentials.h" role="src" />
- <file baseinstalldir="/" md5sum="55ab7a42f9dd9bfc7e28a61cfc5fca63" name="completion_queue.c" role="src" />
- <file baseinstalldir="/" md5sum="f10b5bb232d74a6878e829e2e76cdaa2" name="completion_queue.h" role="src" />
- <file baseinstalldir="/" md5sum="cafed254127007ff2271dad7d56a06c8" name="config.m4" role="src" />
- <file baseinstalldir="/" md5sum="38a1bc979d810c36ebc2a52d4b7b5319" name="CREDITS" role="doc" />
- <file baseinstalldir="/" md5sum="8847cf67b1b54c981d47ecbb0d139a0c" name="LICENSE" role="doc" />
- <file baseinstalldir="/" md5sum="3131a8af38fe5918e5409016b89d6cdb" name="php_grpc.c" role="src" />
- <file baseinstalldir="/" md5sum="673b07859d9f69232f8a754c56780686" name="php_grpc.h" role="src" />
- <file baseinstalldir="/" md5sum="7533a6d3ea02c78cad23a9651de0825d" name="README.md" role="doc" />
- <file baseinstalldir="/" md5sum="3e4e960454ebb2fc7b78a840493f5315" name="server.c" role="src" />
- <file baseinstalldir="/" md5sum="4b730f06d14cbbb0642bdbd194749595" name="server.h" role="src" />
- <file baseinstalldir="/" md5sum="34ea881f1fe960d190d0713422cf8916" name="server_credentials.c" role="src" />
- <file baseinstalldir="/" md5sum="9c4b4cc06356a8a39a16a085a9b85996" name="server_credentials.h" role="src" />
- <file baseinstalldir="/" md5sum="7646ec78cb133f66ba59e03c6f451e39" name="timeval.c" role="src" />
- <file baseinstalldir="/" md5sum="496e27a100b4d93ca3fb35c924c5e163" name="timeval.h" role="src" />
- </dir>
- </contents>
- <dependencies>
- <required>
- <php>
- <min>5.5.0</min>
- </php>
- <pearinstaller>
- <min>1.4.0</min>
- </pearinstaller>
- </required>
- </dependencies>
- <providesextension>grpc</providesextension>
- <extsrcrelease />
- <changelog>
- <release>
- <version>
- <release>0.5.0</release>
- <api>0.5.0</api>
- </version>
- <stability>
- <release>alpha</release>
- <api>alpha</api>
- </stability>
- <date>2015-06-16</date>
- <license>BSD</license>
- <notes>
-First alpha release
- </notes>
- </release>
- <release>
- <version>
- <release>0.5.1</release>
- <api>0.5.1</api>
- </version>
- <stability>
- <release>alpha</release>
- <api>alpha</api>
- </stability>
- <date>2015-07-09</date>
- <license>BSD</license>
- <notes>
-Update to wrap gRPC C Core version 0.10.0
- </notes>
- </release>
- <release>
- <version>
- <release>0.6.0</release>
- <api>0.6.0</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <date>2015-09-24</date>
- <license>BSD</license>
- <notes>
-- support per message compression disable
-- expose per-call host override option
-- expose connectivity API
-- expose channel target and call peer
-- add user-agent
-- update to wrap gRPC C core library beta version 0.11.0
- </notes>
- </release>
- <release>
- <version>
- <release>0.6.1</release>
- <api>0.6.0</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <date>2015-10-21</date>
- <license>BSD</license>
- <notes>
-- fixed undefined constant fatal error when run with apache/nginx #2275
- </notes>
- </release>
- <release>
- <version>
- <release>0.7.0</release>
- <api>0.7.0</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <date>2016-01-13</date>
- <license>BSD</license>
- <notes>
-- Breaking change to Credentials class (removed) #3765
-- Replaced by ChannelCredentials and CallCredentials class #3765
-- New plugin based metadata auth API #4394
-- Explicit ChannelCredentials::createInsecure() call
- </notes>
- </release>
- </changelog>
-</package>
diff --git a/src/php/ext/grpc/php7_wrapper.h b/src/php/ext/grpc/php7_wrapper.h
index f2976c26cd..fd8d35636f 100644
--- a/src/php/ext/grpc/php7_wrapper.h
+++ b/src/php/ext/grpc/php7_wrapper.h
@@ -110,7 +110,8 @@
#define PHP_GRPC_HASH_FOREACH_END() }
-static inline int php_grpc_zend_hash_find(HashTable *ht, char *key, int len, void **value) {
+static inline int php_grpc_zend_hash_find(HashTable *ht, char *key, int len,
+ void **value) {
zval **data = NULL;
if (zend_hash_find(ht, key, len, (void **)&data) == SUCCESS) {
*value = *data;
diff --git a/src/proto/census/census.proto b/src/proto/census/census.proto
index c869d851ff..c2a594b641 100644
--- a/src/proto/census/census.proto
+++ b/src/proto/census/census.proto
@@ -33,12 +33,12 @@ package google.census;
// All the census protos.
//
-// Nomenclature note: capitalized names below (like Metric) are protos.
+// Nomenclature note: capitalized names below (like Resource) are protos.
//
-// Census lets you define a Metric - something which can be measured, like the
+// Census lets you define a Resource - something which can be measured, like the
// latency of an RPC, the number of CPU cycles spent on an operation, or
// anything else you care to measure. You can record individual instances of
-// measurements (a double value) for every metric of interest. These
+// measurements (a double value) for every Resource of interest. These
// individual measurements are aggregated together into an Aggregation. There
// are two Aggregation types available: Distribution (describes the
// distribution of all measurements, possibly with a histogram) and
@@ -47,8 +47,8 @@ package google.census;
//
// You can define how your stats are broken down by Tag values and which
// Aggregations to use through a View. The corresponding combination of
-// Metric/View/Aggregation which is available to census clients is called a
-// ViewAggregation.
+// Resource/View/Aggregation which is available to census clients is called a
+// Metric.
// The following two types are copied from
@@ -85,26 +85,23 @@ message Timestamp {
int32 nanos = 2;
}
-// Describes a metric
-message Metric {
- // name of metric, e.g. rpc_latency, cpu.
+// Describes a Resource.
+message Resource {
+ // name of resource, e.g. rpc_latency, cpu. Must be unique.
string name = 1;
- // More detailed description of the metric, used in documentation.
+ // More detailed description of the resource, used in documentation.
string description = 2;
// Fundamental units of measurement supported by Census
// TODO(aveitch): expand this to include other S.I. units?
- message BasicUnit {
- enum Measure {
- UNKNOWN = 0;
- BITS = 1;
- BYTES = 2;
- SECS = 3;
- CORES = 4;
- MAX_UNITS = 5;
- }
- Measure type = 1;
+ enum BasicUnit {
+ UNKNOWN = 0;
+ BITS = 1;
+ BYTES = 2;
+ SECS = 3;
+ CORES = 4;
+ MAX_UNITS = 5;
}
// MeasurementUnit lets you build compound units of the form
@@ -124,7 +121,7 @@ message Metric {
// denominator: SECS
// denominator: SECS
//
- // To specify multiples (in power of 10) units, specify a non-zero prefix
+ // To specify multiples (in power of 10) of units, specify a non-zero prefix
// value, for example:
//
// - MB/s (i.e. megabytes / s):
@@ -141,32 +138,40 @@ message Metric {
repeated BasicUnit denominator = 3;
}
- // The units in which the Metric value is reported.
+ // The units in which Resource values are measured.
MeasurementUnit unit = 3;
-
- // Metrics will be assigned an ID when registered. Invalid if <= 0.
- int32 id = 4;
}
-// An Aggregation summarizes a series of individual Metric measurements, an
+// An Aggregation summarizes a series of individual Resource measurements, an
// AggregationDescriptor describes an Aggregation.
message AggregationDescriptor {
- // At most one set of options. If neither option is set, a default type
- // of Distribution (without a histogram component) will be used.
+ enum AggregationType {
+ // Unspecified. Should not be used.
+ UNKNOWN = 0;
+ // A count of measurements made.
+ COUNT = 1;
+ // A Distribution.
+ DISTRIBUTION = 2;
+ // Counts over fixed time intervals.
+ INTERVAL = 3;
+ }
+ // The type of Aggregation.
+ AggregationType type = 1;
+
+ // At most one set of options. It is illegal to specifiy an option for
+ // COUNT Aggregations. interval_boundaries must be set for INTERVAL types.
+ // bucket_boundaries are optional for DISTRIBUTION types.
oneof options {
- // Defines the histogram bucket boundaries for Distributions.
- BucketBoundaries bucket_boundaries = 1;
+ // Defines histogram bucket boundaries for Distributions.
+ BucketBoundaries bucket_boundaries = 2;
// Defines the time windows to record for IntervalStats.
- IntervalBoundaries interval_boundaries = 2;
+ IntervalBoundaries interval_boundaries = 3;
}
// A Distribution may optionally contain a histogram of the values in the
- // population. The bucket boundaries for that histogram is described by
- // `bucket_boundaries`.
- //
- // Describes histogram bucket boundaries. Defines `size(bounds) + 1` (= N)
- // buckets (for size(bounds) >= 1; if size(bounds) == 0, then no histogram
- // will be defined. The boundaries for bucket index i are:
+ // population. The bucket boundaries for that histogram are described by
+ // `bucket_boundaries`. This defines `size(bounds) + 1` (= N) buckets. The
+ // boundaries for bucket index i are:
//
// [-infinity, bounds[i]) for i == 0
// [bounds[i-1], bounds[i]) for 0 < i < N-2
@@ -196,8 +201,8 @@ message AggregationDescriptor {
// a specified set of histogram buckets, as defined in
// Aggregation.bucket_options.
//
-// The summary statistics are the count, mean, sum of the squared deviation from
-// the mean, the minimum, and the maximum of the set of population of values.
+// The summary statistics are the count, mean, minimum, and the maximum of the
+// set of population of values.
//
// Although it is not forbidden, it is generally a bad idea to include
// non-finite values (infinities or NaNs) in the population of values, as this
@@ -243,7 +248,7 @@ message Distribution {
message IntervalStats {
// Summary statistic over a single time window.
message Window {
- // The window duration.
+ // The window duration. Must be positive.
Duration window_size = 1;
// The number of measurements in this window.
int64 count = 2;
@@ -251,7 +256,7 @@ message IntervalStats {
double mean = 3;
}
- // Full set of windows for this metric.
+ // Full set of windows for this aggregation.
repeated Window window = 1;
}
@@ -264,24 +269,24 @@ message Tag {
// A View specifies an Aggregation and a set of tag keys. The Aggregation will
// be broken down by the unique set of matching tag values for each measurement.
message View {
- // Name of view.
+ // Name of view. Must be unique.
string name = 1;
// More detailed description, for documentation purposes.
string description = 2;
- // ID of Metric to associate with this View.
- int32 metric_id = 3;
+ // Name of Resource to be broken down for this view.
+ string resource_name = 3;
// Aggregation type to associate with this View.
AggregationDescriptor aggregation = 4;
- // Tag keys to match with a given Metric. If no keys are specified, then all
- // stats for the Metric are recorded. Keys must be unique.
+ // Tag keys to match with a given Resource measurement. If no keys are
+ // specified, then all stats are recorded. Keys must be unique.
repeated string tag_key = 5;
}
-// An Aggregation summarizes a series of individual Metric measures.
+// An Aggregation summarizes a series of individual Resource measurements.
message Aggregation {
// Name of this aggregation.
string name = 1;
@@ -291,23 +296,27 @@ message Aggregation {
// The data for this Aggregation.
oneof data {
- Distribution distribution = 3;
- IntervalStats interval_stats = 4;
+ uint64 count = 3;
+ Distribution distribution = 4;
+ IntervalStats interval_stats = 5;
}
// Tags associated with this Aggregation.
- repeated Tag tag = 5;
+ repeated Tag tag = 6;
}
-// A ViewAggregations represents all the Aggregations for a particular view.
-message ViewAggregations {
+// A Metric represents all the Aggregations for a particular view.
+message Metric {
+ // View associated with this Metric.
+ string view_name = 1;
+
// Aggregations - each will have a unique set of tag values for the tag_keys
// associated with the corresponding View.
- repeated Aggregation aggregation = 1;
+ repeated Aggregation aggregation = 2;
- // Start and end timestamps over which the value was accumulated. These
+ // Start and end timestamps over which the metric was accumulated. These
// values are not relevant/defined for IntervalStats aggregations, which are
// always accumulated over a fixed time period.
- Timestamp start = 2;
- Timestamp end = 3;
+ Timestamp start = 3;
+ Timestamp end = 4;
}
diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py
index 5387d40a51..8f02d2521c 100644
--- a/src/python/grpcio/grpc_core_dependencies.py
+++ b/src/python/grpcio/grpc_core_dependencies.py
@@ -162,6 +162,7 @@ CORE_SOURCE_FILES = [
'src/core/lib/transport/metadata.c',
'src/core/lib/transport/metadata_batch.c',
'src/core/lib/transport/static_metadata.c',
+ 'src/core/lib/transport/timeout_encoding.c',
'src/core/lib/transport/transport.c',
'src/core/lib/transport/transport_op_string.c',
'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c',
@@ -184,7 +185,6 @@ CORE_SOURCE_FILES = [
'src/core/ext/transport/chttp2/transport/status_conversion.c',
'src/core/ext/transport/chttp2/transport/stream_lists.c',
'src/core/ext/transport/chttp2/transport/stream_map.c',
- 'src/core/ext/transport/chttp2/transport/timeout_encoding.c',
'src/core/ext/transport/chttp2/transport/varint.c',
'src/core/ext/transport/chttp2/transport/writing.c',
'src/core/ext/transport/chttp2/alpn/alpn.c',
@@ -240,6 +240,7 @@ CORE_SOURCE_FILES = [
'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c',
+ 'src/core/ext/lb_policy/grpclb/grpclb.c',
'src/core/ext/lb_policy/grpclb/load_balancer_api.c',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'third_party/nanopb/pb_common.c',
@@ -253,6 +254,7 @@ CORE_SOURCE_FILES = [
'src/core/ext/load_reporting/load_reporting.c',
'src/core/ext/load_reporting/load_reporting_filter.c',
'src/core/ext/c-ares/wrapper.c',
+ 'src/core/ext/census/base_resources.c',
'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/grpc_context.c',
@@ -262,6 +264,7 @@ CORE_SOURCE_FILES = [
'src/core/ext/census/mlog.c',
'src/core/ext/census/operation.c',
'src/core/ext/census/placeholders.c',
+ 'src/core/ext/census/resource.c',
'src/core/ext/census/tracing.c',
'src/core/plugin_registry/grpc_plugin_registry.c',
'src/boringssl/err_data.c',
diff --git a/src/ruby/.rubocop.yml b/src/ruby/.rubocop.yml
index 34bb477543..0f61ccfa81 100644
--- a/src/ruby/.rubocop.yml
+++ b/src/ruby/.rubocop.yml
@@ -5,8 +5,8 @@ inherit_from: .rubocop_todo.yml
AllCops:
Exclude:
- 'bin/apis/**/*'
- - 'bin/math.rb'
- - 'bin/math_services.rb'
+ - 'bin/math_pb.rb'
+ - 'bin/math_services_pb.rb'
- 'pb/grpc/health/v1/*'
- 'pb/test/**/*'
diff --git a/src/ruby/bin/math_client.rb b/src/ruby/bin/math_client.rb
index d7e00e4293..1f238a798b 100755
--- a/src/ruby/bin/math_client.rb
+++ b/src/ruby/bin/math_client.rb
@@ -40,7 +40,7 @@ $LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)
$LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir)
require 'grpc'
-require 'math_services'
+require 'math_services_pb'
require 'optparse'
include GRPC::Core::TimeConsts
diff --git a/src/ruby/bin/math.rb b/src/ruby/bin/math_pb.rb
index 60429a1505..60429a1505 100755..100644
--- a/src/ruby/bin/math.rb
+++ b/src/ruby/bin/math_pb.rb
diff --git a/src/ruby/bin/math_server.rb b/src/ruby/bin/math_server.rb
index 1ee4c5632d..751a6ebcab 100755
--- a/src/ruby/bin/math_server.rb
+++ b/src/ruby/bin/math_server.rb
@@ -42,7 +42,7 @@ $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir)
require 'forwardable'
require 'grpc'
require 'logger'
-require 'math_services'
+require 'math_services_pb'
require 'optparse'
# RubyLogger defines a logger for gRPC based on the standard ruby logger.
diff --git a/src/ruby/bin/math_services.rb b/src/ruby/bin/math_services_pb.rb
index 2b97602b6f..2ba1825d4f 100755..100644
--- a/src/ruby/bin/math_services.rb
+++ b/src/ruby/bin/math_services_pb.rb
@@ -32,7 +32,7 @@
#
require 'grpc'
-require 'math'
+require 'math_pb'
module Math
module Math
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
index d7f862cd9c..aee57b11aa 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
@@ -61,15 +61,10 @@ census_trace_print_type census_trace_print_import;
census_trace_scan_start_type census_trace_scan_start_import;
census_get_trace_record_type census_get_trace_record_import;
census_trace_scan_end_type census_trace_scan_end_import;
+census_define_resource_type census_define_resource_import;
+census_delete_resource_type census_delete_resource_import;
+census_resource_id_type census_resource_id_import;
census_record_values_type census_record_values_import;
-census_view_create_type census_view_create_import;
-census_view_delete_type census_view_delete_import;
-census_view_metric_type census_view_metric_import;
-census_view_naggregations_type census_view_naggregations_import;
-census_view_tags_type census_view_tags_import;
-census_view_aggregrations_type census_view_aggregrations_import;
-census_view_get_data_type census_view_get_data_import;
-census_view_reset_type census_view_reset_import;
grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_import;
grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import;
grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import;
@@ -334,15 +329,10 @@ void grpc_rb_load_imports(HMODULE library) {
census_trace_scan_start_import = (census_trace_scan_start_type) GetProcAddress(library, "census_trace_scan_start");
census_get_trace_record_import = (census_get_trace_record_type) GetProcAddress(library, "census_get_trace_record");
census_trace_scan_end_import = (census_trace_scan_end_type) GetProcAddress(library, "census_trace_scan_end");
+ census_define_resource_import = (census_define_resource_type) GetProcAddress(library, "census_define_resource");
+ census_delete_resource_import = (census_delete_resource_type) GetProcAddress(library, "census_delete_resource");
+ census_resource_id_import = (census_resource_id_type) GetProcAddress(library, "census_resource_id");
census_record_values_import = (census_record_values_type) GetProcAddress(library, "census_record_values");
- census_view_create_import = (census_view_create_type) GetProcAddress(library, "census_view_create");
- census_view_delete_import = (census_view_delete_type) GetProcAddress(library, "census_view_delete");
- census_view_metric_import = (census_view_metric_type) GetProcAddress(library, "census_view_metric");
- census_view_naggregations_import = (census_view_naggregations_type) GetProcAddress(library, "census_view_naggregations");
- census_view_tags_import = (census_view_tags_type) GetProcAddress(library, "census_view_tags");
- census_view_aggregrations_import = (census_view_aggregrations_type) GetProcAddress(library, "census_view_aggregrations");
- census_view_get_data_import = (census_view_get_data_type) GetProcAddress(library, "census_view_get_data");
- census_view_reset_import = (census_view_reset_type) GetProcAddress(library, "census_view_reset");
grpc_compression_algorithm_parse_import = (grpc_compression_algorithm_parse_type) GetProcAddress(library, "grpc_compression_algorithm_parse");
grpc_compression_algorithm_name_import = (grpc_compression_algorithm_name_type) GetProcAddress(library, "grpc_compression_algorithm_name");
grpc_compression_algorithm_for_level_import = (grpc_compression_algorithm_for_level_type) GetProcAddress(library, "grpc_compression_algorithm_for_level");
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
index 14da63780c..3bb76fbb97 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
@@ -134,33 +134,18 @@ extern census_get_trace_record_type census_get_trace_record_import;
typedef void(*census_trace_scan_end_type)();
extern census_trace_scan_end_type census_trace_scan_end_import;
#define census_trace_scan_end census_trace_scan_end_import
+typedef int32_t(*census_define_resource_type)(const uint8_t *resource_pb, size_t resource_pb_size);
+extern census_define_resource_type census_define_resource_import;
+#define census_define_resource census_define_resource_import
+typedef void(*census_delete_resource_type)(int32_t resource_id);
+extern census_delete_resource_type census_delete_resource_import;
+#define census_delete_resource census_delete_resource_import
+typedef int32_t(*census_resource_id_type)(const char *name);
+extern census_resource_id_type census_resource_id_import;
+#define census_resource_id census_resource_id_import
typedef void(*census_record_values_type)(census_context *context, census_value *values, size_t nvalues);
extern census_record_values_type census_record_values_import;
#define census_record_values census_record_values_import
-typedef census_view *(*census_view_create_type)(uint32_t metric_id, const census_context *tags, const census_aggregation *aggregations, size_t naggregations);
-extern census_view_create_type census_view_create_import;
-#define census_view_create census_view_create_import
-typedef void(*census_view_delete_type)(census_view *view);
-extern census_view_delete_type census_view_delete_import;
-#define census_view_delete census_view_delete_import
-typedef size_t(*census_view_metric_type)(const census_view *view);
-extern census_view_metric_type census_view_metric_import;
-#define census_view_metric census_view_metric_import
-typedef size_t(*census_view_naggregations_type)(const census_view *view);
-extern census_view_naggregations_type census_view_naggregations_import;
-#define census_view_naggregations census_view_naggregations_import
-typedef const census_context *(*census_view_tags_type)(const census_view *view);
-extern census_view_tags_type census_view_tags_import;
-#define census_view_tags census_view_tags_import
-typedef const census_aggregation *(*census_view_aggregrations_type)(const census_view *view);
-extern census_view_aggregrations_type census_view_aggregrations_import;
-#define census_view_aggregrations census_view_aggregrations_import
-typedef const census_view_data *(*census_view_get_data_type)(const census_view *view);
-extern census_view_get_data_type census_view_get_data_import;
-#define census_view_get_data census_view_get_data_import
-typedef void(*census_view_reset_type)(census_view *view);
-extern census_view_reset_type census_view_reset_import;
-#define census_view_reset census_view_reset_import
typedef int(*grpc_compression_algorithm_parse_type)(const char *name, size_t name_length, grpc_compression_algorithm *algorithm);
extern grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_import;
#define grpc_compression_algorithm_parse grpc_compression_algorithm_parse_import
diff --git a/src/ruby/pb/grpc/health/checker.rb b/src/ruby/pb/grpc/health/checker.rb
index f7310d9289..4bce1744c4 100644
--- a/src/ruby/pb/grpc/health/checker.rb
+++ b/src/ruby/pb/grpc/health/checker.rb
@@ -28,7 +28,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
require 'grpc'
-require 'grpc/health/v1/health_services'
+require 'grpc/health/v1/health_services_pb'
require 'thread'
module Grpc
diff --git a/src/ruby/pb/grpc/health/v1/health.rb b/src/ruby/pb/grpc/health/v1/health_pb.rb
index aa87a93918..aa87a93918 100644
--- a/src/ruby/pb/grpc/health/v1/health.rb
+++ b/src/ruby/pb/grpc/health/v1/health_pb.rb
diff --git a/src/ruby/pb/grpc/health/v1/health_services.rb b/src/ruby/pb/grpc/health/v1/health_services_pb.rb
index 68a3956f54..8cc01e91dc 100644
--- a/src/ruby/pb/grpc/health/v1/health_services.rb
+++ b/src/ruby/pb/grpc/health/v1/health_services_pb.rb
@@ -32,7 +32,7 @@
#
require 'grpc'
-require 'grpc/health/v1/health'
+require 'grpc/health/v1/health_pb'
module Grpc
module Health
diff --git a/src/ruby/pb/grpc/testing/duplicate/echo_duplicate_services.rb b/src/ruby/pb/grpc/testing/duplicate/echo_duplicate_services_pb.rb
index eb523ffa6f..e51c2f087a 100644
--- a/src/ruby/pb/grpc/testing/duplicate/echo_duplicate_services.rb
+++ b/src/ruby/pb/grpc/testing/duplicate/echo_duplicate_services_pb.rb
@@ -1,5 +1,5 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
-# Source: grpc/testing/duplicate/echo_duplicate.proto for package 'grpc.testing.duplicate'
+# Source: src/proto/grpc/testing/duplicate/echo_duplicate.proto for package 'grpc.testing.duplicate'
# Original file comments:
# Copyright 2015, Google Inc.
# All rights reserved.
@@ -34,7 +34,7 @@
#
require 'grpc'
-require 'grpc/testing/duplicate/echo_duplicate'
+require 'src/proto/grpc/testing/duplicate/echo_duplicate_pb'
module Grpc
module Testing
diff --git a/src/ruby/pb/grpc/testing/metrics.rb b/src/ruby/pb/grpc/testing/metrics_pb.rb
index 3b3c8cd61b..77b6c90970 100644
--- a/src/ruby/pb/grpc/testing/metrics.rb
+++ b/src/ruby/pb/grpc/testing/metrics_pb.rb
@@ -1,5 +1,5 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: grpc/testing/metrics.proto
+# source: src/proto/grpc/testing/metrics.proto
require 'google/protobuf'
diff --git a/src/ruby/pb/grpc/testing/metrics_services.rb b/src/ruby/pb/grpc/testing/metrics_services_pb.rb
index 467b7b3ee5..e46366b1fb 100644
--- a/src/ruby/pb/grpc/testing/metrics_services.rb
+++ b/src/ruby/pb/grpc/testing/metrics_services_pb.rb
@@ -1,5 +1,5 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
-# Source: grpc/testing/metrics.proto for package 'grpc.testing'
+# Source: src/proto/grpc/testing/metrics.proto for package 'grpc.testing'
# Original file comments:
# Copyright 2015-2016, Google Inc.
# All rights reserved.
@@ -38,7 +38,7 @@
# service.
require 'grpc'
-require 'grpc/testing/metrics'
+require 'src/proto/grpc/testing/metrics_pb'
module Grpc
module Testing
diff --git a/src/ruby/pb/src/proto/grpc/testing/empty.rb b/src/ruby/pb/src/proto/grpc/testing/empty_pb.rb
index 9c2568d605..9c2568d605 100644
--- a/src/ruby/pb/src/proto/grpc/testing/empty.rb
+++ b/src/ruby/pb/src/proto/grpc/testing/empty_pb.rb
diff --git a/src/ruby/pb/src/proto/grpc/testing/messages.rb b/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb
index e27ccd0dc0..e27ccd0dc0 100644
--- a/src/ruby/pb/src/proto/grpc/testing/messages.rb
+++ b/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb
diff --git a/src/ruby/pb/src/proto/grpc/testing/test.rb b/src/ruby/pb/src/proto/grpc/testing/test_pb.rb
index 245b5ce00c..2cc9863031 100644
--- a/src/ruby/pb/src/proto/grpc/testing/test.rb
+++ b/src/ruby/pb/src/proto/grpc/testing/test_pb.rb
@@ -3,8 +3,8 @@
require 'google/protobuf'
-require 'src/proto/grpc/testing/empty'
-require 'src/proto/grpc/testing/messages'
+require 'src/proto/grpc/testing/empty_pb'
+require 'src/proto/grpc/testing/messages_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
end
diff --git a/src/ruby/pb/src/proto/grpc/testing/test_services.rb b/src/ruby/pb/src/proto/grpc/testing/test_services_pb.rb
index 2652de5e6d..fde328e4c5 100644
--- a/src/ruby/pb/src/proto/grpc/testing/test_services.rb
+++ b/src/ruby/pb/src/proto/grpc/testing/test_services_pb.rb
@@ -35,7 +35,7 @@
#
require 'grpc'
-require 'src/proto/grpc/testing/test'
+require 'src/proto/grpc/testing/test_pb'
module Grpc
module Testing
diff --git a/src/ruby/pb/test/client.rb b/src/ruby/pb/test/client.rb
index 4c6d441dcb..1e3ae65630 100755
--- a/src/ruby/pb/test/client.rb
+++ b/src/ruby/pb/test/client.rb
@@ -52,9 +52,9 @@ require_relative '../../lib/grpc'
require 'googleauth'
require 'google/protobuf'
-require_relative '../src/proto/grpc/testing/empty'
-require_relative '../src/proto/grpc/testing/messages'
-require_relative '../src/proto/grpc/testing/test_services'
+require_relative '../src/proto/grpc/testing/empty_pb'
+require_relative '../src/proto/grpc/testing/messages_pb'
+require_relative '../src/proto/grpc/testing/test_services_pb'
AUTH_ENV = Google::Auth::CredentialsLoader::ENV_VAR
diff --git a/src/ruby/pb/test/server.rb b/src/ruby/pb/test/server.rb
index 11ee3d465d..0808121661 100755
--- a/src/ruby/pb/test/server.rb
+++ b/src/ruby/pb/test/server.rb
@@ -50,9 +50,9 @@ require 'optparse'
require 'grpc'
-require_relative '../src/proto/grpc/testing/empty'
-require_relative '../src/proto/grpc/testing/messages'
-require_relative '../src/proto/grpc/testing/test_services'
+require_relative '../src/proto/grpc/testing/empty_pb'
+require_relative '../src/proto/grpc/testing/messages_pb'
+require_relative '../src/proto/grpc/testing/test_services_pb'
# DebugIsTruncated extends the default Logger to truncate debug messages
class DebugIsTruncated < Logger
diff --git a/src/ruby/qps/client.rb b/src/ruby/qps/client.rb
index 917b01271e..7ed648acef 100644
--- a/src/ruby/qps/client.rb
+++ b/src/ruby/qps/client.rb
@@ -38,7 +38,7 @@ $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir)
require 'grpc'
require 'histogram'
-require 'src/proto/grpc/testing/services_services'
+require 'src/proto/grpc/testing/services_services_pb'
class Poisson
def interarrival
diff --git a/src/ruby/qps/server.rb b/src/ruby/qps/server.rb
index 52a89ce847..cd98ee1fd9 100644
--- a/src/ruby/qps/server.rb
+++ b/src/ruby/qps/server.rb
@@ -38,9 +38,9 @@ $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir)
require 'grpc'
require 'qps-common'
-require 'src/proto/grpc/testing/messages'
-require 'src/proto/grpc/testing/services_services'
-require 'src/proto/grpc/testing/stats'
+require 'src/proto/grpc/testing/messages_pb'
+require 'src/proto/grpc/testing/services_services_pb'
+require 'src/proto/grpc/testing/stats_pb'
class BenchmarkServiceImpl < Grpc::Testing::BenchmarkService::Service
def unary_call(req, _call)
diff --git a/src/ruby/qps/src/proto/grpc/testing/control.rb b/src/ruby/qps/src/proto/grpc/testing/control_pb.rb
index 958fca320b..02207a2b5d 100644
--- a/src/ruby/qps/src/proto/grpc/testing/control.rb
+++ b/src/ruby/qps/src/proto/grpc/testing/control_pb.rb
@@ -3,8 +3,8 @@
require 'google/protobuf'
-require 'src/proto/grpc/testing/payloads'
-require 'src/proto/grpc/testing/stats'
+require 'src/proto/grpc/testing/payloads_pb'
+require 'src/proto/grpc/testing/stats_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "grpc.testing.PoissonParams" do
optional :offered_load, :double, 1
@@ -109,6 +109,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
repeated :server_stats, :message, 4, "grpc.testing.ServerStats"
repeated :server_cores, :int32, 5
optional :summary, :message, 6, "grpc.testing.ScenarioResultSummary"
+ repeated :client_success, :bool, 7
+ repeated :server_success, :bool, 8
end
add_enum "grpc.testing.ClientType" do
value :SYNC_CLIENT, 0
diff --git a/src/ruby/qps/src/proto/grpc/testing/messages.rb b/src/ruby/qps/src/proto/grpc/testing/messages_pb.rb
index e27ccd0dc0..e27ccd0dc0 100644
--- a/src/ruby/qps/src/proto/grpc/testing/messages.rb
+++ b/src/ruby/qps/src/proto/grpc/testing/messages_pb.rb
diff --git a/src/ruby/qps/src/proto/grpc/testing/payloads.rb b/src/ruby/qps/src/proto/grpc/testing/payloads_pb.rb
index ae8855f685..ae8855f685 100644
--- a/src/ruby/qps/src/proto/grpc/testing/payloads.rb
+++ b/src/ruby/qps/src/proto/grpc/testing/payloads_pb.rb
diff --git a/src/ruby/qps/src/proto/grpc/testing/services.rb b/src/ruby/qps/src/proto/grpc/testing/services_pb.rb
index b2675c2afe..5ce13bf8b0 100644
--- a/src/ruby/qps/src/proto/grpc/testing/services.rb
+++ b/src/ruby/qps/src/proto/grpc/testing/services_pb.rb
@@ -3,8 +3,8 @@
require 'google/protobuf'
-require 'src/proto/grpc/testing/messages'
-require 'src/proto/grpc/testing/control'
+require 'src/proto/grpc/testing/messages_pb'
+require 'src/proto/grpc/testing/control_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
end
diff --git a/src/ruby/qps/src/proto/grpc/testing/services_services.rb b/src/ruby/qps/src/proto/grpc/testing/services_services_pb.rb
index 94b9a1e164..bdbb9c86d0 100644
--- a/src/ruby/qps/src/proto/grpc/testing/services_services.rb
+++ b/src/ruby/qps/src/proto/grpc/testing/services_services_pb.rb
@@ -34,7 +34,7 @@
# of unary/streaming requests/responses.
require 'grpc'
-require 'src/proto/grpc/testing/services'
+require 'src/proto/grpc/testing/services_pb'
module Grpc
module Testing
diff --git a/src/ruby/qps/src/proto/grpc/testing/stats.rb b/src/ruby/qps/src/proto/grpc/testing/stats_pb.rb
index 41f75bedf0..41f75bedf0 100644
--- a/src/ruby/qps/src/proto/grpc/testing/stats.rb
+++ b/src/ruby/qps/src/proto/grpc/testing/stats_pb.rb
diff --git a/src/ruby/qps/worker.rb b/src/ruby/qps/worker.rb
index 665fb86352..12b8087ca0 100755
--- a/src/ruby/qps/worker.rb
+++ b/src/ruby/qps/worker.rb
@@ -44,7 +44,7 @@ require 'facter'
require 'client'
require 'qps-common'
require 'server'
-require 'src/proto/grpc/testing/services_services'
+require 'src/proto/grpc/testing/services_services_pb'
class WorkerServiceImpl < Grpc::Testing::WorkerService::Service
def cpu_cores
diff --git a/src/ruby/spec/pb/duplicate/codegen_spec.rb b/src/ruby/spec/pb/duplicate/codegen_spec.rb
index 54c136c510..ea0240965c 100644
--- a/src/ruby/spec/pb/duplicate/codegen_spec.rb
+++ b/src/ruby/spec/pb/duplicate/codegen_spec.rb
@@ -44,7 +44,7 @@ describe 'Ping protobuf code generation' do
# Get the current content
service_path = File.join(root_dir, 'src', 'ruby', 'pb', 'grpc',
'testing', 'duplicate',
- 'echo_duplicate_services.rb')
+ 'echo_duplicate_services_pb.rb')
want = nil
File.open(service_path) { |f| want = f.read }
@@ -54,7 +54,7 @@ describe 'Ping protobuf code generation' do
got = nil
Dir.mktmpdir do |tmp_dir|
gen_out = File.join(tmp_dir, 'src', 'proto', 'grpc', 'testing',
- 'duplicate', 'echo_duplicate_services.rb')
+ 'duplicate', 'echo_duplicate_services_pb.rb')
pid = spawn(
'protoc',
'-I.',
diff --git a/src/ruby/spec/pb/health/checker_spec.rb b/src/ruby/spec/pb/health/checker_spec.rb
index de11c9fedf..1b2fa96827 100644
--- a/src/ruby/spec/pb/health/checker_spec.rb
+++ b/src/ruby/spec/pb/health/checker_spec.rb
@@ -28,7 +28,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
require 'grpc'
-require 'grpc/health/v1/health'
+require 'grpc/health/v1/health_pb'
require 'grpc/health/checker'
require 'open3'
require 'tmpdir'
@@ -43,7 +43,7 @@ describe 'Health protobuf code generation' do
skip 'protoc || grpc_ruby_plugin missing, cannot verify health code-gen'
else
it 'should already be loaded indirectly i.e, used by the other specs' do
- expect(require('grpc/health/v1/health_services')).to be(false)
+ expect(require('grpc/health/v1/health_services_pb')).to be(false)
end
it 'should have the same content as created by code generation' do
@@ -52,7 +52,7 @@ describe 'Health protobuf code generation' do
# Get the current content
service_path = File.join(root_dir, 'ruby', 'pb', 'grpc',
- 'health', 'v1', 'health_services.rb')
+ 'health', 'v1', 'health_services_pb.rb')
want = nil
File.open(service_path) { |f| want = f.read }
@@ -62,7 +62,7 @@ describe 'Health protobuf code generation' do
got = nil
Dir.mktmpdir do |tmp_dir|
gen_out = File.join(tmp_dir, 'grpc', 'health', 'v1',
- 'health_services.rb')
+ 'health_services_pb.rb')
pid = spawn(
'protoc',
'-I.',
diff --git a/src/ruby/stress/metrics_server.rb b/src/ruby/stress/metrics_server.rb
index 13638c4d21..2b7f78577d 100644
--- a/src/ruby/stress/metrics_server.rb
+++ b/src/ruby/stress/metrics_server.rb
@@ -27,8 +27,8 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-require_relative '../pb/grpc/testing/metrics.rb'
-require_relative '../pb/grpc/testing/metrics_services.rb'
+require_relative '../pb/grpc/testing/metrics_pb.rb'
+require_relative '../pb/grpc/testing/metrics_services_pb.rb'
class Gauge
def get_name
diff --git a/src/ruby/tools/bin/grpc_tools_ruby_protoc.rb b/src/ruby/tools/bin/grpc_tools_ruby_protoc
index 3a2a5b8dc9..dab06e7958 100755
--- a/src/ruby/tools/bin/grpc_tools_ruby_protoc.rb
+++ b/src/ruby/tools/bin/grpc_tools_ruby_protoc
@@ -32,10 +32,17 @@ require 'rbconfig'
require_relative '../os_check'
-protoc_name = 'protoc' + RbConfig::CONFIG['EXEEXT']
+ext = RbConfig::CONFIG['EXEEXT']
-protoc_path = File.join(File.dirname(__FILE__),
- RbConfig::CONFIG['host_cpu'] + '-' + OS.os_name,
- protoc_name)
+protoc_name = 'protoc' + ext
-exec([ protoc_path, protoc_path ], *ARGV)
+plugin_name = 'grpc_ruby_plugin' + ext
+
+protoc_dir = File.join(File.dirname(__FILE__),
+ RbConfig::CONFIG['host_cpu'] + '-' + OS.os_name)
+
+protoc_path = File.join(protoc_dir, protoc_name)
+
+plugin_path = File.join(protoc_dir, plugin_name)
+
+exec([ protoc_path, protoc_path ], "--plugin=protoc-gen-grpc=#{plugin_path}", *ARGV)
diff --git a/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin.rb b/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin
index 4b296dedc7..4b296dedc7 100755
--- a/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin.rb
+++ b/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin
diff --git a/src/ruby/tools/grpc-tools.gemspec b/src/ruby/tools/grpc-tools.gemspec
index 9fa4b66392..68e2a7a113 100644
--- a/src/ruby/tools/grpc-tools.gemspec
+++ b/src/ruby/tools/grpc-tools.gemspec
@@ -18,5 +18,5 @@ Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
- s.executables = %w( grpc_tools_ruby_protoc.rb grpc_tools_ruby_protoc_plugin.rb )
+ s.executables = %w( grpc_tools_ruby_protoc grpc_tools_ruby_protoc_plugin )
end
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
index 8624dc4b25..4e4223493b 100644
--- a/templates/CMakeLists.txt.template
+++ b/templates/CMakeLists.txt.template
@@ -42,14 +42,16 @@
<%!
def get_deps(target_dict):
deps = []
+ if target_dict.get('baselib', False):
+ deps.append("${_gRPC_BASELIB_LIBRARIES}")
if target_dict.get('build', None) in ['protoc']:
- deps.append("libprotoc")
+ deps.append("${_gRPC_PROTOBUF_PROTOC_LIBRARIES}")
if target_dict.get('secure', False):
- deps = ["ssl"]
+ deps.append("${_gRPC_SSL_LIBRARIES}")
if target_dict['name'] in ['grpc++', 'grpc++_unsecure', 'grpc++_codegen_lib']:
- deps.append("${PROTOBUF_LIBRARY_NAME}")
+ deps.append("${_gRPC_PROTOBUF_LIBRARIES}")
elif target_dict['name'] in ['grpc']:
- deps.append("zlibstatic")
+ deps.append("${_gRPC_ZLIB_LIBRARIES}")
for d in target_dict.get('deps', []):
deps.append(d)
return deps
@@ -64,46 +66,127 @@
set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
project(<%text>${PACKAGE_NAME}</%text> C CXX)
- if(NOT BORINGSSL_ROOT_DIR)
- set(BORINGSSL_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/boringssl)
+ set(gRPC_ZLIB_PROVIDER "module" CACHE STRING "Provider of zlib library")
+ set_property(CACHE gRPC_ZLIB_PROVIDER PROPERTY STRINGS "module" "package")
+
+ set(gRPC_SSL_PROVIDER "module" CACHE STRING "Provider of ssl library")
+ set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package")
+
+ set(gRPC_PROTOBUF_PROVIDER "module" CACHE STRING "Provider of protobuf library")
+ set_property(CACHE gRPC_PROTOBUF_PROVIDER PROPERTY STRINGS "module" "package")
+
+ set(gRPC_USE_PROTO_LITE OFF CACHE BOOL "Use the protobuf-lite library")
+
+ if (gRPC_USE_PROTO_LITE)
+ set(_gRPC_PROTOBUF_LIBRARY_NAME "libprotobuf-lite")
+ add_definitions("-DGRPC_USE_PROTO_LITE")
+ else()
+ set(_gRPC_PROTOBUF_LIBRARY_NAME "libprotobuf")
endif()
- if(NOT PROTOBUF_ROOT_DIR)
- set(PROTOBUF_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/protobuf)
+
+ if("<%text>${gRPC_ZLIB_PROVIDER}</%text>" STREQUAL "module")
+ if(NOT ZLIB_ROOT_DIR)
+ set(ZLIB_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/zlib)
+ endif()
+ set(ZLIB_INCLUDE_DIR "<%text>${ZLIB_ROOT_DIR}</%text>")
+ if(EXISTS "<%text>${ZLIB_ROOT_DIR}</%text>/CMakeLists.txt")
+ add_subdirectory(<%text>${ZLIB_ROOT_DIR}</%text> third_party/zlib)
+ if(TARGET zlibstatic)
+ set(_gRPC_ZLIB_LIBRARIES zlibstatic)
+ endif()
+ else()
+ message(WARNING "gRPC_ZLIB_PROVIDER is \"module\" but ZLIB_ROOT_DIR is wrong")
+ endif()
+ elseif("<%text>${gRPC_ZLIB_PROVIDER}</%text>" STREQUAL "package")
+ find_package(ZLIB)
+ if(TARGET ZLIB::ZLIB)
+ set(_gRPC_ZLIB_LIBRARIES ZLIB::ZLIB)
+ endif()
+ set(_gRPC_FIND_ZLIB "if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()")
endif()
- if(NOT ZLIB_ROOT_DIR)
- set(ZLIB_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/zlib)
+
+ if("<%text>${gRPC_PROTOBUF_PROVIDER}</%text>" STREQUAL "module")
+ # Building the protobuf tests require gmock what is not part of a standard protobuf checkout.
+ # Disable them unless they are explicitly requested from the cmake command line (when we assume
+ # gmock is downloaded to the right location inside protobuf).
+ if(NOT protobuf_BUILD_TESTS)
+ set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests")
+ endif()
+ if(NOT PROTOBUF_ROOT_DIR)
+ set(PROTOBUF_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/protobuf)
+ endif()
+ if(EXISTS "<%text>${PROTOBUF_ROOT_DIR}</%text>/cmake/CMakeLists.txt")
+ add_subdirectory(<%text>${PROTOBUF_ROOT_DIR}</%text>/cmake third_party/protobuf)
+ if(TARGET <%text>${_gRPC_PROTOBUF_LIBRARY_NAME}</%text>)
+ set(_gRPC_PROTOBUF_LIBRARIES <%text>${_gRPC_PROTOBUF_LIBRARY_NAME}</%text>)
+ endif()
+ if(TARGET libprotoc)
+ set(_gRPC_PROTOBUF_PROTOC_LIBRARIES libprotoc)
+ endif()
+ else()
+ message(WARNING "gRPC_PROTOBUF_PROVIDER is \"module\" but PROTOBUF_ROOT_DIR is wrong")
+ endif()
+ elseif("<%text>${gRPC_PROTOBUF_PROVIDER}</%text>" STREQUAL "package")
+ find_package(protobuf CONFIG)
+ if(protobuf_FOUND)
+ if(TARGET protobuf::<%text>${_gRPC_PROTOBUF_LIBRARY_NAME}</%text>)
+ set(_gRPC_PROTOBUF_LIBRARIES protobuf::<%text>${_gRPC_PROTOBUF_LIBRARY_NAME}</%text>)
+ endif()
+ if(TARGET protobuf::libprotoc)
+ set(_gRPC_PROTOBUF_PROTOC_LIBRARIES protobuf::libprotoc)
+ endif()
+ set(_gRPC_FIND_PROTOBUF "if(NOT protobuf_FOUND)\n find_package(protobuf CONFIG)\nendif()")
+ else()
+ find_package(Protobuf MODULE)
+ set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND)\n find_package(Protobuf)\nendif()")
+ endif()
endif()
- # Building the protobuf tests require gmock what is not part of a standard protobuf checkout.
- # Disable them unless they are explicitly requested from the cmake command line (when we assume
- # gmock is downloaded to the right location inside protobuf).
- if(NOT protobuf_BUILD_TESTS)
- set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests")
+ if("<%text>${gRPC_SSL_PROVIDER}</%text>" STREQUAL "module")
+ if(NOT BORINGSSL_ROOT_DIR)
+ set(BORINGSSL_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/boringssl)
+ endif()
+ if(EXISTS "<%text>${BORINGSSL_ROOT_DIR}</%text>/CMakeLists.txt")
+ add_subdirectory(<%text>${BORINGSSL_ROOT_DIR}</%text> third_party/boringssl)
+ if(TARGET ssl)
+ set(_gRPC_SSL_LIBRARIES ssl)
+ endif()
+ else()
+ message(WARNING "gRPC_SSL_PROVIDER is \"module\" but BORINGSSL_ROOT_DIR is wrong")
+ endif()
+ elseif("<%text>${gRPC_SSL_PROVIDER}</%text>" STREQUAL "package")
+ find_package(OpenSSL)
+ if(TARGET OpenSSL::SSL)
+ set(_gRPC_SSL_LIBRARIES OpenSSL::SSL)
+ endif()
+ set(_gRPC_FIND_SSL "if(NOT OpenSSL_FOUND)\n find_package(OpenSSL)\nendif()")
endif()
- add_subdirectory(<%text>${BORINGSSL_ROOT_DIR}</%text> third_party/boringssl)
- add_subdirectory(<%text>${PROTOBUF_ROOT_DIR}</%text>/cmake third_party/protobuf)
- add_subdirectory(<%text>${ZLIB_ROOT_DIR}</%text> third_party/zlib)
+ if(NOT MSVC)
+ set(CMAKE_C_FLAGS "<%text>${CMAKE_C_FLAGS}</%text> -std=c11")
+ set(CMAKE_CXX_FLAGS "<%text>${CMAKE_CXX_FLAGS}</%text> -std=c++11")
+ endif()
- set(CMAKE_C_FLAGS "<%text>${CMAKE_C_FLAGS}</%text> -std=c11")
- set(CMAKE_CXX_FLAGS "<%text>${CMAKE_CXX_FLAGS}</%text> -std=c++11")
+ if(WIN32 AND MSVC)
+ set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32)
+ endif()
- if (GRPC_USE_PROTO_LITE)
- set(PROTOBUF_LIBRARY_NAME "libprotobuf-lite")
- add_definitions("-DGRPC_USE_PROTO_LITE")
- else()
- set(PROTOBUF_LIBRARY_NAME "libprotobuf")
+ include(GNUInstallDirs)
+ if(NOT DEFINED CMAKE_INSTALL_CMAKEDIR)
+ set(CMAKE_INSTALL_CMAKEDIR "<%text>${CMAKE_INSTALL_LIBDIR}</%text>/cmake/gRPC")
endif()
% for lib in libs:
% if lib.build in ["all", "protoc", "tool"]:
${cc_library(lib)}
+ ${cc_install(lib)}
% endif
% endfor
% for tgt in targets:
% if tgt.build in ["all", "protoc", "tool"]:
${cc_binary(tgt)}
+ ${cc_install(tgt)}
% endif
% endfor
@@ -119,7 +202,7 @@
PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/include
PRIVATE <%text>${BORINGSSL_ROOT_DIR}</%text>/include
PRIVATE <%text>${PROTOBUF_ROOT_DIR}</%text>/src
- PRIVATE <%text>${ZLIB_ROOT_DIR}</%text>
+ PRIVATE <%text>${ZLIB_INCLUDE_DIR}</%text>
PRIVATE <%text>${CMAKE_CURRENT_BINARY_DIR}</%text>/third_party/zlib
)
@@ -130,6 +213,20 @@
% endfor
)
% endif
+
+ % if len(lib.get('public_headers', [])) > 0:
+ foreach(_hdr
+ % for hdr in lib.get('public_headers', []):
+ ${hdr}
+ % endfor
+ )
+ string(REPLACE "include/" "" _path <%text>${_hdr}</%text>)
+ get_filename_component(_path <%text>${_path}</%text> PATH)
+ install(FILES <%text>${_hdr}</%text>
+ DESTINATION "<%text>${CMAKE_INSTALL_INCLUDEDIR}/${_path}</%text>"
+ )
+ endforeach()
+ % endif
</%def>
<%def name="cc_binary(tgt)">
@@ -157,3 +254,23 @@
% endif
</%def>
+ <%def name="cc_install(tgt)">
+ install(TARGETS ${tgt.name} EXPORT gRPCTargets
+ RUNTIME DESTINATION <%text>${CMAKE_INSTALL_BINDIR}</%text>
+ LIBRARY DESTINATION <%text>${CMAKE_INSTALL_LIBDIR}</%text>
+ ARCHIVE DESTINATION <%text>${CMAKE_INSTALL_LIBDIR}</%text>
+ )
+ </%def>
+
+ install(EXPORT gRPCTargets
+ DESTINATION <%text>${CMAKE_INSTALL_CMAKEDIR}</%text>
+ NAMESPACE gRPC::
+ )
+
+ foreach(_config gRPCConfig gRPCConfigVersion)
+ configure_file(tools/cmake/<%text>${_config}</%text>.cmake.in
+ <%text>${_config}</%text>.cmake @ONLY)
+ install(FILES <%text>${CMAKE_CURRENT_BINARY_DIR}/${_config}</%text>.cmake
+ DESTINATION <%text>${CMAKE_INSTALL_CMAKEDIR}</%text>
+ )
+ endforeach()
diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template
index 12d06a7c8d..644dc4a632 100644
--- a/templates/gRPC-Core.podspec.template
+++ b/templates/gRPC-Core.podspec.template
@@ -162,12 +162,16 @@
ss.source_files = 'include/grpc/grpc_cronet.h'
end
- s.subspec 'Cronet-Tests' do |ss|
+ s.subspec 'Cronet-Implementation' do |ss|
ss.header_mappings_dir = '.'
-
ss.source_files = 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c',
- 'src/core/ext/transport/cronet/transport/cronet_transport.c',
- 'test/core/end2end/cq_verifier.{c,h}',
+ 'src/core/ext/transport/cronet/transport/cronet_transport.c'
+ end
+
+ s.subspec 'Tests' do |ss|
+ ss.header_mappings_dir = '.'
+
+ ss.source_files = 'test/core/end2end/cq_verifier.{c,h}',
'test/core/end2end/end2end_tests.{c,h}',
'test/core/end2end/tests/*.{c,h}',
'test/core/end2end/data/*.{c,h}',
diff --git a/templates/package.xml.template b/templates/package.xml.template
index 76c6fff7a7..87b1038959 100644
--- a/templates/package.xml.template
+++ b/templates/package.xml.template
@@ -12,7 +12,7 @@
<email>grpc-packages@google.com</email>
<active>yes</active>
</lead>
- <date>2016-07-21</date>
+ <date>2016-07-28</date>
<time>16:06:07</time>
<version>
<release>${settings.php_version.php()}</release>
@@ -24,7 +24,7 @@
</stability>
<license>BSD</license>
<notes>
- - PHP7 Support #7464
+ - PHP7 Support continued, reduce code duplication #7543
</notes>
<contents>
<dir baseinstalldir="/" name="/">
@@ -234,5 +234,20 @@
- PHP7 Support #7464
</notes>
</release>
+ <release>
+ <version>
+ <release>1.0.0RC3</release>
+ <api>1.0.0RC3</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2016-07-28</date>
+ <license>BSD</license>
+ <notes>
+ - PHP7 Support continued, reduce code duplication #7543
+ </notes>
+ </release>
</changelog>
</package>
diff --git a/templates/src/csharp/Grpc.Auth/project.json.template b/templates/src/csharp/Grpc.Auth/project.json.template
index d91bd8ce1d..b3244e4d3c 100644
--- a/templates/src/csharp/Grpc.Auth/project.json.template
+++ b/templates/src/csharp/Grpc.Auth/project.json.template
@@ -34,9 +34,9 @@
"net45"
],
"dependencies": {
- "Microsoft.NETCore.Portable.Compatibility": "1.0.1-rc2-24027",
- "NETStandard.Library": "1.5.0-rc2-24027",
- "System.Threading.Tasks": "4.0.11-rc2-24027"
+ "Microsoft.NETCore.Portable.Compatibility": "1.0.1",
+ "NETStandard.Library": "1.6.0",
+ "System.Threading.Tasks": "4.0.11"
}
}
}
diff --git a/templates/src/csharp/Grpc.Core.Tests/project.json.template b/templates/src/csharp/Grpc.Core.Tests/project.json.template
index bc9fa3e63a..3452d6b4b0 100644
--- a/templates/src/csharp/Grpc.Core.Tests/project.json.template
+++ b/templates/src/csharp/Grpc.Core.Tests/project.json.template
@@ -8,16 +8,20 @@
},
"Newtonsoft.Json": "8.0.3",
"NUnit": "3.2.0",
- "NUnitLite": "3.2.0-*"
+ "NUnitLite": "3.2.0-*",
+ "NUnit.ConsoleRunner": "3.2.0",
+ "OpenCover": "4.6.519",
+ "ReportGenerator": "2.4.4.0"
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
},
diff --git a/templates/src/csharp/Grpc.Core/project.json.template b/templates/src/csharp/Grpc.Core/project.json.template
index 6355db5389..bd0e8b2c13 100644
--- a/templates/src/csharp/Grpc.Core/project.json.template
+++ b/templates/src/csharp/Grpc.Core/project.json.template
@@ -42,8 +42,8 @@
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027",
- "System.Threading.Thread": "4.0.0-rc2-24027"
+ "NETStandard.Library": "1.6.0",
+ "System.Threading.Thread": "4.0.0"
}
}
}
diff --git a/templates/src/csharp/Grpc.Examples.MathClient/project.json.template b/templates/src/csharp/Grpc.Examples.MathClient/project.json.template
index fba401c3a4..67151dbcfa 100644
--- a/templates/src/csharp/Grpc.Examples.MathClient/project.json.template
+++ b/templates/src/csharp/Grpc.Examples.MathClient/project.json.template
@@ -9,12 +9,13 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/templates/src/csharp/Grpc.Examples.MathServer/project.json.template b/templates/src/csharp/Grpc.Examples.MathServer/project.json.template
index fba401c3a4..67151dbcfa 100644
--- a/templates/src/csharp/Grpc.Examples.MathServer/project.json.template
+++ b/templates/src/csharp/Grpc.Examples.MathServer/project.json.template
@@ -9,12 +9,13 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/templates/src/csharp/Grpc.Examples.Tests/project.json.template b/templates/src/csharp/Grpc.Examples.Tests/project.json.template
index 21765f0565..af13cb5850 100644
--- a/templates/src/csharp/Grpc.Examples.Tests/project.json.template
+++ b/templates/src/csharp/Grpc.Examples.Tests/project.json.template
@@ -11,12 +11,13 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/templates/src/csharp/Grpc.Examples/project.json.template b/templates/src/csharp/Grpc.Examples/project.json.template
index 715fc08725..d5d63f658e 100644
--- a/templates/src/csharp/Grpc.Examples/project.json.template
+++ b/templates/src/csharp/Grpc.Examples/project.json.template
@@ -20,7 +20,7 @@
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template b/templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template
index 79e67226cb..417b773a42 100644
--- a/templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template
+++ b/templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template
@@ -11,12 +11,13 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/templates/src/csharp/Grpc.HealthCheck/project.json.template b/templates/src/csharp/Grpc.HealthCheck/project.json.template
index 264ed29205..cd2da0089b 100644
--- a/templates/src/csharp/Grpc.HealthCheck/project.json.template
+++ b/templates/src/csharp/Grpc.HealthCheck/project.json.template
@@ -39,7 +39,7 @@
"portable-net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template
index 10ed549347..93151f2b89 100644
--- a/templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template
+++ b/templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template
@@ -9,13 +9,14 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45",
"net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template
index 10ed549347..93151f2b89 100644
--- a/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template
+++ b/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template
@@ -9,13 +9,14 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45",
"net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template
index 10ed549347..93151f2b89 100644
--- a/templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template
+++ b/templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template
@@ -9,13 +9,14 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45",
"net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template
index 10ed549347..93151f2b89 100644
--- a/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template
+++ b/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template
@@ -9,13 +9,14 @@
},
"frameworks": {
"net45": { },
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45",
"net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/templates/src/csharp/Grpc.IntegrationTesting/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting/project.json.template
index 3181511485..0a7d5e9af4 100644
--- a/templates/src/csharp/Grpc.IntegrationTesting/project.json.template
+++ b/templates/src/csharp/Grpc.IntegrationTesting/project.json.template
@@ -24,14 +24,15 @@
"System.IO": ""
}
},
- "netstandard1.5": {
+ "netcoreapp1.0": {
"imports": [
"portable-net45",
"net45"
],
"dependencies": {
- "NETStandard.Library": "1.5.0-rc2-24027",
- "System.Linq.Expressions": "4.0.11-rc2-24027"
+ "Microsoft.NETCore.App": "1.0.0",
+ "NETStandard.Library": "1.6.0",
+ "System.Linq.Expressions": "4.1.0"
}
}
}
diff --git a/templates/src/node/health_check/package.json.template b/templates/src/node/health_check/package.json.template
index 1248ced1e1..96b9748aa7 100644
--- a/templates/src/node/health_check/package.json.template
+++ b/templates/src/node/health_check/package.json.template
@@ -21,11 +21,11 @@
"lodash": "^3.9.3",
"google-protobuf": "^3.0.0-alpha.5"
},
- "files": {
+ "files": [
"LICENSE",
"health.js",
"v1"
- },
+ ],
"main": "src/node/index.js",
"license": "BSD-3-Clause"
}
diff --git a/test/core/census/README b/test/core/census/README
new file mode 100644
index 0000000000..d5363b7233
--- /dev/null
+++ b/test/core/census/README
@@ -0,0 +1,7 @@
+Test source and data files for Census.
+
+binary proto files (*.pb) in data directory are generated from the *.txt file,
+via:
+
+BASE="filename"
+cat $BASE.txt | protoc --encode=google.census.Resource census.proto > $BASE.pb
diff --git a/test/core/census/data/resource_empty_name.pb b/test/core/census/data/resource_empty_name.pb
new file mode 100644
index 0000000000..4d547445fa
--- /dev/null
+++ b/test/core/census/data/resource_empty_name.pb
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/test/core/census/data/resource_empty_name.txt b/test/core/census/data/resource_empty_name.txt
new file mode 100644
index 0000000000..271fd3274c
--- /dev/null
+++ b/test/core/census/data/resource_empty_name.txt
@@ -0,0 +1,5 @@
+# Name is present, but empty.
+name : ''
+unit {
+ numerator : SECS
+}
diff --git a/test/core/census/data/resource_full.pb b/test/core/census/data/resource_full.pb
new file mode 100644
index 0000000000..e4c6a2aef5
--- /dev/null
+++ b/test/core/census/data/resource_full.pb
@@ -0,0 +1,2 @@
+
+ full_resource"A resource with everything defined \ No newline at end of file
diff --git a/test/core/census/data/resource_full.txt b/test/core/census/data/resource_full.txt
new file mode 100644
index 0000000000..1aa2fafe3a
--- /dev/null
+++ b/test/core/census/data/resource_full.txt
@@ -0,0 +1,9 @@
+# A full resource definition - all fields filled out.
+name : 'full_resource'
+description : 'A resource with everything defined'
+unit {
+ # Megabits per second.
+ prefix : 6
+ numerator : BITS
+ denominator : SECS
+}
diff --git a/test/core/census/data/resource_minimal_good.pb b/test/core/census/data/resource_minimal_good.pb
new file mode 100644
index 0000000000..7100c462bf
--- /dev/null
+++ b/test/core/census/data/resource_minimal_good.pb
@@ -0,0 +1,2 @@
+
+ minimal_good \ No newline at end of file
diff --git a/test/core/census/data/resource_minimal_good.txt b/test/core/census/data/resource_minimal_good.txt
new file mode 100644
index 0000000000..a7a7e71dd6
--- /dev/null
+++ b/test/core/census/data/resource_minimal_good.txt
@@ -0,0 +1,5 @@
+# A minimal "good" Resource definition: has a name and numerator/unit.
+name : 'minimal_good'
+unit {
+ numerator : SECS
+}
diff --git a/test/core/census/data/resource_no_name.pb b/test/core/census/data/resource_no_name.pb
new file mode 100644
index 0000000000..4d547445fa
--- /dev/null
+++ b/test/core/census/data/resource_no_name.pb
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/test/core/census/data/resource_no_name.txt b/test/core/census/data/resource_no_name.txt
new file mode 100644
index 0000000000..8f12a91d35
--- /dev/null
+++ b/test/core/census/data/resource_no_name.txt
@@ -0,0 +1,4 @@
+# The minimal good Resource without a name.
+unit {
+ numerator : SECS
+}
diff --git a/test/core/census/data/resource_no_numerator.pb b/test/core/census/data/resource_no_numerator.pb
new file mode 100644
index 0000000000..2a5cceee70
--- /dev/null
+++ b/test/core/census/data/resource_no_numerator.pb
@@ -0,0 +1,2 @@
+
+resource_no_numeratorýÿÿÿÿÿÿÿÿ \ No newline at end of file
diff --git a/test/core/census/data/resource_no_numerator.txt b/test/core/census/data/resource_no_numerator.txt
new file mode 100644
index 0000000000..fc1fec74a2
--- /dev/null
+++ b/test/core/census/data/resource_no_numerator.txt
@@ -0,0 +1,6 @@
+# Resource without a numerator
+name : 'resource_no_numerator'
+unit {
+ prefix : -3
+ denominator : SECS
+}
diff --git a/test/core/census/data/resource_no_unit.pb b/test/core/census/data/resource_no_unit.pb
new file mode 100644
index 0000000000..9dca2620e0
--- /dev/null
+++ b/test/core/census/data/resource_no_unit.pb
@@ -0,0 +1,2 @@
+
+resource_no_unit \ No newline at end of file
diff --git a/test/core/census/data/resource_no_unit.txt b/test/core/census/data/resource_no_unit.txt
new file mode 100644
index 0000000000..c5d5115ceb
--- /dev/null
+++ b/test/core/census/data/resource_no_unit.txt
@@ -0,0 +1,2 @@
+# The minimal good resource without a unit
+name : 'resource_no_unit'
diff --git a/test/core/census/resource_test.c b/test/core/census/resource_test.c
new file mode 100644
index 0000000000..e1556d7d7b
--- /dev/null
+++ b/test/core/census/resource_test.c
@@ -0,0 +1,157 @@
+/*
+ *
+ * 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/ext/census/resource.h"
+#include <grpc/census.h>
+#include <grpc/support/log.h>
+#include <grpc/support/port_platform.h>
+#include <grpc/support/useful.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "src/core/ext/census/base_resources.h"
+#include "test/core/util/test_config.h"
+
+// Test all the functionality for dealing with Resources.
+
+// Just startup and shutdown resources subsystem.
+static void test_enable_disable() {
+ initialize_resources();
+ shutdown_resources();
+}
+
+// A blank/empty initialization should not work.
+static void test_empty_definition() {
+ initialize_resources();
+ int32_t rid = census_define_resource(NULL, 0);
+ GPR_ASSERT(rid == -1);
+ uint8_t buffer[50] = {0};
+ rid = census_define_resource(buffer, 50);
+ GPR_ASSERT(rid == -1);
+ shutdown_resources();
+}
+
+// Given a file name, read raw proto and define the resource included within.
+// Returns resource id from census_define_resource().
+static int32_t define_resource_from_file(const char *file) {
+#define BUF_SIZE 512
+ uint8_t buffer[BUF_SIZE];
+ FILE *input = fopen(file, "rb");
+ GPR_ASSERT(input != NULL);
+ size_t nbytes = fread(buffer, 1, BUF_SIZE, input);
+ GPR_ASSERT(nbytes != 0 && nbytes < BUF_SIZE && feof(input) && !ferror(input));
+ int32_t rid = census_define_resource(buffer, nbytes);
+ GPR_ASSERT(fclose(input) == 0);
+ return rid;
+}
+
+// Test definition of a single resource, using a proto read from a file. The
+// `succeed` parameter indicates whether we expect the definition to succeed or
+// fail. `name` is used to check that the returned resource can be looked up by
+// name.
+static void test_define_single_resource(const char *file, const char *name,
+ bool succeed) {
+ gpr_log(GPR_INFO, "Test defining resource \"%s\"\n", name);
+ initialize_resources();
+ int32_t rid = define_resource_from_file(file);
+ if (succeed) {
+ GPR_ASSERT(rid >= 0);
+ int32_t rid2 = census_resource_id(name);
+ GPR_ASSERT(rid == rid2);
+ } else {
+ GPR_ASSERT(rid < 0);
+ }
+ shutdown_resources();
+}
+
+// Try deleting various resources (both those that exist and those that don't).
+static void test_delete_resource() {
+ initialize_resources();
+ // Try deleting resource before any are defined.
+ census_delete_resource(0);
+ // Create and check a couple of resources.
+ int32_t rid1 = define_resource_from_file(
+ "test/core/census/data/resource_minimal_good.pb");
+ int32_t rid2 =
+ define_resource_from_file("test/core/census/data/resource_full.pb");
+ GPR_ASSERT(rid1 >= 0 && rid2 >= 0 && rid1 != rid2);
+ int32_t rid3 = census_resource_id("minimal_good");
+ int32_t rid4 = census_resource_id("full_resource");
+ GPR_ASSERT(rid1 == rid3 && rid2 == rid4);
+ // Try deleting non-existant resources.
+ census_delete_resource(-1);
+ census_delete_resource(rid1 + rid2 + 1);
+ census_delete_resource(10000000);
+ // Delete one of the previously defined resources and check for deletion.
+ census_delete_resource(rid1);
+ rid3 = census_resource_id("minimal_good");
+ GPR_ASSERT(rid3 < 0);
+ // Check that re-adding works.
+ rid1 = define_resource_from_file(
+ "test/core/census/data/resource_minimal_good.pb");
+ GPR_ASSERT(rid1 >= 0);
+ rid3 = census_resource_id("minimal_good");
+ GPR_ASSERT(rid1 == rid3);
+ shutdown_resources();
+}
+
+// Test define base resources.
+static void test_base_resources() {
+ initialize_resources();
+ define_base_resources();
+ int32_t rid1 = census_resource_id("client_rpc_latency");
+ int32_t rid2 = census_resource_id("server_rpc_latency");
+ GPR_ASSERT(rid1 >= 0 && rid2 >= 0 && rid1 != rid2);
+ shutdown_resources();
+}
+
+int main(int argc, char **argv) {
+ grpc_test_init(argc, argv);
+ test_enable_disable();
+ test_empty_definition();
+ test_define_single_resource("test/core/census/data/resource_minimal_good.pb",
+ "minimal_good", true);
+ test_define_single_resource("test/core/census/data/resource_full.pb",
+ "full_resource", true);
+ test_define_single_resource("test/core/census/data/resource_no_name.pb",
+ "resource_no_name", false);
+ test_define_single_resource("test/core/census/data/resource_no_numerator.pb",
+ "resource_no_numerator", false);
+ test_define_single_resource("test/core/census/data/resource_no_unit.pb",
+ "resource_no_unit", false);
+ test_define_single_resource("test/core/census/data/resource_empty_name.pb",
+ "resource_empty_name", false);
+ test_delete_resource();
+ test_base_resources();
+ return 0;
+}
diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c
index f9561bed70..569b3f7cd2 100644
--- a/test/core/channel/channel_stack_test.c
+++ b/test/core/channel/channel_stack_test.c
@@ -53,17 +53,20 @@ static void channel_init_func(grpc_exec_ctx *exec_ctx,
*(int *)(elem->channel_data) = 0;
}
-static void call_init_func(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args) {
+static grpc_error *call_init_func(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
++*(int *)(elem->channel_data);
*(int *)(elem->call_data) = 0;
+ return GRPC_ERROR_NONE;
}
static void channel_destroy_func(grpc_exec_ctx *exec_ctx,
grpc_channel_element *elem) {}
static void call_destroy_func(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_stats *stats, void *ignored) {
+ const grpc_call_final_info *final_info,
+ void *ignored) {
++*(int *)(elem->channel_data);
}
@@ -132,8 +135,10 @@ static void test_create_channel_stack(void) {
GPR_ASSERT(*channel_data == 0);
call_stack = gpr_malloc(channel_stack->call_stack_size);
- grpc_call_stack_init(&exec_ctx, channel_stack, 1, free_call, call_stack, NULL,
- NULL, call_stack);
+ grpc_error *error =
+ grpc_call_stack_init(&exec_ctx, channel_stack, 1, free_call, call_stack,
+ NULL, NULL, call_stack);
+ GPR_ASSERT(error == GRPC_ERROR_NONE);
GPR_ASSERT(call_stack->count == 1);
call_elem = grpc_call_stack_element(call_stack, 0);
GPR_ASSERT(call_elem->filter == channel_elem->filter);
diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c
index 890309c44a..b77568058c 100644
--- a/test/core/end2end/cq_verifier.c
+++ b/test/core/end2end/cq_verifier.c
@@ -259,9 +259,10 @@ void cq_verify(cq_verifier *v) {
gpr_strvec_destroy(&have_tags);
}
-void cq_verify_empty(cq_verifier *v) {
- gpr_timespec deadline = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
- gpr_time_from_seconds(1, GPR_TIMESPAN));
+void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec) {
+ gpr_timespec deadline =
+ gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
+ gpr_time_from_seconds(timeout_sec, GPR_TIMESPAN));
grpc_event ev;
GPR_ASSERT(v->expect.next == &v->expect && "expectation queue must be empty");
@@ -275,6 +276,8 @@ void cq_verify_empty(cq_verifier *v) {
}
}
+void cq_verify_empty(cq_verifier *v) { cq_verify_empty_timeout(v, 1); }
+
static expectation *add(cq_verifier *v, grpc_completion_type type, void *tag) {
expectation *e = gpr_malloc(sizeof(expectation));
e->type = type;
diff --git a/test/core/end2end/cq_verifier.h b/test/core/end2end/cq_verifier.h
index 8c9a85c218..bf82468c9a 100644
--- a/test/core/end2end/cq_verifier.h
+++ b/test/core/end2end/cq_verifier.h
@@ -55,6 +55,9 @@ void cq_verify(cq_verifier *v);
/* ensure that the completion queue is empty */
void cq_verify_empty(cq_verifier *v);
+/* ensure that the completion queue is empty, waiting up to \a timeout secs. */
+void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec);
+
/* Various expectation matchers
Any functions taking ... expect a NULL terminated list of key/value pairs
(each pair using two parameter slots) of metadata that MUST be present in
diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c
index 03e55f1181..3efd18cf2e 100644
--- a/test/core/end2end/end2end_nosec_tests.c
+++ b/test/core/end2end/end2end_nosec_tests.c
@@ -69,6 +69,8 @@ extern void disappearing_server(grpc_end2end_test_config config);
extern void disappearing_server_pre_init(void);
extern void empty_batch(grpc_end2end_test_config config);
extern void empty_batch_pre_init(void);
+extern void filter_call_init_fails(grpc_end2end_test_config config);
+extern void filter_call_init_fails_pre_init(void);
extern void filter_causes_close(grpc_end2end_test_config config);
extern void filter_causes_close_pre_init(void);
extern void graceful_server_shutdown(grpc_end2end_test_config config);
@@ -83,6 +85,8 @@ extern void invoke_large_request(grpc_end2end_test_config config);
extern void invoke_large_request_pre_init(void);
extern void large_metadata(grpc_end2end_test_config config);
extern void large_metadata_pre_init(void);
+extern void load_reporting_hook(grpc_end2end_test_config config);
+extern void load_reporting_hook_pre_init(void);
extern void max_concurrent_streams(grpc_end2end_test_config config);
extern void max_concurrent_streams_pre_init(void);
extern void max_message_length(grpc_end2end_test_config config);
@@ -138,6 +142,7 @@ void grpc_end2end_tests_pre_init(void) {
default_host_pre_init();
disappearing_server_pre_init();
empty_batch_pre_init();
+ filter_call_init_fails_pre_init();
filter_causes_close_pre_init();
graceful_server_shutdown_pre_init();
high_initial_seqno_pre_init();
@@ -145,6 +150,7 @@ void grpc_end2end_tests_pre_init(void) {
idempotent_request_pre_init();
invoke_large_request_pre_init();
large_metadata_pre_init();
+ load_reporting_hook_pre_init();
max_concurrent_streams_pre_init();
max_message_length_pre_init();
negative_deadline_pre_init();
@@ -186,6 +192,7 @@ void grpc_end2end_tests(int argc, char **argv,
default_host(config);
disappearing_server(config);
empty_batch(config);
+ filter_call_init_fails(config);
filter_causes_close(config);
graceful_server_shutdown(config);
high_initial_seqno(config);
@@ -193,6 +200,7 @@ void grpc_end2end_tests(int argc, char **argv,
idempotent_request(config);
invoke_large_request(config);
large_metadata(config);
+ load_reporting_hook(config);
max_concurrent_streams(config);
max_message_length(config);
negative_deadline(config);
@@ -268,6 +276,10 @@ void grpc_end2end_tests(int argc, char **argv,
empty_batch(config);
continue;
}
+ if (0 == strcmp("filter_call_init_fails", argv[i])) {
+ filter_call_init_fails(config);
+ continue;
+ }
if (0 == strcmp("filter_causes_close", argv[i])) {
filter_causes_close(config);
continue;
@@ -296,6 +308,10 @@ void grpc_end2end_tests(int argc, char **argv,
large_metadata(config);
continue;
}
+ if (0 == strcmp("load_reporting_hook", argv[i])) {
+ load_reporting_hook(config);
+ continue;
+ }
if (0 == strcmp("max_concurrent_streams", argv[i])) {
max_concurrent_streams(config);
continue;
diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c
index 877b1b1989..e3d791abc1 100644
--- a/test/core/end2end/end2end_tests.c
+++ b/test/core/end2end/end2end_tests.c
@@ -71,6 +71,8 @@ extern void disappearing_server(grpc_end2end_test_config config);
extern void disappearing_server_pre_init(void);
extern void empty_batch(grpc_end2end_test_config config);
extern void empty_batch_pre_init(void);
+extern void filter_call_init_fails(grpc_end2end_test_config config);
+extern void filter_call_init_fails_pre_init(void);
extern void filter_causes_close(grpc_end2end_test_config config);
extern void filter_causes_close_pre_init(void);
extern void graceful_server_shutdown(grpc_end2end_test_config config);
@@ -85,6 +87,8 @@ extern void invoke_large_request(grpc_end2end_test_config config);
extern void invoke_large_request_pre_init(void);
extern void large_metadata(grpc_end2end_test_config config);
extern void large_metadata_pre_init(void);
+extern void load_reporting_hook(grpc_end2end_test_config config);
+extern void load_reporting_hook_pre_init(void);
extern void max_concurrent_streams(grpc_end2end_test_config config);
extern void max_concurrent_streams_pre_init(void);
extern void max_message_length(grpc_end2end_test_config config);
@@ -141,6 +145,7 @@ void grpc_end2end_tests_pre_init(void) {
default_host_pre_init();
disappearing_server_pre_init();
empty_batch_pre_init();
+ filter_call_init_fails_pre_init();
filter_causes_close_pre_init();
graceful_server_shutdown_pre_init();
high_initial_seqno_pre_init();
@@ -148,6 +153,7 @@ void grpc_end2end_tests_pre_init(void) {
idempotent_request_pre_init();
invoke_large_request_pre_init();
large_metadata_pre_init();
+ load_reporting_hook_pre_init();
max_concurrent_streams_pre_init();
max_message_length_pre_init();
negative_deadline_pre_init();
@@ -190,6 +196,7 @@ void grpc_end2end_tests(int argc, char **argv,
default_host(config);
disappearing_server(config);
empty_batch(config);
+ filter_call_init_fails(config);
filter_causes_close(config);
graceful_server_shutdown(config);
high_initial_seqno(config);
@@ -197,6 +204,7 @@ void grpc_end2end_tests(int argc, char **argv,
idempotent_request(config);
invoke_large_request(config);
large_metadata(config);
+ load_reporting_hook(config);
max_concurrent_streams(config);
max_message_length(config);
negative_deadline(config);
@@ -276,6 +284,10 @@ void grpc_end2end_tests(int argc, char **argv,
empty_batch(config);
continue;
}
+ if (0 == strcmp("filter_call_init_fails", argv[i])) {
+ filter_call_init_fails(config);
+ continue;
+ }
if (0 == strcmp("filter_causes_close", argv[i])) {
filter_causes_close(config);
continue;
@@ -304,6 +316,10 @@ void grpc_end2end_tests(int argc, char **argv,
large_metadata(config);
continue;
}
+ if (0 == strcmp("load_reporting_hook", argv[i])) {
+ load_reporting_hook(config);
+ continue;
+ }
if (0 == strcmp("max_concurrent_streams", argv[i])) {
max_concurrent_streams(config);
continue;
diff --git a/test/core/end2end/fixtures/h2_loadreporting.c b/test/core/end2end/fixtures/h2_load_reporting.c
index 4ed02f9728..f6d3923db9 100644
--- a/test/core/end2end/fixtures/h2_loadreporting.c
+++ b/test/core/end2end/fixtures/h2_load_reporting.c
@@ -52,18 +52,16 @@
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
-static grpc_load_reporting_config *g_client_lrc;
-static grpc_load_reporting_config *g_server_lrc;
-
-typedef struct fullstack_fixture_data {
+typedef struct load_reporting_fixture_data {
char *localaddr;
-} fullstack_fixture_data;
+} load_reporting_fixture_data;
-static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
+static grpc_end2end_test_fixture chttp2_create_fixture_load_reporting(
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));
+ load_reporting_fixture_data *ffd =
+ gpr_malloc(sizeof(load_reporting_fixture_data));
memset(&f, 0, sizeof(f));
gpr_join_host_port(&ffd->localaddr, "localhost", port);
@@ -74,47 +72,20 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
return f;
}
-typedef struct {
- int64_t total_bytes;
- bool fully_processed;
- uint32_t initial_token;
- uint32_t final_token;
-} aggregated_bw_stats;
-
-static void sample_fn(const grpc_load_reporting_call_data *call_data,
- void *user_data) {
- GPR_ASSERT(user_data != NULL);
- aggregated_bw_stats *custom_stats = (aggregated_bw_stats *)user_data;
- if (call_data == NULL) {
- /* initial invocation */
- custom_stats->initial_token = 0xDEADBEEF;
- } else {
- /* final invocation */
- custom_stats->total_bytes =
- (int64_t)(call_data->stats->transport_stream_stats.outgoing.data_bytes +
- call_data->stats->transport_stream_stats.incoming.data_bytes);
- custom_stats->final_token = 0xCAFED00D;
- custom_stats->fully_processed = true;
- }
-}
-
-void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
- fullstack_fixture_data *ffd = f->fixture_data;
- grpc_arg arg = grpc_load_reporting_config_create_arg(g_client_lrc);
- client_args = grpc_channel_args_copy_and_add(client_args, &arg, 1);
+void chttp2_init_client_load_reporting(grpc_end2end_test_fixture *f,
+ grpc_channel_args *client_args) {
+ load_reporting_fixture_data *ffd = f->fixture_data;
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
- grpc_channel_args_destroy(client_args);
GPR_ASSERT(f->client);
}
-void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
- fullstack_fixture_data *ffd = f->fixture_data;
+void chttp2_init_server_load_reporting(grpc_end2end_test_fixture *f,
+ grpc_channel_args *server_args) {
+ load_reporting_fixture_data *ffd = f->fixture_data;
+ grpc_arg arg = grpc_load_reporting_enable_arg();
if (f->server) {
grpc_server_destroy(f->server);
}
- grpc_arg arg = grpc_load_reporting_config_create_arg(g_server_lrc);
server_args = grpc_channel_args_copy_and_add(server_args, &arg, 1);
f->server = grpc_server_create(server_args, NULL);
grpc_channel_args_destroy(server_args);
@@ -123,36 +94,23 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
grpc_server_start(f->server);
}
-void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_fixture_data *ffd = f->fixture_data;
+void chttp2_tear_down_load_reporting(grpc_end2end_test_fixture *f) {
+ load_reporting_fixture_data *ffd = f->fixture_data;
gpr_free(ffd->localaddr);
gpr_free(ffd);
}
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack+loadreporting", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION,
- chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
- chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
+ {"chttp2/fullstack+load_reporting",
+ FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION,
+ chttp2_create_fixture_load_reporting, chttp2_init_client_load_reporting,
+ chttp2_init_server_load_reporting, chttp2_tear_down_load_reporting},
};
int main(int argc, char **argv) {
size_t i;
- aggregated_bw_stats *aggr_stats_client =
- gpr_malloc(sizeof(aggregated_bw_stats));
- aggr_stats_client->total_bytes = -1;
- aggr_stats_client->fully_processed = false;
- aggregated_bw_stats *aggr_stats_server =
- gpr_malloc(sizeof(aggregated_bw_stats));
- aggr_stats_server->total_bytes = -1;
- aggr_stats_server->fully_processed = false;
-
- g_client_lrc =
- grpc_load_reporting_config_create(sample_fn, aggr_stats_client);
- g_server_lrc =
- grpc_load_reporting_config_create(sample_fn, aggr_stats_server);
-
grpc_test_init(argc, argv);
grpc_end2end_tests_pre_init();
grpc_init();
@@ -163,22 +121,5 @@ int main(int argc, char **argv) {
grpc_shutdown();
- grpc_load_reporting_config_destroy(g_client_lrc);
- grpc_load_reporting_config_destroy(g_server_lrc);
-
- if (aggr_stats_client->fully_processed) {
- GPR_ASSERT(aggr_stats_client->total_bytes >= 0);
- GPR_ASSERT(aggr_stats_client->initial_token == 0xDEADBEEF);
- GPR_ASSERT(aggr_stats_client->final_token == 0xCAFED00D);
- }
- if (aggr_stats_server->fully_processed) {
- GPR_ASSERT(aggr_stats_server->total_bytes >= 0);
- GPR_ASSERT(aggr_stats_server->initial_token == 0xDEADBEEF);
- GPR_ASSERT(aggr_stats_server->final_token == 0xCAFED00D);
- }
-
- gpr_free(aggr_stats_client);
- gpr_free(aggr_stats_server);
-
return 0;
}
diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary
index 097e9a8922..3157dfca3f 100644
--- a/test/core/end2end/fuzzers/hpack.dictionary
+++ b/test/core/end2end/fuzzers/hpack.dictionary
@@ -21,8 +21,6 @@
"\x0A:authority"
"\x0Dauthorization"
"\x0Dcache-control"
-"\x0Acensus-bin"
-"\x11census-binary-bin"
"\x13content-disposition"
"\x10content-encoding"
"\x10content-language"
@@ -42,11 +40,13 @@
"\x03GET"
"\x04grpc"
"\x14grpc-accept-encoding"
+"\x0Fgrpc-census-bin"
"\x0Dgrpc-encoding"
"\x1Egrpc-internal-encoding-request"
"\x0Cgrpc-message"
"\x0Bgrpc-status"
"\x0Cgrpc-timeout"
+"\x10grpc-tracing-bin"
"\x04gzip"
"\x0Dgzip, deflate"
"\x04host"
@@ -63,7 +63,8 @@
"\x13if-unmodified-since"
"\x0Dlast-modified"
"\x04link"
-"\x0Eload-reporting"
+"\x16load-reporting-initial"
+"\x17load-reporting-trailing"
"\x08location"
"\x0Cmax-forwards"
"\x07:method"
@@ -137,7 +138,8 @@
"\x00\x13if-unmodified-since\x00"
"\x00\x0Dlast-modified\x00"
"\x00\x04link\x00"
-"\x00\x0Eload-reporting\x00"
+"\x00\x16load-reporting-initial\x00"
+"\x00\x17load-reporting-trailing\x00"
"\x00\x08location\x00"
"\x00\x0Cmax-forwards\x00"
"\x00\x07:method\x03GET"
diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py
index fb7275474d..e59b7dc9fb 100755
--- a/test/core/end2end/gen_build_yaml.py
+++ b/test/core/end2end/gen_build_yaml.py
@@ -53,13 +53,13 @@ fd_unsecure_fixture_options = default_unsecure_fixture_options._replace(
END2END_FIXTURES = {
'h2_compress': default_unsecure_fixture_options,
'h2_census': default_unsecure_fixture_options,
+ 'h2_load_reporting': default_unsecure_fixture_options,
'h2_fakesec': default_secure_fixture_options._replace(ci_mac=False),
'h2_fd': fd_unsecure_fixture_options,
'h2_full': default_unsecure_fixture_options,
'h2_full+pipe': default_unsecure_fixture_options._replace(
platforms=['linux']),
'h2_full+trace': default_unsecure_fixture_options._replace(tracing=True),
- 'h2_loadreporting': default_unsecure_fixture_options,
'h2_oauth2': default_secure_fixture_options._replace(ci_mac=False),
'h2_proxy': default_unsecure_fixture_options._replace(includes_proxy=True,
ci_mac=False),
@@ -102,6 +102,7 @@ END2END_TESTS = {
'disappearing_server': connectivity_test_options,
'empty_batch': default_test_options,
'filter_causes_close': default_test_options,
+ 'filter_call_init_fails': default_test_options,
'graceful_server_shutdown': default_test_options._replace(cpu_cost=LOWCPU),
'hpack_size': default_test_options._replace(proxyable=False,
traceable=False),
@@ -115,6 +116,7 @@ END2END_TESTS = {
'network_status_change': default_test_options,
'no_op': default_test_options,
'payload': default_test_options,
+ 'load_reporting_hook': default_test_options,
'ping_pong_streaming': default_test_options,
'ping': connectivity_test_options._replace(proxyable=False),
'registered_call': default_test_options,
diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c
new file mode 100644
index 0000000000..a09183b786
--- /dev/null
+++ b/test/core/end2end/tests/filter_call_init_fails.c
@@ -0,0 +1,273 @@
+/*
+ *
+ * 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 <limits.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <grpc/byte_buffer.h>
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+#include <grpc/support/time.h>
+#include <grpc/support/useful.h>
+#include "src/core/lib/channel/channel_stack_builder.h"
+#include "src/core/lib/surface/channel_init.h"
+#include "test/core/end2end/cq_verifier.h"
+
+enum { TIMEOUT = 200000 };
+
+static bool g_enable_filter = false;
+
+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) {
+ 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);
+ return f;
+}
+
+static gpr_timespec n_seconds_time(int n) {
+ return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n);
+}
+
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
+
+static void drain_cq(grpc_completion_queue *cq) {
+ grpc_event ev;
+ do {
+ ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL);
+ } while (ev.type != GRPC_QUEUE_SHUTDOWN);
+}
+
+static void shutdown_server(grpc_end2end_test_fixture *f) {
+ if (!f->server) return;
+ grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
+ .type == GRPC_OP_COMPLETE);
+ grpc_server_destroy(f->server);
+ f->server = NULL;
+}
+
+static void shutdown_client(grpc_end2end_test_fixture *f) {
+ if (!f->client) return;
+ grpc_channel_destroy(f->client);
+ f->client = NULL;
+}
+
+static void end_test(grpc_end2end_test_fixture *f) {
+ shutdown_server(f);
+ shutdown_client(f);
+
+ grpc_completion_queue_shutdown(f->cq);
+ drain_cq(f->cq);
+ grpc_completion_queue_destroy(f->cq);
+}
+
+// Simple request via a server filter that always fails to initialize
+// the call.
+static void test_request(grpc_end2end_test_config config) {
+ grpc_call *c;
+ grpc_call *s;
+ gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world");
+ grpc_byte_buffer *request_payload =
+ grpc_raw_byte_buffer_create(&request_payload_slice, 1);
+ gpr_timespec deadline = five_seconds_time();
+ grpc_end2end_test_fixture f =
+ begin_test(config, "filter_call_init_fails", NULL, NULL);
+ cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_op ops[6];
+ grpc_op *op;
+ grpc_metadata_array initial_metadata_recv;
+ grpc_metadata_array trailing_metadata_recv;
+ grpc_metadata_array request_metadata_recv;
+ grpc_byte_buffer *request_payload_recv = NULL;
+ grpc_call_details call_details;
+ grpc_status_code status;
+ grpc_call_error error;
+ 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);
+ GPR_ASSERT(c);
+
+ grpc_metadata_array_init(&initial_metadata_recv);
+ grpc_metadata_array_init(&trailing_metadata_recv);
+ grpc_metadata_array_init(&request_metadata_recv);
+ grpc_call_details_init(&call_details);
+
+ memset(ops, 0, sizeof(ops));
+ op = ops;
+ op->op = GRPC_OP_SEND_INITIAL_METADATA;
+ op->data.send_initial_metadata.count = 0;
+ op->data.send_initial_metadata.metadata = NULL;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_SEND_MESSAGE;
+ op->data.send_message = request_payload;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_INITIAL_METADATA;
+ op->data.recv_initial_metadata = &initial_metadata_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
+ op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv;
+ op->data.recv_status_on_client.status = &status;
+ op->data.recv_status_on_client.status_details = &details;
+ op->data.recv_status_on_client.status_details_capacity = &details_capacity;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ cq_expect_completion(cqv, tag(1), 1);
+ cq_verify(cqv);
+
+ GPR_ASSERT(status == GRPC_STATUS_PERMISSION_DENIED);
+ GPR_ASSERT(0 == strcmp(details, "access denied"));
+
+ gpr_free(details);
+ grpc_metadata_array_destroy(&initial_metadata_recv);
+ grpc_metadata_array_destroy(&trailing_metadata_recv);
+ grpc_metadata_array_destroy(&request_metadata_recv);
+ grpc_call_details_destroy(&call_details);
+
+ grpc_call_destroy(c);
+
+ cq_verifier_destroy(cqv);
+
+ grpc_byte_buffer_destroy(request_payload);
+ grpc_byte_buffer_destroy(request_payload_recv);
+
+ end_test(&f);
+ config.tear_down_data(&f);
+}
+
+/*******************************************************************************
+ * Test filter - always fails to initialize a call
+ */
+
+static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
+ return grpc_error_set_int(GRPC_ERROR_CREATE("access denied"),
+ GRPC_ERROR_INT_GRPC_STATUS,
+ GRPC_STATUS_PERMISSION_DENIED);
+}
+
+static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
+ const grpc_call_final_info *final_info,
+ void *and_free_memory) {}
+
+static void init_channel_elem(grpc_exec_ctx *exec_ctx,
+ grpc_channel_element *elem,
+ grpc_channel_element_args *args) {}
+
+static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
+ grpc_channel_element *elem) {}
+
+static const grpc_channel_filter test_filter = {
+ grpc_call_next_op,
+ grpc_channel_next_op,
+ 0,
+ init_call_elem,
+ grpc_call_stack_ignore_set_pollset_or_pollset_set,
+ destroy_call_elem,
+ 0,
+ init_channel_elem,
+ destroy_channel_elem,
+ grpc_call_next_get_peer,
+ "filter_call_init_fails"};
+
+/*******************************************************************************
+ * Registration
+ */
+
+static bool maybe_add_filter(grpc_channel_stack_builder *builder, void *arg) {
+ if (g_enable_filter) {
+ // Want to add the filter as close to the end as possible, to make
+ // sure that all of the filters work well together. However, we
+ // can't add it at the very end, because the connected channel filter
+ // must be the last one. So we add it right before the last one.
+ grpc_channel_stack_builder_iterator *it =
+ grpc_channel_stack_builder_create_iterator_at_last(builder);
+ GPR_ASSERT(grpc_channel_stack_builder_move_prev(it));
+ const bool retval = grpc_channel_stack_builder_add_filter_before(
+ it, &test_filter, NULL, NULL);
+ grpc_channel_stack_builder_iterator_destroy(it);
+ return retval;
+ } else {
+ return true;
+ }
+}
+
+static void init_plugin(void) {
+ grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX,
+ maybe_add_filter, NULL);
+}
+
+static void destroy_plugin(void) {}
+
+void filter_call_init_fails(grpc_end2end_test_config config) {
+ g_enable_filter = true;
+ test_request(config);
+ g_enable_filter = false;
+}
+
+void filter_call_init_fails_pre_init(void) {
+ grpc_register_plugin(init_plugin, destroy_plugin);
+}
diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c
index 526c05ca3e..c6c36d668b 100644
--- a/test/core/end2end/tests/filter_causes_close.c
+++ b/test/core/end2end/tests/filter_causes_close.c
@@ -233,11 +233,14 @@ static void start_transport_stream_op(grpc_exec_ctx *exec_ctx,
grpc_call_next_op(exec_ctx, elem, op);
}
-static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args) {}
+static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
+ return GRPC_ERROR_NONE;
+}
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_stats *stats,
+ const grpc_call_final_info *final_info,
void *and_free_memory) {}
static void init_channel_elem(grpc_exec_ctx *exec_ctx,
diff --git a/test/core/end2end/tests/load_reporting_hook.c b/test/core/end2end/tests/load_reporting_hook.c
new file mode 100644
index 0000000000..2c6519881a
--- /dev/null
+++ b/test/core/end2end/tests/load_reporting_hook.c
@@ -0,0 +1,321 @@
+/*
+ *
+ * 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/byte_buffer.h>
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
+#include <grpc/support/time.h>
+#include <grpc/support/useful.h>
+#include "test/core/end2end/cq_verifier.h"
+
+#include "src/core/ext/load_reporting/load_reporting.h"
+#include "src/core/ext/load_reporting/load_reporting_filter.h"
+#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/transport/static_metadata.h"
+
+enum { TIMEOUT = 200000 };
+
+static void *tag(intptr_t t) { return (void *)t; }
+
+typedef struct {
+ gpr_mu mu;
+ intptr_t channel_id;
+ intptr_t call_id;
+
+ char *initial_md_str;
+ char *trailing_md_str;
+ char *method_name;
+
+ uint64_t incoming_bytes;
+ uint64_t outgoing_bytes;
+
+ grpc_status_code call_final_status;
+
+ bool fully_processed;
+} load_reporting_data;
+
+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) {
+ 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);
+
+ return f;
+}
+
+static gpr_timespec n_seconds_time(int n) {
+ return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n);
+}
+
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
+
+static void drain_cq(grpc_completion_queue *cq) {
+ grpc_event ev;
+ do {
+ ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL);
+ } while (ev.type != GRPC_QUEUE_SHUTDOWN);
+}
+
+static void shutdown_server(grpc_end2end_test_fixture *f) {
+ if (!f->server) return;
+ grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
+ .type == GRPC_OP_COMPLETE);
+ grpc_server_destroy(f->server);
+ f->server = NULL;
+}
+
+static void shutdown_client(grpc_end2end_test_fixture *f) {
+ if (!f->client) return;
+ grpc_channel_destroy(f->client);
+ f->client = NULL;
+}
+
+static void end_test(grpc_end2end_test_fixture *f) {
+ shutdown_server(f);
+ shutdown_client(f);
+
+ grpc_completion_queue_shutdown(f->cq);
+ drain_cq(f->cq);
+ 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) {
+ 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;
+ grpc_call *s;
+ grpc_byte_buffer *request_payload =
+ grpc_raw_byte_buffer_create(&request_payload_slice, 1);
+ grpc_byte_buffer *response_payload =
+ grpc_raw_byte_buffer_create(&response_payload_slice, 1);
+ gpr_timespec deadline = five_seconds_time();
+ cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_op ops[6];
+ grpc_op *op;
+ grpc_metadata_array initial_metadata_recv;
+ grpc_metadata_array trailing_metadata_recv;
+ grpc_metadata_array request_metadata_recv;
+ grpc_byte_buffer *request_payload_recv = NULL;
+ grpc_byte_buffer *response_payload_recv = NULL;
+ grpc_call_details call_details;
+ grpc_status_code status;
+ grpc_call_error error;
+ char *details = NULL;
+ 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);
+ GPR_ASSERT(c);
+
+ grpc_metadata_array_init(&initial_metadata_recv);
+ grpc_metadata_array_init(&trailing_metadata_recv);
+ grpc_metadata_array_init(&request_metadata_recv);
+ grpc_call_details_init(&call_details);
+
+ memset(ops, 0, sizeof(ops));
+ op = ops;
+ op->op = GRPC_OP_SEND_INITIAL_METADATA;
+ GPR_ASSERT(initial_lr_metadata != NULL);
+ op->data.send_initial_metadata.count = 1;
+ op->data.send_initial_metadata.metadata = initial_lr_metadata;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_SEND_MESSAGE;
+ op->data.send_message = request_payload;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_INITIAL_METADATA;
+ op->data.recv_initial_metadata = &initial_metadata_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_MESSAGE;
+ op->data.recv_message = &response_payload_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
+ op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv;
+ op->data.recv_status_on_client.status = &status;
+ op->data.recv_status_on_client.status_details = &details;
+ op->data.recv_status_on_client.status_details_capacity = &details_capacity;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
+ GPR_ASSERT(GRPC_CALL_OK == error);
+ cq_expect_completion(cqv, tag(101), 1);
+ cq_verify(cqv);
+
+ memset(ops, 0, sizeof(ops));
+ op = ops;
+ op->op = GRPC_OP_SEND_INITIAL_METADATA;
+ op->data.send_initial_metadata.count = 0;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_MESSAGE;
+ op->data.recv_message = &request_payload_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ cq_expect_completion(cqv, tag(102), 1);
+ cq_verify(cqv);
+
+ memset(ops, 0, sizeof(ops));
+ op = ops;
+ op->op = GRPC_OP_RECV_CLOSE_ON_SERVER;
+ op->data.recv_close_on_server.cancelled = &was_cancelled;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_SEND_MESSAGE;
+ op->data.send_message = response_payload;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_SEND_STATUS_FROM_SERVER;
+ GPR_ASSERT(trailing_lr_metadata != NULL);
+ op->data.send_status_from_server.trailing_metadata_count = 1;
+ op->data.send_status_from_server.trailing_metadata = trailing_lr_metadata;
+ op->data.send_status_from_server.status = GRPC_STATUS_OK;
+ op->data.send_status_from_server.status_details = "xyz";
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ cq_expect_completion(cqv, tag(103), 1);
+ cq_expect_completion(cqv, tag(1), 1);
+ cq_verify(cqv);
+
+ GPR_ASSERT(status == GRPC_STATUS_OK);
+
+ gpr_free(details);
+ grpc_metadata_array_destroy(&initial_metadata_recv);
+ grpc_metadata_array_destroy(&trailing_metadata_recv);
+ grpc_metadata_array_destroy(&request_metadata_recv);
+ grpc_call_details_destroy(&call_details);
+
+ grpc_call_destroy(c);
+ grpc_call_destroy(s);
+
+ cq_verifier_destroy(cqv);
+
+ grpc_byte_buffer_destroy(request_payload);
+ grpc_byte_buffer_destroy(response_payload);
+ grpc_byte_buffer_destroy(request_payload_recv);
+ grpc_byte_buffer_destroy(response_payload_recv);
+}
+
+/* override the default for testing purposes */
+extern void (*g_load_reporting_fn)(
+ const grpc_load_reporting_call_data *call_data);
+
+static void test_load_reporting_hook(grpc_end2end_test_config config) {
+ /* TODO(dgq): this test is currently a noop until LR is fully defined.
+ * Leaving the rest here, as it'll likely be reusable. */
+
+ /* Introduce load reporting for the server through its arguments */
+ grpc_arg arg = grpc_load_reporting_enable_arg();
+ grpc_channel_args *lr_server_args =
+ grpc_channel_args_copy_and_add(NULL, &arg, 1);
+
+ grpc_end2end_test_fixture f =
+ begin_test(config, "test_load_reporting_hook", NULL, lr_server_args);
+
+ const char *method_name = "/gRPCFTW";
+ const char *request_msg = "the msg from the client";
+ const char *response_msg = "... and the response from the server";
+
+ grpc_metadata initial_lr_metadata;
+ grpc_metadata trailing_lr_metadata;
+
+ initial_lr_metadata.key = GRPC_LOAD_REPORTING_INITIAL_MD_KEY;
+ initial_lr_metadata.value = "client-token";
+ initial_lr_metadata.value_length = strlen(initial_lr_metadata.value);
+ memset(&initial_lr_metadata.internal_data, 0,
+ sizeof(initial_lr_metadata.internal_data));
+
+ trailing_lr_metadata.key = GRPC_LOAD_REPORTING_TRAILING_MD_KEY;
+ trailing_lr_metadata.value = "server-token";
+ trailing_lr_metadata.value_length = strlen(trailing_lr_metadata.value);
+ 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);
+ end_test(&f);
+ grpc_channel_args_destroy(lr_server_args);
+ config.tear_down_data(&f);
+}
+
+void load_reporting_hook(grpc_end2end_test_config config) {
+ test_load_reporting_hook(config);
+}
+
+void load_reporting_hook_pre_init(void) {}
diff --git a/test/core/json/json_test.c b/test/core/json/json_test.c
index ac1abbd8f3..7ea5caca5b 100644
--- a/test/core/json/json_test.c
+++ b/test/core/json/json_test.c
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/test/core/nanopb/fuzzer_response.c b/test/core/nanopb/fuzzer_response.c
index 21a5d7b968..75a99faf3f 100644
--- a/test/core/nanopb/fuzzer_response.c
+++ b/test/core/nanopb/fuzzer_response.c
@@ -43,9 +43,9 @@ bool leak_check = true;
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size);
- grpc_grpclb_response *response;
- if ((response = grpc_grpclb_response_parse(slice))) {
- grpc_grpclb_response_destroy(response);
+ grpc_grpclb_initial_response *response;
+ if ((response = grpc_grpclb_initial_response_parse(slice))) {
+ grpc_grpclb_initial_response_destroy(response);
}
gpr_slice_unref(slice);
return 0;
diff --git a/test/core/transport/chttp2/timeout_encoding_test.c b/test/core/transport/timeout_encoding_test.c
index 67639936a7..b6004af7b4 100644
--- a/test/core/transport/chttp2/timeout_encoding_test.c
+++ b/test/core/transport/timeout_encoding_test.c
@@ -31,7 +31,7 @@
*
*/
-#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h"
+#include "src/core/lib/transport/timeout_encoding.h"
#include <stdio.h>
#include <string.h>
@@ -46,8 +46,8 @@
#define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x)
static void assert_encodes_as(gpr_timespec ts, const char *s) {
- char buffer[GRPC_CHTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE];
- grpc_chttp2_encode_timeout(ts, buffer);
+ char buffer[GRPC_HTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE];
+ grpc_http2_encode_timeout(ts, buffer);
gpr_log(GPR_INFO, "check '%s' == '%s'", buffer, s);
GPR_ASSERT(0 == strcmp(buffer, s));
}
@@ -88,7 +88,7 @@ void test_encoding(void) {
static void assert_decodes_as(const char *buffer, gpr_timespec expected) {
gpr_timespec got;
gpr_log(GPR_INFO, "check decoding '%s'", buffer);
- GPR_ASSERT(1 == grpc_chttp2_decode_timeout(buffer, &got));
+ GPR_ASSERT(1 == grpc_http2_decode_timeout(buffer, &got));
GPR_ASSERT(0 == gpr_time_cmp(got, expected));
}
@@ -137,15 +137,15 @@ void test_decoding(void) {
void test_decoding_fails(void) {
gpr_timespec x;
LOG_TEST("test_decoding_fails");
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout(" ", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("x", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("1", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("1x", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("1ux", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("!", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("n1", &x));
- GPR_ASSERT(0 == grpc_chttp2_decode_timeout("-1u", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout(" ", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("x", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("1", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("1x", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("1ux", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("!", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("n1", &x));
+ GPR_ASSERT(0 == grpc_http2_decode_timeout("-1u", &x));
}
int main(int argc, char **argv) {
diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc
index 778a2be573..b967a5d1e9 100644
--- a/test/cpp/end2end/server_builder_plugin_test.cc
+++ b/test/cpp/end2end/server_builder_plugin_test.cc
@@ -191,7 +191,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_ = grpc::thread(std::bind(&ServerBuilderPluginTest::RunCQ, this));
+ cq_thread_ = new grpc::thread(&ServerBuilderPluginTest::RunCQ, this);
server_ = builder_->BuildAndStart();
EXPECT_TRUE(CheckPresent());
}
@@ -209,7 +209,8 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
EXPECT_TRUE(plugin->finish_is_called());
server_->Shutdown();
cq_->Shutdown();
- cq_thread_.join();
+ cq_thread_->join();
+ delete cq_thread_;
}
string to_string(const int number) {
@@ -224,7 +225,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_;
+ grpc::thread* cq_thread_;
TestServiceImpl service_;
int port_;
diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc
index bf77878e0a..33de1ee93c 100644
--- a/test/cpp/grpclb/grpclb_api_test.cc
+++ b/test/cpp/grpclb/grpclb_api_test.cc
@@ -58,26 +58,24 @@ TEST_F(GrpclbTest, CreateRequest) {
grpc_grpclb_request_destroy(c_req);
}
-TEST_F(GrpclbTest, ParseResponse) {
+TEST_F(GrpclbTest, ParseInitialResponse) {
LoadBalanceResponse response;
auto* initial_response = response.mutable_initial_response();
auto* client_stats_report_interval =
initial_response->mutable_client_stats_report_interval();
client_stats_report_interval->set_seconds(123);
client_stats_report_interval->set_nanos(456);
-
const std::string encoded_response = response.SerializeAsString();
gpr_slice encoded_slice =
gpr_slice_from_copied_string(encoded_response.c_str());
- grpc_grpclb_response* c_response = grpc_grpclb_response_parse(encoded_slice);
- EXPECT_TRUE(c_response->has_initial_response);
- EXPECT_FALSE(c_response->initial_response.has_load_balancer_delegate);
- EXPECT_EQ(c_response->initial_response.client_stats_report_interval.seconds,
- 123);
- EXPECT_EQ(c_response->initial_response.client_stats_report_interval.nanos,
- 456);
+
+ grpc_grpclb_initial_response* c_initial_response =
+ grpc_grpclb_initial_response_parse(encoded_slice);
+ EXPECT_FALSE(c_initial_response->has_load_balancer_delegate);
+ EXPECT_EQ(c_initial_response->client_stats_report_interval.seconds, 123);
+ EXPECT_EQ(c_initial_response->client_stats_report_interval.nanos, 456);
gpr_slice_unref(encoded_slice);
- grpc_grpclb_response_destroy(c_response);
+ grpc_grpclb_initial_response_destroy(c_initial_response);
}
TEST_F(GrpclbTest, ParseResponseServerList) {
diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc
new file mode 100644
index 0000000000..b2fdce2963
--- /dev/null
+++ b/test/cpp/grpclb/grpclb_test.cc
@@ -0,0 +1,689 @@
+/*
+ *
+ * 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 <cinttypes>
+#include <cstdarg>
+#include <cstdint>
+#include <cstring>
+#include <string>
+
+extern "C" {
+#include <grpc/grpc.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/time.h>
+
+#include "src/core/ext/client_config/client_channel.h"
+#include "src/core/lib/channel/channel_stack.h"
+#include "src/core/lib/support/string.h"
+#include "src/core/lib/support/tmpfile.h"
+#include "src/core/lib/surface/channel.h"
+#include "src/core/lib/surface/server.h"
+#include "test/core/end2end/cq_verifier.h"
+#include "test/core/util/port.h"
+#include "test/core/util/test_config.h"
+}
+
+#include "src/proto/grpc/lb/v1/load_balancer.pb.h"
+
+#define NUM_BACKENDS 4
+
+// TODO(dgq): Other scenarios in need of testing:
+// - Send an empty serverlist update and verify that the client request blocks
+// until a new serverlist with actual contents is available.
+// - Send identical serverlist update
+// - Test reception of invalid serverlist
+// - Test pinging
+// - Test against a non-LB server. That server should return UNIMPLEMENTED and
+// the call should fail.
+// - Random LB server closing the stream unexpectedly.
+
+namespace grpc {
+namespace {
+
+typedef struct client_fixture {
+ grpc_channel *client;
+ char *server_uri;
+ grpc_completion_queue *cq;
+} client_fixture;
+
+typedef struct server_fixture {
+ grpc_server *server;
+ grpc_call *server_call;
+ grpc_completion_queue *cq;
+ char *servers_hostport;
+ int port;
+ gpr_thd_id tid;
+ int num_calls_serviced;
+} server_fixture;
+
+typedef struct test_fixture {
+ server_fixture lb_server;
+ server_fixture lb_backends[NUM_BACKENDS];
+ client_fixture client;
+ int lb_server_update_delay_ms;
+} test_fixture;
+
+static void *tag(intptr_t t) { return (void *)t; }
+
+static gpr_slice build_response_payload_slice(
+ const char *host, int *ports, size_t nports,
+ int64_t expiration_interval_secs, int32_t expiration_interval_nanos) {
+ // server_list {
+ // servers {
+ // ip_address: "127.0.0.1"
+ // port: ...
+ // load_balance_token: "token..."
+ // }
+ // ...
+ // }
+ grpc::lb::v1::LoadBalanceResponse response;
+ auto *serverlist = response.mutable_server_list();
+
+ if (expiration_interval_secs > 0 || expiration_interval_nanos > 0) {
+ auto *expiration_interval = serverlist->mutable_expiration_interval();
+ if (expiration_interval_secs > 0) {
+ expiration_interval->set_seconds(expiration_interval_secs);
+ }
+ if (expiration_interval_nanos > 0) {
+ expiration_interval->set_nanos(expiration_interval_nanos);
+ }
+ }
+ for (size_t i = 0; i < nports; i++) {
+ auto *server = serverlist->add_servers();
+ server->set_ip_address(host);
+ server->set_port(ports[i]);
+ // The following long long int cast is meant to work around the
+ // 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.
+ server->set_load_balance_token("token" +
+ std::to_string((long long int)ports[i]));
+ }
+
+ gpr_log(GPR_INFO, "generating response: %s",
+ response.ShortDebugString().c_str());
+
+ const gpr_slice response_slice =
+ gpr_slice_from_copied_string(response.SerializeAsString().c_str());
+ return response_slice;
+}
+
+static void drain_cq(grpc_completion_queue *cq) {
+ grpc_event ev;
+ do {
+ ev = grpc_completion_queue_next(cq, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
+ NULL);
+ } while (ev.type != GRPC_QUEUE_SHUTDOWN);
+}
+
+static void sleep_ms(int delay_ms) {
+ gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
+ gpr_time_from_millis(delay_ms, GPR_TIMESPAN)));
+}
+
+static void start_lb_server(server_fixture *sf, int *ports, size_t nports,
+ int update_delay_ms) {
+ grpc_call *s;
+ cq_verifier *cqv = cq_verifier_create(sf->cq);
+ grpc_op ops[6];
+ grpc_op *op;
+ grpc_metadata_array request_metadata_recv;
+ grpc_call_details call_details;
+ grpc_call_error error;
+ int was_cancelled = 2;
+ grpc_byte_buffer *request_payload_recv;
+ grpc_byte_buffer *response_payload;
+
+ memset(ops, 0, sizeof(ops));
+ grpc_metadata_array_init(&request_metadata_recv);
+ grpc_call_details_init(&call_details);
+
+ error = grpc_server_request_call(sf->server, &s, &call_details,
+ &request_metadata_recv, sf->cq, sf->cq,
+ tag(200));
+ GPR_ASSERT(GRPC_CALL_OK == error);
+ gpr_log(GPR_INFO, "LB Server[%s] up", sf->servers_hostport);
+ cq_expect_completion(cqv, tag(200), 1);
+ cq_verify(cqv);
+ gpr_log(GPR_INFO, "LB Server[%s] after tag 200", sf->servers_hostport);
+
+ op = ops;
+ op->op = GRPC_OP_SEND_INITIAL_METADATA;
+ op->data.send_initial_metadata.count = 0;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_CLOSE_ON_SERVER;
+ op->data.recv_close_on_server.cancelled = &was_cancelled;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(201), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+ gpr_log(GPR_INFO, "LB Server[%s] after tag 201", sf->servers_hostport);
+
+ // receive request for backends
+ op = ops;
+ op->op = GRPC_OP_RECV_MESSAGE;
+ op->data.recv_message = &request_payload_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(202), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+ cq_expect_completion(cqv, tag(202), 1);
+ cq_verify(cqv);
+ gpr_log(GPR_INFO, "LB Server[%s] after RECV_MSG", sf->servers_hostport);
+ // TODO(dgq): validate request.
+ grpc_byte_buffer_destroy(request_payload_recv);
+ gpr_slice response_payload_slice;
+ for (int i = 0; i < 2; i++) {
+ if (i == 0) {
+ // First half of the ports.
+ response_payload_slice =
+ build_response_payload_slice("127.0.0.1", ports, nports / 2, -1, -1);
+ } else {
+ // Second half of the ports.
+ sleep_ms(update_delay_ms);
+ response_payload_slice =
+ build_response_payload_slice("127.0.0.1", ports + (nports / 2),
+ (nports + 1) / 2 /* ceil */, -1, -1);
+ }
+
+ response_payload = grpc_raw_byte_buffer_create(&response_payload_slice, 1);
+ op = ops;
+ op->op = GRPC_OP_SEND_MESSAGE;
+ op->data.send_message = response_payload;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(203), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+ cq_expect_completion(cqv, tag(203), 1);
+ cq_verify(cqv);
+ gpr_log(GPR_INFO, "LB Server[%s] after SEND_MESSAGE, iter %d",
+ sf->servers_hostport, i);
+
+ grpc_byte_buffer_destroy(response_payload);
+ gpr_slice_unref(response_payload_slice);
+ }
+ gpr_log(GPR_INFO, "LB Server[%s] shutting down", sf->servers_hostport);
+
+ op = ops;
+ op->op = GRPC_OP_SEND_STATUS_FROM_SERVER;
+ op->data.send_status_from_server.trailing_metadata_count = 0;
+ op->data.send_status_from_server.status = GRPC_STATUS_OK;
+ op->data.send_status_from_server.status_details = "xyz";
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(204), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ cq_expect_completion(cqv, tag(201), 1);
+ cq_expect_completion(cqv, tag(204), 1);
+ cq_verify(cqv);
+ gpr_log(GPR_INFO, "LB Server[%s] after tag 204. All done. LB server out",
+ sf->servers_hostport);
+
+ grpc_call_destroy(s);
+
+ cq_verifier_destroy(cqv);
+
+ grpc_metadata_array_destroy(&request_metadata_recv);
+ grpc_call_details_destroy(&call_details);
+}
+
+static void start_backend_server(server_fixture *sf) {
+ grpc_call *s;
+ cq_verifier *cqv;
+ grpc_op ops[6];
+ grpc_op *op;
+ grpc_metadata_array request_metadata_recv;
+ grpc_call_details call_details;
+ grpc_call_error error;
+ int was_cancelled;
+ grpc_byte_buffer *request_payload_recv;
+ grpc_byte_buffer *response_payload;
+ grpc_event ev;
+
+ while (true) {
+ memset(ops, 0, sizeof(ops));
+ cqv = cq_verifier_create(sf->cq);
+ was_cancelled = 2;
+ grpc_metadata_array_init(&request_metadata_recv);
+ grpc_call_details_init(&call_details);
+
+ error = grpc_server_request_call(sf->server, &s, &call_details,
+ &request_metadata_recv, sf->cq, sf->cq,
+ tag(100));
+ GPR_ASSERT(GRPC_CALL_OK == error);
+ gpr_log(GPR_INFO, "Server[%s] up", sf->servers_hostport);
+ ev = grpc_completion_queue_next(sf->cq,
+ GRPC_TIMEOUT_SECONDS_TO_DEADLINE(60), NULL);
+ if (!ev.success) {
+ gpr_log(GPR_INFO, "Server[%s] being torn down", sf->servers_hostport);
+ cq_verifier_destroy(cqv);
+ grpc_metadata_array_destroy(&request_metadata_recv);
+ grpc_call_details_destroy(&call_details);
+ return;
+ }
+ GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
+ gpr_log(GPR_INFO, "Server[%s] after tag 100", sf->servers_hostport);
+
+ op = ops;
+ op->op = GRPC_OP_SEND_INITIAL_METADATA;
+ op->data.send_initial_metadata.count = 0;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_CLOSE_ON_SERVER;
+ op->data.recv_close_on_server.cancelled = &was_cancelled;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(101), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+ gpr_log(GPR_INFO, "Server[%s] after tag 101", sf->servers_hostport);
+
+ bool exit = false;
+ gpr_slice response_payload_slice =
+ gpr_slice_from_copied_string("hello you");
+ while (!exit) {
+ op = ops;
+ op->op = GRPC_OP_RECV_MESSAGE;
+ op->data.recv_message = &request_payload_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+ ev = grpc_completion_queue_next(
+ sf->cq, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), NULL);
+ if (ev.type == GRPC_OP_COMPLETE && ev.success) {
+ GPR_ASSERT(ev.tag = tag(102));
+ if (request_payload_recv == NULL) {
+ exit = true;
+ gpr_log(GPR_INFO,
+ "Server[%s] recv \"close\" from client, exiting. Call #%d",
+ sf->servers_hostport, sf->num_calls_serviced);
+ }
+ } else {
+ gpr_log(GPR_INFO, "Server[%s] forced to shutdown. Call #%d",
+ sf->servers_hostport, sf->num_calls_serviced);
+ exit = true;
+ }
+ gpr_log(GPR_INFO, "Server[%s] after tag 102. Call #%d",
+ sf->servers_hostport, sf->num_calls_serviced);
+
+ if (!exit) {
+ response_payload =
+ grpc_raw_byte_buffer_create(&response_payload_slice, 1);
+ op = ops;
+ op->op = GRPC_OP_SEND_MESSAGE;
+ op->data.send_message = response_payload;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+ ev = grpc_completion_queue_next(
+ sf->cq, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), NULL);
+ if (ev.type == GRPC_OP_COMPLETE && ev.success) {
+ GPR_ASSERT(ev.tag = tag(103));
+ } else {
+ gpr_log(GPR_INFO, "Server[%s] forced to shutdown. Call #%d",
+ sf->servers_hostport, sf->num_calls_serviced);
+ exit = true;
+ }
+ gpr_log(GPR_INFO, "Server[%s] after tag 103. Call #%d",
+ sf->servers_hostport, sf->num_calls_serviced);
+ grpc_byte_buffer_destroy(response_payload);
+ }
+
+ grpc_byte_buffer_destroy(request_payload_recv);
+ }
+ ++sf->num_calls_serviced;
+
+ gpr_log(GPR_INFO, "Server[%s] OUT OF THE LOOP", sf->servers_hostport);
+ gpr_slice_unref(response_payload_slice);
+
+ op = ops;
+ op->op = GRPC_OP_SEND_STATUS_FROM_SERVER;
+ op->data.send_status_from_server.trailing_metadata_count = 0;
+ op->data.send_status_from_server.status = GRPC_STATUS_OK;
+ op->data.send_status_from_server.status_details = "Backend server out a-ok";
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ cq_expect_completion(cqv, tag(101), 1);
+ cq_expect_completion(cqv, tag(104), 1);
+ cq_verify(cqv);
+ gpr_log(GPR_INFO, "Server[%s] DONE. After servicing %d calls",
+ sf->servers_hostport, sf->num_calls_serviced);
+
+ grpc_call_destroy(s);
+ cq_verifier_destroy(cqv);
+ grpc_metadata_array_destroy(&request_metadata_recv);
+ grpc_call_details_destroy(&call_details);
+ }
+}
+
+static void perform_request(client_fixture *cf) {
+ grpc_call *c;
+ cq_verifier *cqv = cq_verifier_create(cf->cq);
+ grpc_op ops[6];
+ grpc_op *op;
+ grpc_metadata_array initial_metadata_recv;
+ grpc_metadata_array trailing_metadata_recv;
+ grpc_status_code status;
+ grpc_call_error error;
+ char *details = NULL;
+ size_t details_capacity = 0;
+ grpc_byte_buffer *request_payload;
+ grpc_byte_buffer *response_payload_recv;
+ int i;
+
+ memset(ops, 0, sizeof(ops));
+ gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world");
+
+ c = grpc_channel_create_call(cf->client, NULL, GRPC_PROPAGATE_DEFAULTS,
+ cf->cq, "/foo", "foo.test.google.fr:1234",
+ GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1000), NULL);
+ gpr_log(GPR_INFO, "Call 0x%" PRIxPTR " created", (intptr_t)c);
+ GPR_ASSERT(c);
+ char *peer;
+
+ grpc_metadata_array_init(&initial_metadata_recv);
+ grpc_metadata_array_init(&trailing_metadata_recv);
+
+ op = ops;
+ op->op = GRPC_OP_SEND_INITIAL_METADATA;
+ op->data.send_initial_metadata.count = 0;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_INITIAL_METADATA;
+ op->data.recv_initial_metadata = &initial_metadata_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
+ op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv;
+ op->data.recv_status_on_client.status = &status;
+ op->data.recv_status_on_client.status_details = &details;
+ op->data.recv_status_on_client.status_details_capacity = &details_capacity;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ for (i = 0; i < 4; i++) {
+ request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1);
+
+ op = ops;
+ op->op = GRPC_OP_SEND_MESSAGE;
+ op->data.send_message = request_payload;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_MESSAGE;
+ op->data.recv_message = &response_payload_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ peer = grpc_call_get_peer(c);
+ cq_expect_completion(cqv, tag(2), 1);
+ cq_verify(cqv);
+ gpr_free(peer);
+
+ grpc_byte_buffer_destroy(request_payload);
+ grpc_byte_buffer_destroy(response_payload_recv);
+ }
+
+ gpr_slice_unref(request_payload_slice);
+
+ op = ops;
+ op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(3), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ cq_expect_completion(cqv, tag(1), 1);
+ cq_expect_completion(cqv, tag(3), 1);
+ cq_verify(cqv);
+ peer = grpc_call_get_peer(c);
+ gpr_log(GPR_INFO, "Client DONE WITH SERVER %s ", peer);
+ gpr_free(peer);
+
+ grpc_call_destroy(c);
+
+ cq_verify_empty_timeout(cqv, 1);
+ cq_verifier_destroy(cqv);
+
+ grpc_metadata_array_destroy(&initial_metadata_recv);
+ grpc_metadata_array_destroy(&trailing_metadata_recv);
+ gpr_free(details);
+}
+
+static void setup_client(const char *server_hostport, client_fixture *cf) {
+ cf->cq = grpc_completion_queue_create(NULL);
+ cf->server_uri = gpr_strdup(server_hostport);
+ cf->client = grpc_insecure_channel_create(cf->server_uri, NULL, NULL);
+}
+
+static void teardown_client(client_fixture *cf) {
+ grpc_completion_queue_shutdown(cf->cq);
+ drain_cq(cf->cq);
+ grpc_completion_queue_destroy(cf->cq);
+ cf->cq = NULL;
+ grpc_channel_destroy(cf->client);
+ cf->client = NULL;
+ gpr_free(cf->server_uri);
+}
+
+static void setup_server(const char *host, server_fixture *sf) {
+ int assigned_port;
+
+ sf->cq = grpc_completion_queue_create(NULL);
+ const char *colon_idx = strchr(host, ':');
+ if (colon_idx) {
+ const char *port_str = colon_idx + 1;
+ sf->port = atoi(port_str);
+ sf->servers_hostport = gpr_strdup(host);
+ } else {
+ sf->port = grpc_pick_unused_port_or_die();
+ gpr_join_host_port(&sf->servers_hostport, host, sf->port);
+ }
+
+ sf->server = grpc_server_create(NULL, NULL);
+ grpc_server_register_completion_queue(sf->server, sf->cq, NULL);
+ GPR_ASSERT((assigned_port = grpc_server_add_insecure_http2_port(
+ sf->server, sf->servers_hostport)) > 0);
+ GPR_ASSERT(sf->port == assigned_port);
+ grpc_server_start(sf->server);
+}
+
+static void teardown_server(server_fixture *sf) {
+ if (!sf->server) return;
+
+ gpr_log(GPR_INFO, "Server[%s] shutting down", sf->servers_hostport);
+ grpc_server_shutdown_and_notify(sf->server, sf->cq, tag(1000));
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ sf->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
+ .type == GRPC_OP_COMPLETE);
+ grpc_server_destroy(sf->server);
+ gpr_thd_join(sf->tid);
+
+ sf->server = NULL;
+ grpc_completion_queue_shutdown(sf->cq);
+ drain_cq(sf->cq);
+ grpc_completion_queue_destroy(sf->cq);
+
+ gpr_log(GPR_INFO, "Server[%s] bye bye", sf->servers_hostport);
+ gpr_free(sf->servers_hostport);
+}
+
+static void fork_backend_server(void *arg) {
+ server_fixture *sf = static_cast<server_fixture *>(arg);
+ start_backend_server(sf);
+}
+
+static void fork_lb_server(void *arg) {
+ test_fixture *tf = static_cast<test_fixture *>(arg);
+ int ports[NUM_BACKENDS];
+ for (int i = 0; i < NUM_BACKENDS; i++) {
+ ports[i] = tf->lb_backends[i].port;
+ }
+ start_lb_server(&tf->lb_server, ports, NUM_BACKENDS,
+ tf->lb_server_update_delay_ms);
+}
+
+static void setup_test_fixture(test_fixture *tf,
+ int lb_server_update_delay_ms) {
+ tf->lb_server_update_delay_ms = lb_server_update_delay_ms;
+
+ gpr_thd_options options = gpr_thd_options_default();
+ gpr_thd_options_set_joinable(&options);
+
+ for (int i = 0; i < NUM_BACKENDS; ++i) {
+ setup_server("127.0.0.1", &tf->lb_backends[i]);
+ gpr_thd_new(&tf->lb_backends[i].tid, fork_backend_server,
+ &tf->lb_backends[i], &options);
+ }
+
+ setup_server("127.0.0.1", &tf->lb_server);
+ gpr_thd_new(&tf->lb_server.tid, fork_lb_server, &tf->lb_server, &options);
+
+ char *server_uri;
+ gpr_asprintf(&server_uri, "ipv4:%s?lb_policy=grpclb&lb_enabled=1",
+ tf->lb_server.servers_hostport);
+ setup_client(server_uri, &tf->client);
+ gpr_free(server_uri);
+}
+
+static void teardown_test_fixture(test_fixture *tf) {
+ teardown_client(&tf->client);
+ for (int i = 0; i < NUM_BACKENDS; ++i) {
+ teardown_server(&tf->lb_backends[i]);
+ }
+ teardown_server(&tf->lb_server);
+}
+
+// The LB server will send two updates: batch 1 and batch 2. Each batch
+// contains
+// two addresses, both of a valid and running backend server. Batch 1 is
+// readily
+// available and provided as soon as the client establishes the streaming
+// call.
+// Batch 2 is sent after a delay of \a lb_server_update_delay_ms
+// milliseconds.
+static test_fixture test_update(int lb_server_update_delay_ms) {
+ gpr_log(GPR_INFO, "start %s(%d)", __func__, lb_server_update_delay_ms);
+ test_fixture tf;
+ memset(&tf, 0, sizeof(tf));
+ setup_test_fixture(&tf, lb_server_update_delay_ms);
+ perform_request(
+ &tf.client); // "consumes" 1st backend server of 1st serverlist
+ perform_request(
+ &tf.client); // "consumes" 2nd backend server of 1st serverlist
+
+ perform_request(
+ &tf.client); // "consumes" 1st backend server of 2nd serverlist
+ perform_request(
+ &tf.client); // "consumes" 2nd backend server of 2nd serverlist
+
+ teardown_test_fixture(&tf);
+ gpr_log(GPR_INFO, "end %s(%d)", __func__, lb_server_update_delay_ms);
+ return tf;
+}
+
+} // namespace
+} // namespace grpc
+
+int main(int argc, char **argv) {
+ grpc_test_init(argc, argv);
+ grpc_init();
+
+ grpc::test_fixture tf_result;
+ // Clients take a bit over one second to complete a call (the last part of the
+ // call sleeps for 1 second while verifying the client's completion queue is
+ // empty). Therefore:
+ //
+ // If the LB server waits 800ms before sending an update, it will arrive
+ // before the first client request is done, skipping the second server from
+ // batch 1 altogether: the 2nd client request will go to the 1st server of
+ // batch 2 (ie, the third one out of the four total servers).
+ tf_result = grpc::test_update(800);
+ GPR_ASSERT(tf_result.lb_backends[0].num_calls_serviced == 1);
+ GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced == 0);
+ GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced == 2);
+ GPR_ASSERT(tf_result.lb_backends[3].num_calls_serviced == 1);
+
+ // If the LB server waits 1500ms, the update arrives after having picked the
+ // 2nd server from batch 1 but before the next pick for the first server of
+ // batch 2. All server are used.
+ tf_result = grpc::test_update(1500);
+ GPR_ASSERT(tf_result.lb_backends[0].num_calls_serviced == 1);
+ GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced == 1);
+ GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced == 1);
+ GPR_ASSERT(tf_result.lb_backends[3].num_calls_serviced == 1);
+
+ // If the LB server waits > 2000ms, the update arrives after the first two
+ // request are done and the third pick is performed, which returns, in RR
+ // fashion, the 1st server of the 1st update. Therefore, the second server of
+ // batch 1 is hit at least one, whereas the first server of batch 2 is never
+ // hit.
+ tf_result = grpc::test_update(2500);
+ GPR_ASSERT(tf_result.lb_backends[0].num_calls_serviced >= 1);
+ GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced > 0);
+ GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced > 0);
+ GPR_ASSERT(tf_result.lb_backends[3].num_calls_serviced == 0);
+
+ grpc_shutdown();
+ return 0;
+}
diff --git a/test/cpp/interop/interop_server.cc b/test/cpp/interop/interop_server.cc
index ebef0002a3..e5878bb248 100644
--- a/test/cpp/interop/interop_server.cc
+++ b/test/cpp/interop/interop_server.cc
@@ -31,7 +31,6 @@
*
*/
-#include <signal.h>
#include <unistd.h>
#include <fstream>
@@ -78,8 +77,6 @@ using grpc::testing::StreamingOutputCallResponse;
using grpc::testing::TestService;
using grpc::Status;
-static bool got_sigint = false;
-
const char kEchoInitialMetadataKey[] = "x-grpc-test-echo-initial";
const char kEchoTrailingBinMetadataKey[] = "x-grpc-test-echo-trailing-bin";
const char kEchoUserAgentKey[] = "x-grpc-test-echo-useragent";
@@ -311,7 +308,9 @@ class TestServiceImpl : public TestService::Service {
}
};
-void RunServer() {
+void grpc::testing::interop::RunServer(
+ std::shared_ptr<ServerCredentials> creds) {
+ GPR_ASSERT(FLAGS_port != 0);
std::ostringstream server_address;
server_address << "0.0.0.0:" << FLAGS_port;
TestServiceImpl service;
@@ -321,24 +320,10 @@ void RunServer() {
ServerBuilder builder;
builder.RegisterService(&service);
- std::shared_ptr<ServerCredentials> creds =
- grpc::testing::CreateInteropServerCredentials();
builder.AddListeningPort(server_address.str(), creds);
std::unique_ptr<Server> server(builder.BuildAndStart());
gpr_log(GPR_INFO, "Server listening on %s", server_address.str().c_str());
- while (!got_sigint) {
+ while (!g_got_sigint) {
sleep(5);
}
}
-
-static void sigint_handler(int x) { got_sigint = true; }
-
-int main(int argc, char** argv) {
- grpc::testing::InitTest(&argc, &argv, true);
- signal(SIGINT, sigint_handler);
-
- GPR_ASSERT(FLAGS_port != 0);
- RunServer();
-
- return 0;
-}
diff --git a/test/cpp/interop/interop_server_bootstrap.cc b/test/cpp/interop/interop_server_bootstrap.cc
new file mode 100644
index 0000000000..424f7ca7f0
--- /dev/null
+++ b/test/cpp/interop/interop_server_bootstrap.cc
@@ -0,0 +1,54 @@
+/*
+ *
+ * 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 <signal.h>
+#include <unistd.h>
+
+#include "test/cpp/interop/server_helper.h"
+#include "test/cpp/util/test_config.h"
+
+bool grpc::testing::interop::g_got_sigint = false;
+
+static void sigint_handler(int x) {
+ grpc::testing::interop::g_got_sigint = true;
+}
+
+int main(int argc, char** argv) {
+ grpc::testing::InitTest(&argc, &argv, true);
+ signal(SIGINT, sigint_handler);
+
+ grpc::testing::interop::RunServer(
+ grpc::testing::CreateInteropServerCredentials());
+
+ return 0;
+}
diff --git a/test/cpp/interop/server_helper.h b/test/cpp/interop/server_helper.h
index a1da14a4c8..fc4ea8b3e8 100644
--- a/test/cpp/interop/server_helper.h
+++ b/test/cpp/interop/server_helper.h
@@ -60,6 +60,12 @@ class InteropServerContextInspector {
const ::grpc::ServerContext& context_;
};
+namespace interop {
+
+extern bool g_got_sigint;
+void RunServer(std::shared_ptr<ServerCredentials> creds);
+
+} // namespace interop
} // namespace testing
} // namespace grpc
diff --git a/test/cpp/qps/limit_cores.cc b/test/cpp/qps/limit_cores.cc
index 59ed369067..b5c222542b 100644
--- a/test/cpp/qps/limit_cores.cc
+++ b/test/cpp/qps/limit_cores.cc
@@ -68,9 +68,9 @@ int LimitCores(const int* cores, int cores_size) {
cores_set++;
}
}
- GPR_ASSERT(sched_setaffinity(0, size, cpup) == 0);
+ bool affinity_set = (sched_setaffinity(0, size, cpup) == 0);
CPU_FREE(cpup);
- return cores_set;
+ return affinity_set ? cores_set : num_cores;
}
} // namespace testing
diff --git a/tools/cmake/gRPCConfig.cmake.in b/tools/cmake/gRPCConfig.cmake.in
new file mode 100644
index 0000000000..48f0674579
--- /dev/null
+++ b/tools/cmake/gRPCConfig.cmake.in
@@ -0,0 +1,7 @@
+# Depend packages
+@_gRPC_FIND_ZLIB@
+@_gRPC_FIND_PROTOBUF@
+@_gRPC_FIND_SSL@
+
+# Targets
+include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake)
diff --git a/tools/cmake/gRPCConfigVersion.cmake.in b/tools/cmake/gRPCConfigVersion.cmake.in
new file mode 100644
index 0000000000..f3c19fd403
--- /dev/null
+++ b/tools/cmake/gRPCConfigVersion.cmake.in
@@ -0,0 +1,11 @@
+set(PACKAGE_VERSION "@PACKAGE_VERSION@")
+
+# Check whether the requested PACKAGE_FIND_VERSION is compatible
+if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else()
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
+ if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
+ set(PACKAGE_VERSION_EXACT TRUE)
+ endif()
+endif()
diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py
index faa83867a6..859adcbeb1 100755
--- a/tools/codegen/core/gen_static_metadata.py
+++ b/tools/codegen/core/gen_static_metadata.py
@@ -50,8 +50,8 @@ CONFIG = [
'host',
'grpc-message',
'grpc-status',
- 'census-bin',
- 'census-binary-bin',
+ 'grpc-tracing-bin',
+ 'grpc-census-bin',
'',
('grpc-status', '0'),
('grpc-status', '1'),
@@ -108,7 +108,8 @@ CONFIG = [
('if-range', ''),
('if-unmodified-since', ''),
('last-modified', ''),
- ('load-reporting', ''),
+ ('load-reporting-initial', ''),
+ ('load-reporting-trailing', ''),
('link', ''),
('location', ''),
('max-forwards', ''),
diff --git a/tools/distrib/check_include_guards.py b/tools/distrib/check_include_guards.py
index 56b2924a1a..28312813f6 100755
--- a/tools/distrib/check_include_guards.py
+++ b/tools/distrib/check_include_guards.py
@@ -200,6 +200,6 @@ validator = GuardValidator()
for filename in filename_list:
if filename in KNOWN_BAD: continue
- ok = validator.check(filename, args.fix)
+ ok = ok and validator.check(filename, args.fix)
sys.exit(0 if ok else 1)
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index 66575fc0c2..f11694aa6a 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -867,6 +867,7 @@ src/core/lib/transport/connectivity_state.h \
src/core/lib/transport/metadata.h \
src/core/lib/transport/metadata_batch.h \
src/core/lib/transport/static_metadata.h \
+src/core/lib/transport/timeout_encoding.h \
src/core/lib/transport/transport.h \
src/core/lib/transport/transport_impl.h \
src/core/ext/transport/chttp2/transport/bin_decoder.h \
@@ -888,7 +889,6 @@ src/core/ext/transport/chttp2/transport/incoming_metadata.h \
src/core/ext/transport/chttp2/transport/internal.h \
src/core/ext/transport/chttp2/transport/status_conversion.h \
src/core/ext/transport/chttp2/transport/stream_map.h \
-src/core/ext/transport/chttp2/transport/timeout_encoding.h \
src/core/ext/transport/chttp2/transport/varint.h \
src/core/ext/transport/chttp2/alpn/alpn.h \
src/core/lib/security/context/security_context.h \
@@ -931,6 +931,7 @@ src/core/ext/client_config/subchannel.h \
src/core/ext/client_config/subchannel_call_holder.h \
src/core/ext/client_config/subchannel_index.h \
src/core/ext/client_config/uri_parser.h \
+src/core/ext/lb_policy/grpclb/grpclb.h \
src/core/ext/lb_policy/grpclb/load_balancer_api.h \
src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h \
third_party/nanopb/pb.h \
@@ -941,11 +942,13 @@ src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h \
src/core/ext/load_reporting/load_reporting.h \
src/core/ext/load_reporting/load_reporting_filter.h \
src/core/ext/census/aggregation.h \
+src/core/ext/census/base_resources.h \
src/core/ext/census/census_interface.h \
src/core/ext/census/census_rpc_stats.h \
src/core/ext/census/gen/census.pb.h \
src/core/ext/census/grpc_filter.h \
src/core/ext/census/mlog.h \
+src/core/ext/census/resource.h \
src/core/ext/census/rpc_metric_id.h \
src/core/lib/surface/init.c \
src/core/lib/channel/channel_args.c \
@@ -1034,6 +1037,7 @@ src/core/lib/transport/connectivity_state.c \
src/core/lib/transport/metadata.c \
src/core/lib/transport/metadata_batch.c \
src/core/lib/transport/static_metadata.c \
+src/core/lib/transport/timeout_encoding.c \
src/core/lib/transport/transport.c \
src/core/lib/transport/transport_op_string.c \
src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c \
@@ -1056,7 +1060,6 @@ src/core/ext/transport/chttp2/transport/parsing.c \
src/core/ext/transport/chttp2/transport/status_conversion.c \
src/core/ext/transport/chttp2/transport/stream_lists.c \
src/core/ext/transport/chttp2/transport/stream_map.c \
-src/core/ext/transport/chttp2/transport/timeout_encoding.c \
src/core/ext/transport/chttp2/transport/varint.c \
src/core/ext/transport/chttp2/transport/writing.c \
src/core/ext/transport/chttp2/alpn/alpn.c \
@@ -1112,6 +1115,7 @@ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \
src/core/ext/transport/chttp2/client/insecure/channel_create.c \
src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \
+src/core/ext/lb_policy/grpclb/grpclb.c \
src/core/ext/lb_policy/grpclb/load_balancer_api.c \
src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
third_party/nanopb/pb_common.c \
@@ -1125,6 +1129,7 @@ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \
src/core/ext/load_reporting/load_reporting.c \
src/core/ext/load_reporting/load_reporting_filter.c \
src/core/ext/c-ares/wrapper.c \
+src/core/ext/census/base_resources.c \
src/core/ext/census/context.c \
src/core/ext/census/gen/census.pb.c \
src/core/ext/census/grpc_context.c \
@@ -1134,6 +1139,7 @@ src/core/ext/census/initialize.c \
src/core/ext/census/mlog.c \
src/core/ext/census/operation.c \
src/core/ext/census/placeholders.c \
+src/core/ext/census/resource.c \
src/core/ext/census/tracing.c \
src/core/plugin_registry/grpc_plugin_registry.c \
include/grpc/support/alloc.h \
diff --git a/tools/gce/create_linux_worker.sh b/tools/gce/create_linux_worker.sh
index c41e4d299b..8a2df40859 100755
--- a/tools/gce/create_linux_worker.sh
+++ b/tools/gce/create_linux_worker.sh
@@ -43,7 +43,8 @@ gcloud compute instances create $INSTANCE_NAME \
--project="$CLOUD_PROJECT" \
--zone "$ZONE" \
--machine-type n1-standard-8 \
- --image ubuntu-15-10 \
+ --image-family=ubuntu-1510 \
+ --image-project=ubuntu-os-cloud \
--boot-disk-size 1000
echo 'Created GCE instance, waiting 60 seconds for it to come online.'
diff --git a/tools/run_tests/build_csharp_coreclr.sh b/tools/run_tests/build_csharp_coreclr.sh
index 733b1a2083..02cf0d39cb 100755
--- a/tools/run_tests/build_csharp_coreclr.sh
+++ b/tools/run_tests/build_csharp_coreclr.sh
@@ -35,4 +35,4 @@ cd $(dirname $0)/../../src/csharp
# TODO(jtattermusch): introduce caching
dotnet restore .
-dotnet build -f netstandard1.5 --configuration $MSBUILD_CONFIG '**/project.json'
+dotnet build --configuration $MSBUILD_CONFIG '**/project.json'
diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh
index ef4a10cca7..f20daeaea0 100755
--- a/tools/run_tests/build_package_node.sh
+++ b/tools/run_tests/build_package_node.sh
@@ -49,7 +49,12 @@ cp grpc-*.tgz $artifacts/grpc.tgz
mkdir -p bin
-cd src/node/tools
+cd $base/src/node/health_check
+npm update
+npm pack
+cp grpc-health-check-*.tgz $artifacts/
+
+cd $base/src/node/tools
npm update
npm pack
cp grpc-tools-*.tgz $artifacts/
diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh
index c4b5d98a53..b786c479f3 100755
--- a/tools/run_tests/build_python.sh
+++ b/tools/run_tests/build_python.sh
@@ -111,6 +111,7 @@ TOOLCHAIN=${4:-$(toolchain)}
ROOT=`pwd`
export CFLAGS="-I$ROOT/include -std=gnu99 -fno-wrapv $CFLAGS"
export GRPC_PYTHON_BUILD_WITH_CYTHON=1
+export LANG=en_US.UTF-8
# Default python on the host to fall back to when instantiating e.g. the
# virtualenv.
@@ -155,7 +156,9 @@ pip_install_dir() {
cd $PWD
}
-$VENV_PYTHON -m pip install --upgrade pip setuptools
+$VENV_PYTHON -m pip install --upgrade pip
+# TODO(https://github.com/pypa/setuptools/issues/709) get the latest setuptools
+$VENV_PYTHON -m pip install setuptools==25.1.1
$VENV_PYTHON -m pip install cython
pip_install_dir $ROOT
$VENV_PYTHON $ROOT/tools/distrib/python/make_grpcio_tools.py
diff --git a/tools/run_tests/pre_build_csharp.bat b/tools/run_tests/pre_build_csharp.bat
index e7131d504c..580d5638fd 100644
--- a/tools/run_tests/pre_build_csharp.bat
+++ b/tools/run_tests/pre_build_csharp.bat
@@ -38,8 +38,61 @@ cd /d %~dp0\..\..
set NUGET=C:\nuget\nuget.exe
if exist %NUGET% (
+ @rem Restore Grpc packages by packages since Nuget client 3.4.4 doesnt support restore
+ @rem by solution
+ @rem Moving into each directory to let the restores work with both nuget 3.4 and 2.8
%NUGET% restore vsprojects/grpc_csharp_ext.sln || goto :error
- %NUGET% restore src/csharp/Grpc.sln || goto :error
+
+ cd src/csharp
+
+ cd Grpc.Auth || goto :error
+ %NUGET% restore -PackagesDirectory ../packages || goto :error
+ cd ..
+
+ cd Grpc.Core || goto :error
+ %NUGET% restore -PackagesDirectory ../packages || goto :error
+ cd ..
+
+ cd Grpc.Core.Tests || goto :error
+ %NUGET% restore -PackagesDirectory ../packages || goto :error
+ cd ..
+
+ cd Grpc.Examples.MathClient || goto :error
+ %NUGET% restore -PackagesDirectory ../packages || goto :error
+ cd ..
+
+ cd Grpc.Examples.MathServer || goto :error
+ %NUGET% restore -PackagesDirectory ../packages || goto :error
+ cd ..
+
+ cd Grpc.Examples || goto :error
+ %NUGET% restore -PackagesDirectory ../packages || goto :error
+ cd ..
+
+ cd Grpc.HealthCheck.Tests || goto :error
+ %NUGET% restore -PackagesDirectory ../packages || goto :error
+ cd ..
+
+ cd Grpc.HealthCheck || goto :error
+ %NUGET% restore -PackagesDirectory ../packages || goto :error
+ cd ..
+
+ cd Grpc.IntegrationTesting.Client || goto :error
+ %NUGET% restore -PackagesDirectory ../packages || goto :error
+ cd ..
+
+ cd Grpc.IntegrationTesting.QpsWorker || goto :error
+ %NUGET% restore -PackagesDirectory ../packages || goto :error
+ cd ..
+
+ cd Grpc.IntegrationTesting.StressClient || goto :error
+ %NUGET% restore -PackagesDirectory ../packages || goto :error
+ cd ..
+
+ cd Grpc.IntegrationTesting || goto :error
+ %NUGET% restore -PackagesDirectory ../packages || goto :error
+
+ cd /d %~dp0\..\.. || goto :error
)
endlocal
diff --git a/tools/run_tests/pre_build_csharp.sh b/tools/run_tests/pre_build_csharp.sh
index 3ff1a4e5a8..0fd3b92a95 100755
--- a/tools/run_tests/pre_build_csharp.sh
+++ b/tools/run_tests/pre_build_csharp.sh
@@ -37,5 +37,54 @@ root=`pwd`
if [ -x "$(command -v nuget)" ]
then
- nuget restore Grpc.sln
+ # Restoring Nuget packages by packages rather than by solution because of
+ # inability to restore by solution with Nuget client 3.4.4
+ # Moving into each directory to let the restores work with nuget 3.4 and 2.8
+ cd Grpc.Auth
+ nuget restore -PackagesDirectory ../packages
+ cd ..
+
+ cd Grpc.Core.Tests
+ nuget restore -PackagesDirectory ../packages
+ cd ..
+
+ cd Grpc.Core
+ nuget restore -PackagesDirectory ../packages
+ cd ..
+
+ cd Grpc.Examples.MathClient
+ nuget restore -PackagesDirectory ../packages
+ cd ..
+
+ cd Grpc.Examples.MathServer
+ nuget restore -PackagesDirectory ../packages
+ cd ..
+
+ cd Grpc.Examples
+ nuget restore -PackagesDirectory ../packages
+ cd ..
+
+ cd Grpc.HealthCheck.Tests
+ nuget restore -PackagesDirectory ../packages
+ cd ..
+
+ cd Grpc.HealthCheck
+ nuget restore -PackagesDirectory ../packages
+ cd ..
+
+ cd Grpc.IntegrationTesting.Client
+ nuget restore -PackagesDirectory ../packages
+ cd ..
+
+ cd Grpc.IntegrationTesting.QpsWorker
+ nuget restore -PackagesDirectory ../packages
+ cd ..
+
+ cd Grpc.IntegrationTesting.StressClient
+ nuget restore -PackagesDirectory ../packages
+ cd ..
+
+ cd Grpc.IntegrationTesting
+ nuget restore -PackagesDirectory ../packages
+ cd ..
fi
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index 6b26a963c9..06198a96cc 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -149,6 +149,22 @@
],
"headers": [],
"language": "c",
+ "name": "census_resource_test",
+ "src": [
+ "test/core/census/resource_test.c"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "language": "c",
"name": "channel_create_test",
"src": [
"test/core/surface/channel_create_test.c"
@@ -1685,7 +1701,7 @@
"language": "c",
"name": "timeout_encoding_test",
"src": [
- "test/core/transport/chttp2/timeout_encoding_test.c"
+ "test/core/transport/timeout_encoding_test.c"
],
"third_party": false,
"type": "target"
@@ -2254,6 +2270,27 @@
"grpc++_test_util",
"grpc_test_util"
],
+ "headers": [
+ "src/proto/grpc/lb/v1/load_balancer.grpc.pb.h",
+ "src/proto/grpc/lb/v1/load_balancer.pb.h"
+ ],
+ "language": "c++",
+ "name": "grpclb_test",
+ "src": [
+ "test/cpp/grpclb/grpclb_test.cc"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc++",
+ "grpc++_test_util",
+ "grpc_test_util"
+ ],
"headers": [],
"language": "c++",
"name": "hybrid_end2end_test",
@@ -2292,6 +2329,7 @@
"grpc++_test_util",
"grpc_test_util",
"interop_server_helper",
+ "interop_server_lib",
"interop_server_main"
],
"headers": [],
@@ -3610,9 +3648,9 @@
],
"headers": [],
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"src": [
- "test/core/end2end/fixtures/h2_loadreporting.c"
+ "test/core/end2end/fixtures/h2_load_reporting.c"
],
"third_party": false,
"type": "target"
@@ -3882,9 +3920,9 @@
],
"headers": [],
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"src": [
- "test/core/end2end/fixtures/h2_loadreporting.c"
+ "test/core/end2end/fixtures/h2_load_reporting.c"
],
"third_party": false,
"type": "target"
@@ -4178,6 +4216,7 @@
"gpr",
"grpc_base",
"grpc_lb_policy_grpclb",
+ "grpc_lb_policy_grpclb",
"grpc_lb_policy_pick_first",
"grpc_lb_policy_round_robin",
"grpc_load_reporting",
@@ -4231,6 +4270,7 @@
"gpr",
"gpr_test_util",
"grpc",
+ "grpc_base",
"grpc_test_util_base"
],
"headers": [
@@ -4272,6 +4312,7 @@
"gpr",
"grpc_base",
"grpc_lb_policy_grpclb",
+ "grpc_lb_policy_grpclb",
"grpc_lb_policy_pick_first",
"grpc_lb_policy_round_robin",
"grpc_load_reporting",
@@ -4629,7 +4670,7 @@
"src/proto/grpc/testing/test.pb.h"
],
"language": "c++",
- "name": "interop_server_main",
+ "name": "interop_server_lib",
"src": [
"test/cpp/interop/interop_server.cc"
],
@@ -4638,6 +4679,19 @@
},
{
"deps": [
+ "interop_server_lib"
+ ],
+ "headers": [],
+ "language": "c++",
+ "name": "interop_server_main",
+ "src": [
+ "test/cpp/interop/interop_server_bootstrap.cc"
+ ],
+ "third_party": false,
+ "type": "lib"
+ },
+ {
+ "deps": [
"grpc++",
"grpc++_test_util",
"grpc_test_util"
@@ -5384,6 +5438,7 @@
"test/core/end2end/tests/default_host.c",
"test/core/end2end/tests/disappearing_server.c",
"test/core/end2end/tests/empty_batch.c",
+ "test/core/end2end/tests/filter_call_init_fails.c",
"test/core/end2end/tests/filter_causes_close.c",
"test/core/end2end/tests/graceful_server_shutdown.c",
"test/core/end2end/tests/high_initial_seqno.c",
@@ -5391,6 +5446,7 @@
"test/core/end2end/tests/idempotent_request.c",
"test/core/end2end/tests/invoke_large_request.c",
"test/core/end2end/tests/large_metadata.c",
+ "test/core/end2end/tests/load_reporting_hook.c",
"test/core/end2end/tests/max_concurrent_streams.c",
"test/core/end2end/tests/max_message_length.c",
"test/core/end2end/tests/negative_deadline.c",
@@ -5444,6 +5500,7 @@
"test/core/end2end/tests/default_host.c",
"test/core/end2end/tests/disappearing_server.c",
"test/core/end2end/tests/empty_batch.c",
+ "test/core/end2end/tests/filter_call_init_fails.c",
"test/core/end2end/tests/filter_causes_close.c",
"test/core/end2end/tests/graceful_server_shutdown.c",
"test/core/end2end/tests/high_initial_seqno.c",
@@ -5451,6 +5508,7 @@
"test/core/end2end/tests/idempotent_request.c",
"test/core/end2end/tests/invoke_large_request.c",
"test/core/end2end/tests/large_metadata.c",
+ "test/core/end2end/tests/load_reporting_hook.c",
"test/core/end2end/tests/max_concurrent_streams.c",
"test/core/end2end/tests/max_message_length.c",
"test/core/end2end/tests/negative_deadline.c",
@@ -5494,11 +5552,13 @@
"headers": [
"include/grpc/census.h",
"src/core/ext/census/aggregation.h",
+ "src/core/ext/census/base_resources.h",
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
+ "src/core/ext/census/resource.h",
"src/core/ext/census/rpc_metric_id.h"
],
"language": "c",
@@ -5506,6 +5566,8 @@
"src": [
"include/grpc/census.h",
"src/core/ext/census/aggregation.h",
+ "src/core/ext/census/base_resources.c",
+ "src/core/ext/census/base_resources.h",
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/context.c",
@@ -5520,6 +5582,8 @@
"src/core/ext/census/mlog.h",
"src/core/ext/census/operation.c",
"src/core/ext/census/placeholders.c",
+ "src/core/ext/census/resource.c",
+ "src/core/ext/census/resource.h",
"src/core/ext/census/rpc_metric_id.h",
"src/core/ext/census/tracing.c"
],
@@ -5790,6 +5854,7 @@
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/static_metadata.h",
+ "src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h"
],
@@ -5965,6 +6030,8 @@
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/static_metadata.c",
"src/core/lib/transport/static_metadata.h",
+ "src/core/lib/transport/timeout_encoding.c",
+ "src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.c",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
@@ -6073,12 +6140,15 @@
"nanopb"
],
"headers": [
+ "src/core/ext/lb_policy/grpclb/grpclb.h",
"src/core/ext/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h"
],
"language": "c",
"name": "grpc_lb_policy_grpclb",
"src": [
+ "src/core/ext/lb_policy/grpclb/grpclb.c",
+ "src/core/ext/lb_policy/grpclb/grpclb.h",
"src/core/ext/lb_policy/grpclb/load_balancer_api.c",
"src/core/ext/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
@@ -6343,7 +6413,6 @@
"src/core/ext/transport/chttp2/transport/internal.h",
"src/core/ext/transport/chttp2/transport/status_conversion.h",
"src/core/ext/transport/chttp2/transport/stream_map.h",
- "src/core/ext/transport/chttp2/transport/timeout_encoding.h",
"src/core/ext/transport/chttp2/transport/varint.h"
],
"language": "c",
@@ -6387,8 +6456,6 @@
"src/core/ext/transport/chttp2/transport/stream_lists.c",
"src/core/ext/transport/chttp2/transport/stream_map.c",
"src/core/ext/transport/chttp2/transport/stream_map.h",
- "src/core/ext/transport/chttp2/transport/timeout_encoding.c",
- "src/core/ext/transport/chttp2/transport/timeout_encoding.h",
"src/core/ext/transport/chttp2/transport/varint.c",
"src/core/ext/transport/chttp2/transport/varint.h",
"src/core/ext/transport/chttp2/transport/writing.c"
diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json
index d94301b946..f608aa96d9 100644
--- a/tools/run_tests/tests.json
+++ b/tools/run_tests/tests.json
@@ -182,6 +182,27 @@
"flaky": false,
"gtest": false,
"language": "c",
+ "name": "census_resource_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ]
+ },
+ {
+ "args": [],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "gtest": false,
+ "language": "c",
"name": "channel_create_test",
"platforms": [
"linux",
@@ -2301,6 +2322,27 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
+ "language": "c++",
+ "name": "grpclb_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ]
+ },
+ {
+ "args": [],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
"gtest": true,
"language": "c++",
"name": "hybrid_end2end_test",
@@ -4678,6 +4720,28 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_census_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -4832,6 +4896,28 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_census_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -5558,6 +5644,28 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_compress_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -5712,6 +5820,28 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_compress_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -6424,6 +6554,27 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_fakesec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -6571,6 +6722,27 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_fakesec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -7190,6 +7362,26 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_fd_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -7330,6 +7522,26 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_fd_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -7978,6 +8190,28 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -8132,6 +8366,28 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -8774,6 +9030,22 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+pipe_test",
+ "platforms": [
+ "linux"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -8886,6 +9158,22 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+pipe_test",
+ "platforms": [
+ "linux"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -9498,6 +9786,28 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+trace_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -9630,6 +9940,28 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+trace_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -10060,7 +10392,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10082,7 +10414,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10104,7 +10436,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10126,7 +10458,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10148,7 +10480,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10170,7 +10502,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10192,7 +10524,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10214,7 +10546,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10236,7 +10568,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10258,7 +10590,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10280,7 +10612,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10302,7 +10634,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10324,7 +10656,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10346,7 +10678,29 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10368,7 +10722,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10390,7 +10744,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10412,7 +10766,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10434,7 +10788,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10456,7 +10810,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10478,7 +10832,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10500,7 +10854,29 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10522,7 +10898,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10544,7 +10920,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10566,7 +10942,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10588,7 +10964,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10610,7 +10986,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10632,7 +11008,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10654,7 +11030,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10676,7 +11052,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10698,7 +11074,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10720,7 +11096,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10742,7 +11118,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10764,7 +11140,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10786,7 +11162,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10808,7 +11184,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10830,7 +11206,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10852,7 +11228,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10874,7 +11250,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10896,7 +11272,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -10918,7 +11294,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_test",
+ "name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
@@ -11222,6 +11598,27 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_oauth2_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -11369,6 +11766,27 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_oauth2_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -12020,6 +12438,27 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_proxy_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -12146,6 +12585,27 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_proxy_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_message_length"
],
"ci_platforms": [
@@ -12713,6 +13173,27 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -12860,6 +13341,27 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -13448,6 +13950,27 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair+trace_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -13574,6 +14097,27 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair+trace_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -14162,6 +14706,27 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_1byte_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -14309,6 +14874,27 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_1byte_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -14974,6 +15560,28 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_ssl_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -15128,6 +15736,28 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_ssl_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -15854,6 +16484,28 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_ssl_cert_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -16008,6 +16660,28 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_ssl_cert_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -16678,6 +17352,27 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_ssl_proxy_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -16804,6 +17499,27 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_ssl_proxy_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_message_length"
],
"ci_platforms": [
@@ -17400,6 +18116,26 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_uds_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -17540,6 +18276,26 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_uds_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -18206,6 +18962,28 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_census_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -18360,6 +19138,28 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_census_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -19064,6 +19864,28 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_compress_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -19218,6 +20040,28 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_compress_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -19836,6 +20680,26 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_fd_nosec_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -19976,6 +20840,26 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_fd_nosec_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -20602,6 +21486,28 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -20756,6 +21662,28 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -21382,6 +22310,22 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+pipe_nosec_test",
+ "platforms": [
+ "linux"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -21494,6 +22438,22 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+pipe_nosec_test",
+ "platforms": [
+ "linux"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -22084,6 +23044,28 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+trace_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -22216,6 +23198,28 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+trace_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -22646,7 +23650,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22668,7 +23672,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22690,7 +23694,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22712,7 +23716,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22734,7 +23738,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22756,7 +23760,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22778,7 +23782,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22800,7 +23804,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22822,7 +23826,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22844,7 +23848,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22866,7 +23870,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22888,7 +23892,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22910,7 +23914,29 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22932,7 +23958,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22954,7 +23980,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22976,7 +24002,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -22998,7 +24024,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23020,7 +24046,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23042,7 +24068,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23064,7 +24090,29 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23086,7 +24134,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23108,7 +24156,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23130,7 +24178,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23152,7 +24200,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23174,7 +24222,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23196,7 +24244,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23218,7 +24266,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23240,7 +24288,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23262,7 +24310,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23284,7 +24332,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23306,7 +24354,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23328,7 +24376,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23350,7 +24398,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23372,7 +24420,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23394,7 +24442,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23416,7 +24464,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23438,7 +24486,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23460,7 +24508,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23482,7 +24530,7 @@
"exclude_configs": [],
"flaky": false,
"language": "c",
- "name": "h2_loadreporting_nosec_test",
+ "name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
@@ -23723,6 +24771,27 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_proxy_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -23849,6 +24918,27 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_proxy_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_message_length"
],
"ci_platforms": [
@@ -24395,6 +25485,27 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -24542,6 +25653,27 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -25109,6 +26241,27 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair+trace_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -25235,6 +26388,27 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair+trace_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -25822,6 +26996,29 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [
+ "msan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_1byte_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -25983,6 +27180,29 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [
+ "msan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_1byte_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
@@ -26614,6 +27834,26 @@
},
{
"args": [
+ "filter_call_init_fails"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_uds_nosec_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"filter_causes_close"
],
"ci_platforms": [
@@ -26754,6 +27994,26 @@
},
{
"args": [
+ "load_reporting_hook"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_uds_nosec_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"max_concurrent_streams"
],
"ci_platforms": [
diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln
index 7232440ab7..c28f3ba39c 100644
--- a/vsprojects/buildtests_c.sln
+++ b/vsprojects/buildtests_c.sln
@@ -109,6 +109,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "census_context_test", "vcxp
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "census_resource_test", "vcxproj\test\census_resource_test\census_resource_test.vcxproj", "{18CF99B5-3C61-EC3D-9509-3C95334C3B88}"
+ 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}") = "channel_create_test", "vcxproj\test\channel_create_test\channel_create_test.vcxproj", "{AFC88484-3A2E-32BC-25B2-23DF741D4F3D}"
ProjectSection(myProperties) = preProject
lib = "False"
@@ -748,7 +759,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full_test", "vcxproj\tes
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_loadreporting_nosec_test", "vcxproj\test/end2end/fixtures\h2_loadreporting_nosec_test\h2_loadreporting_nosec_test.vcxproj", "{679EA55C-7399-53E8-79F0-82FBDB3DDE07}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_load_reporting_nosec_test", "vcxproj\test/end2end/fixtures\h2_load_reporting_nosec_test\h2_load_reporting_nosec_test.vcxproj", "{4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}"
ProjectSection(myProperties) = preProject
lib = "False"
EndProjectSection
@@ -760,7 +771,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_loadreporting_nosec_test
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_loadreporting_test", "vcxproj\test/end2end/fixtures\h2_loadreporting_test\h2_loadreporting_test.vcxproj", "{B107130E-EA33-C114-9CB6-78A18C929F64}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_load_reporting_test", "vcxproj\test/end2end/fixtures\h2_load_reporting_test\h2_load_reporting_test.vcxproj", "{F0A06723-2E3E-FE97-34B7-A2BA26D98B83}"
ProjectSection(myProperties) = preProject
lib = "False"
EndProjectSection
@@ -1599,6 +1610,22 @@ Global
{5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release-DLL|Win32.Build.0 = Release|Win32
{5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release-DLL|x64.ActiveCfg = Release|x64
{5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release-DLL|x64.Build.0 = Release|x64
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug|Win32.ActiveCfg = Debug|Win32
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug|x64.ActiveCfg = Debug|x64
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release|Win32.ActiveCfg = Release|Win32
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release|x64.ActiveCfg = Release|x64
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug|Win32.Build.0 = Debug|Win32
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug|x64.Build.0 = Debug|x64
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release|Win32.Build.0 = Release|Win32
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release|x64.Build.0 = Release|x64
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug-DLL|Win32.ActiveCfg = Debug|Win32
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug-DLL|Win32.Build.0 = Debug|Win32
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug-DLL|x64.ActiveCfg = Debug|x64
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug-DLL|x64.Build.0 = Debug|x64
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release-DLL|Win32.ActiveCfg = Release|Win32
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release-DLL|Win32.Build.0 = Release|Win32
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release-DLL|x64.ActiveCfg = Release|x64
+ {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release-DLL|x64.Build.0 = Release|x64
{AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Debug|Win32.ActiveCfg = Debug|Win32
{AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Debug|x64.ActiveCfg = Debug|x64
{AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Release|Win32.ActiveCfg = Release|Win32
@@ -2607,38 +2634,38 @@ Global
{EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release-DLL|Win32.Build.0 = Release|Win32
{EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release-DLL|x64.ActiveCfg = Release|x64
{EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release-DLL|x64.Build.0 = Release|x64
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug|Win32.ActiveCfg = Debug|Win32
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug|x64.ActiveCfg = Debug|x64
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release|Win32.ActiveCfg = Release|Win32
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release|x64.ActiveCfg = Release|x64
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug|Win32.Build.0 = Debug|Win32
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug|x64.Build.0 = Debug|x64
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release|Win32.Build.0 = Release|Win32
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release|x64.Build.0 = Release|x64
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug-DLL|Win32.ActiveCfg = Debug|Win32
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug-DLL|Win32.Build.0 = Debug|Win32
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug-DLL|x64.ActiveCfg = Debug|x64
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug-DLL|x64.Build.0 = Debug|x64
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release-DLL|Win32.ActiveCfg = Release|Win32
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release-DLL|Win32.Build.0 = Release|Win32
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release-DLL|x64.ActiveCfg = Release|x64
- {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release-DLL|x64.Build.0 = Release|x64
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug|Win32.ActiveCfg = Debug|Win32
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug|x64.ActiveCfg = Debug|x64
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Release|Win32.ActiveCfg = Release|Win32
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Release|x64.ActiveCfg = Release|x64
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug|Win32.Build.0 = Debug|Win32
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug|x64.Build.0 = Debug|x64
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Release|Win32.Build.0 = Release|Win32
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Release|x64.Build.0 = Release|x64
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug-DLL|Win32.ActiveCfg = Debug|Win32
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug-DLL|Win32.Build.0 = Debug|Win32
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug-DLL|x64.ActiveCfg = Debug|x64
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug-DLL|x64.Build.0 = Debug|x64
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Release-DLL|Win32.ActiveCfg = Release|Win32
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Release-DLL|Win32.Build.0 = Release|Win32
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Release-DLL|x64.ActiveCfg = Release|x64
- {B107130E-EA33-C114-9CB6-78A18C929F64}.Release-DLL|x64.Build.0 = Release|x64
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug|x64.ActiveCfg = Debug|x64
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release|Win32.ActiveCfg = Release|Win32
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release|x64.ActiveCfg = Release|x64
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug|Win32.Build.0 = Debug|Win32
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug|x64.Build.0 = Debug|x64
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release|Win32.Build.0 = Release|Win32
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release|x64.Build.0 = Release|x64
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug-DLL|Win32.ActiveCfg = Debug|Win32
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug-DLL|Win32.Build.0 = Debug|Win32
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug-DLL|x64.ActiveCfg = Debug|x64
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug-DLL|x64.Build.0 = Debug|x64
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release-DLL|Win32.ActiveCfg = Release|Win32
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release-DLL|Win32.Build.0 = Release|Win32
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release-DLL|x64.ActiveCfg = Release|x64
+ {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release-DLL|x64.Build.0 = Release|x64
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug|x64.ActiveCfg = Debug|x64
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release|Win32.ActiveCfg = Release|Win32
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release|x64.ActiveCfg = Release|x64
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug|Win32.Build.0 = Debug|Win32
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug|x64.Build.0 = Debug|x64
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release|Win32.Build.0 = Release|Win32
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release|x64.Build.0 = Release|x64
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug-DLL|Win32.ActiveCfg = Debug|Win32
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug-DLL|Win32.Build.0 = Debug|Win32
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug-DLL|x64.ActiveCfg = Debug|x64
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug-DLL|x64.Build.0 = Debug|x64
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release-DLL|Win32.ActiveCfg = Release|Win32
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release-DLL|Win32.Build.0 = Release|Win32
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release-DLL|x64.ActiveCfg = Release|x64
+ {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release-DLL|x64.Build.0 = Release|x64
{0F761FF3-342A-C429-711F-F76181BAA52D}.Debug|Win32.ActiveCfg = Debug|Win32
{0F761FF3-342A-C429-711F-F76181BAA52D}.Debug|x64.ActiveCfg = Debug|x64
{0F761FF3-342A-C429-711F-F76181BAA52D}.Release|Win32.ActiveCfg = Release|Win32
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj
index e85685db86..df51caaaf9 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj
@@ -376,6 +376,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\static_metadata.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport_impl.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\bin_decoder.h" />
@@ -397,7 +398,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\internal.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\status_conversion.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_map.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\timeout_encoding.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\varint.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\alpn\alpn.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\security\context\security_context.h" />
@@ -440,6 +440,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_call_holder.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_index.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\uri_parser.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\grpclb.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\load_balancer_api.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\proto\grpc\lb\v1\load_balancer.pb.h" />
<ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb.h" />
@@ -450,11 +451,13 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting_filter.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\aggregation.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\census\base_resources.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\census_interface.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\census_rpc_stats.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\gen\census.pb.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\grpc_filter.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\mlog.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\census\resource.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\rpc_metric_id.h" />
</ItemGroup>
<ItemGroup>
@@ -632,6 +635,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport_op_string.c">
@@ -676,8 +681,6 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_map.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\timeout_encoding.c">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\varint.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\writing.c">
@@ -788,6 +791,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\client\insecure\channel_create_posix.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\grpclb.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\load_balancer_api.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\proto\grpc\lb\v1\load_balancer.pb.c">
@@ -814,6 +819,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\c-ares\wrapper.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\census\base_resources.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\context.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\gen\census.pb.c">
@@ -832,6 +839,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\placeholders.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\census\resource.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\tracing.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\plugin_registry\grpc_plugin_registry.c">
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
index 6997ec9657..9a12796773 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
@@ -262,6 +262,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c">
<Filter>src\core\lib\transport</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport.c">
<Filter>src\core\lib\transport</Filter>
</ClCompile>
@@ -328,9 +331,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_map.c">
<Filter>src\core\ext\transport\chttp2\transport</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\timeout_encoding.c">
- <Filter>src\core\ext\transport\chttp2\transport</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\varint.c">
<Filter>src\core\ext\transport\chttp2\transport</Filter>
</ClCompile>
@@ -496,6 +496,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\client\insecure\channel_create_posix.c">
<Filter>src\core\ext\transport\chttp2\client\insecure</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\grpclb.c">
+ <Filter>src\core\ext\lb_policy\grpclb</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\load_balancer_api.c">
<Filter>src\core\ext\lb_policy\grpclb</Filter>
</ClCompile>
@@ -535,6 +538,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\c-ares\wrapper.c">
<Filter>src\core\ext\c-ares</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\census\base_resources.c">
+ <Filter>src\core\ext\census</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\context.c">
<Filter>src\core\ext\census</Filter>
</ClCompile>
@@ -562,6 +568,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\placeholders.c">
<Filter>src\core\ext\census</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\census\resource.c">
+ <Filter>src\core\ext\census</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\tracing.c">
<Filter>src\core\ext\census</Filter>
</ClCompile>
@@ -893,6 +902,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h">
<Filter>src\core\lib\transport</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h">
<Filter>src\core\lib\transport</Filter>
</ClInclude>
@@ -956,9 +968,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_map.h">
<Filter>src\core\ext\transport\chttp2\transport</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\timeout_encoding.h">
- <Filter>src\core\ext\transport\chttp2\transport</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\varint.h">
<Filter>src\core\ext\transport\chttp2\transport</Filter>
</ClInclude>
@@ -1085,6 +1094,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\uri_parser.h">
<Filter>src\core\ext\client_config</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\grpclb.h">
+ <Filter>src\core\ext\lb_policy\grpclb</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\load_balancer_api.h">
<Filter>src\core\ext\lb_policy\grpclb</Filter>
</ClInclude>
@@ -1115,6 +1127,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\aggregation.h">
<Filter>src\core\ext\census</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\census\base_resources.h">
+ <Filter>src\core\ext\census</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\census_interface.h">
<Filter>src\core\ext\census</Filter>
</ClInclude>
@@ -1130,6 +1145,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\mlog.h">
<Filter>src\core\ext\census</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\census\resource.h">
+ <Filter>src\core\ext\census</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\rpc_metric_id.h">
<Filter>src\core\ext\census</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
index f0a8f7b6b9..84a71d217d 100644
--- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
+++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
@@ -147,6 +147,35 @@
</ItemDefinitionGroup>
<ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\byte_buffer.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\byte_buffer_reader.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\compression.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\status.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.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\alloc.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\log.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\slice_buffer.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\time.h" />
+ </ItemGroup>
+ <ItemGroup>
<ClInclude Include="$(SolutionDir)\..\test\core\end2end\data\ssl_test_data.h" />
<ClInclude Include="$(SolutionDir)\..\test\core\security\oauth2_utils.h" />
<ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.h" />
@@ -160,6 +189,86 @@
<ClInclude Include="$(SolutionDir)\..\test\core\util\port.h" />
<ClInclude Include="$(SolutionDir)\..\test\core\util\port_server_client.h" />
<ClInclude Include="$(SolutionDir)\..\test\core\util\slice_splitter.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack_builder.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\compress_filter.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\connected_channel.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\context.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\http_client_filter.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\http_server_filter.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\algorithm_metadata.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\message_compress.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\debug\trace.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\format_request.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\httpcli.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\parser.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\closure.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\executor.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iocp_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\load_file.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\network_status_tracker.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_utils.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_pipe.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\workqueue.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\workqueue_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\workqueue_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_common.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_reader.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_writer.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\api_trace.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\call.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\call_test_only.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_init.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_stack_type.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\event_string.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\init.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\server.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\byte_stream.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\connectivity_state.h" />
+ <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\static_metadata.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport_impl.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\data\client_certs.c">
@@ -196,6 +305,184 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\util\slice_splitter.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack_builder.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\compress_filter.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\connected_channel.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\handshaker.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\http_client_filter.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\http_server_filter.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\compression\compression.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\compression\message_compress.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\debug\trace.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\http\format_request.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\http\httpcli.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\http\parser.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\closure.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\executor.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iocp_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\load_file.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\network_status_tracker.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_utils.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_common_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_linux.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix_noop.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_eventfd.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_nospecial.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_pipe.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\workqueue_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\workqueue_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_reader.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_string.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_writer.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\alarm.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\api_trace.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\byte_buffer.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\byte_buffer_reader.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\call.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\call_details.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\call_log_batch.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel_init.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel_ping.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel_stack_type.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\event_string.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\metadata_array.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\server.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\validate_metadata.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\version.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\byte_stream.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\connectivity_state.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\metadata.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\metadata_batch.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport_op_string.c">
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr_test_util\gpr_test_util.vcxproj">
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 a1d31eb54e..18fe926405 100644
--- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
@@ -52,6 +52,356 @@
<ClCompile Include="$(SolutionDir)\..\test\core\util\slice_splitter.c">
<Filter>test\core\util</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack_builder.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\compress_filter.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\connected_channel.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\handshaker.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\http_client_filter.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\http_server_filter.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\compression\compression.c">
+ <Filter>src\core\lib\compression</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\compression\message_compress.c">
+ <Filter>src\core\lib\compression</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\debug\trace.c">
+ <Filter>src\core\lib\debug</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\http\format_request.c">
+ <Filter>src\core\lib\http</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\http\httpcli.c">
+ <Filter>src\core\lib\http</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\http\parser.c">
+ <Filter>src\core\lib\http</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\closure.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\executor.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iocp_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\load_file.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\network_status_tracker.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_utils.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_common_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_linux.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix_noop.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_eventfd.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_nospecial.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_pipe.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\workqueue_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\workqueue_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json.c">
+ <Filter>src\core\lib\json</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_reader.c">
+ <Filter>src\core\lib\json</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_string.c">
+ <Filter>src\core\lib\json</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_writer.c">
+ <Filter>src\core\lib\json</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\alarm.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\api_trace.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\byte_buffer.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\byte_buffer_reader.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\call.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\call_details.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\call_log_batch.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel_init.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel_ping.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel_stack_type.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\event_string.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\metadata_array.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\server.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\validate_metadata.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\version.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\byte_stream.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\connectivity_state.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\metadata.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\metadata_batch.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>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport_op_string.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\byte_buffer.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\byte_buffer_reader.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\compression.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_posix.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\status.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.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\alloc.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\log.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\slice_buffer.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\time.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\test\core\end2end\data\ssl_test_data.h">
@@ -93,9 +443,294 @@
<ClInclude Include="$(SolutionDir)\..\test\core\util\slice_splitter.h">
<Filter>test\core\util</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack_builder.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\compress_filter.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\connected_channel.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\context.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\http_client_filter.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\http_server_filter.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\algorithm_metadata.h">
+ <Filter>src\core\lib\compression</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\message_compress.h">
+ <Filter>src\core\lib\compression</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\debug\trace.h">
+ <Filter>src\core\lib\debug</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\format_request.h">
+ <Filter>src\core\lib\http</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\httpcli.h">
+ <Filter>src\core\lib\http</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\parser.h">
+ <Filter>src\core\lib\http</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\closure.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\executor.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iocp_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\load_file.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\network_status_tracker.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_utils.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_pipe.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\workqueue.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\workqueue_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\workqueue_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json.h">
+ <Filter>src\core\lib\json</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_common.h">
+ <Filter>src\core\lib\json</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_reader.h">
+ <Filter>src\core\lib\json</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_writer.h">
+ <Filter>src\core\lib\json</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\api_trace.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\call.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\call_test_only.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_init.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_stack_type.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\event_string.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\init.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\server.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\byte_stream.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\connectivity_state.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata_batch.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>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport_impl.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{50129440-aff7-7df7-682c-b9671be19a6f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc">
+ <UniqueIdentifier>{d448b078-95a6-6fca-fe4a-8b44dd71f359}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc\impl">
+ <UniqueIdentifier>{314a6801-6fe3-9211-33d8-ecf3332c1151}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc\impl\codegen">
+ <UniqueIdentifier>{8e97f1e1-f4d1-a56e-0837-7901778fb3b9}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{7d107d7c-1da3-9525-3ba1-3a411b552ea8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core">
+ <UniqueIdentifier>{f7bfac91-5eb2-dea7-4601-6c63edbbf997}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib">
+ <UniqueIdentifier>{f4e8c61e-1ca6-0fdd-7b5e-b7f9a30c9a21}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\channel">
+ <UniqueIdentifier>{1cd1503c-bec0-5ade-c75f-aa25c80975ec}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\compression">
+ <UniqueIdentifier>{09632582-2cc3-5618-d673-65d3884f8ce5}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\debug">
+ <UniqueIdentifier>{2c1a72e9-886e-8082-9d2f-0fc9cb3ab996}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\http">
+ <UniqueIdentifier>{4862ecce-fa07-eb5e-5c05-bfa753c8bfe5}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\iomgr">
+ <UniqueIdentifier>{fc7f488e-08b4-8366-3720-1f7ffaa0b0b3}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\json">
+ <UniqueIdentifier>{89bc8f83-e29a-ddab-8f6b-22df11cdc867}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\surface">
+ <UniqueIdentifier>{7f2b7dca-395f-94dd-c9ad-9a286bd9751e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\transport">
+ <UniqueIdentifier>{5249e884-ea07-6782-531d-ec622c54b9af}</UniqueIdentifier>
+ </Filter>
<Filter Include="test">
<UniqueIdentifier>{a2783de3-4fcf-718d-a859-c2108350ff33}</UniqueIdentifier>
</Filter>
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
index b05de504a3..f348d12a7b 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
@@ -365,6 +365,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\static_metadata.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport_impl.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\bin_decoder.h" />
@@ -386,7 +387,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\internal.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\status_conversion.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_map.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\timeout_encoding.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\varint.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\alpn\alpn.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\client_channel.h" />
@@ -408,6 +408,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting_filter.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\grpclb.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\load_balancer_api.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\proto\grpc\lb\v1\load_balancer.pb.h" />
<ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb.h" />
@@ -415,11 +416,13 @@
<ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_decode.h" />
<ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_encode.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\aggregation.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\census\base_resources.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\census_interface.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\census_rpc_stats.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\gen\census.pb.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\grpc_filter.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\mlog.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\census\resource.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\rpc_metric_id.h" />
</ItemGroup>
<ItemGroup>
@@ -599,6 +602,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport_op_string.c">
@@ -645,8 +650,6 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_map.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\timeout_encoding.c">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\varint.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\writing.c">
@@ -705,6 +708,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting_filter.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\grpclb.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\load_balancer_api.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\proto\grpc\lb\v1\load_balancer.pb.c">
@@ -719,6 +724,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\round_robin\round_robin.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\census\base_resources.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\context.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\gen\census.pb.c">
@@ -737,6 +744,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\placeholders.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\census\resource.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\tracing.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\plugin_registry\grpc_unsecure_plugin_registry.c">
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
index bc0190bfd7..2619ed285c 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
@@ -265,6 +265,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c">
<Filter>src\core\lib\transport</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport.c">
<Filter>src\core\lib\transport</Filter>
</ClCompile>
@@ -334,9 +337,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_map.c">
<Filter>src\core\ext\transport\chttp2\transport</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\timeout_encoding.c">
- <Filter>src\core\ext\transport\chttp2\transport</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\varint.c">
<Filter>src\core\ext\transport\chttp2\transport</Filter>
</ClCompile>
@@ -424,6 +424,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting_filter.c">
<Filter>src\core\ext\load_reporting</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\grpclb.c">
+ <Filter>src\core\ext\lb_policy\grpclb</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\load_balancer_api.c">
<Filter>src\core\ext\lb_policy\grpclb</Filter>
</ClCompile>
@@ -445,6 +448,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\round_robin\round_robin.c">
<Filter>src\core\ext\lb_policy\round_robin</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\census\base_resources.c">
+ <Filter>src\core\ext\census</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\context.c">
<Filter>src\core\ext\census</Filter>
</ClCompile>
@@ -472,6 +478,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\placeholders.c">
<Filter>src\core\ext\census</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\census\resource.c">
+ <Filter>src\core\ext\census</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\tracing.c">
<Filter>src\core\ext\census</Filter>
</ClCompile>
@@ -797,6 +806,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h">
<Filter>src\core\lib\transport</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h">
<Filter>src\core\lib\transport</Filter>
</ClInclude>
@@ -860,9 +872,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_map.h">
<Filter>src\core\ext\transport\chttp2\transport</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\timeout_encoding.h">
- <Filter>src\core\ext\transport\chttp2\transport</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\varint.h">
<Filter>src\core\ext\transport\chttp2\transport</Filter>
</ClInclude>
@@ -926,6 +935,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting_filter.h">
<Filter>src\core\ext\load_reporting</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\grpclb.h">
+ <Filter>src\core\ext\lb_policy\grpclb</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\load_balancer_api.h">
<Filter>src\core\ext\lb_policy\grpclb</Filter>
</ClInclude>
@@ -947,6 +959,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\aggregation.h">
<Filter>src\core\ext\census</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\census\base_resources.h">
+ <Filter>src\core\ext\census</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\census_interface.h">
<Filter>src\core\ext\census</Filter>
</ClInclude>
@@ -962,6 +977,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\mlog.h">
<Filter>src\core\ext\census</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\census\resource.h">
+ <Filter>src\core\ext\census</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\rpc_metric_id.h">
<Filter>src\core\ext\census</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj b/vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj
new file mode 100644
index 0000000000..204d3f770b
--- /dev/null
+++ b/vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj
@@ -0,0 +1,212 @@
+<?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>{458DCA09-83B9-5E68-D7E9-118864ECBD94}</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>interop_server_lib</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'">
+ <TargetName>interop_server_lib</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>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\empty.pb.cc">
+ </ClCompile>
+ <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\empty.pb.h">
+ </ClInclude>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\empty.grpc.pb.cc">
+ </ClCompile>
+ <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\empty.grpc.pb.h">
+ </ClInclude>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.pb.cc">
+ </ClCompile>
+ <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.pb.h">
+ </ClInclude>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.grpc.pb.cc">
+ </ClCompile>
+ <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.grpc.pb.h">
+ </ClInclude>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\test.pb.cc">
+ </ClCompile>
+ <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\test.pb.h">
+ </ClInclude>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\test.grpc.pb.cc">
+ </ClCompile>
+ <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\test.grpc.pb.h">
+ </ClInclude>
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\interop\interop_server.cc">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\interop_server_helper\interop_server_helper.vcxproj">
+ <Project>{F55BEA2C-B61D-AAFE-CA15-223B8AC0DE5A}</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>
+ <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>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_test_config\grpc++_test_config.vcxproj">
+ <Project>{3F7D093D-11F9-C4BC-BEB7-18EB28E3F290}</Project>
+ </ProjectReference>
+ </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/interop_server_lib/interop_server_lib.vcxproj.filters b/vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj.filters
new file mode 100644
index 0000000000..63fc0f7f51
--- /dev/null
+++ b/vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj.filters
@@ -0,0 +1,42 @@
+<?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\testing\empty.proto">
+ <Filter>src\proto\grpc\testing</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.proto">
+ <Filter>src\proto\grpc\testing</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\test.proto">
+ <Filter>src\proto\grpc\testing</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\interop\interop_server.cc">
+ <Filter>test\cpp\interop</Filter>
+ </ClCompile>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{356c90d7-2dcd-5f6a-d3ca-6461f2597581}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto">
+ <UniqueIdentifier>{70740334-0cbf-ab29-0e1c-f0ffa390d77f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc">
+ <UniqueIdentifier>{d581eb6c-94b6-eb79-6b76-d122c13cff3c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc\testing">
+ <UniqueIdentifier>{27f43e87-cfd9-68cc-179a-fc44046797c4}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test">
+ <UniqueIdentifier>{3402c01e-a9f6-2dd8-6963-03a5774d37f2}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\cpp">
+ <UniqueIdentifier>{656eed4b-782e-224c-6101-8a61c2daa94e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\cpp\interop">
+ <UniqueIdentifier>{61c0dab5-5c69-82b0-2961-4104445f2e06}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj
index 18971d6a34..9fd4d11be9 100644
--- a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj
+++ b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj
@@ -147,57 +147,12 @@
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\empty.pb.cc">
- </ClCompile>
- <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\empty.pb.h">
- </ClInclude>
- <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\empty.grpc.pb.cc">
- </ClCompile>
- <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\empty.grpc.pb.h">
- </ClInclude>
- <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.pb.cc">
- </ClCompile>
- <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.pb.h">
- </ClInclude>
- <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.grpc.pb.cc">
- </ClCompile>
- <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.grpc.pb.h">
- </ClInclude>
- <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\test.pb.cc">
- </ClCompile>
- <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\test.pb.h">
- </ClInclude>
- <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\test.grpc.pb.cc">
- </ClCompile>
- <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\test.grpc.pb.h">
- </ClInclude>
- <ClCompile Include="$(SolutionDir)\..\test\cpp\interop\interop_server.cc">
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\interop\interop_server_bootstrap.cc">
</ClCompile>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\interop_server_helper\interop_server_helper.vcxproj">
- <Project>{F55BEA2C-B61D-AAFE-CA15-223B8AC0DE5A}</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>
- <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>
- <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_test_config\grpc++_test_config.vcxproj">
- <Project>{3F7D093D-11F9-C4BC-BEB7-18EB28E3F290}</Project>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\interop_server_lib\interop_server_lib.vcxproj">
+ <Project>{458DCA09-83B9-5E68-D7E9-118864ECBD94}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters
index 4ee8135c04..d8d049299b 100644
--- a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters
+++ b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters
@@ -1,33 +1,12 @@
<?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\testing\empty.proto">
- <Filter>src\proto\grpc\testing</Filter>
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.proto">
- <Filter>src\proto\grpc\testing</Filter>
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\test.proto">
- <Filter>src\proto\grpc\testing</Filter>
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\test\cpp\interop\interop_server.cc">
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\interop\interop_server_bootstrap.cc">
<Filter>test\cpp\interop</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
- <Filter Include="src">
- <UniqueIdentifier>{9dfb04b3-9e58-7efb-70a2-b02ec8c5e83e}</UniqueIdentifier>
- </Filter>
- <Filter Include="src\proto">
- <UniqueIdentifier>{ebd8177f-6130-a4fb-1c41-d894f801e3b9}</UniqueIdentifier>
- </Filter>
- <Filter Include="src\proto\grpc">
- <UniqueIdentifier>{1df1acf2-4654-4530-10af-912381c69012}</UniqueIdentifier>
- </Filter>
- <Filter Include="src\proto\grpc\testing">
- <UniqueIdentifier>{ba56d830-1546-c07f-f5ee-03164e41914e}</UniqueIdentifier>
- </Filter>
<Filter Include="test">
<UniqueIdentifier>{02523054-816a-75a0-b24b-f527e99c7142}</UniqueIdentifier>
</Filter>
diff --git a/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj b/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj
new file mode 100644
index 0000000000..c4fbd54e22
--- /dev/null
+++ b/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj
@@ -0,0 +1,199 @@
+<?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>{18CF99B5-3C61-EC3D-9509-3C95334C3B88}</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\global.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'">
+ <TargetName>census_resource_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>census_resource_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\core\census\resource_test.c">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <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>{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/census_resource_test/census_resource_test.vcxproj.filters b/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj.filters
new file mode 100644
index 0000000000..93faac55d0
--- /dev/null
+++ b/vsprojects/vcxproj/test/census_resource_test/census_resource_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\census\resource_test.c">
+ <Filter>test\core\census</Filter>
+ </ClCompile>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="test">
+ <UniqueIdentifier>{313aad4e-d33b-88c5-7d94-e04a4cb0c912}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\core">
+ <UniqueIdentifier>{ff2d74ef-228a-1739-7fa7-7dccbec5b0c5}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\core\census">
+ <UniqueIdentifier>{4f529bd9-396f-027c-bc49-f9a6bbc97c72}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj
index 6a6ac5ebf1..1ccc6bb8dc 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj
@@ -20,7 +20,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{679EA55C-7399-53E8-79F0-82FBDB3DDE07}</ProjectGuid>
+ <ProjectGuid>{4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}</ProjectGuid>
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
</PropertyGroup>
@@ -60,14 +60,14 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
- <TargetName>h2_loadreporting_nosec_test</TargetName>
+ <TargetName>h2_load_reporting_nosec_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_loadreporting_nosec_test</TargetName>
+ <TargetName>h2_load_reporting_nosec_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,7 +158,7 @@
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\h2_loadreporting.c">
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\h2_load_reporting.c">
</ClCompile>
</ItemGroup>
<ItemGroup>
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj.filters
index 4ed1bb0c45..72df23ebc1 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj.filters
+++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj.filters
@@ -1,23 +1,23 @@
<?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_loadreporting.c">
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\h2_load_reporting.c">
<Filter>test\core\end2end\fixtures</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="test">
- <UniqueIdentifier>{8adc89fb-e447-77bc-c462-3dba6abcf344}</UniqueIdentifier>
+ <UniqueIdentifier>{abff9aef-586e-65d2-beb8-e6392ecf7440}</UniqueIdentifier>
</Filter>
<Filter Include="test\core">
- <UniqueIdentifier>{3c2c01f5-2a18-1bee-6ee0-217d415e2a95}</UniqueIdentifier>
+ <UniqueIdentifier>{fd31cbf1-8cff-2e6a-618d-a01855997839}</UniqueIdentifier>
</Filter>
<Filter Include="test\core\end2end">
- <UniqueIdentifier>{3efa0f41-5802-6a8e-36ee-f246a201a1a5}</UniqueIdentifier>
+ <UniqueIdentifier>{c6cc113f-ddb4-733b-5c10-8f98aa2d7d22}</UniqueIdentifier>
</Filter>
<Filter Include="test\core\end2end\fixtures">
- <UniqueIdentifier>{366eb24f-49e9-d57f-e20f-729d1e0fb892}</UniqueIdentifier>
+ <UniqueIdentifier>{2cd15a3b-a7e6-b847-b6c4-7c6cc03eacc2}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj
index 20765487bc..d5d1a15a82 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj
@@ -20,7 +20,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{B107130E-EA33-C114-9CB6-78A18C929F64}</ProjectGuid>
+ <ProjectGuid>{F0A06723-2E3E-FE97-34B7-A2BA26D98B83}</ProjectGuid>
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
</PropertyGroup>
@@ -60,14 +60,14 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
- <TargetName>h2_loadreporting_test</TargetName>
+ <TargetName>h2_load_reporting_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_loadreporting_test</TargetName>
+ <TargetName>h2_load_reporting_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,7 +158,7 @@
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\h2_loadreporting.c">
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\h2_load_reporting.c">
</ClCompile>
</ItemGroup>
<ItemGroup>
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj.filters
index afe54329ad..95b049c852 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj.filters
+++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj.filters
@@ -1,23 +1,23 @@
<?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_loadreporting.c">
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\h2_load_reporting.c">
<Filter>test\core\end2end\fixtures</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="test">
- <UniqueIdentifier>{8f73760a-74dc-05ef-65e1-fa8c44ccf918}</UniqueIdentifier>
+ <UniqueIdentifier>{467ceaa9-3a51-d5df-0556-1ef8e91f5d7d}</UniqueIdentifier>
</Filter>
<Filter Include="test\core">
- <UniqueIdentifier>{a280079e-b626-333e-0636-8fe6eb788ca1}</UniqueIdentifier>
+ <UniqueIdentifier>{1ec29254-9064-0338-78ca-94d8cfdbd95c}</UniqueIdentifier>
</Filter>
<Filter Include="test\core\end2end">
- <UniqueIdentifier>{c1aa73d6-503a-06c0-42b2-0793a4805e96}</UniqueIdentifier>
+ <UniqueIdentifier>{58fc84e1-7dc9-a517-359e-7d7e1c417432}</UniqueIdentifier>
</Filter>
<Filter Include="test\core\end2end\fixtures">
- <UniqueIdentifier>{3e738e89-dc27-f929-cc8f-1aa94c24345b}</UniqueIdentifier>
+ <UniqueIdentifier>{92ef09e0-592b-0ca5-4d79-5929ae159ed5}</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 28ced2dc7e..a500fe3a39 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
@@ -179,6 +179,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\empty_batch.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_call_init_fails.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_causes_close.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\graceful_server_shutdown.c">
@@ -193,6 +195,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\large_metadata.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\load_reporting_hook.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\max_concurrent_streams.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\max_message_length.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 7c725355d9..6f2294c750 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
@@ -43,6 +43,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\empty_batch.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_call_init_fails.c">
+ <Filter>test\core\end2end\tests</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_causes_close.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
@@ -64,6 +67,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\large_metadata.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\load_reporting_hook.c">
+ <Filter>test\core\end2end\tests</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\max_concurrent_streams.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 bc064cd6ac..76140894ca 100644
--- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj
@@ -181,6 +181,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\empty_batch.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_call_init_fails.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_causes_close.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\graceful_server_shutdown.c">
@@ -195,6 +197,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\large_metadata.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\load_reporting_hook.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\max_concurrent_streams.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\max_message_length.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 d959c80485..db336f09a9 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
@@ -46,6 +46,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\empty_batch.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_call_init_fails.c">
+ <Filter>test\core\end2end\tests</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_causes_close.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
@@ -67,6 +70,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\large_metadata.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\load_reporting_hook.c">
+ <Filter>test\core\end2end\tests</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\max_concurrent_streams.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
diff --git a/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj
new file mode 100644
index 0000000000..91b9a6eacc
--- /dev/null
+++ b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj
@@ -0,0 +1,215 @@
+<?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>{9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}</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>grpclb_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>grpclb_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)\..\src\proto\grpc\lb\v1\load_balancer.pb.cc">
+ </ClCompile>
+ <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\lb\v1\load_balancer.pb.h">
+ </ClInclude>
+ <ClCompile Include="$(SolutionDir)\..\src\proto\grpc\lb\v1\load_balancer.grpc.pb.cc">
+ </ClCompile>
+ <ClInclude Include="$(SolutionDir)\..\src\proto\grpc\lb\v1\load_balancer.grpc.pb.h">
+ </ClInclude>
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\grpclb\grpclb_test.cc">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj">
+ <Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</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\.\grpc\grpc.vcxproj">
+ <Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project>
+ </ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++\grpc++.vcxproj">
+ <Project>{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}</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>
+ </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/grpclb_test/grpclb_test.vcxproj.filters b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters
new file mode 100644
index 0000000000..5493df2e7b
--- /dev/null
+++ b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters
@@ -0,0 +1,39 @@
+<?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\lb\v1\load_balancer.proto">
+ <Filter>src\proto\grpc\lb\v1</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\grpclb\grpclb_test.cc">
+ <Filter>test\cpp\grpclb</Filter>
+ </ClCompile>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{082bbcbc-bbd8-db7d-afe9-fa0fec76863d}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto">
+ <UniqueIdentifier>{7c61995a-80c2-ef3d-0a4b-baf2221c12f8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc">
+ <UniqueIdentifier>{fc2920d4-902c-fdf0-d4b8-6b22e1361105}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc\lb">
+ <UniqueIdentifier>{4778352a-559f-b008-e3d2-4ae9181260df}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\proto\grpc\lb\v1">
+ <UniqueIdentifier>{36a4326b-4f2a-4720-b730-e40fe078fd40}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test">
+ <UniqueIdentifier>{e0ba55a2-37d9-5029-6f4e-64f097307340}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\cpp">
+ <UniqueIdentifier>{ad67d6ba-d08b-7879-2929-20f0f01c9918}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\cpp\grpclb">
+ <UniqueIdentifier>{4498fa30-2dab-584c-5711-a1055cec30f6}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj b/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj
index 37be682009..76efe30394 100644
--- a/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj
+++ b/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj
@@ -158,7 +158,7 @@
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="$(SolutionDir)\..\test\core\transport\chttp2\timeout_encoding_test.c">
+ <ClCompile Include="$(SolutionDir)\..\test\core\transport\timeout_encoding_test.c">
</ClCompile>
</ItemGroup>
<ItemGroup>
diff --git a/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj.filters b/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj.filters
index 3e3b8d21a4..d5fafc20ed 100644
--- a/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj.filters
+++ b/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj.filters
@@ -1,8 +1,8 @@
<?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\chttp2\timeout_encoding_test.c">
- <Filter>test\core\transport\chttp2</Filter>
+ <ClCompile Include="$(SolutionDir)\..\test\core\transport\timeout_encoding_test.c">
+ <Filter>test\core\transport</Filter>
</ClCompile>
</ItemGroup>
@@ -16,9 +16,6 @@
<Filter Include="test\core\transport">
<UniqueIdentifier>{3178e0c5-5a68-26eb-6bf6-a5a8dabb0a3c}</UniqueIdentifier>
</Filter>
- <Filter Include="test\core\transport\chttp2">
- <UniqueIdentifier>{40739011-4ce0-83f5-d2d6-af515bac7f87}</UniqueIdentifier>
- </Filter>
</ItemGroup>
</Project>