diff options
50 files changed, 585 insertions, 95 deletions
@@ -821,6 +821,7 @@ grpc_cc_library( "src/core/lib/transport/timeout_encoding.cc", "src/core/lib/transport/transport.cc", "src/core/lib/transport/transport_op_string.cc", + "src/core/lib/uri/uri_parser.cc", ], hdrs = [ "src/core/lib/avl/avl.h", @@ -955,6 +956,7 @@ grpc_cc_library( "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", "src/core/lib/transport/transport_impl.h", + "src/core/lib/uri/uri_parser.h", ], external_deps = [ "zlib", @@ -1054,7 +1056,6 @@ grpc_cc_library( "src/core/ext/filters/client_channel/retry_throttle.cc", "src/core/ext/filters/client_channel/subchannel.cc", "src/core/ext/filters/client_channel/subchannel_index.cc", - "src/core/ext/filters/client_channel/uri_parser.cc", ], hdrs = [ "src/core/ext/filters/client_channel/backup_poller.h", @@ -1078,7 +1079,6 @@ grpc_cc_library( "src/core/ext/filters/client_channel/retry_throttle.h", "src/core/ext/filters/client_channel/subchannel.h", "src/core/ext/filters/client_channel/subchannel_index.h", - "src/core/ext/filters/client_channel/uri_parser.h", ], language = "c++", deps = [ @@ -2111,6 +2111,7 @@ grpc_cc_library( name = "grpc++_codegen_base_src", srcs = [ "src/cpp/codegen/codegen_init.cc", + "src/cpp/codegen/client_interceptor.cc", ], language = "c++", deps = [ diff --git a/CMakeLists.txt b/CMakeLists.txt index 5cc068885b..372a92d222 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1125,6 +1125,7 @@ add_library(grpc src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc + src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc src/core/ext/transport/chttp2/transport/bin_decoder.cc @@ -1248,7 +1249,6 @@ add_library(grpc src/core/ext/filters/client_channel/retry_throttle.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_index.cc - src/core/ext/filters/client_channel/uri_parser.cc src/core/ext/filters/deadline/deadline_filter.cc src/core/ext/filters/client_channel/health/health.pb.c src/core/tsi/alts_transport_security.cc @@ -1546,6 +1546,7 @@ add_library(grpc_cronet src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc + src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc src/core/ext/transport/cronet/transport/cronet_api_dummy.cc @@ -1600,7 +1601,6 @@ add_library(grpc_cronet src/core/ext/filters/client_channel/retry_throttle.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_index.cc - src/core/ext/filters/client_channel/uri_parser.cc src/core/ext/filters/deadline/deadline_filter.cc src/core/ext/filters/client_channel/health/health.pb.c third_party/nanopb/pb_common.c @@ -1949,6 +1949,7 @@ add_library(grpc_test_util src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc + src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc src/core/ext/filters/client_channel/backup_poller.cc src/core/ext/filters/client_channel/channel_connectivity.cc @@ -1972,7 +1973,6 @@ add_library(grpc_test_util src/core/ext/filters/client_channel/retry_throttle.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_index.cc - src/core/ext/filters/client_channel/uri_parser.cc src/core/ext/filters/deadline/deadline_filter.cc src/core/ext/filters/client_channel/health/health.pb.c third_party/nanopb/pb_common.c @@ -2268,6 +2268,7 @@ add_library(grpc_test_util_unsecure src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc + src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc src/core/ext/filters/client_channel/backup_poller.cc src/core/ext/filters/client_channel/channel_connectivity.cc @@ -2291,7 +2292,6 @@ add_library(grpc_test_util_unsecure src/core/ext/filters/client_channel/retry_throttle.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_index.cc - src/core/ext/filters/client_channel/uri_parser.cc src/core/ext/filters/deadline/deadline_filter.cc src/core/ext/filters/client_channel/health/health.pb.c third_party/nanopb/pb_common.c @@ -2566,6 +2566,7 @@ add_library(grpc_unsecure src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc + src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc @@ -2623,7 +2624,6 @@ add_library(grpc_unsecure src/core/ext/filters/client_channel/retry_throttle.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_index.cc - src/core/ext/filters/client_channel/uri_parser.cc src/core/ext/filters/deadline/deadline_filter.cc src/core/ext/filters/client_channel/health/health.pb.c third_party/nanopb/pb_common.c @@ -2896,6 +2896,7 @@ add_library(grpc++ third_party/nanopb/pb_common.c third_party/nanopb/pb_decode.c third_party/nanopb/pb_encode.c + src/cpp/codegen/client_interceptor.cc src/cpp/codegen/codegen_init.cc ) @@ -3267,6 +3268,7 @@ add_library(grpc++_cronet third_party/nanopb/pb_common.c third_party/nanopb/pb_decode.c third_party/nanopb/pb_encode.c + src/cpp/codegen/client_interceptor.cc src/cpp/codegen/codegen_init.cc src/core/ext/transport/chttp2/client/insecure/channel_create.cc src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc @@ -3444,6 +3446,7 @@ add_library(grpc++_cronet src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc + src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc src/core/ext/transport/chttp2/alpn/alpn.cc src/core/ext/filters/http/client/http_client_filter.cc @@ -3472,7 +3475,6 @@ add_library(grpc++_cronet src/core/ext/filters/client_channel/retry_throttle.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_index.cc - src/core/ext/filters/client_channel/uri_parser.cc src/core/ext/filters/deadline/deadline_filter.cc src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc @@ -4020,6 +4022,7 @@ add_library(grpc++_test_util test/cpp/util/string_ref_helper.cc test/cpp/util/subprocess.cc test/cpp/util/test_credentials_provider.cc + src/cpp/codegen/client_interceptor.cc src/cpp/codegen/codegen_init.cc ) @@ -4210,6 +4213,7 @@ add_library(grpc++_test_util_unsecure test/cpp/util/byte_buffer_proto_helper.cc test/cpp/util/string_ref_helper.cc test/cpp/util/subprocess.cc + src/cpp/codegen/client_interceptor.cc src/cpp/codegen/codegen_init.cc ) @@ -4413,6 +4417,7 @@ add_library(grpc++_unsecure third_party/nanopb/pb_common.c third_party/nanopb/pb_decode.c third_party/nanopb/pb_encode.c + src/cpp/codegen/client_interceptor.cc src/cpp/codegen/codegen_init.cc ) @@ -12640,6 +12645,7 @@ add_executable(codegen_test_minimal ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/stats.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/stats.grpc.pb.h test/cpp/codegen/codegen_test_minimal.cc + src/cpp/codegen/client_interceptor.cc src/cpp/codegen/codegen_init.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -3600,6 +3600,7 @@ LIBGRPC_SRC = \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ @@ -3723,7 +3724,6 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ - src/core/ext/filters/client_channel/uri_parser.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/filters/client_channel/health/health.pb.c \ src/core/tsi/alts_transport_security.cc \ @@ -4015,6 +4015,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc \ src/core/ext/transport/cronet/transport/cronet_api_dummy.cc \ @@ -4069,7 +4070,6 @@ LIBGRPC_CRONET_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ - src/core/ext/filters/client_channel/uri_parser.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/filters/client_channel/health/health.pb.c \ third_party/nanopb/pb_common.c \ @@ -4411,6 +4411,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ @@ -4434,7 +4435,6 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ - src/core/ext/filters/client_channel/uri_parser.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/filters/client_channel/health/health.pb.c \ third_party/nanopb/pb_common.c \ @@ -4716,6 +4716,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ @@ -4739,7 +4740,6 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ - src/core/ext/filters/client_channel/uri_parser.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/filters/client_channel/health/health.pb.c \ third_party/nanopb/pb_common.c \ @@ -4987,6 +4987,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc \ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc \ @@ -5044,7 +5045,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ - src/core/ext/filters/client_channel/uri_parser.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/filters/client_channel/health/health.pb.c \ third_party/nanopb/pb_common.c \ @@ -5282,6 +5282,7 @@ LIBGRPC++_SRC = \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ + src/cpp/codegen/client_interceptor.cc \ src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ @@ -5663,6 +5664,7 @@ LIBGRPC++_CRONET_SRC = \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ + src/cpp/codegen/client_interceptor.cc \ src/cpp/codegen/codegen_init.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \ @@ -5840,6 +5842,7 @@ LIBGRPC++_CRONET_SRC = \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/transport/chttp2/alpn/alpn.cc \ src/core/ext/filters/http/client/http_client_filter.cc \ @@ -5868,7 +5871,6 @@ LIBGRPC++_CRONET_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ - src/core/ext/filters/client_channel/uri_parser.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc \ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc \ @@ -6418,6 +6420,7 @@ LIBGRPC++_TEST_UTIL_SRC = \ test/cpp/util/string_ref_helper.cc \ test/cpp/util/subprocess.cc \ test/cpp/util/test_credentials_provider.cc \ + src/cpp/codegen/client_interceptor.cc \ src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ @@ -6570,6 +6573,7 @@ $(OBJDIR)/$(CONFIG)/test/cpp/util/create_test_channel.o: $(GENDIR)/src/proto/grp $(OBJDIR)/$(CONFIG)/test/cpp/util/string_ref_helper.o: $(GENDIR)/src/proto/grpc/channelz/channelz.pb.cc $(GENDIR)/src/proto/grpc/channelz/channelz.grpc.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/util/subprocess.o: $(GENDIR)/src/proto/grpc/channelz/channelz.pb.cc $(GENDIR)/src/proto/grpc/channelz/channelz.grpc.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/util/test_credentials_provider.o: $(GENDIR)/src/proto/grpc/channelz/channelz.pb.cc $(GENDIR)/src/proto/grpc/channelz/channelz.grpc.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/src/cpp/codegen/client_interceptor.o: $(GENDIR)/src/proto/grpc/channelz/channelz.pb.cc $(GENDIR)/src/proto/grpc/channelz/channelz.grpc.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(GENDIR)/src/proto/grpc/channelz/channelz.pb.cc $(GENDIR)/src/proto/grpc/channelz/channelz.grpc.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc @@ -6582,6 +6586,7 @@ LIBGRPC++_TEST_UTIL_UNSECURE_SRC = \ test/cpp/util/byte_buffer_proto_helper.cc \ test/cpp/util/string_ref_helper.cc \ test/cpp/util/subprocess.cc \ + src/cpp/codegen/client_interceptor.cc \ src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ @@ -6731,6 +6736,7 @@ $(OBJDIR)/$(CONFIG)/test/cpp/end2end/test_service_impl.o: $(GENDIR)/src/proto/gr $(OBJDIR)/$(CONFIG)/test/cpp/util/byte_buffer_proto_helper.o: $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/util/string_ref_helper.o: $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/util/subprocess.o: $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/src/cpp/codegen/client_interceptor.o: $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc @@ -6774,6 +6780,7 @@ LIBGRPC++_UNSECURE_SRC = \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ + src/cpp/codegen/client_interceptor.cc \ src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ @@ -17482,6 +17489,7 @@ CODEGEN_TEST_MINIMAL_SRC = \ $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc \ test/cpp/codegen/codegen_test_minimal.cc \ + src/cpp/codegen/client_interceptor.cc \ src/cpp/codegen/codegen_init.cc \ CODEGEN_TEST_MINIMAL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CODEGEN_TEST_MINIMAL_SRC)))) @@ -17529,6 +17537,8 @@ $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/stats.o: $(LIBDIR)/$(CONFIG)/libgrpc $(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test_minimal.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/src/cpp/codegen/client_interceptor.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_codegen_test_minimal: $(CODEGEN_TEST_MINIMAL_OBJS:.o=.dep) @@ -17539,6 +17549,7 @@ ifneq ($(NO_DEPS),true) endif endif $(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test_minimal.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/src/cpp/codegen/client_interceptor.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc diff --git a/build.yaml b/build.yaml index 534ea1a175..24fe56ab60 100644 --- a/build.yaml +++ b/build.yaml @@ -382,6 +382,7 @@ filegroups: - src/core/lib/transport/timeout_encoding.cc - src/core/lib/transport/transport.cc - src/core/lib/transport/transport_op_string.cc + - src/core/lib/uri/uri_parser.cc deps: - gpr filegroups: @@ -538,6 +539,7 @@ filegroups: - src/core/lib/transport/timeout_encoding.h - src/core/lib/transport/transport.h - src/core/lib/transport/transport_impl.h + - src/core/lib/uri/uri_parser.h deps: - gpr uses: @@ -588,7 +590,6 @@ filegroups: - src/core/ext/filters/client_channel/retry_throttle.h - src/core/ext/filters/client_channel/subchannel.h - src/core/ext/filters/client_channel/subchannel_index.h - - src/core/ext/filters/client_channel/uri_parser.h src: - src/core/ext/filters/client_channel/backup_poller.cc - src/core/ext/filters/client_channel/channel_connectivity.cc @@ -612,7 +613,6 @@ filegroups: - src/core/ext/filters/client_channel/retry_throttle.cc - src/core/ext/filters/client_channel/subchannel.cc - src/core/ext/filters/client_channel/subchannel_index.cc - - src/core/ext/filters/client_channel/uri_parser.cc plugin: grpc_client_channel uses: - grpc_base @@ -1262,6 +1262,7 @@ filegroups: - name: grpc++_codegen_base_src language: c++ src: + - src/cpp/codegen/client_interceptor.cc - src/cpp/codegen/codegen_init.cc uses: - grpc++_codegen_base @@ -234,6 +234,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ @@ -357,7 +358,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ - src/core/ext/filters/client_channel/uri_parser.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/filters/client_channel/health/health.pb.c \ src/core/tsi/alts_transport_security.cc \ @@ -733,6 +733,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/slice) 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/uri) PHP_ADD_BUILD_DIR($ext_builddir/src/core/plugin_registry) PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi) PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/alts/crypt) diff --git a/config.w32 b/config.w32 index 245e4cf683..8dff1229be 100644 --- a/config.w32 +++ b/config.w32 @@ -209,6 +209,7 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\transport\\timeout_encoding.cc " + "src\\core\\lib\\transport\\transport.cc " + "src\\core\\lib\\transport\\transport_op_string.cc " + + "src\\core\\lib\\uri\\uri_parser.cc " + "src\\core\\lib\\debug\\trace.cc " + "src\\core\\ext\\transport\\chttp2\\server\\secure\\server_secure_chttp2.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\bin_decoder.cc " + @@ -332,7 +333,6 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\client_channel\\retry_throttle.cc " + "src\\core\\ext\\filters\\client_channel\\subchannel.cc " + "src\\core\\ext\\filters\\client_channel\\subchannel_index.cc " + - "src\\core\\ext\\filters\\client_channel\\uri_parser.cc " + "src\\core\\ext\\filters\\deadline\\deadline_filter.cc " + "src\\core\\ext\\filters\\client_channel\\health\\health.pb.c " + "src\\core\\tsi\\alts_transport_security.cc " + @@ -749,6 +749,7 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\slice"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\surface"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\transport"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\uri"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\plugin_registry"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\alts"); diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index c7b34ca695..2993cdbb69 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -225,6 +225,7 @@ Pod::Spec.new do |s| 'src/cpp/util/status.cc', 'src/cpp/util/string_ref.cc', 'src/cpp/util/time_cc.cc', + 'src/cpp/codegen/client_interceptor.cc', 'src/cpp/codegen/codegen_init.cc', 'src/core/lib/gpr/alloc.h', 'src/core/lib/gpr/arena.h', @@ -356,7 +357,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/retry_throttle.h', 'src/core/ext/filters/client_channel/subchannel.h', 'src/core/ext/filters/client_channel/subchannel_index.h', - 'src/core/ext/filters/client_channel/uri_parser.h', 'src/core/ext/filters/deadline/deadline_filter.h', 'src/core/ext/filters/client_channel/health/health.pb.h', 'src/core/tsi/alts_transport_security.h', @@ -504,6 +504,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', + 'src/core/lib/uri/uri_parser.h', 'src/core/lib/debug/trace.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h', @@ -695,6 +696,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', + 'src/core/lib/uri/uri_parser.h', 'src/core/lib/debug/trace.h', 'src/core/ext/transport/inproc/inproc_transport.h', 'src/core/ext/filters/client_channel/health/health.pb.h' diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 4e40b2b5df..6a43420830 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -355,7 +355,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/retry_throttle.h', 'src/core/ext/filters/client_channel/subchannel.h', 'src/core/ext/filters/client_channel/subchannel_index.h', - 'src/core/ext/filters/client_channel/uri_parser.h', 'src/core/ext/filters/deadline/deadline_filter.h', 'src/core/ext/filters/client_channel/health/health.pb.h', 'src/core/tsi/alts_transport_security.h', @@ -503,6 +502,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', + 'src/core/lib/uri/uri_parser.h', 'src/core/lib/debug/trace.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h', @@ -674,6 +674,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc', 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', @@ -794,7 +795,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_index.cc', - 'src/core/ext/filters/client_channel/uri_parser.cc', 'src/core/ext/filters/deadline/deadline_filter.cc', 'src/core/ext/filters/client_channel/health/health.pb.c', 'src/core/tsi/alts_transport_security.cc', @@ -974,7 +974,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/retry_throttle.h', 'src/core/ext/filters/client_channel/subchannel.h', 'src/core/ext/filters/client_channel/subchannel_index.h', - 'src/core/ext/filters/client_channel/uri_parser.h', 'src/core/ext/filters/deadline/deadline_filter.h', 'src/core/ext/filters/client_channel/health/health.pb.h', 'src/core/tsi/alts_transport_security.h', @@ -1122,6 +1121,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', + 'src/core/lib/uri/uri_parser.h', 'src/core/lib/debug/trace.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h', diff --git a/grpc.gemspec b/grpc.gemspec index 43ad3a0006..a9d3a95f2c 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -291,7 +291,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/retry_throttle.h ) s.files += %w( src/core/ext/filters/client_channel/subchannel.h ) s.files += %w( src/core/ext/filters/client_channel/subchannel_index.h ) - s.files += %w( src/core/ext/filters/client_channel/uri_parser.h ) s.files += %w( src/core/ext/filters/deadline/deadline_filter.h ) s.files += %w( src/core/ext/filters/client_channel/health/health.pb.h ) s.files += %w( src/core/tsi/alts_transport_security.h ) @@ -439,6 +438,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/timeout_encoding.h ) s.files += %w( src/core/lib/transport/transport.h ) s.files += %w( src/core/lib/transport/transport_impl.h ) + s.files += %w( src/core/lib/uri/uri_parser.h ) s.files += %w( src/core/lib/debug/trace.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h ) @@ -610,6 +610,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/timeout_encoding.cc ) s.files += %w( src/core/lib/transport/transport.cc ) s.files += %w( src/core/lib/transport/transport_op_string.cc ) + s.files += %w( src/core/lib/uri/uri_parser.cc ) s.files += %w( src/core/lib/debug/trace.cc ) s.files += %w( src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc ) s.files += %w( src/core/ext/transport/chttp2/transport/bin_decoder.cc ) @@ -733,7 +734,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/retry_throttle.cc ) s.files += %w( src/core/ext/filters/client_channel/subchannel.cc ) s.files += %w( src/core/ext/filters/client_channel/subchannel_index.cc ) - s.files += %w( src/core/ext/filters/client_channel/uri_parser.cc ) s.files += %w( src/core/ext/filters/deadline/deadline_filter.cc ) s.files += %w( src/core/ext/filters/client_channel/health/health.pb.c ) s.files += %w( src/core/tsi/alts_transport_security.cc ) @@ -426,6 +426,7 @@ 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc', 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', @@ -549,7 +550,6 @@ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_index.cc', - 'src/core/ext/filters/client_channel/uri_parser.cc', 'src/core/ext/filters/deadline/deadline_filter.cc', 'src/core/ext/filters/client_channel/health/health.pb.c', 'src/core/tsi/alts_transport_security.cc', @@ -786,6 +786,7 @@ 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', 'src/core/ext/filters/client_channel/backup_poller.cc', 'src/core/ext/filters/client_channel/channel_connectivity.cc', @@ -809,7 +810,6 @@ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_index.cc', - 'src/core/ext/filters/client_channel/uri_parser.cc', 'src/core/ext/filters/deadline/deadline_filter.cc', 'src/core/ext/filters/client_channel/health/health.pb.c', 'third_party/nanopb/pb_common.c', @@ -1025,6 +1025,7 @@ 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', 'src/core/ext/filters/client_channel/backup_poller.cc', 'src/core/ext/filters/client_channel/channel_connectivity.cc', @@ -1048,7 +1049,6 @@ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_index.cc', - 'src/core/ext/filters/client_channel/uri_parser.cc', 'src/core/ext/filters/deadline/deadline_filter.cc', 'src/core/ext/filters/client_channel/health/health.pb.c', 'third_party/nanopb/pb_common.c', @@ -1242,6 +1242,7 @@ 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc', @@ -1299,7 +1300,6 @@ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_index.cc', - 'src/core/ext/filters/client_channel/uri_parser.cc', 'src/core/ext/filters/deadline/deadline_filter.cc', 'src/core/ext/filters/client_channel/health/health.pb.c', 'third_party/nanopb/pb_common.c', @@ -1420,6 +1420,7 @@ 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', + 'src/cpp/codegen/client_interceptor.cc', 'src/cpp/codegen/codegen_init.cc', ], }, @@ -1500,6 +1501,7 @@ 'test/cpp/util/string_ref_helper.cc', 'test/cpp/util/subprocess.cc', 'test/cpp/util/test_credentials_provider.cc', + 'src/cpp/codegen/client_interceptor.cc', 'src/cpp/codegen/codegen_init.cc', ], }, @@ -1520,6 +1522,7 @@ 'test/cpp/util/byte_buffer_proto_helper.cc', 'test/cpp/util/string_ref_helper.cc', 'test/cpp/util/subprocess.cc', + 'src/cpp/codegen/client_interceptor.cc', 'src/cpp/codegen/codegen_init.cc', ], }, @@ -1570,6 +1573,7 @@ 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', + 'src/cpp/codegen/client_interceptor.cc', 'src/cpp/codegen/codegen_init.cc', ], }, diff --git a/include/grpcpp/channel.h b/include/grpcpp/channel.h index 14209b85ee..4502b94b17 100644 --- a/include/grpcpp/channel.h +++ b/include/grpcpp/channel.h @@ -91,7 +91,7 @@ class Channel final : public ChannelInterface, internal::Call CreateCallInternal(const internal::RpcMethod& method, ClientContext* context, CompletionQueue* cq, - int interceptor_pos) override; + size_t interceptor_pos) override; const grpc::string host_; grpc_channel* const c_channel_; // owned diff --git a/include/grpcpp/impl/codegen/channel_interface.h b/include/grpcpp/impl/codegen/channel_interface.h index 39805a0ef5..6ec1ffb8c7 100644 --- a/include/grpcpp/impl/codegen/channel_interface.h +++ b/include/grpcpp/impl/codegen/channel_interface.h @@ -134,7 +134,7 @@ class ChannelInterface { virtual internal::Call CreateCallInternal(const internal::RpcMethod& method, ClientContext* context, CompletionQueue* cq, - int interceptor_pos) { + size_t interceptor_pos) { return internal::Call(); } diff --git a/include/grpcpp/impl/codegen/client_interceptor.h b/include/grpcpp/impl/codegen/client_interceptor.h index 0e08a7ce01..f69c99ab22 100644 --- a/include/grpcpp/impl/codegen/client_interceptor.h +++ b/include/grpcpp/impl/codegen/client_interceptor.h @@ -19,6 +19,7 @@ #ifndef GRPCPP_IMPL_CODEGEN_CLIENT_INTERCEPTOR_H #define GRPCPP_IMPL_CODEGEN_CLIENT_INTERCEPTOR_H +#include <memory> #include <vector> #include <grpcpp/impl/codegen/interceptor.h> @@ -41,7 +42,14 @@ class ClientInterceptorFactoryInterface { virtual ~ClientInterceptorFactoryInterface() {} virtual Interceptor* CreateClientInterceptor(ClientRpcInfo* info) = 0; }; +} // namespace experimental +namespace internal { +extern experimental::ClientInterceptorFactoryInterface* + g_global_client_interceptor_factory; +} + +namespace experimental { class ClientRpcInfo { public: ClientRpcInfo() {} @@ -71,12 +79,21 @@ class ClientRpcInfo { void RegisterInterceptors( const std::vector<std::unique_ptr< experimental::ClientInterceptorFactoryInterface>>& creators, - int interceptor_pos) { + size_t interceptor_pos) { + if (interceptor_pos > creators.size()) { + // No interceptors to register + return; + } for (auto it = creators.begin() + interceptor_pos; it != creators.end(); ++it) { interceptors_.push_back(std::unique_ptr<experimental::Interceptor>( (*it)->CreateClientInterceptor(this))); } + if (internal::g_global_client_interceptor_factory != nullptr) { + interceptors_.push_back(std::unique_ptr<experimental::Interceptor>( + internal::g_global_client_interceptor_factory + ->CreateClientInterceptor(this))); + } } grpc::ClientContext* ctx_ = nullptr; @@ -90,6 +107,20 @@ class ClientRpcInfo { friend class grpc::ClientContext; }; +// PLEASE DO NOT USE THIS. ALWAYS PREFER PER CHANNEL INTERCEPTORS OVER A GLOBAL +// INTERCEPTOR. IF USAGE IS ABSOLUTELY NECESSARY, PLEASE READ THE SAFETY NOTES. +// Registers a global client interceptor factory object, which is used for all +// RPCs made in this process. If the argument is nullptr, the global +// interceptor factory is deregistered. The application is responsible for +// maintaining the life of the object while gRPC operations are in progress. It +// is unsafe to try to register/deregister if any gRPC operation is in progress. +// For safety, it is in the best interests of the developer to register the +// global interceptor factory once at the start of the process before any gRPC +// operations have begun. Deregistration is optional since gRPC does not +// maintain any references to the object. +void RegisterGlobalClientInterceptorFactory( + ClientInterceptorFactoryInterface* factory); + } // namespace experimental } // namespace grpc diff --git a/include/grpcpp/impl/codegen/intercepted_channel.h b/include/grpcpp/impl/codegen/intercepted_channel.h index 612e56d862..5255a6d147 100644 --- a/include/grpcpp/impl/codegen/intercepted_channel.h +++ b/include/grpcpp/impl/codegen/intercepted_channel.h @@ -42,7 +42,7 @@ class InterceptedChannel : public ChannelInterface { } private: - InterceptedChannel(ChannelInterface* channel, int pos) + InterceptedChannel(ChannelInterface* channel, size_t pos) : channel_(channel), interceptor_pos_(pos) {} Call CreateCall(const RpcMethod& method, ClientContext* context, @@ -70,7 +70,7 @@ class InterceptedChannel : public ChannelInterface { CompletionQueue* CallbackCQ() override { return channel_->CallbackCQ(); } ChannelInterface* channel_; - int interceptor_pos_; + size_t interceptor_pos_; friend class InterceptorBatchMethodsImpl; }; diff --git a/package.xml b/package.xml index 6c19cb3f09..69f952c466 100644 --- a/package.xml +++ b/package.xml @@ -296,7 +296,6 @@ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/retry_throttle.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel_index.h" role="src" /> - <file baseinstalldir="/" name="src/core/ext/filters/client_channel/uri_parser.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/deadline/deadline_filter.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/client_channel/health/health.pb.h" role="src" /> <file baseinstalldir="/" name="src/core/tsi/alts_transport_security.h" role="src" /> @@ -444,6 +443,7 @@ <file baseinstalldir="/" name="src/core/lib/transport/timeout_encoding.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/transport/transport.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/transport/transport_impl.h" role="src" /> + <file baseinstalldir="/" name="src/core/lib/uri/uri_parser.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/debug/trace.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h" role="src" /> @@ -615,6 +615,7 @@ <file baseinstalldir="/" name="src/core/lib/transport/timeout_encoding.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/transport/transport.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/transport/transport_op_string.cc" role="src" /> + <file baseinstalldir="/" name="src/core/lib/uri/uri_parser.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/debug/trace.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/bin_decoder.cc" role="src" /> @@ -738,7 +739,6 @@ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/retry_throttle.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel_index.cc" role="src" /> - <file baseinstalldir="/" name="src/core/ext/filters/client_channel/uri_parser.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/deadline/deadline_filter.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/client_channel/health/health.pb.c" role="src" /> <file baseinstalldir="/" name="src/core/tsi/alts_transport_security.cc" role="src" /> diff --git a/requirements.bazel.txt b/requirements.bazel.txt index 16f31f9e94..efbf5314af 100644 --- a/requirements.bazel.txt +++ b/requirements.bazel.txt @@ -8,3 +8,4 @@ wheel>=0.29 futures>=2.2.0 google-auth>=1.0.0 oauth2client==4.1.0 +requests>=2.14.2 diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.cc b/src/core/ext/filters/client_channel/http_connect_handshaker.cc index bfabc68c66..0716e46818 100644 --- a/src/core/ext/filters/client_channel/http_connect_handshaker.cc +++ b/src/core/ext/filters/client_channel/http_connect_handshaker.cc @@ -29,7 +29,6 @@ #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/filters/client_channel/uri_parser.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/handshaker_registry.h" #include "src/core/lib/gpr/env.h" @@ -37,6 +36,7 @@ #include "src/core/lib/http/format_request.h" #include "src/core/lib/http/parser.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/uri/uri_parser.h" typedef struct http_connect_handshaker { // Base class. Must be first. diff --git a/src/core/ext/filters/client_channel/http_proxy.cc b/src/core/ext/filters/client_channel/http_proxy.cc index 26d3f479b7..8951a2920c 100644 --- a/src/core/ext/filters/client_channel/http_proxy.cc +++ b/src/core/ext/filters/client_channel/http_proxy.cc @@ -29,12 +29,12 @@ #include "src/core/ext/filters/client_channel/http_connect_handshaker.h" #include "src/core/ext/filters/client_channel/proxy_mapper_registry.h" -#include "src/core/ext/filters/client_channel/uri_parser.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/env.h" #include "src/core/lib/gpr/host_port.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/slice/b64.h" +#include "src/core/lib/uri/uri_parser.h" /** * Parses the 'https_proxy' env var (fallback on 'http_proxy') and returns the diff --git a/src/core/ext/filters/client_channel/lb_policy_factory.h b/src/core/ext/filters/client_channel/lb_policy_factory.h index 62bdbf2689..a59deadb26 100644 --- a/src/core/ext/filters/client_channel/lb_policy_factory.h +++ b/src/core/ext/filters/client_channel/lb_policy_factory.h @@ -25,7 +25,7 @@ #include "src/core/ext/filters/client_channel/client_channel_factory.h" #include "src/core/ext/filters/client_channel/lb_policy.h" -#include "src/core/ext/filters/client_channel/uri_parser.h" +#include "src/core/lib/uri/uri_parser.h" // // representation of an LB address diff --git a/src/core/ext/filters/client_channel/parse_address.h b/src/core/ext/filters/client_channel/parse_address.h index c2af0e6c49..5c050a2333 100644 --- a/src/core/ext/filters/client_channel/parse_address.h +++ b/src/core/ext/filters/client_channel/parse_address.h @@ -23,8 +23,8 @@ #include <stddef.h> -#include "src/core/ext/filters/client_channel/uri_parser.h" #include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/uri/uri_parser.h" /** Populate \a resolved_addr from \a uri, whose path is expected to contain a * unix socket path. Returns true upon success. */ diff --git a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h index 708eaf1147..74a3062e7f 100644 --- a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +++ b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h @@ -20,9 +20,9 @@ #include <grpc/support/port_platform.h> #include "src/core/ext/filters/client_channel/lb_policy_factory.h" -#include "src/core/ext/filters/client_channel/uri_parser.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/lib/uri/uri_parser.h" #define GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR \ "grpc.fake_resolver.response_generator" diff --git a/src/core/ext/filters/client_channel/resolver_factory.h b/src/core/ext/filters/client_channel/resolver_factory.h index ee3cfeeb9b..d891ef62e1 100644 --- a/src/core/ext/filters/client_channel/resolver_factory.h +++ b/src/core/ext/filters/client_channel/resolver_factory.h @@ -24,11 +24,11 @@ #include <grpc/support/string_util.h> #include "src/core/ext/filters/client_channel/resolver.h" -#include "src/core/ext/filters/client_channel/uri_parser.h" #include "src/core/lib/gprpp/abstract.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/uri/uri_parser.h" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc index e4c6efe862..b98f238be0 100644 --- a/src/core/ext/filters/client_channel/subchannel.cc +++ b/src/core/ext/filters/client_channel/subchannel.cc @@ -34,7 +34,6 @@ #include "src/core/ext/filters/client_channel/parse_address.h" #include "src/core/ext/filters/client_channel/proxy_mapper_registry.h" #include "src/core/ext/filters/client_channel/subchannel_index.h" -#include "src/core/ext/filters/client_channel/uri_parser.h" #include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/connected_channel.h" @@ -54,6 +53,7 @@ #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/service_config.h" #include "src/core/lib/transport/status_metadata.h" +#include "src/core/lib/uri/uri_parser.h" #define INTERNAL_REF_BITS 16 #define STRONG_REF_MASK (~(gpr_atm)((1 << INTERNAL_REF_BITS) - 1)) diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc index 8ac34c629f..6a7231ff7d 100644 --- a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc +++ b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc @@ -25,7 +25,6 @@ #include <grpc/support/string_util.h> #include "src/core/ext/filters/client_channel/parse_address.h" -#include "src/core/ext/filters/client_channel/uri_parser.h" #include "src/core/ext/filters/load_reporting/registered_opencensus_objects.h" #include "src/core/ext/filters/load_reporting/server_load_reporting_filter.h" #include "src/core/lib/channel/channel_args.h" @@ -36,6 +35,7 @@ #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/call.h" +#include "src/core/lib/uri/uri_parser.h" namespace grpc { diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc index 5ce73a95d7..e73eee4353 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc @@ -27,7 +27,6 @@ #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/filters/client_channel/uri_parser.h" #include "src/core/ext/transport/chttp2/client/chttp2_connector.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/memory.h" @@ -39,6 +38,7 @@ #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" +#include "src/core/lib/uri/uri_parser.h" static void client_channel_factory_ref( grpc_client_channel_factory* cc_factory) {} diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.cc b/src/core/ext/transport/chttp2/server/chttp2_server.cc index 287bc0454e..cad71daf6e 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.cc +++ b/src/core/ext/transport/chttp2/server/chttp2_server.cc @@ -367,14 +367,9 @@ grpc_error* grpc_chttp2_server_add_port(grpc_server* server, const char* addr, arg = grpc_channel_args_find(args, GRPC_ARG_ENABLE_CHANNELZ); if (grpc_channel_arg_get_bool(arg, false)) { - char* host; - char* port; - gpr_split_host_port(addr, &host, &port); - // allocated host's ownership is passed to ListenSocketNode. state->channelz_listen_socket = grpc_core::MakeRefCounted<grpc_core::channelz::ListenSocketNode>( - grpc_core::UniquePtr<char>(host), *port_num); - gpr_free(port); + grpc_core::UniquePtr<char>(gpr_strdup(addr))); socket_uuid = state->channelz_listen_socket->uuid(); } diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 04874a9494..7c2dc0bcbe 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -53,6 +53,7 @@ #include "src/core/lib/transport/timeout_encoding.h" #include "src/core/lib/transport/transport.h" #include "src/core/lib/transport/transport_impl.h" +#include "src/core/lib/uri/uri_parser.h" #define DEFAULT_CONNECTION_WINDOW_TARGET (1024 * 1024) #define MAX_WINDOW 0x7fffffffu @@ -395,8 +396,12 @@ static bool read_channel_args(grpc_chttp2_transport* t, } } if (channelz_enabled) { + // TODO(ncteisen): add an API to endpoint to query for local addr, and pass + // it in here, so SocketNode knows its own address. t->channelz_socket = - grpc_core::MakeRefCounted<grpc_core::channelz::SocketNode>(); + grpc_core::MakeRefCounted<grpc_core::channelz::SocketNode>( + grpc_core::UniquePtr<char>(), + grpc_core::UniquePtr<char>(gpr_strdup(t->peer_string))); } return enable_bdp; } diff --git a/src/core/lib/channel/channelz.cc b/src/core/lib/channel/channelz.cc index 032654b861..b31ab41f6a 100644 --- a/src/core/lib/channel/channelz.cc +++ b/src/core/lib/channel/channelz.cc @@ -30,15 +30,18 @@ #include "src/core/lib/channel/channelz_registry.h" #include "src/core/lib/channel/status_util.h" +#include "src/core/lib/gpr/host_port.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/useful.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/slice/b64.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/server.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/lib/uri/uri_parser.h" namespace grpc_core { namespace channelz { @@ -277,7 +280,61 @@ grpc_json* ServerNode::RenderJson() { return top_level_json; } -SocketNode::SocketNode() : BaseNode(EntityType::kSocket) {} +static void PopulateSocketAddressJson(grpc_json* json, const char* name, + const char* addr_str) { + if (addr_str == nullptr) return; + grpc_json* json_iterator = nullptr; + json_iterator = grpc_json_create_child(json_iterator, json, name, nullptr, + GRPC_JSON_OBJECT, false); + json = json_iterator; + json_iterator = nullptr; + grpc_uri* uri = grpc_uri_parse(addr_str, true); + if ((uri != nullptr) && ((strcmp(uri->scheme, "ipv4") == 0) || + (strcmp(uri->scheme, "ipv6") == 0))) { + const char* host_port = uri->path; + if (*host_port == '/') ++host_port; + char* host = nullptr; + char* port = nullptr; + GPR_ASSERT(gpr_split_host_port(host_port, &host, &port)); + int port_num = -1; + if (port != nullptr) { + port_num = atoi(port); + } + char* b64_host = grpc_base64_encode(host, strlen(host), false, false); + json_iterator = grpc_json_create_child(json_iterator, json, "tcpip_address", + nullptr, GRPC_JSON_OBJECT, false); + json = json_iterator; + json_iterator = nullptr; + json_iterator = grpc_json_add_number_string_child(json, json_iterator, + "port", port_num); + json_iterator = grpc_json_create_child(json_iterator, json, "ip_address", + b64_host, GRPC_JSON_STRING, true); + gpr_free(host); + gpr_free(port); + + } else if (uri != nullptr && strcmp(uri->scheme, "unix") == 0) { + json_iterator = grpc_json_create_child(json_iterator, json, "uds_address", + nullptr, GRPC_JSON_OBJECT, false); + json = json_iterator; + json_iterator = nullptr; + json_iterator = + grpc_json_create_child(json_iterator, json, "filename", + gpr_strdup(uri->path), GRPC_JSON_STRING, true); + } else { + json_iterator = grpc_json_create_child(json_iterator, json, "other_address", + nullptr, GRPC_JSON_OBJECT, false); + json = json_iterator; + json_iterator = nullptr; + json_iterator = grpc_json_create_child(json_iterator, json, "name", + addr_str, GRPC_JSON_STRING, false); + } + grpc_uri_destroy(uri); +} + +SocketNode::SocketNode(UniquePtr<char> local, UniquePtr<char> remote) + : BaseNode(EntityType::kSocket), + local_(std::move(local)), + remote_(std::move(remote)) {} void SocketNode::RecordStreamStartedFromLocal() { gpr_atm_no_barrier_fetch_add(&streams_started_, static_cast<gpr_atm>(1)); @@ -315,6 +372,9 @@ grpc_json* SocketNode::RenderJson() { json_iterator = nullptr; json_iterator = grpc_json_add_number_string_child(json, json_iterator, "socketId", uuid()); + json = top_level_json; + PopulateSocketAddressJson(json, "remote", remote_.get()); + PopulateSocketAddressJson(json, "local", local_.get()); // reset json iterators to top level object json = top_level_json; json_iterator = nullptr; @@ -374,8 +434,8 @@ grpc_json* SocketNode::RenderJson() { return top_level_json; } -ListenSocketNode::ListenSocketNode(UniquePtr<char> host, int port) - : BaseNode(EntityType::kSocket), host_(std::move(host)), port_(port) {} +ListenSocketNode::ListenSocketNode(UniquePtr<char> local_addr) + : BaseNode(EntityType::kSocket), local_addr_(std::move(local_addr)) {} grpc_json* ListenSocketNode::RenderJson() { // We need to track these three json objects to build our object @@ -389,20 +449,7 @@ grpc_json* ListenSocketNode::RenderJson() { json_iterator = nullptr; json_iterator = grpc_json_add_number_string_child(json, json_iterator, "socketId", uuid()); - json = top_level_json; - json_iterator = nullptr; - json_iterator = grpc_json_create_child(json_iterator, json, "local", nullptr, - GRPC_JSON_OBJECT, false); - json = json_iterator; - json_iterator = nullptr; - json_iterator = grpc_json_create_child(json_iterator, json, "tcpip_address", - nullptr, GRPC_JSON_OBJECT, false); - json = json_iterator; - json_iterator = nullptr; - json_iterator = - grpc_json_add_number_string_child(json, json_iterator, "port", port_); - json_iterator = grpc_json_create_child(json_iterator, json, "ip_address", - host_.get(), GRPC_JSON_STRING, false); + PopulateSocketAddressJson(json, "local", local_addr_.get()); return top_level_json; } diff --git a/src/core/lib/channel/channelz.h b/src/core/lib/channel/channelz.h index 8e66623142..64ab5cb3a6 100644 --- a/src/core/lib/channel/channelz.h +++ b/src/core/lib/channel/channelz.h @@ -232,7 +232,7 @@ class ServerNode : public BaseNode { // Handles channelz bookkeeping for sockets class SocketNode : public BaseNode { public: - SocketNode(); + SocketNode(UniquePtr<char> local, UniquePtr<char> remote); ~SocketNode() override {} grpc_json* RenderJson() override; @@ -262,21 +262,21 @@ class SocketNode : public BaseNode { gpr_atm last_remote_stream_created_millis_ = 0; gpr_atm last_message_sent_millis_ = 0; gpr_atm last_message_received_millis_ = 0; - UniquePtr<char> peer_string_; + UniquePtr<char> local_; + UniquePtr<char> remote_; }; // Handles channelz bookkeeping for listen sockets class ListenSocketNode : public BaseNode { public: // ListenSocketNode takes ownership of host. - ListenSocketNode(UniquePtr<char> host, int port); + explicit ListenSocketNode(UniquePtr<char> local_addr); ~ListenSocketNode() override {} grpc_json* RenderJson() override; private: - UniquePtr<char> host_; - int port_; + UniquePtr<char> local_addr_; }; // Creation functions diff --git a/src/core/lib/channel/channelz_registry.cc b/src/core/lib/channel/channelz_registry.cc index 8fc1b58adc..bc23b90a66 100644 --- a/src/core/lib/channel/channelz_registry.cc +++ b/src/core/lib/channel/channelz_registry.cc @@ -210,6 +210,17 @@ char* ChannelzRegistry::InternalGetServers(intptr_t start_server_id) { return json_str; } +void ChannelzRegistry::InternalLogAllEntities() { + MutexLock lock(&mu_); + for (size_t i = 0; i < entities_.size(); ++i) { + if (entities_[i] != nullptr) { + char* json = entities_[i]->RenderJsonString(); + gpr_log(GPR_INFO, "%s", json); + gpr_free(json); + } + } +} + } // namespace channelz } // namespace grpc_core diff --git a/src/core/lib/channel/channelz_registry.h b/src/core/lib/channel/channelz_registry.h index 326f0201c7..73b330785d 100644 --- a/src/core/lib/channel/channelz_registry.h +++ b/src/core/lib/channel/channelz_registry.h @@ -62,6 +62,10 @@ class ChannelzRegistry { return Default()->InternalGetServers(start_server_id); } + // Test only helper function to dump the JSON representation to std out. + // This can aid in debugging channelz code. + static void LogAllEntities() { Default()->InternalLogAllEntities(); } + private: GPRC_ALLOW_CLASS_TO_USE_NON_PUBLIC_NEW GPRC_ALLOW_CLASS_TO_USE_NON_PUBLIC_DELETE @@ -96,6 +100,8 @@ class ChannelzRegistry { // Else, will return idx of the first uuid higher than the target. int FindByUuidLocked(intptr_t uuid, bool direct_hit_needed); + void InternalLogAllEntities(); + // protects members gpr_mu mu_; InlinedVector<BaseNode*, 20> entities_; diff --git a/src/core/ext/filters/client_channel/uri_parser.cc b/src/core/lib/uri/uri_parser.cc index 0572034a9c..f212c7d2c0 100644 --- a/src/core/ext/filters/client_channel/uri_parser.cc +++ b/src/core/lib/uri/uri_parser.cc @@ -18,7 +18,7 @@ #include <grpc/support/port_platform.h> -#include "src/core/ext/filters/client_channel/uri_parser.h" +#include "src/core/lib/uri/uri_parser.h" #include <string.h> diff --git a/src/core/ext/filters/client_channel/uri_parser.h b/src/core/lib/uri/uri_parser.h index d749f23308..b6771bbde3 100644 --- a/src/core/ext/filters/client_channel/uri_parser.h +++ b/src/core/lib/uri/uri_parser.h @@ -16,8 +16,8 @@ * */ -#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_URI_PARSER_H -#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_URI_PARSER_H +#ifndef GRPC_CORE_LIB_URI_URI_PARSER_H +#define GRPC_CORE_LIB_URI_URI_PARSER_H #include <grpc/support/port_platform.h> @@ -47,4 +47,4 @@ const char* grpc_uri_get_query_arg(const grpc_uri* uri, const char* key); /** destroy a uri */ void grpc_uri_destroy(grpc_uri* uri); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_URI_PARSER_H */ +#endif /* GRPC_CORE_LIB_URI_URI_PARSER_H */ diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc index f5c1b4e2c5..6ef7df4ea0 100644 --- a/src/cpp/client/channel_cc.cc +++ b/src/cpp/client/channel_cc.cc @@ -115,7 +115,7 @@ void ChannelResetConnectionBackoff(Channel* channel) { internal::Call Channel::CreateCallInternal(const internal::RpcMethod& method, ClientContext* context, CompletionQueue* cq, - int interceptor_pos) { + size_t interceptor_pos) { const bool kRegistered = method.channel_tag() && context->authority().empty(); grpc_call* c_call = nullptr; if (kRegistered) { diff --git a/src/cpp/codegen/client_interceptor.cc b/src/cpp/codegen/client_interceptor.cc new file mode 100644 index 0000000000..3a5cac9830 --- /dev/null +++ b/src/cpp/codegen/client_interceptor.cc @@ -0,0 +1,34 @@ +/* + * + * Copyright 2018 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include <grpcpp/impl/codegen/client_interceptor.h> + +namespace grpc { + +namespace internal { +experimental::ClientInterceptorFactoryInterface* + g_global_client_interceptor_factory = nullptr; +} + +namespace experimental { +void RegisterGlobalClientInterceptorFactory( + ClientInterceptorFactoryInterface* factory) { + internal::g_global_client_interceptor_factory = factory; +} +} // namespace experimental +} // namespace grpc diff --git a/src/proto/grpc/reflection/v1alpha/BUILD b/src/proto/grpc/reflection/v1alpha/BUILD index 4605418447..4d919d029e 100644 --- a/src/proto/grpc/reflection/v1alpha/BUILD +++ b/src/proto/grpc/reflection/v1alpha/BUILD @@ -22,3 +22,11 @@ grpc_proto_library( name = "reflection_proto", srcs = ["reflection.proto"], ) + +filegroup( + name = "reflection_proto_file", + srcs = [ + "reflection.proto", + ], +) + diff --git a/src/proto/grpc/testing/BUILD b/src/proto/grpc/testing/BUILD index 16721ff2ed..7048911b9a 100644 --- a/src/proto/grpc/testing/BUILD +++ b/src/proto/grpc/testing/BUILD @@ -15,6 +15,8 @@ licenses(["notice"]) # Apache v2 load("//bazel:grpc_build_system.bzl", "grpc_proto_library", "grpc_package") +load("@grpc_python_dependencies//:requirements.bzl", "requirement") +load("@org_pubref_rules_protobuf//python:rules.bzl", "py_proto_library") grpc_package(name = "testing", visibility = "public") @@ -58,12 +60,30 @@ grpc_proto_library( has_services = False, ) +py_proto_library( + name = "py_empty_proto", + protos = ["empty.proto",], + with_grpc = True, + deps = [ + requirement('protobuf'), + ], +) + grpc_proto_library( name = "messages_proto", srcs = ["messages.proto"], has_services = False, ) +py_proto_library( + name = "py_messages_proto", + protos = ["messages.proto",], + with_grpc = True, + deps = [ + requirement('protobuf'), + ], +) + grpc_proto_library( name = "metrics_proto", srcs = ["metrics.proto"], @@ -116,3 +136,17 @@ grpc_proto_library( "messages_proto", ], ) + +py_proto_library( + name = "py_test_proto", + protos = ["test.proto",], + with_grpc = True, + deps = [ + requirement('protobuf'), + ], + proto_deps = [ + ":py_empty_proto", + ":py_messages_proto", + ] +) + diff --git a/src/proto/grpc/testing/proto2/BUILD.bazel b/src/proto/grpc/testing/proto2/BUILD.bazel new file mode 100644 index 0000000000..c4c4f004ef --- /dev/null +++ b/src/proto/grpc/testing/proto2/BUILD.bazel @@ -0,0 +1,30 @@ +load("@grpc_python_dependencies//:requirements.bzl", "requirement") +load("@org_pubref_rules_protobuf//python:rules.bzl", "py_proto_library") + +package(default_visibility = ["//visibility:public"]) + +py_proto_library( + name = "empty2_proto", + protos = [ + "empty2.proto", + ], + with_grpc = True, + deps = [ + requirement('protobuf'), + ], +) + +py_proto_library( + name = "empty2_extensions_proto", + protos = [ + "empty2_extensions.proto", + ], + proto_deps = [ + ":empty2_proto", + ], + with_grpc = True, + deps = [ + requirement('protobuf'), + ], +) + diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 9db1c52932..42a4a7aa04 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -208,6 +208,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc', 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', @@ -331,7 +332,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_index.cc', - 'src/core/ext/filters/client_channel/uri_parser.cc', 'src/core/ext/filters/deadline/deadline_filter.cc', 'src/core/ext/filters/client_channel/health/health.pb.c', 'src/core/tsi/alts_transport_security.cc', diff --git a/src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel b/src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel new file mode 100644 index 0000000000..3a2ba26371 --- /dev/null +++ b/src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel @@ -0,0 +1,34 @@ +load("@grpc_python_dependencies//:requirements.bzl", "requirement") +load("@org_pubref_rules_protobuf//python:rules.bzl", "py_proto_library") + +package(default_visibility = ["//visibility:public"]) + +genrule( + name = "mv_reflection_proto", + srcs = [ + "//src/proto/grpc/reflection/v1alpha:reflection_proto_file", + ], + outs = ["reflection.proto",], + cmd = "cp $< $@", +) + +py_proto_library( + name = "py_reflection_proto", + protos = [":mv_reflection_proto",], + with_grpc = True, + deps = [ + requirement('protobuf'), + ], +) + +py_library( + name = "grpc_reflection", + srcs = ["reflection.py",], + deps = [ + ":py_reflection_proto", + "//src/python/grpcio/grpc:grpcio", + requirement('protobuf'), + ], + imports=["../../",], +) + diff --git a/src/python/grpcio_tests/tests/interop/BUILD.bazel b/src/python/grpcio_tests/tests/interop/BUILD.bazel new file mode 100644 index 0000000000..a39f30d32a --- /dev/null +++ b/src/python/grpcio_tests/tests/interop/BUILD.bazel @@ -0,0 +1,97 @@ +load("@grpc_python_dependencies//:requirements.bzl", "requirement") + +package(default_visibility = ["//visibility:public"]) + +py_library( + name = "_intraop_test_case", + srcs = ["_intraop_test_case.py"], + deps = [ + ":methods", + ], + imports=["../../",], +) + +py_library( + name = "client", + srcs = ["client.py"], + deps = [ + "//src/python/grpcio/grpc:grpcio", + ":methods", + ":resources", + "//src/proto/grpc/testing:py_test_proto", + requirement('google-auth'), + ], + imports=["../../",], +) + +py_library( + name = "methods", + srcs = ["methods.py"], + deps = [ + "//src/python/grpcio/grpc:grpcio", + "//src/proto/grpc/testing:py_empty_proto", + "//src/proto/grpc/testing:py_messages_proto", + "//src/proto/grpc/testing:py_test_proto", + requirement('google-auth'), + requirement('requests'), + requirement('enum34'), + ], + imports=["../../",], +) + +py_library( + name = "resources", + srcs = ["resources.py"], + data = [ + "//src/python/grpcio_tests/tests/interop/credentials", + ], +) + +py_library( + name = "server", + srcs = ["server.py"], + deps = [ + "//src/python/grpcio/grpc:grpcio", + ":methods", + ":resources", + "//src/python/grpcio_tests/tests/unit:test_common", + "//src/proto/grpc/testing:py_test_proto", + ], + imports=["../../",], +) + +py_test( + name="_insecure_intraop_test", + size="small", + srcs=["_insecure_intraop_test.py",], + main="_insecure_intraop_test.py", + deps=[ + "//src/python/grpcio/grpc:grpcio", + ":_intraop_test_case", + ":methods", + ":server", + "//src/python/grpcio_tests/tests/unit:test_common", + "//src/proto/grpc/testing:py_test_proto", + ], + imports=["../../",], + data=[ + "//src/python/grpcio_tests/tests/unit/credentials", + ], +) + +py_test( + name="_secure_intraop_test", + size="small", + srcs=["_secure_intraop_test.py",], + main="_secure_intraop_test.py", + deps=[ + "//src/python/grpcio/grpc:grpcio", + ":_intraop_test_case", + ":methods", + ":server", + "//src/python/grpcio_tests/tests/unit:test_common", + "//src/proto/grpc/testing:py_test_proto", + ], + imports=["../../",], +) + diff --git a/src/python/grpcio_tests/tests/interop/credentials/BUILD.bazel b/src/python/grpcio_tests/tests/interop/credentials/BUILD.bazel new file mode 100644 index 0000000000..bc2b997292 --- /dev/null +++ b/src/python/grpcio_tests/tests/interop/credentials/BUILD.bazel @@ -0,0 +1,9 @@ +package(default_visibility = ["//visibility:public"]) + +filegroup( + name="credentials", + srcs=glob([ + "**", + ]), +) + diff --git a/src/python/grpcio_tests/tests/reflection/BUILD.bazel b/src/python/grpcio_tests/tests/reflection/BUILD.bazel new file mode 100644 index 0000000000..c0efb0b7ce --- /dev/null +++ b/src/python/grpcio_tests/tests/reflection/BUILD.bazel @@ -0,0 +1,21 @@ +load("@grpc_python_dependencies//:requirements.bzl", "requirement") + +package(default_visibility = ["//visibility:public"]) + +py_test( + name="_reflection_servicer_test", + size="small", + timeout="moderate", + srcs=["_reflection_servicer_test.py",], + main="_reflection_servicer_test.py", + deps=[ + "//src/python/grpcio/grpc:grpcio", + "//src/python/grpcio_reflection/grpc_reflection/v1alpha:grpc_reflection", + "//src/python/grpcio_tests/tests/unit:test_common", + "//src/proto/grpc/testing:py_empty_proto", + "//src/proto/grpc/testing/proto2:empty2_extensions_proto", + requirement('protobuf'), + ], + imports=["../../",], +) + diff --git a/test/core/client_channel/uri_fuzzer_test.cc b/test/core/client_channel/uri_fuzzer_test.cc index ee38453166..a88e2ac5cf 100644 --- a/test/core/client_channel/uri_fuzzer_test.cc +++ b/test/core/client_channel/uri_fuzzer_test.cc @@ -23,8 +23,8 @@ #include <grpc/grpc.h> #include <grpc/support/alloc.h> -#include "src/core/ext/filters/client_channel/uri_parser.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/uri/uri_parser.h" bool squelch = true; bool leak_check = true; diff --git a/test/core/client_channel/uri_parser_test.cc b/test/core/client_channel/uri_parser_test.cc index 254bfddfb3..ec4f755dda 100644 --- a/test/core/client_channel/uri_parser_test.cc +++ b/test/core/client_channel/uri_parser_test.cc @@ -16,7 +16,7 @@ * */ -#include "src/core/ext/filters/client_channel/uri_parser.h" +#include "src/core/lib/uri/uri_parser.h" #include <string.h> diff --git a/test/core/end2end/tests/channelz.cc b/test/core/end2end/tests/channelz.cc index 7c61b7910b..922783aa0d 100644 --- a/test/core/end2end/tests/channelz.cc +++ b/test/core/end2end/tests/channelz.cc @@ -29,6 +29,7 @@ #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <grpc/support/time.h> +#include "src/core/lib/channel/channelz_registry.h" #include "src/core/lib/gpr/string.h" #include "test/core/end2end/cq_verifier.h" @@ -238,7 +239,6 @@ static void test_channelz(grpc_end2end_test_config config) { json = channelz_channel->RenderJsonString(); GPR_ASSERT(json != nullptr); - gpr_log(GPR_INFO, "%s", json); GPR_ASSERT(nullptr != strstr(json, "\"callsStarted\":\"2\"")); GPR_ASSERT(nullptr != strstr(json, "\"callsFailed\":\"1\"")); GPR_ASSERT(nullptr != strstr(json, "\"callsSucceeded\":\"1\"")); @@ -250,7 +250,6 @@ static void test_channelz(grpc_end2end_test_config config) { json = channelz_server->RenderJsonString(); GPR_ASSERT(json != nullptr); - gpr_log(GPR_INFO, "%s", json); GPR_ASSERT(nullptr != strstr(json, "\"callsStarted\":\"2\"")); GPR_ASSERT(nullptr != strstr(json, "\"callsFailed\":\"1\"")); GPR_ASSERT(nullptr != strstr(json, "\"callsSucceeded\":\"1\"")); @@ -292,7 +291,6 @@ static void test_channelz_with_channel_trace(grpc_end2end_test_config config) { char* json = channelz_channel->RenderJsonString(); GPR_ASSERT(json != nullptr); - gpr_log(GPR_INFO, "%s", json); GPR_ASSERT(nullptr != strstr(json, "\"trace\"")); GPR_ASSERT(nullptr != strstr(json, "\"description\":\"Channel created\"")); GPR_ASSERT(nullptr != strstr(json, "\"severity\":\"CT_INFO\"")); @@ -300,7 +298,6 @@ static void test_channelz_with_channel_trace(grpc_end2end_test_config config) { json = channelz_server->RenderJsonString(); GPR_ASSERT(json != nullptr); - gpr_log(GPR_INFO, "%s", json); GPR_ASSERT(nullptr != strstr(json, "\"trace\"")); GPR_ASSERT(nullptr != strstr(json, "\"description\":\"Server created\"")); GPR_ASSERT(nullptr != strstr(json, "\"severity\":\"CT_INFO\"")); diff --git a/test/cpp/end2end/client_interceptors_end2end_test.cc b/test/cpp/end2end/client_interceptors_end2end_test.cc index e8ffd46344..205f64c0f2 100644 --- a/test/cpp/end2end/client_interceptors_end2end_test.cc +++ b/test/cpp/end2end/client_interceptors_end2end_test.cc @@ -601,6 +601,106 @@ TEST_F(ClientInterceptorsStreamingEnd2endTest, BidiStreamingTest) { EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20); } +class ClientGlobalInterceptorEnd2endTest : public ::testing::Test { + protected: + ClientGlobalInterceptorEnd2endTest() { + int port = grpc_pick_unused_port_or_die(); + + ServerBuilder builder; + server_address_ = "localhost:" + std::to_string(port); + builder.AddListeningPort(server_address_, InsecureServerCredentials()); + builder.RegisterService(&service_); + server_ = builder.BuildAndStart(); + } + + ~ClientGlobalInterceptorEnd2endTest() { server_->Shutdown(); } + + std::string server_address_; + TestServiceImpl service_; + std::unique_ptr<Server> server_; +}; + +TEST_F(ClientGlobalInterceptorEnd2endTest, DummyGlobalInterceptor) { + // We should ideally be registering a global interceptor only once per + // process, but for the purposes of testing, it should be fine to modify the + // registered global interceptor when there are no ongoing gRPC operations + DummyInterceptorFactory global_factory; + experimental::RegisterGlobalClientInterceptorFactory(&global_factory); + ChannelArguments args; + DummyInterceptor::Reset(); + auto creators = std::unique_ptr<std::vector< + std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>>( + new std::vector< + std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>()); + // Add 20 dummy interceptors + for (auto i = 0; i < 20; i++) { + creators->push_back(std::unique_ptr<DummyInterceptorFactory>( + new DummyInterceptorFactory())); + } + auto channel = experimental::CreateCustomChannelWithInterceptors( + server_address_, InsecureChannelCredentials(), args, std::move(creators)); + MakeCall(channel); + // Make sure all 20 dummy interceptors were run with the global interceptor + EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 21); + // Reset the global interceptor. This is again 'safe' because there are no + // other ongoing gRPC operations + experimental::RegisterGlobalClientInterceptorFactory(nullptr); +} + +TEST_F(ClientGlobalInterceptorEnd2endTest, LoggingGlobalInterceptor) { + // We should ideally be registering a global interceptor only once per + // process, but for the purposes of testing, it should be fine to modify the + // registered global interceptor when there are no ongoing gRPC operations + LoggingInterceptorFactory global_factory; + experimental::RegisterGlobalClientInterceptorFactory(&global_factory); + ChannelArguments args; + DummyInterceptor::Reset(); + auto creators = std::unique_ptr<std::vector< + std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>>( + new std::vector< + std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>()); + // Add 20 dummy interceptors + for (auto i = 0; i < 20; i++) { + creators->push_back(std::unique_ptr<DummyInterceptorFactory>( + new DummyInterceptorFactory())); + } + auto channel = experimental::CreateCustomChannelWithInterceptors( + server_address_, InsecureChannelCredentials(), args, std::move(creators)); + MakeCall(channel); + // Make sure all 20 dummy interceptors were run + EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20); + // Reset the global interceptor. This is again 'safe' because there are no + // other ongoing gRPC operations + experimental::RegisterGlobalClientInterceptorFactory(nullptr); +} + +TEST_F(ClientGlobalInterceptorEnd2endTest, HijackingGlobalInterceptor) { + // We should ideally be registering a global interceptor only once per + // process, but for the purposes of testing, it should be fine to modify the + // registered global interceptor when there are no ongoing gRPC operations + HijackingInterceptorFactory global_factory; + experimental::RegisterGlobalClientInterceptorFactory(&global_factory); + ChannelArguments args; + DummyInterceptor::Reset(); + auto creators = std::unique_ptr<std::vector< + std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>>( + new std::vector< + std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>()); + // Add 20 dummy interceptors + for (auto i = 0; i < 20; i++) { + creators->push_back(std::unique_ptr<DummyInterceptorFactory>( + new DummyInterceptorFactory())); + } + auto channel = experimental::CreateCustomChannelWithInterceptors( + server_address_, InsecureChannelCredentials(), args, std::move(creators)); + MakeCall(channel); + // Make sure all 20 dummy interceptors were run + EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20); + // Reset the global interceptor. This is again 'safe' because there are no + // other ongoing gRPC operations + experimental::RegisterGlobalClientInterceptorFactory(nullptr); +} + } // namespace } // namespace testing } // namespace grpc diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 33dd985914..dc27a6ae76 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1183,6 +1183,7 @@ src/core/lib/transport/status_metadata.h \ src/core/lib/transport/timeout_encoding.h \ src/core/lib/transport/transport.h \ src/core/lib/transport/transport_impl.h \ +src/core/lib/uri/uri_parser.h \ src/cpp/README.md \ src/cpp/client/channel_cc.cc \ src/cpp/client/client_context.cc \ @@ -1195,6 +1196,7 @@ src/cpp/client/generic_stub.cc \ src/cpp/client/insecure_credentials.cc \ src/cpp/client/secure_credentials.cc \ src/cpp/client/secure_credentials.h \ +src/cpp/codegen/client_interceptor.cc \ src/cpp/codegen/codegen_init.cc \ src/cpp/common/alarm.cc \ src/cpp/common/auth_property_iterator.cc \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 30841a351b..791318bf36 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -962,8 +962,6 @@ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel.h \ src/core/ext/filters/client_channel/subchannel_index.cc \ src/core/ext/filters/client_channel/subchannel_index.h \ -src/core/ext/filters/client_channel/uri_parser.cc \ -src/core/ext/filters/client_channel/uri_parser.h \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/filters/deadline/deadline_filter.h \ src/core/ext/filters/http/client/http_client_filter.cc \ @@ -1478,6 +1476,8 @@ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport.h \ src/core/lib/transport/transport_impl.h \ src/core/lib/transport/transport_op_string.cc \ +src/core/lib/uri/uri_parser.cc \ +src/core/lib/uri/uri_parser.h \ src/core/plugin_registry/grpc_plugin_registry.cc \ src/core/tsi/README.md \ src/core/tsi/alts/crypt/aes_gcm.cc \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 0e653f3b97..b94fc77d76 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -9648,7 +9648,8 @@ "src/core/lib/transport/status_metadata.cc", "src/core/lib/transport/timeout_encoding.cc", "src/core/lib/transport/transport.cc", - "src/core/lib/transport/transport_op_string.cc" + "src/core/lib/transport/transport_op_string.cc", + "src/core/lib/uri/uri_parser.cc" ], "third_party": false, "type": "filegroup" @@ -9805,7 +9806,8 @@ "src/core/lib/transport/status_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h" + "src/core/lib/transport/transport_impl.h", + "src/core/lib/uri/uri_parser.h" ], "is_filegroup": true, "language": "c", @@ -9956,7 +9958,8 @@ "src/core/lib/transport/status_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h" + "src/core/lib/transport/transport_impl.h", + "src/core/lib/uri/uri_parser.h" ], "third_party": false, "type": "filegroup" @@ -10034,8 +10037,7 @@ "src/core/ext/filters/client_channel/resolver_registry.h", "src/core/ext/filters/client_channel/retry_throttle.h", "src/core/ext/filters/client_channel/subchannel.h", - "src/core/ext/filters/client_channel/subchannel_index.h", - "src/core/ext/filters/client_channel/uri_parser.h" + "src/core/ext/filters/client_channel/subchannel_index.h" ], "is_filegroup": true, "language": "c", @@ -10083,9 +10085,7 @@ "src/core/ext/filters/client_channel/subchannel.cc", "src/core/ext/filters/client_channel/subchannel.h", "src/core/ext/filters/client_channel/subchannel_index.cc", - "src/core/ext/filters/client_channel/subchannel_index.h", - "src/core/ext/filters/client_channel/uri_parser.cc", - "src/core/ext/filters/client_channel/uri_parser.h" + "src/core/ext/filters/client_channel/subchannel_index.h" ], "third_party": false, "type": "filegroup" @@ -11322,6 +11322,7 @@ "language": "c++", "name": "grpc++_codegen_base_src", "src": [ + "src/cpp/codegen/client_interceptor.cc", "src/cpp/codegen/codegen_init.cc" ], "third_party": false, |