aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-03-31 10:26:53 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-03-31 10:26:53 -0700
commit8479c972e4f9fbf2a5bcf44048924c533d09a513 (patch)
tree508edd32b0d36a1b6f3887de42c8054330bd72a1
parentb92bb96ccf0042cc37f4ee0aad3722a0c765b210 (diff)
parent2b9012362ca03181eefaec22238c6100e77bb736 (diff)
Merge github.com:grpc/grpc into cleaner-posix2
-rw-r--r--BUILD45
-rw-r--r--Makefile21
-rw-r--r--binding.gyp9
-rw-r--r--build.yaml37
-rw-r--r--config.m416
-rw-r--r--gRPC.podspec21
-rwxr-xr-xgrpc.gemspec15
-rw-r--r--include/grpc/grpc.h3
-rw-r--r--include/grpc/impl/codegen/grpc_types.h7
-rw-r--r--package.json15
-rw-r--r--package.xml15
-rw-r--r--src/core/ext/lb_policy/grpclb/load_balancer_api.c (renamed from src/core/lib/client_config/lb_policies/load_balancer_api.c)2
-rw-r--r--src/core/ext/lb_policy/grpclb/load_balancer_api.h (renamed from src/core/lib/client_config/lb_policies/load_balancer_api.h)8
-rw-r--r--src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c (renamed from src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c)2
-rw-r--r--src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h (renamed from src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h)0
-rw-r--r--src/core/ext/lb_policy/pick_first/pick_first.c (renamed from src/core/lib/client_config/lb_policies/pick_first.c)38
-rw-r--r--src/core/ext/lb_policy/round_robin/round_robin.c (renamed from src/core/lib/client_config/lb_policies/round_robin.c)29
-rw-r--r--src/core/lib/channel/http_client_filter.c4
-rw-r--r--src/core/lib/channel/http_server_filter.c18
-rw-r--r--src/core/lib/client_config/lb_policy_registry.c7
-rw-r--r--src/core/lib/client_config/lb_policy_registry.h2
-rw-r--r--src/core/lib/iomgr/unix_sockets_posix_noop.c7
-rw-r--r--src/core/lib/surface/call.c15
-rw-r--r--src/core/lib/surface/init.c12
-rw-r--r--src/core/lib/surface/server.c30
-rw-r--r--src/core/lib/transport/static_metadata.c19
-rw-r--r--src/core/lib/transport/static_metadata.h106
-rw-r--r--src/core/lib/transport/transport.h7
-rw-r--r--src/core/plugin_registry/grpc_plugin_registry.c (renamed from src/core/lib/client_config/lb_policies/pick_first.h)21
-rw-r--r--src/core/plugin_registry/grpc_unsecure_plugin_registry.c (renamed from src/core/lib/client_config/lb_policies/round_robin.h)24
-rw-r--r--src/cpp/server/server.cc3
-rw-r--r--src/python/grpcio/grpc/_cython/imports.generated.h2
-rw-r--r--src/python/grpcio/grpc_core_dependencies.py9
-rw-r--r--src/ruby/ext/grpc/rb_grpc_imports.generated.h2
-rw-r--r--templates/src/core/plugin_registry.template52
-rw-r--r--test/core/bad_client/bad_client.c9
-rw-r--r--test/core/client_config/lb_policies_test.c3
-rw-r--r--test/core/end2end/end2end_nosec_tests.c6
-rw-r--r--test/core/end2end/end2end_tests.c6
-rw-r--r--test/core/end2end/fixtures/proxy.c9
-rwxr-xr-xtest/core/end2end/gen_build_yaml.py1
-rw-r--r--test/core/end2end/tests/idempotent_request.c248
-rw-r--r--test/core/end2end/tests/simple_request.c1
-rw-r--r--test/core/surface/server_test.c16
-rw-r--r--test/cpp/grpclb/grpclb_api_test.cc2
-rwxr-xr-xtools/buildgen/plugins/expand_filegroups.py20
-rwxr-xr-xtools/codegen/core/gen_load_balancing_proto.sh4
-rwxr-xr-xtools/codegen/core/gen_static_metadata.py29
-rwxr-xr-xtools/distrib/check_include_guards.py2
-rwxr-xr-xtools/distrib/check_nanopb_output.sh4
-rw-r--r--tools/doxygen/Doxyfile.core.internal15
-rw-r--r--tools/run_tests/sources_and_headers.json48
-rw-r--r--tools/run_tests/tests.json501
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj24
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj.filters87
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj24
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters87
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj2
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters3
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj2
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters3
61 files changed, 1373 insertions, 406 deletions
diff --git a/BUILD b/BUILD
index 45e962bcf2..9ef186bea2 100644
--- a/BUILD
+++ b/BUILD
@@ -159,6 +159,8 @@ cc_library(
cc_library(
name = "grpc",
srcs = [
+ "src/core/ext/lb_policy/grpclb/load_balancer_api.h",
+ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/ext/transport/chttp2/transport/alpn.h",
"src/core/ext/transport/chttp2/transport/bin_encoder.h",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h",
@@ -198,9 +200,6 @@ cc_library(
"src/core/lib/client_config/client_config.h",
"src/core/lib/client_config/connector.h",
"src/core/lib/client_config/initial_connect_string.h",
- "src/core/lib/client_config/lb_policies/load_balancer_api.h",
- "src/core/lib/client_config/lb_policies/pick_first.h",
- "src/core/lib/client_config/lb_policies/round_robin.h",
"src/core/lib/client_config/lb_policy.h",
"src/core/lib/client_config/lb_policy_factory.h",
"src/core/lib/client_config/lb_policy_registry.h",
@@ -259,7 +258,6 @@ cc_library(
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/lib/security/auth_filters.h",
"src/core/lib/security/b64.h",
"src/core/lib/security/credentials.h",
@@ -295,6 +293,10 @@ cc_library(
"src/core/lib/tsi/ssl_types.h",
"src/core/lib/tsi/transport_security.h",
"src/core/lib/tsi/transport_security_interface.h",
+ "src/core/ext/lb_policy/grpclb/load_balancer_api.c",
+ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/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/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/transport/chttp2/client/secure/secure_channel_create.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
@@ -342,9 +344,6 @@ cc_library(
"src/core/lib/client_config/connector.c",
"src/core/lib/client_config/default_initial_connect_string.c",
"src/core/lib/client_config/initial_connect_string.c",
- "src/core/lib/client_config/lb_policies/load_balancer_api.c",
- "src/core/lib/client_config/lb_policies/pick_first.c",
- "src/core/lib/client_config/lb_policies/round_robin.c",
"src/core/lib/client_config/lb_policy.c",
"src/core/lib/client_config/lb_policy_factory.c",
"src/core/lib/client_config/lb_policy_registry.c",
@@ -407,7 +406,6 @@ cc_library(
"src/core/lib/json/json_reader.c",
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c",
"src/core/lib/security/b64.c",
"src/core/lib/security/client_auth_filter.c",
"src/core/lib/security/credentials.c",
@@ -453,6 +451,7 @@ cc_library(
"src/core/lib/tsi/fake_transport_security.c",
"src/core/lib/tsi/ssl_transport_security.c",
"src/core/lib/tsi/transport_security.c",
+ "src/core/plugin_registry/grpc_plugin_registry.c",
],
hdrs = [
"include/grpc/byte_buffer.h",
@@ -526,6 +525,8 @@ cc_library(
cc_library(
name = "grpc_unsecure",
srcs = [
+ "src/core/ext/lb_policy/grpclb/load_balancer_api.h",
+ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/ext/transport/chttp2/transport/alpn.h",
"src/core/ext/transport/chttp2/transport/bin_encoder.h",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h",
@@ -565,9 +566,6 @@ cc_library(
"src/core/lib/client_config/client_config.h",
"src/core/lib/client_config/connector.h",
"src/core/lib/client_config/initial_connect_string.h",
- "src/core/lib/client_config/lb_policies/load_balancer_api.h",
- "src/core/lib/client_config/lb_policies/pick_first.h",
- "src/core/lib/client_config/lb_policies/round_robin.h",
"src/core/lib/client_config/lb_policy.h",
"src/core/lib/client_config/lb_policy_factory.h",
"src/core/lib/client_config/lb_policy_registry.h",
@@ -626,7 +624,6 @@ cc_library(
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/lib/statistics/census_interface.h",
"src/core/lib/statistics/census_rpc_stats.h",
"src/core/lib/surface/api_trace.h",
@@ -648,6 +645,10 @@ cc_library(
"src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
+ "src/core/ext/lb_policy/grpclb/load_balancer_api.c",
+ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/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/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
"src/core/ext/transport/chttp2/transport/alpn.c",
@@ -693,9 +694,6 @@ cc_library(
"src/core/lib/client_config/connector.c",
"src/core/lib/client_config/default_initial_connect_string.c",
"src/core/lib/client_config/initial_connect_string.c",
- "src/core/lib/client_config/lb_policies/load_balancer_api.c",
- "src/core/lib/client_config/lb_policies/pick_first.c",
- "src/core/lib/client_config/lb_policies/round_robin.c",
"src/core/lib/client_config/lb_policy.c",
"src/core/lib/client_config/lb_policy_factory.c",
"src/core/lib/client_config/lb_policy_registry.c",
@@ -757,7 +755,6 @@ cc_library(
"src/core/lib/json/json_reader.c",
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c",
"src/core/lib/surface/alarm.c",
"src/core/lib/surface/api_trace.c",
"src/core/lib/surface/byte_buffer.c",
@@ -786,6 +783,7 @@ cc_library(
"src/core/lib/transport/static_metadata.c",
"src/core/lib/transport/transport.c",
"src/core/lib/transport/transport_op_string.c",
+ "src/core/plugin_registry/grpc_unsecure_plugin_registry.c",
],
hdrs = [
"include/grpc/byte_buffer.h",
@@ -1353,6 +1351,10 @@ objc_library(
objc_library(
name = "grpc_objc",
srcs = [
+ "src/core/ext/lb_policy/grpclb/load_balancer_api.c",
+ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/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/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/transport/chttp2/client/secure/secure_channel_create.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
@@ -1400,9 +1402,6 @@ objc_library(
"src/core/lib/client_config/connector.c",
"src/core/lib/client_config/default_initial_connect_string.c",
"src/core/lib/client_config/initial_connect_string.c",
- "src/core/lib/client_config/lb_policies/load_balancer_api.c",
- "src/core/lib/client_config/lb_policies/pick_first.c",
- "src/core/lib/client_config/lb_policies/round_robin.c",
"src/core/lib/client_config/lb_policy.c",
"src/core/lib/client_config/lb_policy_factory.c",
"src/core/lib/client_config/lb_policy_registry.c",
@@ -1465,7 +1464,6 @@ objc_library(
"src/core/lib/json/json_reader.c",
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c",
"src/core/lib/security/b64.c",
"src/core/lib/security/client_auth_filter.c",
"src/core/lib/security/credentials.c",
@@ -1511,6 +1509,7 @@ objc_library(
"src/core/lib/tsi/fake_transport_security.c",
"src/core/lib/tsi/ssl_transport_security.c",
"src/core/lib/tsi/transport_security.c",
+ "src/core/plugin_registry/grpc_plugin_registry.c",
],
hdrs = [
"include/grpc/byte_buffer.h",
@@ -1526,6 +1525,8 @@ objc_library(
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
"include/grpc/status.h",
+ "src/core/ext/lb_policy/grpclb/load_balancer_api.h",
+ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/ext/transport/chttp2/transport/alpn.h",
"src/core/ext/transport/chttp2/transport/bin_encoder.h",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h",
@@ -1565,9 +1566,6 @@ objc_library(
"src/core/lib/client_config/client_config.h",
"src/core/lib/client_config/connector.h",
"src/core/lib/client_config/initial_connect_string.h",
- "src/core/lib/client_config/lb_policies/load_balancer_api.h",
- "src/core/lib/client_config/lb_policies/pick_first.h",
- "src/core/lib/client_config/lb_policies/round_robin.h",
"src/core/lib/client_config/lb_policy.h",
"src/core/lib/client_config/lb_policy_factory.h",
"src/core/lib/client_config/lb_policy_registry.h",
@@ -1626,7 +1624,6 @@ objc_library(
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/lib/security/auth_filters.h",
"src/core/lib/security/b64.h",
"src/core/lib/security/credentials.h",
diff --git a/Makefile b/Makefile
index 175530cbd0..43c92be8b2 100644
--- a/Makefile
+++ b/Makefile
@@ -2426,6 +2426,10 @@ endif
LIBGRPC_SRC = \
+ src/core/ext/lb_policy/grpclb/load_balancer_api.c \
+ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/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/transport/chttp2/client/insecure/channel_create.c \
src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \
src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
@@ -2473,9 +2477,6 @@ LIBGRPC_SRC = \
src/core/lib/client_config/connector.c \
src/core/lib/client_config/default_initial_connect_string.c \
src/core/lib/client_config/initial_connect_string.c \
- src/core/lib/client_config/lb_policies/load_balancer_api.c \
- src/core/lib/client_config/lb_policies/pick_first.c \
- src/core/lib/client_config/lb_policies/round_robin.c \
src/core/lib/client_config/lb_policy.c \
src/core/lib/client_config/lb_policy_factory.c \
src/core/lib/client_config/lb_policy_registry.c \
@@ -2538,7 +2539,6 @@ LIBGRPC_SRC = \
src/core/lib/json/json_reader.c \
src/core/lib/json/json_string.c \
src/core/lib/json/json_writer.c \
- src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c \
src/core/lib/security/b64.c \
src/core/lib/security/client_auth_filter.c \
src/core/lib/security/credentials.c \
@@ -2584,6 +2584,7 @@ LIBGRPC_SRC = \
src/core/lib/tsi/fake_transport_security.c \
src/core/lib/tsi/ssl_transport_security.c \
src/core/lib/tsi/transport_security.c \
+ src/core/plugin_registry/grpc_plugin_registry.c \
third_party/nanopb/pb_common.c \
third_party/nanopb/pb_decode.c \
third_party/nanopb/pb_encode.c \
@@ -2784,6 +2785,10 @@ endif
LIBGRPC_UNSECURE_SRC = \
+ src/core/ext/lb_policy/grpclb/load_balancer_api.c \
+ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/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/transport/chttp2/client/insecure/channel_create.c \
src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
src/core/ext/transport/chttp2/transport/alpn.c \
@@ -2829,9 +2834,6 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/client_config/connector.c \
src/core/lib/client_config/default_initial_connect_string.c \
src/core/lib/client_config/initial_connect_string.c \
- src/core/lib/client_config/lb_policies/load_balancer_api.c \
- src/core/lib/client_config/lb_policies/pick_first.c \
- src/core/lib/client_config/lb_policies/round_robin.c \
src/core/lib/client_config/lb_policy.c \
src/core/lib/client_config/lb_policy_factory.c \
src/core/lib/client_config/lb_policy_registry.c \
@@ -2893,7 +2895,6 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/json/json_reader.c \
src/core/lib/json/json_string.c \
src/core/lib/json/json_writer.c \
- src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c \
src/core/lib/surface/alarm.c \
src/core/lib/surface/api_trace.c \
src/core/lib/surface/byte_buffer.c \
@@ -2922,6 +2923,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/transport/static_metadata.c \
src/core/lib/transport/transport.c \
src/core/lib/transport/transport_op_string.c \
+ src/core/plugin_registry/grpc_unsecure_plugin_registry.c \
third_party/nanopb/pb_common.c \
third_party/nanopb/pb_decode.c \
third_party/nanopb/pb_encode.c \
@@ -5810,6 +5812,7 @@ LIBEND2END_TESTS_SRC = \
test/core/end2end/tests/graceful_server_shutdown.c \
test/core/end2end/tests/high_initial_seqno.c \
test/core/end2end/tests/hpack_size.c \
+ 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/max_concurrent_streams.c \
@@ -5884,6 +5887,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \
test/core/end2end/tests/graceful_server_shutdown.c \
test/core/end2end/tests/high_initial_seqno.c \
test/core/end2end/tests/hpack_size.c \
+ 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/max_concurrent_streams.c \
@@ -13528,6 +13532,7 @@ src/core/lib/surface/init_secure.c: $(OPENSSL_DEP)
src/core/lib/tsi/fake_transport_security.c: $(OPENSSL_DEP)
src/core/lib/tsi/ssl_transport_security.c: $(OPENSSL_DEP)
src/core/lib/tsi/transport_security.c: $(OPENSSL_DEP)
+src/core/plugin_registry/grpc_plugin_registry.c: $(OPENSSL_DEP)
src/cpp/client/secure_credentials.cc: $(OPENSSL_DEP)
src/cpp/common/auth_property_iterator.cc: $(OPENSSL_DEP)
src/cpp/common/secure_auth_context.cc: $(OPENSSL_DEP)
diff --git a/binding.gyp b/binding.gyp
index 95aab0feed..f1b591c12f 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -558,6 +558,10 @@
'gpr',
],
'sources': [
+ 'src/core/ext/lb_policy/grpclb/load_balancer_api.c',
+ 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/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/transport/chttp2/client/insecure/channel_create.c',
'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
@@ -605,9 +609,6 @@
'src/core/lib/client_config/connector.c',
'src/core/lib/client_config/default_initial_connect_string.c',
'src/core/lib/client_config/initial_connect_string.c',
- 'src/core/lib/client_config/lb_policies/load_balancer_api.c',
- 'src/core/lib/client_config/lb_policies/pick_first.c',
- 'src/core/lib/client_config/lb_policies/round_robin.c',
'src/core/lib/client_config/lb_policy.c',
'src/core/lib/client_config/lb_policy_factory.c',
'src/core/lib/client_config/lb_policy_registry.c',
@@ -670,7 +671,6 @@
'src/core/lib/json/json_reader.c',
'src/core/lib/json/json_string.c',
'src/core/lib/json/json_writer.c',
- 'src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c',
'src/core/lib/security/b64.c',
'src/core/lib/security/client_auth_filter.c',
'src/core/lib/security/credentials.c',
@@ -716,6 +716,7 @@
'src/core/lib/tsi/fake_transport_security.c',
'src/core/lib/tsi/ssl_transport_security.c',
'src/core/lib/tsi/transport_security.c',
+ 'src/core/plugin_registry/grpc_plugin_registry.c',
'third_party/nanopb/pb_common.c',
'third_party/nanopb/pb_decode.c',
'third_party/nanopb/pb_encode.c',
diff --git a/build.yaml b/build.yaml
index 30adba3af6..f704643702 100644
--- a/build.yaml
+++ b/build.yaml
@@ -262,9 +262,6 @@ filegroups:
- src/core/lib/client_config/client_config.h
- src/core/lib/client_config/connector.h
- src/core/lib/client_config/initial_connect_string.h
- - src/core/lib/client_config/lb_policies/load_balancer_api.h
- - src/core/lib/client_config/lb_policies/pick_first.h
- - src/core/lib/client_config/lb_policies/round_robin.h
- src/core/lib/client_config/lb_policy.h
- src/core/lib/client_config/lb_policy_factory.h
- src/core/lib/client_config/lb_policy_registry.h
@@ -323,7 +320,6 @@ filegroups:
- src/core/lib/json/json_common.h
- src/core/lib/json/json_reader.h
- src/core/lib/json/json_writer.h
- - src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h
- src/core/lib/statistics/census_interface.h
- src/core/lib/statistics/census_rpc_stats.h
- src/core/lib/surface/api_trace.h
@@ -362,9 +358,6 @@ filegroups:
- src/core/lib/client_config/connector.c
- src/core/lib/client_config/default_initial_connect_string.c
- src/core/lib/client_config/initial_connect_string.c
- - src/core/lib/client_config/lb_policies/load_balancer_api.c
- - src/core/lib/client_config/lb_policies/pick_first.c
- - src/core/lib/client_config/lb_policies/round_robin.c
- src/core/lib/client_config/lb_policy.c
- src/core/lib/client_config/lb_policy_factory.c
- src/core/lib/client_config/lb_policy_registry.c
@@ -426,7 +419,6 @@ filegroups:
- src/core/lib/json/json_reader.c
- src/core/lib/json/json_string.c
- src/core/lib/json/json_writer.c
- - src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c
- src/core/lib/surface/alarm.c
- src/core/lib/surface/api_trace.c
- src/core/lib/surface/byte_buffer.c
@@ -462,6 +454,27 @@ filegroups:
- include/grpc/impl/codegen/grpc_types.h
- include/grpc/impl/codegen/propagation_bits.h
- include/grpc/impl/codegen/status.h
+- name: grpc_lb_policy_grpclb
+ headers:
+ - src/core/ext/lb_policy/grpclb/load_balancer_api.h
+ - src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h
+ src:
+ - src/core/ext/lb_policy/grpclb/load_balancer_api.c
+ - src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c
+ uses:
+ - grpc_base
+- name: grpc_lb_policy_pick_first
+ src:
+ - src/core/ext/lb_policy/pick_first/pick_first.c
+ plugin: grpc_lb_policy_pick_first
+ uses:
+ - grpc_base
+- name: grpc_lb_policy_round_robin
+ src:
+ - src/core/ext/lb_policy/round_robin/round_robin.c
+ plugin: grpc_lb_policy_round_robin
+ uses:
+ - grpc_base
- name: grpc_secure
headers:
- src/core/lib/security/auth_filters.h
@@ -635,10 +648,14 @@ libs:
- grpc_transport_chttp2_client_secure
- grpc_transport_chttp2_server_insecure
- grpc_transport_chttp2_client_insecure
+ - grpc_lb_policy_grpclb
+ - grpc_lb_policy_pick_first
+ - grpc_lb_policy_round_robin
- grpc_secure
- grpc_codegen
- census
- nanopb
+ generate_plugin_registry: true
secure: true
vs_packages:
- grpc.dependencies.openssl
@@ -718,9 +735,13 @@ libs:
- grpc_base
- grpc_transport_chttp2_server_insecure
- grpc_transport_chttp2_client_insecure
+ - grpc_lb_policy_grpclb
+ - grpc_lb_policy_pick_first
+ - grpc_lb_policy_round_robin
- grpc_codegen
- census
- nanopb
+ generate_plugin_registry: true
secure: false
vs_project_guid: '{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}'
- name: grpc_zookeeper
diff --git a/config.m4 b/config.m4
index 1357058114..fbccb0ca6c 100644
--- a/config.m4
+++ b/config.m4
@@ -80,6 +80,10 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/support/tmpfile_posix.c \
src/core/lib/support/tmpfile_win32.c \
src/core/lib/support/wrap_memcpy.c \
+ src/core/ext/lb_policy/grpclb/load_balancer_api.c \
+ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/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/transport/chttp2/client/insecure/channel_create.c \
src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \
src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
@@ -127,9 +131,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/client_config/connector.c \
src/core/lib/client_config/default_initial_connect_string.c \
src/core/lib/client_config/initial_connect_string.c \
- src/core/lib/client_config/lb_policies/load_balancer_api.c \
- src/core/lib/client_config/lb_policies/pick_first.c \
- src/core/lib/client_config/lb_policies/round_robin.c \
src/core/lib/client_config/lb_policy.c \
src/core/lib/client_config/lb_policy_factory.c \
src/core/lib/client_config/lb_policy_registry.c \
@@ -192,7 +193,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/json/json_reader.c \
src/core/lib/json/json_string.c \
src/core/lib/json/json_writer.c \
- src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c \
src/core/lib/security/b64.c \
src/core/lib/security/client_auth_filter.c \
src/core/lib/security/credentials.c \
@@ -238,6 +238,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/tsi/fake_transport_security.c \
src/core/lib/tsi/ssl_transport_security.c \
src/core/lib/tsi/transport_security.c \
+ src/core/plugin_registry/grpc_plugin_registry.c \
third_party/nanopb/pb_common.c \
third_party/nanopb/pb_decode.c \
third_party/nanopb/pb_encode.c \
@@ -543,6 +544,10 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/php/ext/grpc)
PHP_ADD_BUILD_DIR($ext_builddir/src/boringssl)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/pick_first)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/round_robin)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client/insecure)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client/secure)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/insecure)
@@ -551,7 +556,6 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/census)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/channel)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/client_config)
- PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/client_config/lb_policies)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/client_config/resolvers)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/compression)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/debug)
@@ -559,12 +563,12 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/json)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/profiling)
- PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/proto/grpc/lb/v0)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/support)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/surface)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/transport)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/tsi)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/plugin_registry)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/aes)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/asn1)
diff --git a/gRPC.podspec b/gRPC.podspec
index f2a6c41d83..69816750c5 100644
--- a/gRPC.podspec
+++ b/gRPC.podspec
@@ -161,6 +161,8 @@ Pod::Spec.new do |s|
'src/core/lib/support/tmpfile_posix.c',
'src/core/lib/support/tmpfile_win32.c',
'src/core/lib/support/wrap_memcpy.c',
+ 'src/core/ext/lb_policy/grpclb/load_balancer_api.h',
+ 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h',
'src/core/ext/transport/chttp2/transport/alpn.h',
'src/core/ext/transport/chttp2/transport/bin_encoder.h',
'src/core/ext/transport/chttp2/transport/chttp2_transport.h',
@@ -200,9 +202,6 @@ Pod::Spec.new do |s|
'src/core/lib/client_config/client_config.h',
'src/core/lib/client_config/connector.h',
'src/core/lib/client_config/initial_connect_string.h',
- 'src/core/lib/client_config/lb_policies/load_balancer_api.h',
- 'src/core/lib/client_config/lb_policies/pick_first.h',
- 'src/core/lib/client_config/lb_policies/round_robin.h',
'src/core/lib/client_config/lb_policy.h',
'src/core/lib/client_config/lb_policy_factory.h',
'src/core/lib/client_config/lb_policy_registry.h',
@@ -261,7 +260,6 @@ Pod::Spec.new do |s|
'src/core/lib/json/json_common.h',
'src/core/lib/json/json_reader.h',
'src/core/lib/json/json_writer.h',
- 'src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h',
'src/core/lib/security/auth_filters.h',
'src/core/lib/security/b64.h',
'src/core/lib/security/credentials.h',
@@ -314,6 +312,10 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/propagation_bits.h',
'include/grpc/impl/codegen/status.h',
'include/grpc/status.h',
+ 'src/core/ext/lb_policy/grpclb/load_balancer_api.c',
+ 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/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/transport/chttp2/client/insecure/channel_create.c',
'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
@@ -361,9 +363,6 @@ Pod::Spec.new do |s|
'src/core/lib/client_config/connector.c',
'src/core/lib/client_config/default_initial_connect_string.c',
'src/core/lib/client_config/initial_connect_string.c',
- 'src/core/lib/client_config/lb_policies/load_balancer_api.c',
- 'src/core/lib/client_config/lb_policies/pick_first.c',
- 'src/core/lib/client_config/lb_policies/round_robin.c',
'src/core/lib/client_config/lb_policy.c',
'src/core/lib/client_config/lb_policy_factory.c',
'src/core/lib/client_config/lb_policy_registry.c',
@@ -426,7 +425,6 @@ Pod::Spec.new do |s|
'src/core/lib/json/json_reader.c',
'src/core/lib/json/json_string.c',
'src/core/lib/json/json_writer.c',
- 'src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c',
'src/core/lib/security/b64.c',
'src/core/lib/security/client_auth_filter.c',
'src/core/lib/security/credentials.c',
@@ -472,6 +470,7 @@ Pod::Spec.new do |s|
'src/core/lib/tsi/fake_transport_security.c',
'src/core/lib/tsi/ssl_transport_security.c',
'src/core/lib/tsi/transport_security.c',
+ 'src/core/plugin_registry/grpc_plugin_registry.c',
'third_party/nanopb/pb_common.c',
'third_party/nanopb/pb_decode.c',
'third_party/nanopb/pb_encode.c'
@@ -488,6 +487,8 @@ Pod::Spec.new do |s|
'src/core/lib/support/thd_internal.h',
'src/core/lib/support/time_precise.h',
'src/core/lib/support/tmpfile.h',
+ 'src/core/ext/lb_policy/grpclb/load_balancer_api.h',
+ 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h',
'src/core/ext/transport/chttp2/transport/alpn.h',
'src/core/ext/transport/chttp2/transport/bin_encoder.h',
'src/core/ext/transport/chttp2/transport/chttp2_transport.h',
@@ -527,9 +528,6 @@ Pod::Spec.new do |s|
'src/core/lib/client_config/client_config.h',
'src/core/lib/client_config/connector.h',
'src/core/lib/client_config/initial_connect_string.h',
- 'src/core/lib/client_config/lb_policies/load_balancer_api.h',
- 'src/core/lib/client_config/lb_policies/pick_first.h',
- 'src/core/lib/client_config/lb_policies/round_robin.h',
'src/core/lib/client_config/lb_policy.h',
'src/core/lib/client_config/lb_policy_factory.h',
'src/core/lib/client_config/lb_policy_registry.h',
@@ -588,7 +586,6 @@ Pod::Spec.new do |s|
'src/core/lib/json/json_common.h',
'src/core/lib/json/json_reader.h',
'src/core/lib/json/json_writer.h',
- 'src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h',
'src/core/lib/security/auth_filters.h',
'src/core/lib/security/b64.h',
'src/core/lib/security/credentials.h',
diff --git a/grpc.gemspec b/grpc.gemspec
index 6a0d0b45a4..a45d513f6d 100755
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -157,6 +157,8 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/impl/codegen/propagation_bits.h )
s.files += %w( include/grpc/impl/codegen/status.h )
s.files += %w( include/grpc/status.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/v0/load_balancer.pb.h )
s.files += %w( src/core/ext/transport/chttp2/transport/alpn.h )
s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.h )
s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.h )
@@ -196,9 +198,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/client_config/client_config.h )
s.files += %w( src/core/lib/client_config/connector.h )
s.files += %w( src/core/lib/client_config/initial_connect_string.h )
- s.files += %w( src/core/lib/client_config/lb_policies/load_balancer_api.h )
- s.files += %w( src/core/lib/client_config/lb_policies/pick_first.h )
- s.files += %w( src/core/lib/client_config/lb_policies/round_robin.h )
s.files += %w( src/core/lib/client_config/lb_policy.h )
s.files += %w( src/core/lib/client_config/lb_policy_factory.h )
s.files += %w( src/core/lib/client_config/lb_policy_registry.h )
@@ -257,7 +256,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/json/json_common.h )
s.files += %w( src/core/lib/json/json_reader.h )
s.files += %w( src/core/lib/json/json_writer.h )
- s.files += %w( src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h )
s.files += %w( src/core/lib/security/auth_filters.h )
s.files += %w( src/core/lib/security/b64.h )
s.files += %w( src/core/lib/security/credentials.h )
@@ -297,6 +295,10 @@ Gem::Specification.new do |s|
s.files += %w( third_party/nanopb/pb_common.h )
s.files += %w( third_party/nanopb/pb_decode.h )
s.files += %w( third_party/nanopb/pb_encode.h )
+ 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/v0/load_balancer.pb.c )
+ s.files += %w( src/core/ext/lb_policy/pick_first/pick_first.c )
+ s.files += %w( src/core/ext/lb_policy/round_robin/round_robin.c )
s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c )
s.files += %w( src/core/ext/transport/chttp2/client/secure/secure_channel_create.c )
s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c )
@@ -344,9 +346,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/client_config/connector.c )
s.files += %w( src/core/lib/client_config/default_initial_connect_string.c )
s.files += %w( src/core/lib/client_config/initial_connect_string.c )
- s.files += %w( src/core/lib/client_config/lb_policies/load_balancer_api.c )
- s.files += %w( src/core/lib/client_config/lb_policies/pick_first.c )
- s.files += %w( src/core/lib/client_config/lb_policies/round_robin.c )
s.files += %w( src/core/lib/client_config/lb_policy.c )
s.files += %w( src/core/lib/client_config/lb_policy_factory.c )
s.files += %w( src/core/lib/client_config/lb_policy_registry.c )
@@ -409,7 +408,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/json/json_reader.c )
s.files += %w( src/core/lib/json/json_string.c )
s.files += %w( src/core/lib/json/json_writer.c )
- s.files += %w( src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c )
s.files += %w( src/core/lib/security/b64.c )
s.files += %w( src/core/lib/security/client_auth_filter.c )
s.files += %w( src/core/lib/security/credentials.c )
@@ -455,6 +453,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/tsi/fake_transport_security.c )
s.files += %w( src/core/lib/tsi/ssl_transport_security.c )
s.files += %w( src/core/lib/tsi/transport_security.c )
+ s.files += %w( src/core/plugin_registry/grpc_plugin_registry.c )
s.files += %w( third_party/nanopb/pb_common.c )
s.files += %w( third_party/nanopb/pb_decode.c )
s.files += %w( third_party/nanopb/pb_encode.c )
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index fe0cf28b3b..dbd2cc0000 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -297,7 +297,8 @@ GRPCAPI grpc_call_error grpc_server_request_call(
Must be called before grpc_server_start.
Returns NULL on failure. */
GRPCAPI void *grpc_server_register_method(grpc_server *server,
- const char *method, const char *host);
+ const char *method, const char *host,
+ uint32_t flags);
/** Request notification of a new pre-registered call. 'cq_for_notification'
must have been registered to the server via
diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h
index b11f6ffec4..993fc97adb 100644
--- a/include/grpc/impl/codegen/grpc_types.h
+++ b/include/grpc/impl/codegen/grpc_types.h
@@ -199,6 +199,12 @@ typedef enum grpc_call_error {
/** Mask of all valid flags. */
#define GRPC_WRITE_USED_MASK (GRPC_WRITE_BUFFER_HINT | GRPC_WRITE_NO_COMPRESS)
+/* Initial metadata flags */
+/** Signal that the call is idempotent */
+#define GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST (0x00000010u)
+/** Mask of all valid flags */
+#define GRPC_INITIAL_METADATA_USED_MASK GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST
+
/** A single metadata element */
typedef struct grpc_metadata {
const char *key;
@@ -250,6 +256,7 @@ typedef struct {
char *host;
size_t host_capacity;
gpr_timespec deadline;
+ uint32_t flags;
void *reserved;
} grpc_call_details;
diff --git a/package.json b/package.json
index 560b5919e5..5974a3b7db 100644
--- a/package.json
+++ b/package.json
@@ -100,6 +100,8 @@
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
"include/grpc/status.h",
+ "src/core/ext/lb_policy/grpclb/load_balancer_api.h",
+ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/ext/transport/chttp2/transport/alpn.h",
"src/core/ext/transport/chttp2/transport/bin_encoder.h",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h",
@@ -139,9 +141,6 @@
"src/core/lib/client_config/client_config.h",
"src/core/lib/client_config/connector.h",
"src/core/lib/client_config/initial_connect_string.h",
- "src/core/lib/client_config/lb_policies/load_balancer_api.h",
- "src/core/lib/client_config/lb_policies/pick_first.h",
- "src/core/lib/client_config/lb_policies/round_robin.h",
"src/core/lib/client_config/lb_policy.h",
"src/core/lib/client_config/lb_policy_factory.h",
"src/core/lib/client_config/lb_policy_registry.h",
@@ -200,7 +199,6 @@
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/lib/security/auth_filters.h",
"src/core/lib/security/b64.h",
"src/core/lib/security/credentials.h",
@@ -240,6 +238,10 @@
"third_party/nanopb/pb_common.h",
"third_party/nanopb/pb_decode.h",
"third_party/nanopb/pb_encode.h",
+ "src/core/ext/lb_policy/grpclb/load_balancer_api.c",
+ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/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/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/transport/chttp2/client/secure/secure_channel_create.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
@@ -287,9 +289,6 @@
"src/core/lib/client_config/connector.c",
"src/core/lib/client_config/default_initial_connect_string.c",
"src/core/lib/client_config/initial_connect_string.c",
- "src/core/lib/client_config/lb_policies/load_balancer_api.c",
- "src/core/lib/client_config/lb_policies/pick_first.c",
- "src/core/lib/client_config/lb_policies/round_robin.c",
"src/core/lib/client_config/lb_policy.c",
"src/core/lib/client_config/lb_policy_factory.c",
"src/core/lib/client_config/lb_policy_registry.c",
@@ -352,7 +351,6 @@
"src/core/lib/json/json_reader.c",
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c",
"src/core/lib/security/b64.c",
"src/core/lib/security/client_auth_filter.c",
"src/core/lib/security/credentials.c",
@@ -398,6 +396,7 @@
"src/core/lib/tsi/fake_transport_security.c",
"src/core/lib/tsi/ssl_transport_security.c",
"src/core/lib/tsi/transport_security.c",
+ "src/core/plugin_registry/grpc_plugin_registry.c",
"third_party/nanopb/pb_common.c",
"third_party/nanopb/pb_decode.c",
"third_party/nanopb/pb_encode.c",
diff --git a/package.xml b/package.xml
index 6c11475d0f..82ae36db82 100644
--- a/package.xml
+++ b/package.xml
@@ -161,6 +161,8 @@
<file baseinstalldir="/" name="include/grpc/impl/codegen/propagation_bits.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/status.h" role="src" />
<file baseinstalldir="/" name="include/grpc/status.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/v0/load_balancer.pb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/alpn.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/bin_encoder.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/chttp2_transport.h" role="src" />
@@ -200,9 +202,6 @@
<file baseinstalldir="/" name="src/core/lib/client_config/client_config.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/client_config/connector.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/client_config/initial_connect_string.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/client_config/lb_policies/load_balancer_api.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/client_config/lb_policies/pick_first.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/client_config/lb_policies/round_robin.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/client_config/lb_policy.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/client_config/lb_policy_factory.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/client_config/lb_policy_registry.h" role="src" />
@@ -261,7 +260,6 @@
<file baseinstalldir="/" name="src/core/lib/json/json_common.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/json/json_reader.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/json/json_writer.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/auth_filters.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/b64.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/credentials.h" role="src" />
@@ -301,6 +299,10 @@
<file baseinstalldir="/" name="third_party/nanopb/pb_common.h" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_decode.h" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_encode.h" 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/v0/load_balancer.pb.c" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/lb_policy/pick_first/pick_first.c" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/lb_policy/round_robin/round_robin.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/secure/secure_channel_create.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/insecure/server_chttp2.c" role="src" />
@@ -348,9 +350,6 @@
<file baseinstalldir="/" name="src/core/lib/client_config/connector.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/client_config/default_initial_connect_string.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/client_config/initial_connect_string.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/client_config/lb_policies/load_balancer_api.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/client_config/lb_policies/pick_first.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/client_config/lb_policies/round_robin.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/client_config/lb_policy.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/client_config/lb_policy_factory.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/client_config/lb_policy_registry.c" role="src" />
@@ -413,7 +412,6 @@
<file baseinstalldir="/" name="src/core/lib/json/json_reader.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/json/json_string.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/json/json_writer.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/b64.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/client_auth_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/credentials.c" role="src" />
@@ -459,6 +457,7 @@
<file baseinstalldir="/" name="src/core/lib/tsi/fake_transport_security.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/tsi/ssl_transport_security.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/tsi/transport_security.c" role="src" />
+ <file baseinstalldir="/" name="src/core/plugin_registry/grpc_plugin_registry.c" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_common.c" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_decode.c" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_encode.c" role="src" />
diff --git a/src/core/lib/client_config/lb_policies/load_balancer_api.c b/src/core/ext/lb_policy/grpclb/load_balancer_api.c
index 4cbed200df..d8af644870 100644
--- a/src/core/lib/client_config/lb_policies/load_balancer_api.c
+++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.c
@@ -31,7 +31,7 @@
*
*/
-#include "src/core/lib/client_config/lb_policies/load_balancer_api.h"
+#include "src/core/ext/lb_policy/grpclb/load_balancer_api.h"
#include "third_party/nanopb/pb_decode.h"
#include "third_party/nanopb/pb_encode.h"
diff --git a/src/core/lib/client_config/lb_policies/load_balancer_api.h b/src/core/ext/lb_policy/grpclb/load_balancer_api.h
index 83299adfa9..d329a2ffe8 100644
--- a/src/core/lib/client_config/lb_policies/load_balancer_api.h
+++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.h
@@ -31,13 +31,13 @@
*
*/
-#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H
-#define GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H
+#ifndef GRPC_CORE_EXT_LB_POLICY_GRPCLB_LOAD_BALANCER_API_H
+#define GRPC_CORE_EXT_LB_POLICY_GRPCLB_LOAD_BALANCER_API_H
#include <grpc/support/slice_buffer.h>
+#include "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h"
#include "src/core/lib/client_config/lb_policy_factory.h"
-#include "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h"
#ifdef __cplusplus
extern "C" {
@@ -82,4 +82,4 @@ void grpc_grpclb_response_destroy(grpc_grpclb_response *response);
}
#endif
-#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H */
+#endif /* GRPC_CORE_EXT_LB_POLICY_GRPCLB_LOAD_BALANCER_API_H */
diff --git a/src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c
index 8f82141f96..9719673181 100644
--- a/src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c
+++ b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c
@@ -33,7 +33,7 @@
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.5-dev */
-#include "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h"
+#include "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h"
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
diff --git a/src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h
index 3599f881bb..3599f881bb 100644
--- a/src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h
+++ b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h
diff --git a/src/core/lib/client_config/lb_policies/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c
index 9ac550d9e7..95fe372c1b 100644
--- a/src/core/lib/client_config/lb_policies/pick_first.c
+++ b/src/core/ext/lb_policy/pick_first/pick_first.c
@@ -31,12 +31,10 @@
*
*/
-#include "src/core/lib/client_config/lb_policies/pick_first.h"
-
#include <string.h>
#include <grpc/support/alloc.h>
-#include "src/core/lib/client_config/lb_policy_factory.h"
+#include "src/core/lib/client_config/lb_policy_registry.h"
#include "src/core/lib/transport/connectivity_state.h"
typedef struct pending_pick {
@@ -78,7 +76,7 @@ typedef struct {
#define GET_SELECTED(p) \
((grpc_connected_subchannel *)gpr_atm_acq_load(&(p)->selected))
-void pf_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
+static void pf_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
pick_first_lb_policy *p = (pick_first_lb_policy *)pol;
grpc_connected_subchannel *selected = GET_SELECTED(p);
size_t i;
@@ -95,7 +93,7 @@ void pf_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
gpr_free(p);
}
-void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
+static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
pick_first_lb_policy *p = (pick_first_lb_policy *)pol;
pending_pick *pp;
grpc_connected_subchannel *selected;
@@ -162,7 +160,7 @@ static void start_picking(grpc_exec_ctx *exec_ctx, pick_first_lb_policy *p) {
&p->connectivity_changed);
}
-void pf_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
+static void pf_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
pick_first_lb_policy *p = (pick_first_lb_policy *)pol;
gpr_mu_lock(&p->mu);
if (!p->started_picking) {
@@ -171,9 +169,10 @@ void pf_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
gpr_mu_unlock(&p->mu);
}
-int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_pollset *pollset,
- grpc_metadata_batch *initial_metadata,
- grpc_connected_subchannel **target, grpc_closure *on_complete) {
+static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
+ grpc_pollset *pollset, grpc_metadata_batch *initial_metadata,
+ grpc_connected_subchannel **target,
+ grpc_closure *on_complete) {
pick_first_lb_policy *p = (pick_first_lb_policy *)pol;
pending_pick *pp;
@@ -356,9 +355,10 @@ static grpc_connectivity_state pf_check_connectivity(grpc_exec_ctx *exec_ctx,
return st;
}
-void pf_notify_on_state_change(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
- grpc_connectivity_state *current,
- grpc_closure *notify) {
+static void pf_notify_on_state_change(grpc_exec_ctx *exec_ctx,
+ grpc_lb_policy *pol,
+ grpc_connectivity_state *current,
+ grpc_closure *notify) {
pick_first_lb_policy *p = (pick_first_lb_policy *)pol;
gpr_mu_lock(&p->mu);
grpc_connectivity_state_notify_on_state_change(exec_ctx, &p->state_tracker,
@@ -366,8 +366,8 @@ void pf_notify_on_state_change(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
gpr_mu_unlock(&p->mu);
}
-void pf_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
- grpc_closure *closure) {
+static void pf_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
+ grpc_closure *closure) {
pick_first_lb_policy *p = (pick_first_lb_policy *)pol;
grpc_connected_subchannel *selected = GET_SELECTED(p);
if (selected) {
@@ -439,6 +439,14 @@ static const grpc_lb_policy_factory_vtable pick_first_factory_vtable = {
static grpc_lb_policy_factory pick_first_lb_policy_factory = {
&pick_first_factory_vtable};
-grpc_lb_policy_factory *grpc_pick_first_lb_factory_create() {
+static grpc_lb_policy_factory *pick_first_lb_factory_create() {
return &pick_first_lb_policy_factory;
}
+
+/* Plugin registration */
+
+void grpc_lb_policy_pick_first_init() {
+ grpc_register_lb_policy(pick_first_lb_factory_create());
+}
+
+void grpc_lb_policy_pick_first_shutdown() {}
diff --git a/src/core/lib/client_config/lb_policies/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c
index a4bc2c4786..eb6cccdca9 100644
--- a/src/core/lib/client_config/lb_policies/round_robin.c
+++ b/src/core/ext/lb_policy/round_robin/round_robin.c
@@ -31,11 +31,12 @@
*
*/
-#include "src/core/lib/client_config/lb_policies/round_robin.h"
-
#include <string.h>
#include <grpc/support/alloc.h>
+
+#include "src/core/lib/client_config/lb_policy_registry.h"
+#include "src/core/lib/debug/trace.h"
#include "src/core/lib/transport/connectivity_state.h"
typedef struct round_robin_lb_policy round_robin_lb_policy;
@@ -199,7 +200,7 @@ static void remove_disconnected_sc_locked(round_robin_lb_policy *p,
gpr_free(node);
}
-void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
+static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
round_robin_lb_policy *p = (round_robin_lb_policy *)pol;
size_t i;
ready_list *elem;
@@ -226,7 +227,7 @@ void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
gpr_free(p);
}
-void rr_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
+static void rr_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
round_robin_lb_policy *p = (round_robin_lb_policy *)pol;
pending_pick *pp;
size_t i;
@@ -291,7 +292,7 @@ static void start_picking(grpc_exec_ctx *exec_ctx, round_robin_lb_policy *p) {
}
}
-void rr_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
+static void rr_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
round_robin_lb_policy *p = (round_robin_lb_policy *)pol;
gpr_mu_lock(&p->mu);
if (!p->started_picking) {
@@ -300,9 +301,10 @@ void rr_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
gpr_mu_unlock(&p->mu);
}
-int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_pollset *pollset,
- grpc_metadata_batch *initial_metadata,
- grpc_connected_subchannel **target, grpc_closure *on_complete) {
+static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
+ grpc_pollset *pollset, grpc_metadata_batch *initial_metadata,
+ grpc_connected_subchannel **target,
+ grpc_closure *on_complete) {
round_robin_lb_policy *p = (round_robin_lb_policy *)pol;
pending_pick *pp;
ready_list *selected;
@@ -558,6 +560,15 @@ static const grpc_lb_policy_factory_vtable round_robin_factory_vtable = {
static grpc_lb_policy_factory round_robin_lb_policy_factory = {
&round_robin_factory_vtable};
-grpc_lb_policy_factory *grpc_round_robin_lb_factory_create() {
+static grpc_lb_policy_factory *round_robin_lb_factory_create() {
return &round_robin_lb_policy_factory;
}
+
+/* Plugin registration */
+
+void grpc_lb_policy_round_robin_init() {
+ grpc_register_lb_policy(round_robin_lb_factory_create());
+ grpc_register_tracer("round_robin", &grpc_lb_round_robin_trace);
+}
+
+void grpc_lb_policy_round_robin_shutdown() {}
diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c
index 7dbac38414..b4e58b7f29 100644
--- a/src/core/lib/channel/http_client_filter.c
+++ b/src/core/lib/channel/http_client_filter.c
@@ -112,7 +112,9 @@ static void hc_mutate_op(grpc_call_element *elem,
/* Send : prefixed headers, which have to be before any application
layer headers. */
grpc_metadata_batch_add_head(op->send_initial_metadata, &calld->method,
- GRPC_MDELEM_METHOD_POST);
+ op->send_idempotent_request
+ ? GRPC_MDELEM_METHOD_PUT
+ : GRPC_MDELEM_METHOD_POST);
grpc_metadata_batch_add_head(op->send_initial_metadata, &calld->scheme,
channeld->static_scheme);
grpc_metadata_batch_add_tail(op->send_initial_metadata, &calld->te_trailers,
diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c
index df99b77ab3..db1a3d5010 100644
--- a/src/core/lib/channel/http_server_filter.c
+++ b/src/core/lib/channel/http_server_filter.c
@@ -41,7 +41,7 @@
typedef struct call_data {
uint8_t seen_path;
- uint8_t seen_post;
+ uint8_t seen_method;
uint8_t sent_status;
uint8_t seen_scheme;
uint8_t seen_te_trailers;
@@ -50,6 +50,7 @@ typedef struct call_data {
grpc_linked_mdelem content_type;
grpc_metadata_batch *recv_initial_metadata;
+ bool *recv_idempotent_request;
/** Closure to call when finished with the hs_on_recv hook */
grpc_closure *on_done_recv;
/** Receive closures are chained: we inject this closure as the on_done_recv
@@ -72,11 +73,16 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) {
/* Check if it is one of the headers we care about. */
if (md == GRPC_MDELEM_TE_TRAILERS || md == GRPC_MDELEM_METHOD_POST ||
- md == GRPC_MDELEM_SCHEME_HTTP || md == GRPC_MDELEM_SCHEME_HTTPS ||
+ md == GRPC_MDELEM_METHOD_PUT || md == GRPC_MDELEM_SCHEME_HTTP ||
+ md == GRPC_MDELEM_SCHEME_HTTPS ||
md == GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC) {
/* swallow it */
if (md == GRPC_MDELEM_METHOD_POST) {
- calld->seen_post = 1;
+ calld->seen_method = 1;
+ *calld->recv_idempotent_request = false;
+ } else if (md == GRPC_MDELEM_METHOD_PUT) {
+ calld->seen_method = 1;
+ *calld->recv_idempotent_request = true;
} else if (md->key == GRPC_MDSTR_SCHEME) {
calld->seen_scheme = 1;
} else if (md == GRPC_MDELEM_TE_TRAILERS) {
@@ -142,7 +148,7 @@ static void hs_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, bool success) {
/* Have we seen the required http2 transport headers?
(:method, :scheme, content-type, with :path and :authority covered
at the channel level right now) */
- if (calld->seen_post && calld->seen_scheme && calld->seen_te_trailers &&
+ if (calld->seen_method && calld->seen_scheme && calld->seen_te_trailers &&
calld->seen_path && calld->seen_authority) {
/* do nothing */
} else {
@@ -152,7 +158,7 @@ static void hs_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, bool success) {
if (!calld->seen_authority) {
gpr_log(GPR_ERROR, "Missing :authority header");
}
- if (!calld->seen_post) {
+ if (!calld->seen_method) {
gpr_log(GPR_ERROR, "Missing :method header");
}
if (!calld->seen_scheme) {
@@ -185,7 +191,9 @@ static void hs_mutate_op(grpc_call_element *elem,
if (op->recv_initial_metadata) {
/* substitute our callback for the higher callback */
+ GPR_ASSERT(op->recv_idempotent_request != NULL);
calld->recv_initial_metadata = op->recv_initial_metadata;
+ calld->recv_idempotent_request = op->recv_idempotent_request;
calld->on_done_recv = op->recv_initial_metadata_ready;
op->recv_initial_metadata_ready = &calld->hs_on_recv;
}
diff --git a/src/core/lib/client_config/lb_policy_registry.c b/src/core/lib/client_config/lb_policy_registry.c
index f703e630a0..d1dc502b9a 100644
--- a/src/core/lib/client_config/lb_policy_registry.c
+++ b/src/core/lib/client_config/lb_policy_registry.c
@@ -40,12 +40,7 @@
static grpc_lb_policy_factory *g_all_of_the_lb_policies[MAX_POLICIES];
static int g_number_of_lb_policies = 0;
-static grpc_lb_policy_factory *g_default_lb_policy_factory;
-
-void grpc_lb_policy_registry_init(grpc_lb_policy_factory *default_factory) {
- g_number_of_lb_policies = 0;
- g_default_lb_policy_factory = default_factory;
-}
+void grpc_lb_policy_registry_init(void) { g_number_of_lb_policies = 0; }
void grpc_lb_policy_registry_shutdown(void) {
int i;
diff --git a/src/core/lib/client_config/lb_policy_registry.h b/src/core/lib/client_config/lb_policy_registry.h
index 789854bd20..1ecf7fe39f 100644
--- a/src/core/lib/client_config/lb_policy_registry.h
+++ b/src/core/lib/client_config/lb_policy_registry.h
@@ -39,7 +39,7 @@
/** Initialize the registry and set \a default_factory as the factory to be
* returned when no name is provided in a lookup */
-void grpc_lb_policy_registry_init(grpc_lb_policy_factory *default_factory);
+void grpc_lb_policy_registry_init(void);
void grpc_lb_policy_registry_shutdown(void);
/** Register a LB policy factory. */
diff --git a/src/core/lib/iomgr/unix_sockets_posix_noop.c b/src/core/lib/iomgr/unix_sockets_posix_noop.c
index 06f6ee05e7..43e006e15e 100644
--- a/src/core/lib/iomgr/unix_sockets_posix_noop.c
+++ b/src/core/lib/iomgr/unix_sockets_posix_noop.c
@@ -35,7 +35,12 @@
#ifndef GPR_HAVE_UNIX_SOCKET
-void grpc_create_socketpair_if_unix(int sv[2]) {}
+void grpc_create_socketpair_if_unix(int sv[2]) {
+ // TODO: Either implement this for the non-Unix socket case or make
+ // sure that it is never called in any such case. Until then, leave an
+ // assertion to notify if this gets called inadvertently
+ GPR_ASSERT(0);
+}
grpc_resolved_addresses *grpc_resolve_unix_domain_address(const char *name) {
return NULL;
diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c
index 0219d7e6d0..77ad410b50 100644
--- a/src/core/lib/surface/call.c
+++ b/src/core/lib/surface/call.c
@@ -912,7 +912,7 @@ static void set_cancelled_value(grpc_status_code status, void *dest) {
*(int *)dest = (status != GRPC_STATUS_OK);
}
-static int are_write_flags_valid(uint32_t flags) {
+static bool are_write_flags_valid(uint32_t flags) {
/* check that only bits in GRPC_WRITE_(INTERNAL?)_USED_MASK are set */
const uint32_t allowed_write_positions =
(GRPC_WRITE_USED_MASK | GRPC_WRITE_INTERNAL_USED_MASK);
@@ -920,6 +920,15 @@ static int are_write_flags_valid(uint32_t flags) {
return !(flags & invalid_positions);
}
+static bool are_initial_metadata_flags_valid(uint32_t flags, bool is_client) {
+ /* check that only bits in GRPC_WRITE_(INTERNAL?)_USED_MASK are set */
+ uint32_t invalid_positions = ~GRPC_INITIAL_METADATA_USED_MASK;
+ if (!is_client) {
+ invalid_positions |= GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST;
+ }
+ return !(flags & invalid_positions);
+}
+
static batch_control *allocate_batch_control(grpc_call *call) {
size_t i;
for (i = 0; i < MAX_CONCURRENT_BATCHES; i++) {
@@ -1199,7 +1208,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
switch (op->op) {
case GRPC_OP_SEND_INITIAL_METADATA:
/* Flag validation: currently allow no flags */
- if (op->flags != 0) {
+ if (!are_initial_metadata_flags_valid(op->flags, call->is_client)) {
error = GRPC_CALL_ERROR_INVALID_FLAGS;
goto done_with_error;
}
@@ -1223,6 +1232,8 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
call->metadata_batch[0][0].deadline = call->send_deadline;
stream_op.send_initial_metadata =
&call->metadata_batch[0 /* is_receiving */][0 /* is_trailing */];
+ stream_op.send_idempotent_request =
+ (op->flags & GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST) != 0;
break;
case GRPC_OP_SEND_MESSAGE:
if (!are_write_flags_valid(op->flags)) {
diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c
index dbfc8a9336..3ccc21fb31 100644
--- a/src/core/lib/surface/init.c
+++ b/src/core/lib/surface/init.c
@@ -48,8 +48,6 @@
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/channel/http_client_filter.h"
#include "src/core/lib/channel/http_server_filter.h"
-#include "src/core/lib/client_config/lb_policies/pick_first.h"
-#include "src/core/lib/client_config/lb_policies/round_robin.h"
#include "src/core/lib/client_config/lb_policy_registry.h"
#include "src/core/lib/client_config/resolver_registry.h"
#include "src/core/lib/client_config/resolvers/dns_resolver.h"
@@ -75,6 +73,9 @@
#define GRPC_DEFAULT_NAME_PREFIX "dns:///"
#endif
+/* (generated) built in registry of plugins */
+extern void grpc_register_built_in_plugins(void);
+
#define MAX_PLUGINS 128
static gpr_once g_basic_init = GPR_ONCE_INIT;
@@ -83,6 +84,7 @@ static int g_initializations;
static void do_basic_init(void) {
gpr_mu_init(&g_init_mu);
+ grpc_register_built_in_plugins();
/* TODO(ctiller): ideally remove this strict linkage */
grpc_register_plugin(census_grpc_plugin_init, census_grpc_plugin_destroy);
g_initializations = 0;
@@ -165,14 +167,12 @@ void grpc_init(void) {
gpr_time_init();
grpc_mdctx_global_init();
grpc_channel_init_init();
- grpc_lb_policy_registry_init(grpc_pick_first_lb_factory_create());
- grpc_register_lb_policy(grpc_pick_first_lb_factory_create());
- grpc_register_lb_policy(grpc_round_robin_lb_factory_create());
+ grpc_lb_policy_registry_init();
grpc_resolver_registry_init(GRPC_DEFAULT_NAME_PREFIX);
grpc_register_resolver_type(grpc_dns_resolver_factory_create());
grpc_register_resolver_type(grpc_ipv4_resolver_factory_create());
grpc_register_resolver_type(grpc_ipv6_resolver_factory_create());
-#ifdef GPR_POSIX_SOCKET
+#ifdef GPR_HAVE_UNIX_SOCKET
grpc_register_resolver_type(grpc_unix_resolver_factory_create());
#endif
grpc_register_tracer("api", &grpc_api_trace);
diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c
index 080734e9d5..55e5e49e11 100644
--- a/src/core/lib/surface/server.c
+++ b/src/core/lib/surface/server.c
@@ -100,6 +100,7 @@ typedef struct requested_call {
typedef struct channel_registered_method {
registered_method *server_registered_method;
+ uint32_t flags;
grpc_mdstr *method;
grpc_mdstr *host;
} channel_registered_method;
@@ -152,6 +153,7 @@ struct call_data {
grpc_completion_queue *cq_new;
grpc_metadata_batch *recv_initial_metadata;
+ bool recv_idempotent_request;
grpc_metadata_array initial_metadata;
grpc_closure got_initial_metadata;
@@ -171,6 +173,7 @@ struct request_matcher {
struct registered_method {
char *method;
char *host;
+ uint32_t flags;
request_matcher request_matcher;
registered_method *next;
};
@@ -468,6 +471,9 @@ static void start_new_rpc(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) {
if (!rm) break;
if (rm->host != calld->host) continue;
if (rm->method != calld->path) continue;
+ if ((rm->flags & GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST) &&
+ !calld->recv_idempotent_request)
+ continue;
finish_start_new_rpc(exec_ctx, server, elem,
&rm->server_registered_method->request_matcher);
return;
@@ -480,6 +486,9 @@ static void start_new_rpc(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) {
if (!rm) break;
if (rm->host != NULL) continue;
if (rm->method != calld->path) continue;
+ if ((rm->flags & GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST) &&
+ !calld->recv_idempotent_request)
+ continue;
finish_start_new_rpc(exec_ctx, server, elem,
&rm->server_registered_method->request_matcher);
return;
@@ -598,9 +607,11 @@ static void server_mutate_op(grpc_call_element *elem,
call_data *calld = elem->call_data;
if (op->recv_initial_metadata != NULL) {
+ GPR_ASSERT(op->recv_idempotent_request == NULL);
calld->recv_initial_metadata = op->recv_initial_metadata;
calld->on_done_recv_initial_metadata = op->recv_initial_metadata_ready;
op->recv_initial_metadata_ready = &calld->server_on_recv_initial_metadata;
+ op->recv_idempotent_request = &calld->recv_idempotent_request;
}
}
@@ -830,10 +841,12 @@ static int streq(const char *a, const char *b) {
}
void *grpc_server_register_method(grpc_server *server, const char *method,
- const char *host) {
+ const char *host, uint32_t flags) {
registered_method *m;
- GRPC_API_TRACE("grpc_server_register_method(server=%p, method=%s, host=%s)",
- 3, (server, method, host));
+ GRPC_API_TRACE(
+ "grpc_server_register_method(server=%p, method=%s, host=%s, "
+ "flags=0x%08x)",
+ 4, (server, method, host, flags));
if (!method) {
gpr_log(GPR_ERROR,
"grpc_server_register_method method string cannot be NULL");
@@ -846,12 +859,18 @@ void *grpc_server_register_method(grpc_server *server, const char *method,
return NULL;
}
}
+ if ((flags & ~GRPC_INITIAL_METADATA_USED_MASK) != 0) {
+ gpr_log(GPR_ERROR, "grpc_server_register_method invalid flags 0x%08x",
+ flags);
+ return NULL;
+ }
m = gpr_malloc(sizeof(registered_method));
memset(m, 0, sizeof(*m));
request_matcher_init(&m->request_matcher, server->max_requested_calls);
m->method = gpr_strdup(method);
m->host = gpr_strdup(host);
m->next = server->registered_methods;
+ m->flags = flags;
server->registered_methods = m;
return m;
}
@@ -930,6 +949,7 @@ void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s,
if (probes > max_probes) max_probes = probes;
crm = &chand->registered_methods[(hash + probes) % slots];
crm->server_registered_method = rm;
+ crm->flags = rm->flags;
crm->host = host;
crm->method = method;
}
@@ -1247,6 +1267,10 @@ static void begin_call(grpc_exec_ctx *exec_ctx, grpc_server *server,
cpstr(&rc->data.batch.details->method,
&rc->data.batch.details->method_capacity, calld->path);
rc->data.batch.details->deadline = calld->deadline;
+ rc->data.batch.details->flags =
+ 0 | (calld->recv_idempotent_request
+ ? GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST
+ : 0);
break;
case REGISTERED_CALL:
*rc->data.registered.deadline = calld->deadline;
diff --git a/src/core/lib/transport/static_metadata.c b/src/core/lib/transport/static_metadata.c
index eda277b3dc..bde1fafc88 100644
--- a/src/core/lib/transport/static_metadata.c
+++ b/src/core/lib/transport/static_metadata.c
@@ -1,5 +1,4 @@
/*
- *
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
@@ -28,19 +27,16 @@
* 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.
- *
*/
/*
* WARNING: Auto-generated code.
*
* To make changes to this file, change
- * tools/codegen/core/gen_static_metadata.py,
- * and then re-run it.
+ * tools/codegen/core/gen_static_metadata.py, and then re-run it.
*
* See metadata.h for an explanation of the interface here, and metadata.c for
- * an
- * explanation of what's going on.
+ * an explanation of what's going on.
*/
#include "src/core/lib/transport/static_metadata.h"
@@ -52,7 +48,7 @@ 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};
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,
@@ -60,10 +56,10 @@ const uint8_t grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2] =
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, 40, 66, 68, 67, 78, 67, 79, 69, 35,
- 70, 35, 71, 35, 72, 35, 73, 35, 74, 35, 75, 41, 75, 51, 75, 52, 76, 35,
- 77, 35, 80, 3, 80, 4, 80, 5, 80, 6, 80, 7, 80, 8, 80, 9, 81, 35,
- 82, 83, 84, 35, 85, 35, 86, 35, 87, 35, 88, 35};
+ 62, 35, 63, 35, 64, 35, 65, 35, 66, 40, 66, 68, 66, 71, 67, 79, 67, 80,
+ 69, 35, 70, 35, 72, 35, 73, 35, 74, 35, 75, 35, 76, 41, 76, 51, 76, 52,
+ 77, 35, 78, 35, 81, 3, 81, 4, 81, 5, 81, 6, 81, 7, 81, 8, 81, 9,
+ 82, 35, 83, 84, 85, 35, 86, 35, 87, 35, 88, 35, 89, 35};
const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {
"0",
@@ -137,6 +133,7 @@ const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {
"POST",
"proxy-authenticate",
"proxy-authorization",
+ "PUT",
"range",
"referer",
"refresh",
diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h
index aff136a6d2..a05553a870 100644
--- a/src/core/lib/transport/static_metadata.h
+++ b/src/core/lib/transport/static_metadata.h
@@ -1,5 +1,4 @@
/*
- *
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
@@ -28,19 +27,16 @@
* 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.
- *
*/
/*
* WARNING: Auto-generated code.
*
* To make changes to this file, change
- * tools/codegen/core/gen_static_metadata.py,
- * and then re-run it.
+ * tools/codegen/core/gen_static_metadata.py, and then re-run it.
*
* See metadata.h for an explanation of the interface here, and metadata.c for
- * an
- * explanation of what's going on.
+ * an explanation of what's going on.
*/
#ifndef GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H
@@ -48,7 +44,7 @@
#include "src/core/lib/transport/metadata.h"
-#define GRPC_STATIC_MDSTR_COUNT 89
+#define GRPC_STATIC_MDSTR_COUNT 90
extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
/* "0" */
#define GRPC_MDSTR_0 (&grpc_static_mdstr_table[0])
@@ -193,44 +189,46 @@ extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
#define GRPC_MDSTR_PROXY_AUTHENTICATE (&grpc_static_mdstr_table[69])
/* "proxy-authorization" */
#define GRPC_MDSTR_PROXY_AUTHORIZATION (&grpc_static_mdstr_table[70])
+/* "PUT" */
+#define GRPC_MDSTR_PUT (&grpc_static_mdstr_table[71])
/* "range" */
-#define GRPC_MDSTR_RANGE (&grpc_static_mdstr_table[71])
+#define GRPC_MDSTR_RANGE (&grpc_static_mdstr_table[72])
/* "referer" */
-#define GRPC_MDSTR_REFERER (&grpc_static_mdstr_table[72])
+#define GRPC_MDSTR_REFERER (&grpc_static_mdstr_table[73])
/* "refresh" */
-#define GRPC_MDSTR_REFRESH (&grpc_static_mdstr_table[73])
+#define GRPC_MDSTR_REFRESH (&grpc_static_mdstr_table[74])
/* "retry-after" */
-#define GRPC_MDSTR_RETRY_AFTER (&grpc_static_mdstr_table[74])
+#define GRPC_MDSTR_RETRY_AFTER (&grpc_static_mdstr_table[75])
/* ":scheme" */
-#define GRPC_MDSTR_SCHEME (&grpc_static_mdstr_table[75])
+#define GRPC_MDSTR_SCHEME (&grpc_static_mdstr_table[76])
/* "server" */
-#define GRPC_MDSTR_SERVER (&grpc_static_mdstr_table[76])
+#define GRPC_MDSTR_SERVER (&grpc_static_mdstr_table[77])
/* "set-cookie" */
-#define GRPC_MDSTR_SET_COOKIE (&grpc_static_mdstr_table[77])
+#define GRPC_MDSTR_SET_COOKIE (&grpc_static_mdstr_table[78])
/* "/" */
-#define GRPC_MDSTR_SLASH (&grpc_static_mdstr_table[78])
+#define GRPC_MDSTR_SLASH (&grpc_static_mdstr_table[79])
/* "/index.html" */
-#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (&grpc_static_mdstr_table[79])
+#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (&grpc_static_mdstr_table[80])
/* ":status" */
-#define GRPC_MDSTR_STATUS (&grpc_static_mdstr_table[80])
+#define GRPC_MDSTR_STATUS (&grpc_static_mdstr_table[81])
/* "strict-transport-security" */
-#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (&grpc_static_mdstr_table[81])
+#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (&grpc_static_mdstr_table[82])
/* "te" */
-#define GRPC_MDSTR_TE (&grpc_static_mdstr_table[82])
+#define GRPC_MDSTR_TE (&grpc_static_mdstr_table[83])
/* "trailers" */
-#define GRPC_MDSTR_TRAILERS (&grpc_static_mdstr_table[83])
+#define GRPC_MDSTR_TRAILERS (&grpc_static_mdstr_table[84])
/* "transfer-encoding" */
-#define GRPC_MDSTR_TRANSFER_ENCODING (&grpc_static_mdstr_table[84])
+#define GRPC_MDSTR_TRANSFER_ENCODING (&grpc_static_mdstr_table[85])
/* "user-agent" */
-#define GRPC_MDSTR_USER_AGENT (&grpc_static_mdstr_table[85])
+#define GRPC_MDSTR_USER_AGENT (&grpc_static_mdstr_table[86])
/* "vary" */
-#define GRPC_MDSTR_VARY (&grpc_static_mdstr_table[86])
+#define GRPC_MDSTR_VARY (&grpc_static_mdstr_table[87])
/* "via" */
-#define GRPC_MDSTR_VIA (&grpc_static_mdstr_table[87])
+#define GRPC_MDSTR_VIA (&grpc_static_mdstr_table[88])
/* "www-authenticate" */
-#define GRPC_MDSTR_WWW_AUTHENTICATE (&grpc_static_mdstr_table[88])
+#define GRPC_MDSTR_WWW_AUTHENTICATE (&grpc_static_mdstr_table[89])
-#define GRPC_STATIC_MDELEM_COUNT 78
+#define GRPC_STATIC_MDELEM_COUNT 79
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": "" */
@@ -343,61 +341,63 @@ extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];
#define GRPC_MDELEM_METHOD_GET (&grpc_static_mdelem_table[49])
/* ":method": "POST" */
#define GRPC_MDELEM_METHOD_POST (&grpc_static_mdelem_table[50])
+/* ":method": "PUT" */
+#define GRPC_MDELEM_METHOD_PUT (&grpc_static_mdelem_table[51])
/* ":path": "/" */
-#define GRPC_MDELEM_PATH_SLASH (&grpc_static_mdelem_table[51])
+#define GRPC_MDELEM_PATH_SLASH (&grpc_static_mdelem_table[52])
/* ":path": "/index.html" */
-#define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML (&grpc_static_mdelem_table[52])
+#define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML (&grpc_static_mdelem_table[53])
/* "proxy-authenticate": "" */
-#define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[53])
+#define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[54])
/* "proxy-authorization": "" */
-#define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY (&grpc_static_mdelem_table[54])
+#define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY (&grpc_static_mdelem_table[55])
/* "range": "" */
-#define GRPC_MDELEM_RANGE_EMPTY (&grpc_static_mdelem_table[55])
+#define GRPC_MDELEM_RANGE_EMPTY (&grpc_static_mdelem_table[56])
/* "referer": "" */
-#define GRPC_MDELEM_REFERER_EMPTY (&grpc_static_mdelem_table[56])
+#define GRPC_MDELEM_REFERER_EMPTY (&grpc_static_mdelem_table[57])
/* "refresh": "" */
-#define GRPC_MDELEM_REFRESH_EMPTY (&grpc_static_mdelem_table[57])
+#define GRPC_MDELEM_REFRESH_EMPTY (&grpc_static_mdelem_table[58])
/* "retry-after": "" */
-#define GRPC_MDELEM_RETRY_AFTER_EMPTY (&grpc_static_mdelem_table[58])
+#define GRPC_MDELEM_RETRY_AFTER_EMPTY (&grpc_static_mdelem_table[59])
/* ":scheme": "grpc" */
-#define GRPC_MDELEM_SCHEME_GRPC (&grpc_static_mdelem_table[59])
+#define GRPC_MDELEM_SCHEME_GRPC (&grpc_static_mdelem_table[60])
/* ":scheme": "http" */
-#define GRPC_MDELEM_SCHEME_HTTP (&grpc_static_mdelem_table[60])
+#define GRPC_MDELEM_SCHEME_HTTP (&grpc_static_mdelem_table[61])
/* ":scheme": "https" */
-#define GRPC_MDELEM_SCHEME_HTTPS (&grpc_static_mdelem_table[61])
+#define GRPC_MDELEM_SCHEME_HTTPS (&grpc_static_mdelem_table[62])
/* "server": "" */
-#define GRPC_MDELEM_SERVER_EMPTY (&grpc_static_mdelem_table[62])
+#define GRPC_MDELEM_SERVER_EMPTY (&grpc_static_mdelem_table[63])
/* "set-cookie": "" */
-#define GRPC_MDELEM_SET_COOKIE_EMPTY (&grpc_static_mdelem_table[63])
+#define GRPC_MDELEM_SET_COOKIE_EMPTY (&grpc_static_mdelem_table[64])
/* ":status": "200" */
-#define GRPC_MDELEM_STATUS_200 (&grpc_static_mdelem_table[64])
+#define GRPC_MDELEM_STATUS_200 (&grpc_static_mdelem_table[65])
/* ":status": "204" */
-#define GRPC_MDELEM_STATUS_204 (&grpc_static_mdelem_table[65])
+#define GRPC_MDELEM_STATUS_204 (&grpc_static_mdelem_table[66])
/* ":status": "206" */
-#define GRPC_MDELEM_STATUS_206 (&grpc_static_mdelem_table[66])
+#define GRPC_MDELEM_STATUS_206 (&grpc_static_mdelem_table[67])
/* ":status": "304" */
-#define GRPC_MDELEM_STATUS_304 (&grpc_static_mdelem_table[67])
+#define GRPC_MDELEM_STATUS_304 (&grpc_static_mdelem_table[68])
/* ":status": "400" */
-#define GRPC_MDELEM_STATUS_400 (&grpc_static_mdelem_table[68])
+#define GRPC_MDELEM_STATUS_400 (&grpc_static_mdelem_table[69])
/* ":status": "404" */
-#define GRPC_MDELEM_STATUS_404 (&grpc_static_mdelem_table[69])
+#define GRPC_MDELEM_STATUS_404 (&grpc_static_mdelem_table[70])
/* ":status": "500" */
-#define GRPC_MDELEM_STATUS_500 (&grpc_static_mdelem_table[70])
+#define GRPC_MDELEM_STATUS_500 (&grpc_static_mdelem_table[71])
/* "strict-transport-security": "" */
#define GRPC_MDELEM_STRICT_TRANSPORT_SECURITY_EMPTY \
- (&grpc_static_mdelem_table[71])
+ (&grpc_static_mdelem_table[72])
/* "te": "trailers" */
-#define GRPC_MDELEM_TE_TRAILERS (&grpc_static_mdelem_table[72])
+#define GRPC_MDELEM_TE_TRAILERS (&grpc_static_mdelem_table[73])
/* "transfer-encoding": "" */
-#define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY (&grpc_static_mdelem_table[73])
+#define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY (&grpc_static_mdelem_table[74])
/* "user-agent": "" */
-#define GRPC_MDELEM_USER_AGENT_EMPTY (&grpc_static_mdelem_table[74])
+#define GRPC_MDELEM_USER_AGENT_EMPTY (&grpc_static_mdelem_table[75])
/* "vary": "" */
-#define GRPC_MDELEM_VARY_EMPTY (&grpc_static_mdelem_table[75])
+#define GRPC_MDELEM_VARY_EMPTY (&grpc_static_mdelem_table[76])
/* "via": "" */
-#define GRPC_MDELEM_VIA_EMPTY (&grpc_static_mdelem_table[76])
+#define GRPC_MDELEM_VIA_EMPTY (&grpc_static_mdelem_table[77])
/* "www-authenticate": "" */
-#define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[77])
+#define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[78])
extern const uint8_t
grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2];
diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h
index c253b190e7..6dd782c19e 100644
--- a/src/core/lib/transport/transport.h
+++ b/src/core/lib/transport/transport.h
@@ -98,8 +98,12 @@ void grpc_transport_move_stats(grpc_transport_stream_stats *from,
/* Transport stream op: a set of operations to perform on a transport
against a single stream */
typedef struct grpc_transport_stream_op {
- /** Send initial metadata to the peer, from the provided metadata batch. */
+ /** Send initial metadata to the peer, from the provided metadata batch.
+ idempotent_request MUST be set if this is non-null */
grpc_metadata_batch *send_initial_metadata;
+ /** Iff send_initial_metadata != NULL, flags if this is an idempotent request
+ or not */
+ bool send_idempotent_request;
/** Send trailing metadata to the peer, from the provided metadata batch. */
grpc_metadata_batch *send_trailing_metadata;
@@ -109,6 +113,7 @@ typedef struct grpc_transport_stream_op {
/** Receive initial metadata from the stream, into provided metadata batch. */
grpc_metadata_batch *recv_initial_metadata;
+ bool *recv_idempotent_request;
/** Should be enqueued when initial metadata is ready to be processed. */
grpc_closure *recv_initial_metadata_ready;
diff --git a/src/core/lib/client_config/lb_policies/pick_first.h b/src/core/plugin_registry/grpc_plugin_registry.c
index dba86ea7ad..3e3c214c22 100644
--- a/src/core/lib/client_config/lb_policies/pick_first.h
+++ b/src/core/plugin_registry/grpc_plugin_registry.c
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015-2016, Google Inc.
+ * Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,13 +31,16 @@
*
*/
-#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_PICK_FIRST_H
-#define GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_PICK_FIRST_H
+#include <grpc/grpc.h>
-#include "src/core/lib/client_config/lb_policy_factory.h"
+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);
+extern void grpc_lb_policy_round_robin_shutdown(void);
-/** Returns a load balancing factory for the pick first policy, which picks up
- * the first subchannel from \a subchannels to succesfully connect */
-grpc_lb_policy_factory *grpc_pick_first_lb_factory_create();
-
-#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_PICK_FIRST_H */
+void grpc_register_built_in_plugins(void) {
+ grpc_register_plugin(grpc_lb_policy_pick_first_init,
+ grpc_lb_policy_pick_first_shutdown);
+ grpc_register_plugin(grpc_lb_policy_round_robin_init,
+ grpc_lb_policy_round_robin_shutdown);
+}
diff --git a/src/core/lib/client_config/lb_policies/round_robin.h b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c
index 52db1caa0c..3e3c214c22 100644
--- a/src/core/lib/client_config/lb_policies/round_robin.h
+++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015-2016, Google Inc.
+ * Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,16 +31,16 @@
*
*/
-#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_ROUND_ROBIN_H
-#define GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_ROUND_ROBIN_H
+#include <grpc/grpc.h>
-#include "src/core/lib/client_config/lb_policy.h"
+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);
+extern void grpc_lb_policy_round_robin_shutdown(void);
-extern int grpc_lb_round_robin_trace;
-
-#include "src/core/lib/client_config/lb_policy_factory.h"
-
-/** Returns a load balancing factory for the round robin policy */
-grpc_lb_policy_factory *grpc_round_robin_lb_factory_create();
-
-#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_ROUND_ROBIN_H */
+void grpc_register_built_in_plugins(void) {
+ grpc_register_plugin(grpc_lb_policy_pick_first_init,
+ grpc_lb_policy_pick_first_shutdown);
+ grpc_register_plugin(grpc_lb_policy_round_robin_init,
+ grpc_lb_policy_round_robin_shutdown);
+}
diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc
index 7e5f557ffa..5ec05e4dcc 100644
--- a/src/cpp/server/server.cc
+++ b/src/cpp/server/server.cc
@@ -264,6 +264,7 @@ class Server::SyncRequest GRPC_FINAL : public CompletionQueueTag {
void* const tag_;
bool in_flight_;
const bool has_request_payload_;
+ uint32_t incoming_flags_;
grpc_call* call_;
grpc_call_details* call_details_;
gpr_timespec deadline_;
@@ -334,7 +335,7 @@ bool Server::RegisterService(const grpc::string* host, Service* service) {
}
RpcServiceMethod* method = it->get();
void* tag = grpc_server_register_method(server_, method->name(),
- host ? host->c_str() : nullptr);
+ host ? host->c_str() : nullptr, 0);
if (tag == nullptr) {
gpr_log(GPR_DEBUG, "Attempt to register %s multiple times",
method->name());
diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h
index 4d18369e1f..adcd8e954a 100644
--- a/src/python/grpcio/grpc/_cython/imports.generated.h
+++ b/src/python/grpcio/grpc/_cython/imports.generated.h
@@ -283,7 +283,7 @@ extern grpc_call_destroy_type grpc_call_destroy_import;
typedef grpc_call_error(*grpc_server_request_call_type)(grpc_server *server, grpc_call **call, grpc_call_details *details, grpc_metadata_array *request_metadata, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new);
extern grpc_server_request_call_type grpc_server_request_call_import;
#define grpc_server_request_call grpc_server_request_call_import
-typedef void *(*grpc_server_register_method_type)(grpc_server *server, const char *method, const char *host);
+typedef void *(*grpc_server_register_method_type)(grpc_server *server, const char *method, const char *host, uint32_t flags);
extern grpc_server_register_method_type grpc_server_register_method_import;
#define grpc_server_register_method grpc_server_register_method_import
typedef grpc_call_error(*grpc_server_request_registered_call_type)(grpc_server *server, void *registered_method, grpc_call **call, gpr_timespec *deadline, grpc_metadata_array *request_metadata, grpc_byte_buffer **optional_payload, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new);
diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py
index 13ef197f26..988fbf6b06 100644
--- a/src/python/grpcio/grpc_core_dependencies.py
+++ b/src/python/grpcio/grpc_core_dependencies.py
@@ -74,6 +74,10 @@ CORE_SOURCE_FILES = [
'src/core/lib/support/tmpfile_posix.c',
'src/core/lib/support/tmpfile_win32.c',
'src/core/lib/support/wrap_memcpy.c',
+ 'src/core/ext/lb_policy/grpclb/load_balancer_api.c',
+ 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/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/transport/chttp2/client/insecure/channel_create.c',
'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
@@ -121,9 +125,6 @@ CORE_SOURCE_FILES = [
'src/core/lib/client_config/connector.c',
'src/core/lib/client_config/default_initial_connect_string.c',
'src/core/lib/client_config/initial_connect_string.c',
- 'src/core/lib/client_config/lb_policies/load_balancer_api.c',
- 'src/core/lib/client_config/lb_policies/pick_first.c',
- 'src/core/lib/client_config/lb_policies/round_robin.c',
'src/core/lib/client_config/lb_policy.c',
'src/core/lib/client_config/lb_policy_factory.c',
'src/core/lib/client_config/lb_policy_registry.c',
@@ -186,7 +187,6 @@ CORE_SOURCE_FILES = [
'src/core/lib/json/json_reader.c',
'src/core/lib/json/json_string.c',
'src/core/lib/json/json_writer.c',
- 'src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c',
'src/core/lib/security/b64.c',
'src/core/lib/security/client_auth_filter.c',
'src/core/lib/security/credentials.c',
@@ -232,6 +232,7 @@ CORE_SOURCE_FILES = [
'src/core/lib/tsi/fake_transport_security.c',
'src/core/lib/tsi/ssl_transport_security.c',
'src/core/lib/tsi/transport_security.c',
+ 'src/core/plugin_registry/grpc_plugin_registry.c',
'third_party/nanopb/pb_common.c',
'third_party/nanopb/pb_decode.c',
'third_party/nanopb/pb_encode.c',
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
index 3bf81af8fb..22ea84c750 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
@@ -283,7 +283,7 @@ extern grpc_call_destroy_type grpc_call_destroy_import;
typedef grpc_call_error(*grpc_server_request_call_type)(grpc_server *server, grpc_call **call, grpc_call_details *details, grpc_metadata_array *request_metadata, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new);
extern grpc_server_request_call_type grpc_server_request_call_import;
#define grpc_server_request_call grpc_server_request_call_import
-typedef void *(*grpc_server_register_method_type)(grpc_server *server, const char *method, const char *host);
+typedef void *(*grpc_server_register_method_type)(grpc_server *server, const char *method, const char *host, uint32_t flags);
extern grpc_server_register_method_type grpc_server_register_method_import;
#define grpc_server_register_method grpc_server_register_method_import
typedef grpc_call_error(*grpc_server_request_registered_call_type)(grpc_server *server, void *registered_method, grpc_call **call, gpr_timespec *deadline, grpc_metadata_array *request_metadata, grpc_byte_buffer **optional_payload, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new);
diff --git a/templates/src/core/plugin_registry.template b/templates/src/core/plugin_registry.template
new file mode 100644
index 0000000000..352682c3f0
--- /dev/null
+++ b/templates/src/core/plugin_registry.template
@@ -0,0 +1,52 @@
+%YAML 1.2
+---
+foreach: libs
+cond: selected.get('generate_plugin_registry', False)
+output_name: ${selected.name}_plugin_registry.c
+template: |
+ /*
+ *
+ * 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 <grpc/grpc.h>
+
+ %for plugin in selected.plugins:
+ extern void ${plugin}_init(void);
+ extern void ${plugin}_shutdown(void);
+ %endfor
+
+ void grpc_register_built_in_plugins(void) {
+ %for plugin in selected.plugins:
+ grpc_register_plugin(${plugin}_init,
+ ${plugin}_shutdown);
+ %endfor
+ }
diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c
index 7fd7a00c81..d385cab372 100644
--- a/test/core/bad_client/bad_client.c
+++ b/test/core/bad_client/bad_client.c
@@ -33,6 +33,9 @@
#include "test/core/bad_client/bad_client.h"
+#include <grpc/support/alloc.h>
+#include <grpc/support/sync.h>
+#include <grpc/support/thd.h>
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/http_server_filter.h"
@@ -41,10 +44,6 @@
#include "src/core/lib/surface/completion_queue.h"
#include "src/core/lib/surface/server.h"
-#include <grpc/support/alloc.h>
-#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
-
typedef struct {
grpc_server *server;
grpc_completion_queue *cq;
@@ -110,7 +109,7 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator,
grpc_server_register_completion_queue(a.server, a.cq, NULL);
a.registered_method =
grpc_server_register_method(a.server, GRPC_BAD_CLIENT_REGISTERED_METHOD,
- GRPC_BAD_CLIENT_REGISTERED_HOST);
+ GRPC_BAD_CLIENT_REGISTERED_HOST, 0);
grpc_server_start(a.server);
transport = grpc_create_chttp2_transport(&exec_ctx, NULL, sfd.server, 0);
server_setup_transport(&a, transport);
diff --git a/test/core/client_config/lb_policies_test.c b/test/core/client_config/lb_policies_test.c
index bc7040de77..ac42891f94 100644
--- a/test/core/client_config/lb_policies_test.c
+++ b/test/core/client_config/lb_policies_test.c
@@ -43,7 +43,6 @@
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/client_channel.h"
-#include "src/core/lib/client_config/lb_policies/round_robin.h"
#include "src/core/lib/client_config/lb_policy_registry.h"
#include "src/core/lib/support/string.h"
#include "src/core/lib/surface/channel.h"
@@ -881,7 +880,7 @@ int main(int argc, char **argv) {
grpc_test_init(argc, argv);
grpc_init();
- grpc_lb_round_robin_trace = 1;
+ grpc_tracer_set_enabled("round_robin", 1);
GPR_ASSERT(grpc_lb_policy_create(&exec_ctx, "this-lb-policy-does-not-exist",
NULL) == NULL);
diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c
index b8934512c6..f560900a25 100644
--- a/test/core/end2end/end2end_nosec_tests.c
+++ b/test/core/end2end/end2end_nosec_tests.c
@@ -56,6 +56,7 @@ extern void empty_batch(grpc_end2end_test_config config);
extern void graceful_server_shutdown(grpc_end2end_test_config config);
extern void high_initial_seqno(grpc_end2end_test_config config);
extern void hpack_size(grpc_end2end_test_config config);
+extern void idempotent_request(grpc_end2end_test_config config);
extern void invoke_large_request(grpc_end2end_test_config config);
extern void large_metadata(grpc_end2end_test_config config);
extern void max_concurrent_streams(grpc_end2end_test_config config);
@@ -97,6 +98,7 @@ void grpc_end2end_tests(int argc, char **argv,
graceful_server_shutdown(config);
high_initial_seqno(config);
hpack_size(config);
+ idempotent_request(config);
invoke_large_request(config);
large_metadata(config);
max_concurrent_streams(config);
@@ -184,6 +186,10 @@ void grpc_end2end_tests(int argc, char **argv,
hpack_size(config);
continue;
}
+ if (0 == strcmp("idempotent_request", argv[i])) {
+ idempotent_request(config);
+ continue;
+ }
if (0 == strcmp("invoke_large_request", argv[i])) {
invoke_large_request(config);
continue;
diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c
index f0969794c6..f191c3a20d 100644
--- a/test/core/end2end/end2end_tests.c
+++ b/test/core/end2end/end2end_tests.c
@@ -57,6 +57,7 @@ extern void empty_batch(grpc_end2end_test_config config);
extern void graceful_server_shutdown(grpc_end2end_test_config config);
extern void high_initial_seqno(grpc_end2end_test_config config);
extern void hpack_size(grpc_end2end_test_config config);
+extern void idempotent_request(grpc_end2end_test_config config);
extern void invoke_large_request(grpc_end2end_test_config config);
extern void large_metadata(grpc_end2end_test_config config);
extern void max_concurrent_streams(grpc_end2end_test_config config);
@@ -99,6 +100,7 @@ void grpc_end2end_tests(int argc, char **argv,
graceful_server_shutdown(config);
high_initial_seqno(config);
hpack_size(config);
+ idempotent_request(config);
invoke_large_request(config);
large_metadata(config);
max_concurrent_streams(config);
@@ -190,6 +192,10 @@ void grpc_end2end_tests(int argc, char **argv,
hpack_size(config);
continue;
}
+ if (0 == strcmp("idempotent_request", argv[i])) {
+ idempotent_request(config);
+ continue;
+ }
if (0 == strcmp("invoke_large_request", argv[i])) {
invoke_large_request(config);
continue;
diff --git a/test/core/end2end/fixtures/proxy.c b/test/core/end2end/fixtures/proxy.c
index 434e75dd15..1ca53cdad9 100644
--- a/test/core/end2end/fixtures/proxy.c
+++ b/test/core/end2end/fixtures/proxy.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
@@ -338,10 +338,10 @@ static void on_new_call(void *arg, int success) {
proxy->new_call_details.deadline, NULL);
gpr_ref_init(&pc->refs, 1);
- op.flags = 0;
op.reserved = NULL;
op.op = GRPC_OP_RECV_INITIAL_METADATA;
+ op.flags = 0;
op.data.recv_initial_metadata = &pc->p2s_initial_metadata;
refpc(pc, "on_p2s_recv_initial_metadata");
err = grpc_call_start_batch(
@@ -349,6 +349,7 @@ static void on_new_call(void *arg, int success) {
GPR_ASSERT(err == GRPC_CALL_OK);
op.op = GRPC_OP_SEND_INITIAL_METADATA;
+ op.flags = proxy->new_call_details.flags;
op.data.send_initial_metadata.count = pc->c2p_initial_metadata.count;
op.data.send_initial_metadata.metadata = pc->c2p_initial_metadata.metadata;
refpc(pc, "on_p2s_sent_initial_metadata");
@@ -357,6 +358,7 @@ static void on_new_call(void *arg, int success) {
GPR_ASSERT(err == GRPC_CALL_OK);
op.op = GRPC_OP_RECV_MESSAGE;
+ op.flags = 0;
op.data.recv_message = &pc->c2p_msg;
refpc(pc, "on_c2p_recv_msg");
err = grpc_call_start_batch(pc->c2p, &op, 1,
@@ -364,6 +366,7 @@ static void on_new_call(void *arg, int success) {
GPR_ASSERT(err == GRPC_CALL_OK);
op.op = GRPC_OP_RECV_MESSAGE;
+ op.flags = 0;
op.data.recv_message = &pc->p2s_msg;
refpc(pc, "on_p2s_recv_msg");
err = grpc_call_start_batch(pc->p2s, &op, 1,
@@ -371,6 +374,7 @@ static void on_new_call(void *arg, int success) {
GPR_ASSERT(err == GRPC_CALL_OK);
op.op = GRPC_OP_RECV_STATUS_ON_CLIENT;
+ op.flags = 0;
op.data.recv_status_on_client.trailing_metadata =
&pc->p2s_trailing_metadata;
op.data.recv_status_on_client.status = &pc->p2s_status;
@@ -383,6 +387,7 @@ static void on_new_call(void *arg, int success) {
GPR_ASSERT(err == GRPC_CALL_OK);
op.op = GRPC_OP_RECV_CLOSE_ON_SERVER;
+ op.flags = 0;
op.data.recv_close_on_server.cancelled = &pc->c2p_server_cancelled;
refpc(pc, "on_c2p_closed");
err = grpc_call_start_batch(pc->c2p, &op, 1, new_closure(on_c2p_closed, pc),
diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py
index adf2b3c8d9..30dbc4346e 100755
--- a/test/core/end2end/gen_build_yaml.py
+++ b/test/core/end2end/gen_build_yaml.py
@@ -98,6 +98,7 @@ END2END_TESTS = {
'hpack_size': default_test_options._replace(proxyable=False,
traceable=False),
'high_initial_seqno': default_test_options,
+ 'idempotent_request': default_test_options,
'invoke_large_request': default_test_options,
'large_metadata': default_test_options,
'max_concurrent_streams': default_test_options._replace(proxyable=False),
diff --git a/test/core/end2end/tests/idempotent_request.c b/test/core/end2end/tests/idempotent_request.c
new file mode 100644
index 0000000000..485a854441
--- /dev/null
+++ b/test/core/end2end/tests/idempotent_request.c
@@ -0,0 +1,248 @@
+/*
+ *
+ * Copyright 2015-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 <stdio.h>
+#include <string.h>
+
+#include <grpc/byte_buffer.h>
+#include <grpc/grpc.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/support/string.h"
+#include "test/core/end2end/cq_verifier.h"
+
+enum { TIMEOUT = 200000 };
+
+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);
+}
+
+static void simple_request_body(grpc_end2end_test_fixture f) {
+ grpc_call *c;
+ grpc_call *s;
+ 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_call_details call_details;
+ grpc_status_code status;
+ grpc_call_error error;
+ char *details = NULL;
+ size_t details_capacity = 0;
+ int was_cancelled = 2;
+ char *peer;
+
+ c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
+ "/foo", "foo.test.google.fr:1234", deadline,
+ NULL);
+ GPR_ASSERT(c);
+
+ peer = grpc_call_get_peer(c);
+ GPR_ASSERT(peer != NULL);
+ gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer);
+ gpr_free(peer);
+
+ 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);
+
+ op = ops;
+ op->op = GRPC_OP_SEND_INITIAL_METADATA;
+ op->data.send_initial_metadata.count = 0;
+ op->flags = GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST;
+ 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(101), 1);
+ cq_verify(cqv);
+
+ peer = grpc_call_get_peer(s);
+ GPR_ASSERT(peer != NULL);
+ gpr_log(GPR_DEBUG, "server_peer=%s", peer);
+ gpr_free(peer);
+ peer = grpc_call_get_peer(c);
+ GPR_ASSERT(peer != NULL);
+ gpr_log(GPR_DEBUG, "client_peer=%s", peer);
+ gpr_free(peer);
+
+ 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_SEND_STATUS_FROM_SERVER;
+ op->data.send_status_from_server.trailing_metadata_count = 0;
+ op->data.send_status_from_server.status = GRPC_STATUS_UNIMPLEMENTED;
+ op->data.send_status_from_server.status_details = "xyz";
+ 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(102), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ cq_expect_completion(cqv, tag(102), 1);
+ cq_expect_completion(cqv, tag(1), 1);
+ cq_verify(cqv);
+
+ GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
+ GPR_ASSERT(0 == strcmp(details, "xyz"));
+ GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
+ GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
+ GPR_ASSERT(GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST == call_details.flags);
+ GPR_ASSERT(was_cancelled == 1);
+
+ 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);
+}
+
+static void test_invoke_simple_request(grpc_end2end_test_config config) {
+ grpc_end2end_test_fixture f;
+
+ f = begin_test(config, "test_invoke_simple_request", NULL, NULL);
+ simple_request_body(f);
+ end_test(&f);
+ config.tear_down_data(&f);
+}
+
+static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
+ int i;
+ grpc_end2end_test_fixture f =
+ begin_test(config, "test_invoke_10_simple_requests", NULL, NULL);
+ for (i = 0; i < 10; i++) {
+ simple_request_body(f);
+ gpr_log(GPR_INFO, "Passed simple request %d", i);
+ }
+ end_test(&f);
+ config.tear_down_data(&f);
+}
+
+void idempotent_request(grpc_end2end_test_config config) {
+ int i;
+ for (i = 0; i < 10; i++) {
+ test_invoke_simple_request(config);
+ }
+ test_invoke_10_simple_requests(config);
+}
diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c
index bc634ef83a..d75c5594a9 100644
--- a/test/core/end2end/tests/simple_request.c
+++ b/test/core/end2end/tests/simple_request.c
@@ -203,6 +203,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
+ GPR_ASSERT(0 == call_details.flags);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
diff --git a/test/core/surface/server_test.c b/test/core/surface/server_test.c
index 1d5211d225..4c62d8caad 100644
--- a/test/core/surface/server_test.c
+++ b/test/core/surface/server_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
@@ -42,11 +42,19 @@ void test_register_method_fail(void) {
grpc_server *server = grpc_server_create(NULL, NULL);
void *method;
void *method_old;
- method = grpc_server_register_method(server, NULL, NULL);
+ method = grpc_server_register_method(server, NULL, NULL, 0);
GPR_ASSERT(method == NULL);
- method_old = grpc_server_register_method(server, "m", "h");
+ method_old = grpc_server_register_method(server, "m", "h", 0);
GPR_ASSERT(method_old != NULL);
- method = grpc_server_register_method(server, "m", "h");
+ method = grpc_server_register_method(server, "m", "h", 0);
+ GPR_ASSERT(method == NULL);
+ method_old = grpc_server_register_method(
+ server, "m2", "h2", GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST);
+ GPR_ASSERT(method_old != NULL);
+ method = grpc_server_register_method(server, "m2", "h2", 0);
+ GPR_ASSERT(method == NULL);
+ method = grpc_server_register_method(
+ server, "m2", "h2", GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST);
GPR_ASSERT(method == NULL);
grpc_server_destroy(server);
}
diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc
index bc8219c1c7..92f93c869c 100644
--- a/test/cpp/grpclb/grpclb_api_test.cc
+++ b/test/cpp/grpclb/grpclb_api_test.cc
@@ -34,7 +34,7 @@
#include <gtest/gtest.h>
#include <string>
-#include "src/core/lib/client_config/lb_policies/load_balancer_api.h"
+#include "src/core/ext/lb_policy/grpclb/load_balancer_api.h"
#include "src/proto/grpc/lb/v0/load_balancer.pb.h" // C++ version
namespace grpc {
diff --git a/tools/buildgen/plugins/expand_filegroups.py b/tools/buildgen/plugins/expand_filegroups.py
index c40143ef95..0294a43271 100755
--- a/tools/buildgen/plugins/expand_filegroups.py
+++ b/tools/buildgen/plugins/expand_filegroups.py
@@ -75,11 +75,20 @@ def mako_plugin(dictionary):
todo.append(cur)
else:
skips = 0
+ assert 'plugins' not in cur
+ plugins = []
for uses in cur.get('uses', []):
+ for plugin in filegroups[uses]['plugins']:
+ if plugin not in plugins:
+ plugins.append(plugin)
for lst in FILEGROUP_LISTS:
vals = cur.get(lst, [])
vals.extend(filegroups[uses].get(lst, []))
cur[lst] = vals
+ cur_plugin_name = cur.get('plugin')
+ if cur_plugin_name:
+ plugins.append(cur_plugin_name)
+ cur['plugins'] = plugins
filegroups[cur['name']] = cur
# the above expansion can introduce duplicate filenames: contract them here
@@ -88,13 +97,20 @@ def mako_plugin(dictionary):
fg[lst] = sorted(list(set(fg.get(lst, []))))
for lib in libs:
+ assert 'plugins' not in lib
+ plugins = []
for fg_name in lib.get('filegroups', []):
fg = filegroups[fg_name]
-
+ for plugin in fg['plugins']:
+ if plugin not in plugins:
+ plugins.append(plugin)
for lst in FILEGROUP_LISTS:
vals = lib.get(lst, [])
vals.extend(fg.get(lst, []))
lib[lst] = vals
-
+ lib['plugins'] = plugins
+ if lib.get('generate_plugin_registry', False):
+ lib['src'].append('src/core/plugin_registry/%s_plugin_registry.c' %
+ lib['name'])
for lst in FILEGROUP_LISTS:
lib[lst] = sorted(list(set(lib.get(lst, []))))
diff --git a/tools/codegen/core/gen_load_balancing_proto.sh b/tools/codegen/core/gen_load_balancing_proto.sh
index 6a5363eeb3..339da0a733 100755
--- a/tools/codegen/core/gen_load_balancing_proto.sh
+++ b/tools/codegen/core/gen_load_balancing_proto.sh
@@ -82,7 +82,7 @@ fi
readonly GRPC_ROOT=$PWD
-OUTPUT_DIR="$GRPC_ROOT/src/core/lib/proto/grpc/lb/v0"
+OUTPUT_DIR="$GRPC_ROOT/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0"
if [ $# -eq 2 ]; then
mkdir -p "$2"
if [ $? != 0 ]; then
@@ -122,7 +122,7 @@ protoc \
"$(basename $1)"
readonly PROTO_BASENAME=$(basename $1 .proto)
-sed -i "s:$PROTO_BASENAME.pb.h:src/core/lib/proto/grpc/lb/v0/$PROTO_BASENAME.pb.h:g" \
+sed -i "s:$PROTO_BASENAME.pb.h:src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/$PROTO_BASENAME.pb.h:g" \
"$OUTPUT_DIR/$PROTO_BASENAME.pb.c"
# prepend copyright
diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py
index 70d41414f4..a6336a3d55 100755
--- a/tools/codegen/core/gen_static_metadata.py
+++ b/tools/codegen/core/gen_static_metadata.py
@@ -69,6 +69,7 @@ CONFIG = [
(':scheme', 'grpc'),
(':authority', ''),
(':method', 'GET'),
+ (':method', 'PUT'),
(':path', '/'),
(':path', '/index.html'),
(':status', '204'),
@@ -232,20 +233,20 @@ with open(sys.argv[0]) as my_source:
if line[0] != '#':
break
copyright.append(line)
- put_banner([H,C], [line[1:].strip() for line in copyright])
+ put_banner([H,C], [line[2:].rstrip() for line in copyright])
put_banner([H,C],
"""WARNING: Auto-generated code.
-To make changes to this file, change tools/codegen/core/gen_static_metadata.py,
-and then re-run it.
+To make changes to this file, change
+tools/codegen/core/gen_static_metadata.py, and then re-run it.
-See metadata.h for an explanation of the interface here, and metadata.c for an
-explanation of what's going on.
+See metadata.h for an explanation of the interface here, and metadata.c for
+an explanation of what's going on.
""".splitlines())
-print >>H, '#ifndef GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H'
-print >>H, '#define GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H'
+print >>H, '#ifndef GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H'
+print >>H, '#define GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H'
print >>H
print >>H, '#include "src/core/lib/transport/metadata.h"'
print >>H
@@ -264,13 +265,13 @@ print >>C
print >>H, '#define GRPC_STATIC_MDELEM_COUNT %d' % len(all_elems)
print >>H, 'extern grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];'
-print >>H, 'extern gpr_uintptr grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];'
+print >>H, 'extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];'
for i, elem in enumerate(all_elems):
print >>H, '/* "%s": "%s" */' % elem
print >>H, '#define %s (&grpc_static_mdelem_table[%d])' % (mangle(elem).upper(), i)
print >>H
print >>C, 'grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];'
-print >>C, 'gpr_uintptr grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = {'
+print >>C, 'uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = {'
print >>C, ' %s' % ','.join('%d' % static_userdata.get(elem, 0) for elem in all_elems)
print >>C, '};'
print >>C
@@ -285,8 +286,8 @@ def md_idx(m):
if m == m2:
return i
-print >>H, 'extern const gpr_uint8 grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT*2];'
-print >>C, 'const gpr_uint8 grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT*2] = {'
+print >>H, 'extern const uint8_t grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT*2];'
+print >>C, 'const uint8_t grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT*2] = {'
print >>C, ','.join('%d' % str_idx(x) for x in itertools.chain.from_iterable([a,b] for a, b in all_elems))
print >>C, '};'
print >>C
@@ -297,15 +298,15 @@ print >>C, '%s' % ',\n'.join(' "%s"' % s for s in all_strs)
print >>C, '};'
print >>C
-print >>H, 'extern const gpr_uint8 grpc_static_accept_encoding_metadata[%d];' % (1 << len(COMPRESSION_ALGORITHMS))
-print >>C, 'const gpr_uint8 grpc_static_accept_encoding_metadata[%d] = {' % (1 << len(COMPRESSION_ALGORITHMS))
+print >>H, 'extern const uint8_t grpc_static_accept_encoding_metadata[%d];' % (1 << len(COMPRESSION_ALGORITHMS))
+print >>C, 'const uint8_t grpc_static_accept_encoding_metadata[%d] = {' % (1 << len(COMPRESSION_ALGORITHMS))
print >>C, '0,%s' % ','.join('%d' % md_idx(elem) for elem in compression_elems)
print >>C, '};'
print >>C
print >>H, '#define GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(algs) (&grpc_static_mdelem_table[grpc_static_accept_encoding_metadata[(algs)]])'
-print >>H, '#endif /* GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H */'
+print >>H, '#endif /* GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H */'
H.close()
C.close()
diff --git a/tools/distrib/check_include_guards.py b/tools/distrib/check_include_guards.py
index 463e316885..6406fe6ae7 100755
--- a/tools/distrib/check_include_guards.py
+++ b/tools/distrib/check_include_guards.py
@@ -167,7 +167,7 @@ argp.add_argument('--precommit',
args = argp.parse_args()
KNOWN_BAD = set([
- 'src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h',
+ 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h',
])
diff --git a/tools/distrib/check_nanopb_output.sh b/tools/distrib/check_nanopb_output.sh
index e0a60946a9..4032ae1d9d 100755
--- a/tools/distrib/check_nanopb_output.sh
+++ b/tools/distrib/check_nanopb_output.sh
@@ -60,7 +60,7 @@ PATH="$PROTOC_PATH:$PATH" ./tools/codegen/core/gen_load_balancing_proto.sh \
$NANOPB_TMP_OUTPUT
# compare outputs to checked compiled code
-if ! diff -r $NANOPB_TMP_OUTPUT src/core/lib/proto/grpc/lb/v0; then
- echo "Outputs differ: $NANOPB_TMP_OUTPUT vs src/core/lib/proto/grpc/lb/v0"
+if ! diff -r $NANOPB_TMP_OUTPUT src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0; then
+ echo "Outputs differ: $NANOPB_TMP_OUTPUT vs src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0"
exit 2
fi
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index cc2ad34343..af9a18373c 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -773,6 +773,8 @@ include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
include/grpc/status.h \
+src/core/ext/lb_policy/grpclb/load_balancer_api.h \
+src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h \
src/core/ext/transport/chttp2/transport/alpn.h \
src/core/ext/transport/chttp2/transport/bin_encoder.h \
src/core/ext/transport/chttp2/transport/chttp2_transport.h \
@@ -812,9 +814,6 @@ src/core/lib/channel/subchannel_call_holder.h \
src/core/lib/client_config/client_config.h \
src/core/lib/client_config/connector.h \
src/core/lib/client_config/initial_connect_string.h \
-src/core/lib/client_config/lb_policies/load_balancer_api.h \
-src/core/lib/client_config/lb_policies/pick_first.h \
-src/core/lib/client_config/lb_policies/round_robin.h \
src/core/lib/client_config/lb_policy.h \
src/core/lib/client_config/lb_policy_factory.h \
src/core/lib/client_config/lb_policy_registry.h \
@@ -873,7 +872,6 @@ src/core/lib/json/json.h \
src/core/lib/json/json_common.h \
src/core/lib/json/json_reader.h \
src/core/lib/json/json_writer.h \
-src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h \
src/core/lib/security/auth_filters.h \
src/core/lib/security/b64.h \
src/core/lib/security/credentials.h \
@@ -913,6 +911,10 @@ third_party/nanopb/pb.h \
third_party/nanopb/pb_common.h \
third_party/nanopb/pb_decode.h \
third_party/nanopb/pb_encode.h \
+src/core/ext/lb_policy/grpclb/load_balancer_api.c \
+src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/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/transport/chttp2/client/insecure/channel_create.c \
src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \
src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
@@ -960,9 +962,6 @@ src/core/lib/client_config/client_config.c \
src/core/lib/client_config/connector.c \
src/core/lib/client_config/default_initial_connect_string.c \
src/core/lib/client_config/initial_connect_string.c \
-src/core/lib/client_config/lb_policies/load_balancer_api.c \
-src/core/lib/client_config/lb_policies/pick_first.c \
-src/core/lib/client_config/lb_policies/round_robin.c \
src/core/lib/client_config/lb_policy.c \
src/core/lib/client_config/lb_policy_factory.c \
src/core/lib/client_config/lb_policy_registry.c \
@@ -1025,7 +1024,6 @@ 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/proto/grpc/lb/v0/load_balancer.pb.c \
src/core/lib/security/b64.c \
src/core/lib/security/client_auth_filter.c \
src/core/lib/security/credentials.c \
@@ -1071,6 +1069,7 @@ src/core/lib/transport/transport_op_string.c \
src/core/lib/tsi/fake_transport_security.c \
src/core/lib/tsi/ssl_transport_security.c \
src/core/lib/tsi/transport_security.c \
+src/core/plugin_registry/grpc_plugin_registry.c \
third_party/nanopb/pb_common.c \
third_party/nanopb/pb_decode.c \
third_party/nanopb/pb_encode.c \
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index f9146e1c22..28b91c699c 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -3917,6 +3917,8 @@
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
"include/grpc/status.h",
+ "src/core/ext/lb_policy/grpclb/load_balancer_api.h",
+ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/ext/transport/chttp2/transport/alpn.h",
"src/core/ext/transport/chttp2/transport/bin_encoder.h",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h",
@@ -3956,9 +3958,6 @@
"src/core/lib/client_config/client_config.h",
"src/core/lib/client_config/connector.h",
"src/core/lib/client_config/initial_connect_string.h",
- "src/core/lib/client_config/lb_policies/load_balancer_api.h",
- "src/core/lib/client_config/lb_policies/pick_first.h",
- "src/core/lib/client_config/lb_policies/round_robin.h",
"src/core/lib/client_config/lb_policy.h",
"src/core/lib/client_config/lb_policy_factory.h",
"src/core/lib/client_config/lb_policy_registry.h",
@@ -4017,7 +4016,6 @@
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/lib/security/auth_filters.h",
"src/core/lib/security/b64.h",
"src/core/lib/security/credentials.h",
@@ -4074,6 +4072,12 @@
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
"include/grpc/status.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/v0/load_balancer.pb.c",
+ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h",
+ "src/core/ext/lb_policy/pick_first/pick_first.c",
+ "src/core/ext/lb_policy/round_robin/round_robin.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/transport/chttp2/client/secure/secure_channel_create.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
@@ -4160,12 +4164,6 @@
"src/core/lib/client_config/default_initial_connect_string.c",
"src/core/lib/client_config/initial_connect_string.c",
"src/core/lib/client_config/initial_connect_string.h",
- "src/core/lib/client_config/lb_policies/load_balancer_api.c",
- "src/core/lib/client_config/lb_policies/load_balancer_api.h",
- "src/core/lib/client_config/lb_policies/pick_first.c",
- "src/core/lib/client_config/lb_policies/pick_first.h",
- "src/core/lib/client_config/lb_policies/round_robin.c",
- "src/core/lib/client_config/lb_policies/round_robin.h",
"src/core/lib/client_config/lb_policy.c",
"src/core/lib/client_config/lb_policy.h",
"src/core/lib/client_config/lb_policy_factory.c",
@@ -4286,8 +4284,6 @@
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
"src/core/lib/json/json_writer.h",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/lib/security/auth_filters.h",
"src/core/lib/security/b64.c",
"src/core/lib/security/b64.h",
@@ -4367,7 +4363,8 @@
"src/core/lib/tsi/ssl_types.h",
"src/core/lib/tsi/transport_security.c",
"src/core/lib/tsi/transport_security.h",
- "src/core/lib/tsi/transport_security_interface.h"
+ "src/core/lib/tsi/transport_security_interface.h",
+ "src/core/plugin_registry/grpc_plugin_registry.c"
],
"third_party": false,
"type": "lib"
@@ -4540,6 +4537,8 @@
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
"include/grpc/status.h",
+ "src/core/ext/lb_policy/grpclb/load_balancer_api.h",
+ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/ext/transport/chttp2/transport/alpn.h",
"src/core/ext/transport/chttp2/transport/bin_encoder.h",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h",
@@ -4579,9 +4578,6 @@
"src/core/lib/client_config/client_config.h",
"src/core/lib/client_config/connector.h",
"src/core/lib/client_config/initial_connect_string.h",
- "src/core/lib/client_config/lb_policies/load_balancer_api.h",
- "src/core/lib/client_config/lb_policies/pick_first.h",
- "src/core/lib/client_config/lb_policies/round_robin.h",
"src/core/lib/client_config/lb_policy.h",
"src/core/lib/client_config/lb_policy_factory.h",
"src/core/lib/client_config/lb_policy_registry.h",
@@ -4640,7 +4636,6 @@
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/lib/statistics/census_interface.h",
"src/core/lib/statistics/census_rpc_stats.h",
"src/core/lib/surface/api_trace.h",
@@ -4682,6 +4677,12 @@
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
"include/grpc/status.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/v0/load_balancer.pb.c",
+ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h",
+ "src/core/ext/lb_policy/pick_first/pick_first.c",
+ "src/core/ext/lb_policy/round_robin/round_robin.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
"src/core/ext/transport/chttp2/transport/alpn.c",
@@ -4766,12 +4767,6 @@
"src/core/lib/client_config/default_initial_connect_string.c",
"src/core/lib/client_config/initial_connect_string.c",
"src/core/lib/client_config/initial_connect_string.h",
- "src/core/lib/client_config/lb_policies/load_balancer_api.c",
- "src/core/lib/client_config/lb_policies/load_balancer_api.h",
- "src/core/lib/client_config/lb_policies/pick_first.c",
- "src/core/lib/client_config/lb_policies/pick_first.h",
- "src/core/lib/client_config/lb_policies/round_robin.c",
- "src/core/lib/client_config/lb_policies/round_robin.h",
"src/core/lib/client_config/lb_policy.c",
"src/core/lib/client_config/lb_policy.h",
"src/core/lib/client_config/lb_policy_factory.c",
@@ -4891,8 +4886,6 @@
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
"src/core/lib/json/json_writer.h",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c",
- "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/lib/statistics/census_interface.h",
"src/core/lib/statistics/census_rpc_stats.h",
"src/core/lib/surface/alarm.c",
@@ -4941,7 +4934,8 @@
"src/core/lib/transport/transport.c",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
- "src/core/lib/transport/transport_op_string.c"
+ "src/core/lib/transport/transport_op_string.c",
+ "src/core/plugin_registry/grpc_unsecure_plugin_registry.c"
],
"third_party": false,
"type": "lib"
@@ -6498,6 +6492,7 @@
"test/core/end2end/tests/graceful_server_shutdown.c",
"test/core/end2end/tests/high_initial_seqno.c",
"test/core/end2end/tests/hpack_size.c",
+ "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/max_concurrent_streams.c",
@@ -6554,6 +6549,7 @@
"test/core/end2end/tests/graceful_server_shutdown.c",
"test/core/end2end/tests/high_initial_seqno.c",
"test/core/end2end/tests/hpack_size.c",
+ "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/max_concurrent_streams.c",
diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json
index c7c3417d96..2391224072 100644
--- a/tools/run_tests/tests.json
+++ b/tools/run_tests/tests.json
@@ -4651,6 +4651,28 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -5443,6 +5465,28 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -6218,6 +6262,27 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -6991,6 +7056,28 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -7681,6 +7768,22 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+pipe_test",
+ "platforms": [
+ "linux"
+ ]
+ },
+ {
+ "args": [
"invoke_large_request"
],
"ci_platforms": [
@@ -8337,6 +8440,28 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -9112,6 +9237,27 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -9805,6 +9951,27 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -10435,6 +10602,27 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -11065,6 +11253,27 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -11716,6 +11925,27 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -12447,6 +12677,28 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -13159,6 +13411,27 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -13815,6 +14088,26 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_uds_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"invoke_large_request"
],
"ci_platforms": [
@@ -14547,6 +14840,28 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -15317,6 +15632,28 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -16087,6 +16424,28 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -16761,6 +17120,22 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+pipe_nosec_test",
+ "platforms": [
+ "linux"
+ ]
+ },
+ {
+ "args": [
"invoke_large_request"
],
"ci_platforms": [
@@ -17395,6 +17770,28 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -18086,6 +18483,27 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -18695,6 +19113,27 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -19304,6 +19743,27 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
@@ -19934,6 +20394,27 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_1byte_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"invoke_large_request"
],
"ci_platforms": [
@@ -20591,6 +21072,26 @@
},
{
"args": [
+ "idempotent_request"
+ ],
+ "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": [
"invoke_large_request"
],
"ci_platforms": [
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj
index db7df085f8..0d0b4add92 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj
@@ -282,6 +282,8 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\status.h" />
</ItemGroup>
<ItemGroup>
+ <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\v0\load_balancer.pb.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\alpn.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\bin_encoder.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\chttp2_transport.h" />
@@ -321,9 +323,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\client_config.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\connector.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\initial_connect_string.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\load_balancer_api.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\pick_first.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\round_robin.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy_factory.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy_registry.h" />
@@ -382,7 +381,6 @@
<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\proto\grpc\lb\v0\load_balancer.pb.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\security\auth_filters.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\security\b64.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\security\credentials.h" />
@@ -424,6 +422,14 @@
<ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_encode.h" />
</ItemGroup>
<ItemGroup>
+ <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\v0\load_balancer.pb.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\pick_first\pick_first.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\round_robin\round_robin.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\client\insecure\channel_create.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\client\secure\secure_channel_create.c">
@@ -518,12 +524,6 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\initial_connect_string.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\load_balancer_api.c">
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\pick_first.c">
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\round_robin.c">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy_factory.c">
@@ -648,8 +648,6 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_writer.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\proto\grpc\lb\v0\load_balancer.pb.c">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\security\b64.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\security\client_auth_filter.c">
@@ -740,6 +738,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\tsi\transport_security.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\plugin_registry\grpc_plugin_registry.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\third_party\nanopb\pb_common.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\third_party\nanopb\pb_decode.c">
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
index 3ed51807a6..47758205b9 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
@@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\load_balancer_api.c">
+ <Filter>src\core\ext\lb_policy\grpclb</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0\load_balancer.pb.c">
+ <Filter>src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\pick_first\pick_first.c">
+ <Filter>src\core\ext\lb_policy\pick_first</Filter>
+ </ClCompile>
+ <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\transport\chttp2\client\insecure\channel_create.c">
<Filter>src\core\ext\transport\chttp2\client\insecure</Filter>
</ClCompile>
@@ -142,15 +154,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\initial_connect_string.c">
<Filter>src\core\lib\client_config</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\load_balancer_api.c">
- <Filter>src\core\lib\client_config\lb_policies</Filter>
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\pick_first.c">
- <Filter>src\core\lib\client_config\lb_policies</Filter>
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\round_robin.c">
- <Filter>src\core\lib\client_config\lb_policies</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy.c">
<Filter>src\core\lib\client_config</Filter>
</ClCompile>
@@ -337,9 +340,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_writer.c">
<Filter>src\core\lib\json</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\proto\grpc\lb\v0\load_balancer.pb.c">
- <Filter>src\core\lib\proto\grpc\lb\v0</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\security\b64.c">
<Filter>src\core\lib\security</Filter>
</ClCompile>
@@ -475,6 +475,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\tsi\transport_security.c">
<Filter>src\core\lib\tsi</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\plugin_registry\grpc_plugin_registry.c">
+ <Filter>src\core\plugin_registry</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\third_party\nanopb\pb_common.c">
<Filter>third_party\nanopb</Filter>
</ClCompile>
@@ -527,6 +530,12 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\load_balancer_api.h">
+ <Filter>src\core\ext\lb_policy\grpclb</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0\load_balancer.pb.h">
+ <Filter>src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\alpn.h">
<Filter>src\core\ext\transport\chttp2\transport</Filter>
</ClInclude>
@@ -644,15 +653,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\initial_connect_string.h">
<Filter>src\core\lib\client_config</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\load_balancer_api.h">
- <Filter>src\core\lib\client_config\lb_policies</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\pick_first.h">
- <Filter>src\core\lib\client_config\lb_policies</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\round_robin.h">
- <Filter>src\core\lib\client_config\lb_policies</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy.h">
<Filter>src\core\lib\client_config</Filter>
</ClInclude>
@@ -827,9 +827,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_writer.h">
<Filter>src\core\lib\json</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\proto\grpc\lb\v0\load_balancer.pb.h">
- <Filter>src\core\lib\proto\grpc\lb\v0</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\security\auth_filters.h">
<Filter>src\core\lib\security</Filter>
</ClInclude>
@@ -971,6 +968,30 @@
<Filter Include="src\core\ext">
<UniqueIdentifier>{3f32a58f-394f-5f13-06aa-6cc52cc2daaf}</UniqueIdentifier>
</Filter>
+ <Filter Include="src\core\ext\lb_policy">
+ <UniqueIdentifier>{030f00ff-6c54-76c8-12df-37e3008335d1}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\grpclb">
+ <UniqueIdentifier>{fe41339e-53fb-39b3-7457-7a0fbb238dbe}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\grpclb\proto">
+ <UniqueIdentifier>{a7c27f6b-6d15-01cf-76d9-c30dddea0990}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\grpclb\proto\grpc">
+ <UniqueIdentifier>{bc714e6d-8aba-91df-7db9-7f189f05a6ff}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\grpclb\proto\grpc\lb">
+ <UniqueIdentifier>{adf7e553-94ef-14fd-e845-03104f00a06f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0">
+ <UniqueIdentifier>{0406d191-8817-38c3-a562-e3541201f424}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\pick_first">
+ <UniqueIdentifier>{b63ded00-b24f-708e-333f-ce199e421875}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\round_robin">
+ <UniqueIdentifier>{2472d352-cf94-f317-646e-72b769cea846}</UniqueIdentifier>
+ </Filter>
<Filter Include="src\core\ext\transport">
<UniqueIdentifier>{e3abfd0a-064e-0f2f-c8e8-7c5a7e98142a}</UniqueIdentifier>
</Filter>
@@ -1010,9 +1031,6 @@
<Filter Include="src\core\lib\client_config">
<UniqueIdentifier>{2f3260de-be57-d18d-6882-61d115baa159}</UniqueIdentifier>
</Filter>
- <Filter Include="src\core\lib\client_config\lb_policies">
- <UniqueIdentifier>{118d2bb5-086f-54f3-11de-26d7d7f73f9d}</UniqueIdentifier>
- </Filter>
<Filter Include="src\core\lib\client_config\resolvers">
<UniqueIdentifier>{b9d8db6c-2c68-1c90-fe5e-37da90f47ae6}</UniqueIdentifier>
</Filter>
@@ -1031,18 +1049,6 @@
<Filter Include="src\core\lib\json">
<UniqueIdentifier>{cb2b0073-f2a7-5c63-d182-8874b24bdf36}</UniqueIdentifier>
</Filter>
- <Filter Include="src\core\lib\proto">
- <UniqueIdentifier>{b4b19f9a-1575-8a21-0bca-537746f858b7}</UniqueIdentifier>
- </Filter>
- <Filter Include="src\core\lib\proto\grpc">
- <UniqueIdentifier>{cbc8ce67-4a97-d533-8dc3-f949c63e2771}</UniqueIdentifier>
- </Filter>
- <Filter Include="src\core\lib\proto\grpc\lb">
- <UniqueIdentifier>{933530ae-447b-ea8d-3531-98f0556960b0}</UniqueIdentifier>
- </Filter>
- <Filter Include="src\core\lib\proto\grpc\lb\v0">
- <UniqueIdentifier>{c33f944f-37d4-42fd-abc3-61f0d4400462}</UniqueIdentifier>
- </Filter>
<Filter Include="src\core\lib\security">
<UniqueIdentifier>{c4661d64-349f-01c1-1ba8-0602f9047595}</UniqueIdentifier>
</Filter>
@@ -1058,6 +1064,9 @@
<Filter Include="src\core\lib\tsi">
<UniqueIdentifier>{95ad2811-c8d0-7a42-2a73-baf03fcbf699}</UniqueIdentifier>
</Filter>
+ <Filter Include="src\core\plugin_registry">
+ <UniqueIdentifier>{02bec99b-ff39-88d7-9dea-e0ff9f4a2701}</UniqueIdentifier>
+ </Filter>
<Filter Include="third_party">
<UniqueIdentifier>{aaab30a4-2a15-732e-c141-3fbc0f0f5a7a}</UniqueIdentifier>
</Filter>
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
index 53fd4e77a9..3b3e6f1e5d 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
@@ -272,6 +272,8 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\status.h" />
</ItemGroup>
<ItemGroup>
+ <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\v0\load_balancer.pb.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\alpn.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\bin_encoder.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\chttp2_transport.h" />
@@ -311,9 +313,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\client_config.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\connector.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\initial_connect_string.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\load_balancer_api.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\pick_first.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\round_robin.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy_factory.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy_registry.h" />
@@ -372,7 +371,6 @@
<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\proto\grpc\lb\v0\load_balancer.pb.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\statistics\census_interface.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\statistics\census_rpc_stats.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\api_trace.h" />
@@ -400,6 +398,14 @@
<ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_encode.h" />
</ItemGroup>
<ItemGroup>
+ <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\v0\load_balancer.pb.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\pick_first\pick_first.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\round_robin\round_robin.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\client\insecure\channel_create.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\server\insecure\server_chttp2.c">
@@ -490,12 +496,6 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\initial_connect_string.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\load_balancer_api.c">
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\pick_first.c">
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\round_robin.c">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy_factory.c">
@@ -618,8 +618,6 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_writer.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\proto\grpc\lb\v0\load_balancer.pb.c">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\alarm.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\api_trace.c">
@@ -676,6 +674,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport_op_string.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\plugin_registry\grpc_unsecure_plugin_registry.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\third_party\nanopb\pb_common.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\third_party\nanopb\pb_decode.c">
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
index 6338f4c4b2..225f882d1d 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
@@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\load_balancer_api.c">
+ <Filter>src\core\ext\lb_policy\grpclb</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0\load_balancer.pb.c">
+ <Filter>src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\pick_first\pick_first.c">
+ <Filter>src\core\ext\lb_policy\pick_first</Filter>
+ </ClCompile>
+ <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\transport\chttp2\client\insecure\channel_create.c">
<Filter>src\core\ext\transport\chttp2\client\insecure</Filter>
</ClCompile>
@@ -136,15 +148,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\initial_connect_string.c">
<Filter>src\core\lib\client_config</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\load_balancer_api.c">
- <Filter>src\core\lib\client_config\lb_policies</Filter>
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\pick_first.c">
- <Filter>src\core\lib\client_config\lb_policies</Filter>
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\round_robin.c">
- <Filter>src\core\lib\client_config\lb_policies</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy.c">
<Filter>src\core\lib\client_config</Filter>
</ClCompile>
@@ -328,9 +331,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_writer.c">
<Filter>src\core\lib\json</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\proto\grpc\lb\v0\load_balancer.pb.c">
- <Filter>src\core\lib\proto\grpc\lb\v0</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\alarm.c">
<Filter>src\core\lib\surface</Filter>
</ClCompile>
@@ -415,6 +415,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport_op_string.c">
<Filter>src\core\lib\transport</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\plugin_registry\grpc_unsecure_plugin_registry.c">
+ <Filter>src\core\plugin_registry</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\third_party\nanopb\pb_common.c">
<Filter>third_party\nanopb</Filter>
</ClCompile>
@@ -464,6 +467,12 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\load_balancer_api.h">
+ <Filter>src\core\ext\lb_policy\grpclb</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0\load_balancer.pb.h">
+ <Filter>src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\alpn.h">
<Filter>src\core\ext\transport\chttp2\transport</Filter>
</ClInclude>
@@ -581,15 +590,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\initial_connect_string.h">
<Filter>src\core\lib\client_config</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\load_balancer_api.h">
- <Filter>src\core\lib\client_config\lb_policies</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\pick_first.h">
- <Filter>src\core\lib\client_config\lb_policies</Filter>
- </ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policies\round_robin.h">
- <Filter>src\core\lib\client_config\lb_policies</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\client_config\lb_policy.h">
<Filter>src\core\lib\client_config</Filter>
</ClInclude>
@@ -764,9 +764,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_writer.h">
<Filter>src\core\lib\json</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\proto\grpc\lb\v0\load_balancer.pb.h">
- <Filter>src\core\lib\proto\grpc\lb\v0</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\statistics\census_interface.h">
<Filter>src\core\lib\statistics</Filter>
</ClInclude>
@@ -866,6 +863,30 @@
<Filter Include="src\core\ext">
<UniqueIdentifier>{82f86e8c-00a4-f566-d235-670fc629798d}</UniqueIdentifier>
</Filter>
+ <Filter Include="src\core\ext\lb_policy">
+ <UniqueIdentifier>{a23781d2-27e4-7cb0-12cd-59782ecb21ce}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\grpclb">
+ <UniqueIdentifier>{25a465c8-d1e8-6248-c005-bb2062206472}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\grpclb\proto">
+ <UniqueIdentifier>{40fc2615-d244-0d36-4486-ba6f0fa468bb}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\grpclb\proto\grpc">
+ <UniqueIdentifier>{1d129f24-a399-12ef-68de-023aff7dde52}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\grpclb\proto\grpc\lb">
+ <UniqueIdentifier>{21858d9d-30b5-8847-5882-6b47df0fa293}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0">
+ <UniqueIdentifier>{1795a20b-3e7c-e27d-eae1-96582fa9a958}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\pick_first">
+ <UniqueIdentifier>{e27f9ecf-97bb-1a2e-3135-a41f732dcf55}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\lb_policy\round_robin">
+ <UniqueIdentifier>{e5fc1091-5d60-404f-775b-686ef4b3266f}</UniqueIdentifier>
+ </Filter>
<Filter Include="src\core\ext\transport">
<UniqueIdentifier>{967c89fe-c97c-27e2-aac0-9ba5854cb5fa}</UniqueIdentifier>
</Filter>
@@ -899,9 +920,6 @@
<Filter Include="src\core\lib\client_config">
<UniqueIdentifier>{29ca2974-89e4-1a74-3e4d-0d63e2f77566}</UniqueIdentifier>
</Filter>
- <Filter Include="src\core\lib\client_config\lb_policies">
- <UniqueIdentifier>{6c7e36d4-6117-e0cd-c886-b9eb3c994927}</UniqueIdentifier>
- </Filter>
<Filter Include="src\core\lib\client_config\resolvers">
<UniqueIdentifier>{2d959ef9-9703-dc92-a56f-9fe136dadfb9}</UniqueIdentifier>
</Filter>
@@ -920,18 +938,6 @@
<Filter Include="src\core\lib\json">
<UniqueIdentifier>{681cdaeb-c47f-8853-d985-bf13c2873947}</UniqueIdentifier>
</Filter>
- <Filter Include="src\core\lib\proto">
- <UniqueIdentifier>{4bfbd6c6-f6a8-c6b3-5186-b788f4e11e23}</UniqueIdentifier>
- </Filter>
- <Filter Include="src\core\lib\proto\grpc">
- <UniqueIdentifier>{60f3ab7d-ea44-348f-671e-77fdebbd18bb}</UniqueIdentifier>
- </Filter>
- <Filter Include="src\core\lib\proto\grpc\lb">
- <UniqueIdentifier>{bcd33510-32e7-c2fb-e11d-a3655f97bc84}</UniqueIdentifier>
- </Filter>
- <Filter Include="src\core\lib\proto\grpc\lb\v0">
- <UniqueIdentifier>{bb9b8c80-9eff-5ab6-5b29-c2d54f0fc192}</UniqueIdentifier>
- </Filter>
<Filter Include="src\core\lib\statistics">
<UniqueIdentifier>{d0ab6d54-ae25-fc49-3656-91d9db57366a}</UniqueIdentifier>
</Filter>
@@ -941,6 +947,9 @@
<Filter Include="src\core\lib\transport">
<UniqueIdentifier>{6c3394d1-27e9-003e-19ed-8116d210f7cc}</UniqueIdentifier>
</Filter>
+ <Filter Include="src\core\plugin_registry">
+ <UniqueIdentifier>{babf0a90-e934-f599-5475-e6937d9580fe}</UniqueIdentifier>
+ </Filter>
<Filter Include="third_party">
<UniqueIdentifier>{025c051e-8eba-125b-67f9-173f95176eb2}</UniqueIdentifier>
</Filter>
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 568a0515aa..d54d21b66e 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
@@ -185,6 +185,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\hpack_size.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\idempotent_request.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\invoke_large_request.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\large_metadata.c">
diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters
index ecc23e868d..99622e228d 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
@@ -52,6 +52,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\hpack_size.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\idempotent_request.c">
+ <Filter>test\core\end2end\tests</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\invoke_large_request.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 3e0092ef87..c0b21c9ae1 100644
--- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj
@@ -187,6 +187,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\hpack_size.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\idempotent_request.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\invoke_large_request.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\large_metadata.c">
diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters
index c3aabc48a0..791589863e 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
@@ -55,6 +55,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\hpack_size.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\idempotent_request.c">
+ <Filter>test\core\end2end\tests</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\invoke_large_request.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>