Merge branch 'master' into restrict-grpc_public_hdrs

pull/36289/head
AJ Heller 10 months ago
commit 16f6c72ab6
  1. 31
      BUILD
  2. 101
      CMakeLists.txt
  3. 8
      Makefile
  4. 19
      Package.swift
  5. 1
      bazel/experiments.bzl
  6. 2
      bazel/grpc_build_system.bzl
  7. 123
      build_autogenerated.yaml
  8. 8
      config.m4
  9. 8
      config.w32
  10. 1
      examples/cpp/csm/BUILD
  11. 3
      examples/cpp/csm/csm_greeter_server.cc
  12. 1
      examples/cpp/helloworld/BUILD
  13. 1
      examples/cpp/helloworld/CMakeLists.txt
  14. 8
      examples/cpp/helloworld/xds_greeter_server.cc
  15. 2
      examples/cpp/keepalive/CMakeLists.txt
  16. 1
      examples/cpp/xds/BUILD
  17. 8
      examples/cpp/xds/xds_greeter_server.cc
  18. 20
      gRPC-C++.podspec
  19. 28
      gRPC-Core.podspec
  20. 130
      grpc.def
  21. 15
      grpc.gemspec
  22. 1222
      include/grpc/credentials.h
  23. 7
      include/grpc/grpc.h
  24. 1
      include/grpc/grpc_crl_provider.h
  25. 1171
      include/grpc/grpc_security.h
  26. 1
      include/grpc/module.modulemap
  27. 2
      include/grpc/support/log.h
  28. 1
      include/grpcpp/security/tls_certificate_provider.h
  29. 2
      include/grpcpp/support/callback_common.h
  30. 15
      package.xml
  31. 1220
      src/compiler/cpp_generator.cc
  32. 4
      src/compiler/cpp_generator.h
  33. 20
      src/compiler/cpp_plugin.h
  34. 42
      src/core/BUILD
  35. 4
      src/core/channelz/channel_trace.cc
  36. 6
      src/core/channelz/channel_trace.h
  37. 66
      src/core/channelz/channelz.cc
  38. 48
      src/core/channelz/channelz.h
  39. 4
      src/core/channelz/channelz_registry.cc
  40. 8
      src/core/channelz/channelz_registry.h
  41. 93
      src/core/client_channel/client_channel_channelz.cc
  42. 85
      src/core/client_channel/client_channel_channelz.h
  43. 5
      src/core/client_channel/client_channel_filter.cc
  44. 4
      src/core/client_channel/client_channel_filter.h
  45. 2
      src/core/client_channel/client_channel_internal.h
  46. 2
      src/core/client_channel/client_channel_service_config.h
  47. 2
      src/core/client_channel/config_selector.h
  48. 2
      src/core/client_channel/connector.h
  49. 2
      src/core/client_channel/retry_filter.cc
  50. 4
      src/core/client_channel/subchannel.cc
  51. 1
      src/core/client_channel/subchannel.h
  52. 7
      src/core/ext/filters/backend_metrics/backend_metric_filter.cc
  53. 4
      src/core/ext/filters/backend_metrics/backend_metric_filter.h
  54. 18
      src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc
  55. 21
      src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h
  56. 5
      src/core/ext/filters/deadline/deadline_filter.cc
  57. 13
      src/core/ext/filters/fault_injection/fault_injection_filter.cc
  58. 8
      src/core/ext/filters/fault_injection/fault_injection_filter.h
  59. 9
      src/core/ext/filters/http/client/http_client_filter.cc
  60. 10
      src/core/ext/filters/http/client/http_client_filter.h
  61. 7
      src/core/ext/filters/http/client_authority_filter.cc
  62. 9
      src/core/ext/filters/http/client_authority_filter.h
  63. 12
      src/core/ext/filters/http/message_compress/compression_filter.cc
  64. 16
      src/core/ext/filters/http/message_compress/compression_filter.h
  65. 4
      src/core/ext/filters/http/server/http_server_filter.cc
  66. 10
      src/core/ext/filters/http/server/http_server_filter.h
  67. 9
      src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
  68. 2
      src/core/ext/filters/load_reporting/server_load_reporting_filter.h
  69. 19
      src/core/ext/filters/logging/logging_filter.cc
  70. 11
      src/core/ext/filters/logging/logging_filter.h
  71. 16
      src/core/ext/filters/message_size/message_size_filter.cc
  72. 14
      src/core/ext/filters/message_size/message_size_filter.h
  73. 15
      src/core/ext/filters/rbac/rbac_filter.cc
  74. 10
      src/core/ext/filters/rbac/rbac_filter.h
  75. 63
      src/core/ext/filters/server_config_selector/server_config_selector_filter.cc
  76. 7
      src/core/ext/filters/stateful_session/stateful_session_filter.cc
  77. 5
      src/core/ext/filters/stateful_session/stateful_session_filter.h
  78. 1
      src/core/ext/gcp/metadata_query.cc
  79. 3
      src/core/ext/transport/binder/.clang-format
  80. 3
      src/core/ext/transport/binder/client/binder_connector.h
  81. 3
      src/core/ext/transport/binder/client/channel_create.cc
  82. 4
      src/core/ext/transport/binder/client/channel_create_impl.cc
  83. 1
      src/core/ext/transport/binder/client/channel_create_impl.h
  84. 4
      src/core/ext/transport/binder/client/connection_id_generator.cc
  85. 4
      src/core/ext/transport/binder/client/connection_id_generator.h
  86. 4
      src/core/ext/transport/binder/client/endpoint_binder_pool.cc
  87. 4
      src/core/ext/transport/binder/client/endpoint_binder_pool.h
  88. 4
      src/core/ext/transport/binder/client/jni_utils.cc
  89. 4
      src/core/ext/transport/binder/client/jni_utils.h
  90. 3
      src/core/ext/transport/binder/client/security_policy_setting.h
  91. 4
      src/core/ext/transport/binder/server/binder_server.cc
  92. 3
      src/core/ext/transport/binder/server/binder_server.h
  93. 4
      src/core/ext/transport/binder/transport/binder_transport.cc
  94. 3
      src/core/ext/transport/binder/transport/binder_transport.h
  95. 4
      src/core/ext/transport/binder/utils/ndk_binder.cc
  96. 4
      src/core/ext/transport/binder/utils/transport_stream_receiver.h
  97. 4
      src/core/ext/transport/binder/utils/transport_stream_receiver_impl.cc
  98. 4
      src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h
  99. 4
      src/core/ext/transport/binder/wire_format/binder.h
  100. 4
      src/core/ext/transport/binder/wire_format/binder_constants.h
  101. Some files were not shown because too many files have changed in this diff Show More

31
BUILD

@ -1245,6 +1245,7 @@ grpc_cc_library(
"gpr",
"grpc++_base_unsecure",
"grpc++_codegen_proto",
"grpc_core_credentials_header",
"grpc_public_hdrs",
"grpc_security_base",
"grpc_unsecure",
@ -1349,14 +1350,14 @@ grpc_cc_library(
grpc_cc_library(
name = "channelz",
srcs = [
"//src/core:lib/channel/channel_trace.cc",
"//src/core:lib/channel/channelz.cc",
"//src/core:lib/channel/channelz_registry.cc",
"//src/core:channelz/channel_trace.cc",
"//src/core:channelz/channelz.cc",
"//src/core:channelz/channelz_registry.cc",
],
hdrs = [
"//src/core:lib/channel/channel_trace.h",
"//src/core:lib/channel/channelz.h",
"//src/core:lib/channel/channelz_registry.h",
"//src/core:channelz/channel_trace.h",
"//src/core:channelz/channelz.h",
"//src/core:channelz/channelz_registry.h",
],
external_deps = [
"absl/base:core_headers",
@ -2269,6 +2270,7 @@ grpc_cc_library(
"exec_ctx",
"gpr",
"grpc_base",
"grpc_core_credentials_header",
"grpc_public_hdrs",
"grpc_trace",
"handshaker",
@ -2330,6 +2332,14 @@ grpc_cc_library(
],
)
# TODO(hork): split credentials types into their own source files and targets.
grpc_cc_library(
name = "grpc_core_credentials_header",
hdrs = ["include/grpc/credentials.h"],
language = "c++",
visibility = ["@grpc:core_credentials"],
)
grpc_cc_library(
name = "alts_util",
srcs = [
@ -2357,6 +2367,7 @@ grpc_cc_library(
deps = [
"alts_upb",
"gpr",
"grpc_core_credentials_header",
"grpc_public_hdrs",
],
)
@ -2430,6 +2441,7 @@ grpc_cc_library(
"grpc",
"grpc++_codegen_proto",
"grpc_base",
"grpc_core_credentials_header",
"grpc_credentials_util",
"grpc_health_upb",
"grpc_public_hdrs",
@ -2511,6 +2523,7 @@ grpc_cc_library(
"exec_ctx",
"gpr",
"grpc_base",
"grpc_core_credentials_header",
"grpc_health_upb",
"grpc_public_hdrs",
"grpc_security_base",
@ -3521,7 +3534,6 @@ grpc_cc_library(
"xds_orca_service_upb",
"xds_orca_upb",
"//src/core:backend_metric_parser",
"//src/core:client_channel_channelz",
"//src/core:closure",
"//src/core:error",
"//src/core:grpc_backend_metric_data",
@ -3655,7 +3667,6 @@ grpc_cc_library(
"//src/core:channel_init",
"//src/core:channel_stack_type",
"//src/core:client_channel_backup_poller",
"//src/core:client_channel_channelz",
"//src/core:client_channel_internal_header",
"//src/core:client_channel_service_config",
"//src/core:closure",
@ -3862,6 +3873,7 @@ grpc_cc_library(
"exec_ctx",
"gpr",
"grpc_base",
"grpc_core_credentials_header",
"grpc_public_hdrs",
"grpc_security_base",
"handshaker",
@ -3931,6 +3943,7 @@ grpc_cc_library(
"exec_ctx",
"gpr",
"grpc_base",
"grpc_core_credentials_header",
"grpc_credentials_util",
"grpc_security_base",
"grpc_trace",
@ -4019,6 +4032,7 @@ grpc_cc_library(
"exec_ctx",
"gpr",
"grpc_base",
"grpc_core_credentials_header",
"grpc_security_base",
"tsi_alts_frame_protector",
"tsi_base",
@ -4136,6 +4150,7 @@ grpc_cc_library(
"config_vars",
"gpr",
"grpc_base",
"grpc_core_credentials_header",
"grpc_credentials_util",
"grpc_public_hdrs",
"grpc_security_base",

101
CMakeLists.txt generated

@ -1448,7 +1448,7 @@ if(gRPC_BUILD_TESTS)
add_dependencies(buildtests_cxx tcp_server_posix_test)
endif()
add_dependencies(buildtests_cxx tcp_socket_utils_test)
add_dependencies(buildtests_cxx test_core_channel_channelz_test)
add_dependencies(buildtests_cxx test_core_channelz_channelz_test)
add_dependencies(buildtests_cxx test_core_end2end_channelz_test)
add_dependencies(buildtests_cxx test_core_event_engine_posix_timer_heap_test)
add_dependencies(buildtests_cxx test_core_event_engine_posix_timer_list_test)
@ -1819,8 +1819,10 @@ endif()
add_library(grpc
src/core/channelz/channel_trace.cc
src/core/channelz/channelz.cc
src/core/channelz/channelz_registry.cc
src/core/client_channel/backup_poller.cc
src/core/client_channel/client_channel_channelz.cc
src/core/client_channel/client_channel_factory.cc
src/core/client_channel/client_channel_filter.cc
src/core/client_channel/client_channel_plugin.cc
@ -2245,9 +2247,6 @@ add_library(grpc
src/core/lib/channel/channel_stack_builder.cc
src/core/lib/channel/channel_stack_builder_impl.cc
src/core/lib/channel/channel_stack_trace.cc
src/core/lib/channel/channel_trace.cc
src/core/lib/channel/channelz.cc
src/core/lib/channel/channelz_registry.cc
src/core/lib/channel/connected_channel.cc
src/core/lib/channel/metrics.cc
src/core/lib/channel/promise_based_filter.cc
@ -2694,6 +2693,7 @@ foreach(_hdr
include/grpc/byte_buffer_reader.h
include/grpc/census.h
include/grpc/compression.h
include/grpc/credentials.h
include/grpc/event_engine/endpoint_config.h
include/grpc/event_engine/event_engine.h
include/grpc/event_engine/extensible.h
@ -2915,8 +2915,10 @@ endif()
endif()
add_library(grpc_unsecure
src/core/channelz/channel_trace.cc
src/core/channelz/channelz.cc
src/core/channelz/channelz_registry.cc
src/core/client_channel/backup_poller.cc
src/core/client_channel/client_channel_channelz.cc
src/core/client_channel/client_channel_factory.cc
src/core/client_channel/client_channel_filter.cc
src/core/client_channel/client_channel_plugin.cc
@ -3010,9 +3012,6 @@ add_library(grpc_unsecure
src/core/lib/channel/channel_stack_builder.cc
src/core/lib/channel/channel_stack_builder_impl.cc
src/core/lib/channel/channel_stack_trace.cc
src/core/lib/channel/channel_trace.cc
src/core/lib/channel/channelz.cc
src/core/lib/channel/channelz_registry.cc
src/core/lib/channel/connected_channel.cc
src/core/lib/channel/metrics.cc
src/core/lib/channel/promise_based_filter.cc
@ -3395,6 +3394,7 @@ foreach(_hdr
include/grpc/byte_buffer_reader.h
include/grpc/census.h
include/grpc/compression.h
include/grpc/credentials.h
include/grpc/event_engine/endpoint_config.h
include/grpc/event_engine/event_engine.h
include/grpc/event_engine/extensible.h
@ -5111,6 +5111,9 @@ endif()
add_library(grpc_authorization_provider
src/core/channelz/channel_trace.cc
src/core/channelz/channelz.cc
src/core/channelz/channelz_registry.cc
src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c
src/core/ext/upb-gen/google/rpc/status.upb_minitable.c
src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c
@ -5126,9 +5129,6 @@ add_library(grpc_authorization_provider
src/core/lib/channel/channel_stack_builder.cc
src/core/lib/channel/channel_stack_builder_impl.cc
src/core/lib/channel/channel_stack_trace.cc
src/core/lib/channel/channel_trace.cc
src/core/lib/channel/channelz.cc
src/core/lib/channel/channelz_registry.cc
src/core/lib/channel/connected_channel.cc
src/core/lib/channel/metrics.cc
src/core/lib/channel/promise_based_filter.cc
@ -5452,6 +5452,7 @@ foreach(_hdr
include/grpc/byte_buffer.h
include/grpc/byte_buffer_reader.h
include/grpc/compression.h
include/grpc/credentials.h
include/grpc/event_engine/endpoint_config.h
include/grpc/event_engine/event_engine.h
include/grpc/event_engine/extensible.h
@ -5896,7 +5897,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX)
add_executable(static_stride_scheduler_benchmark
src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc
test/core/client_channel/lb_policy/static_stride_scheduler_benchmark.cc
test/core/load_balancing/static_stride_scheduler_benchmark.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -6605,6 +6606,7 @@ target_include_directories(alts_frame_protector_test
target_link_libraries(alts_frame_protector_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -7395,6 +7397,7 @@ target_include_directories(aws_request_signer_test
target_link_libraries(aws_request_signer_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -7760,6 +7763,7 @@ target_include_directories(bad_streaming_id_bad_client_test
target_link_libraries(bad_streaming_id_bad_client_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -7804,6 +7808,7 @@ target_include_directories(badreq_bad_client_test
target_link_libraries(badreq_bad_client_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -8046,7 +8051,7 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(binder_resolver_test
test/core/client_channel/resolvers/binder_resolver_test.cc
test/core/resolver/binder_resolver_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -9923,7 +9928,7 @@ add_executable(channel_trace_test
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/channelz/channelz.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/channelz/channelz.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/channelz/channelz.grpc.pb.h
test/core/channel/channel_trace_test.cc
test/core/channelz/channel_trace_test.cc
test/cpp/util/channel_trace_proto_helper.cc
)
if(WIN32 AND MSVC)
@ -9968,7 +9973,7 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(channelz_registry_test
test/core/channel/channelz_registry_test.cc
test/core/channelz/channelz_registry_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -11391,6 +11396,7 @@ target_include_directories(connection_prefix_bad_client_test
target_link_libraries(connection_prefix_bad_client_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -11874,6 +11880,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
target_link_libraries(crl_ssl_transport_security_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -12199,7 +12206,7 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(dns_resolver_cooldown_test
test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc
test/core/resolver/dns_resolver_cooldown_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -12241,7 +12248,7 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(dns_resolver_test
test/core/client_channel/resolvers/dns_resolver_test.cc
test/core/resolver/dns_resolver_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -12448,6 +12455,7 @@ target_include_directories(duplicate_header_bad_client_test
target_link_libraries(duplicate_header_bad_client_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -13659,7 +13667,7 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(fake_resolver_test
test/core/client_channel/resolvers/fake_resolver_test.cc
test/core/resolver/fake_resolver_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -13736,6 +13744,7 @@ target_include_directories(fake_transport_security_test
target_link_libraries(fake_transport_security_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -14828,7 +14837,7 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(google_c2p_resolver_test
test/core/client_channel/resolvers/google_c2p_resolver_test.cc
test/core/resolver/google_c2p_resolver_test.cc
test/core/util/fake_udp_and_tcp_server.cc
)
if(WIN32 AND MSVC)
@ -15799,6 +15808,7 @@ target_include_directories(grpc_tls_certificate_distributor_test
target_link_libraries(grpc_tls_certificate_distributor_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -15850,6 +15860,7 @@ target_include_directories(grpc_tls_certificate_provider_test
target_link_libraries(grpc_tls_certificate_provider_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -16516,6 +16527,7 @@ target_include_directories(head_of_line_blocking_bad_client_test
target_link_libraries(head_of_line_blocking_bad_client_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -16560,6 +16572,7 @@ target_include_directories(headers_bad_client_test
target_link_libraries(headers_bad_client_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -17170,7 +17183,7 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(http_proxy_mapper_test
test/core/client_channel/http_proxy_mapper_test.cc
test/core/handshake/http_proxy_mapper_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -17557,6 +17570,7 @@ target_include_directories(initial_settings_frame_bad_client_test
target_link_libraries(initial_settings_frame_bad_client_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -20785,6 +20799,7 @@ target_include_directories(out_of_bounds_bad_client_test
target_link_libraries(out_of_bounds_bad_client_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -20793,7 +20808,7 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(outlier_detection_lb_config_parser_test
test/core/client_channel/lb_policy/outlier_detection_lb_config_parser_test.cc
test/core/load_balancing/outlier_detection_lb_config_parser_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -20839,9 +20854,9 @@ add_executable(outlier_detection_test
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h
test/core/client_channel/lb_policy/outlier_detection_test.cc
test/core/event_engine/event_engine_test_utils.cc
test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
test/core/load_balancing/outlier_detection_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -21326,9 +21341,9 @@ add_executable(pick_first_test
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h
test/core/client_channel/lb_policy/pick_first_test.cc
test/core/event_engine/event_engine_test_utils.cc
test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
test/core/load_balancing/pick_first_test.cc
test/core/util/fake_stats_plugin.cc
)
if(WIN32 AND MSVC)
@ -26091,9 +26106,9 @@ add_executable(ring_hash_test
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h
test/core/client_channel/lb_policy/ring_hash_test.cc
test/core/event_engine/event_engine_test_utils.cc
test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
test/core/load_balancing/ring_hash_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -26210,7 +26225,7 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(rls_lb_config_parser_test
test/core/client_channel/lb_policy/rls_lb_config_parser_test.cc
test/core/load_balancing/rls_lb_config_parser_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -26256,9 +26271,9 @@ add_executable(round_robin_test
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h
test/core/client_channel/lb_policy/round_robin_test.cc
test/core/event_engine/event_engine_test_utils.cc
test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
test/core/load_balancing/round_robin_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -27174,6 +27189,7 @@ target_include_directories(server_registered_method_bad_client_test
target_link_libraries(server_registered_method_bad_client_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -27919,6 +27935,7 @@ target_include_directories(simple_request_bad_client_test
target_link_libraries(simple_request_bad_client_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -28163,7 +28180,7 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(sockaddr_resolver_test
test/core/client_channel/resolvers/sockaddr_resolver_test.cc
test/core/resolver/sockaddr_resolver_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -28410,6 +28427,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
target_link_libraries(ssl_transport_security_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -28455,6 +28473,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
target_link_libraries(ssl_transport_security_utils_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -28551,7 +28570,7 @@ if(gRPC_BUILD_TESTS)
add_executable(static_stride_scheduler_test
src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc
test/core/client_channel/lb_policy/static_stride_scheduler_test.cc
test/core/load_balancing/static_stride_scheduler_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -29539,18 +29558,18 @@ target_link_libraries(tcp_socket_utils_test
endif()
if(gRPC_BUILD_TESTS)
add_executable(test_core_channel_channelz_test
add_executable(test_core_channelz_channelz_test
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/channelz/channelz.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/channelz/channelz.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/channelz/channelz.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/channelz/channelz.grpc.pb.h
test/core/channel/channelz_test.cc
test/core/channelz/channelz_test.cc
test/core/event_engine/event_engine_test_utils.cc
test/cpp/util/channel_trace_proto_helper.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
target_compile_definitions(test_core_channel_channelz_test
target_compile_definitions(test_core_channelz_channelz_test
PRIVATE
"GPR_DLL_IMPORTS"
"GRPC_DLL_IMPORTS"
@ -29558,8 +29577,8 @@ if(WIN32 AND MSVC)
)
endif()
endif()
target_compile_features(test_core_channel_channelz_test PUBLIC cxx_std_14)
target_include_directories(test_core_channel_channelz_test
target_compile_features(test_core_channelz_channelz_test PUBLIC cxx_std_14)
target_include_directories(test_core_channelz_channelz_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
@ -29578,7 +29597,7 @@ target_include_directories(test_core_channel_channelz_test
${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(test_core_channel_channelz_test
target_link_libraries(test_core_channelz_channelz_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
@ -29981,6 +30000,7 @@ target_include_directories(test_core_security_credentials_test
target_link_libraries(test_core_security_credentials_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -31267,6 +31287,7 @@ target_include_directories(tls_security_connector_test
target_link_libraries(tls_security_connector_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -31823,6 +31844,7 @@ target_include_directories(unknown_frame_bad_client_test
target_link_libraries(unknown_frame_bad_client_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -32121,7 +32143,7 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(weighted_round_robin_config_test
test/core/client_channel/lb_policy/weighted_round_robin_config_test.cc
test/core/load_balancing/weighted_round_robin_config_test.cc
test/core/util/fake_stats_plugin.cc
)
if(WIN32 AND MSVC)
@ -32168,9 +32190,9 @@ add_executable(weighted_round_robin_test
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h
test/core/client_channel/lb_policy/weighted_round_robin_test.cc
test/core/event_engine/event_engine_test_utils.cc
test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
test/core/load_balancing/weighted_round_robin_test.cc
test/core/util/fake_stats_plugin.cc
)
if(WIN32 AND MSVC)
@ -32297,6 +32319,7 @@ target_include_directories(window_overflow_bad_client_test
target_link_libraries(window_overflow_bad_client_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::check
grpc_test_util
)
@ -35528,7 +35551,7 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(xds_override_host_lb_config_parser_test
test/core/client_channel/lb_policy/xds_override_host_lb_config_parser_test.cc
test/core/load_balancing/xds_override_host_lb_config_parser_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
@ -35574,9 +35597,9 @@ add_executable(xds_override_host_test
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h
test/core/client_channel/lb_policy/xds_override_host_test.cc
test/core/event_engine/event_engine_test_utils.cc
test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
test/core/load_balancing/xds_override_host_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)

8
Makefile generated

@ -666,8 +666,10 @@ clean:
# deps: ['cares', 'libssl', 'z']
# transitive_deps: ['cares', 'libssl', 'z']
LIBGRPC_SRC = \
src/core/channelz/channel_trace.cc \
src/core/channelz/channelz.cc \
src/core/channelz/channelz_registry.cc \
src/core/client_channel/backup_poller.cc \
src/core/client_channel/client_channel_channelz.cc \
src/core/client_channel/client_channel_factory.cc \
src/core/client_channel/client_channel_filter.cc \
src/core/client_channel/client_channel_plugin.cc \
@ -1092,9 +1094,6 @@ LIBGRPC_SRC = \
src/core/lib/channel/channel_stack_builder.cc \
src/core/lib/channel/channel_stack_builder_impl.cc \
src/core/lib/channel/channel_stack_trace.cc \
src/core/lib/channel/channel_trace.cc \
src/core/lib/channel/channelz.cc \
src/core/lib/channel/channelz_registry.cc \
src/core/lib/channel/connected_channel.cc \
src/core/lib/channel/metrics.cc \
src/core/lib/channel/promise_based_filter.cc \
@ -1728,6 +1727,7 @@ PUBLIC_HEADERS_C += \
include/grpc/byte_buffer_reader.h \
include/grpc/census.h \
include/grpc/compression.h \
include/grpc/credentials.h \
include/grpc/event_engine/endpoint_config.h \
include/grpc/event_engine/event_engine.h \
include/grpc/event_engine/extensible.h \

19
Package.swift generated

@ -23,8 +23,8 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/firebase/abseil-cpp-SwiftPM.git", "0.20230802.0"..<"0.20230803.0"),
.package(url: "https://github.com/firebase/boringssl-SwiftPM.git", "0.9.0"..<"0.10.0"),
.package(url: "https://github.com/firebase/abseil-cpp-SwiftPM.git", "0.20240116.1"..<"0.20240117.0"),
.package(url: "https://github.com/firebase/boringssl-SwiftPM.git", "0.32.0"..<"0.33.0"),
],
targets: [
@ -45,6 +45,7 @@ let package = Package(
"include/grpc/byte_buffer_reader.h",
"include/grpc/census.h",
"include/grpc/compression.h",
"include/grpc/credentials.h",
"include/grpc/event_engine/endpoint_config.h",
"include/grpc/event_engine/event_engine.h",
"include/grpc/event_engine/extensible.h",
@ -116,10 +117,14 @@ let package = Package(
"include/grpc/support/thd_id.h",
"include/grpc/support/time.h",
"include/grpc/support/workaround_list.h",
"src/core/channelz/channel_trace.cc",
"src/core/channelz/channel_trace.h",
"src/core/channelz/channelz.cc",
"src/core/channelz/channelz.h",
"src/core/channelz/channelz_registry.cc",
"src/core/channelz/channelz_registry.h",
"src/core/client_channel/backup_poller.cc",
"src/core/client_channel/backup_poller.h",
"src/core/client_channel/client_channel_channelz.cc",
"src/core/client_channel/client_channel_channelz.h",
"src/core/client_channel/client_channel_factory.cc",
"src/core/client_channel/client_channel_factory.h",
"src/core/client_channel/client_channel_filter.cc",
@ -1143,12 +1148,6 @@ let package = Package(
"src/core/lib/channel/channel_stack_builder_impl.h",
"src/core/lib/channel/channel_stack_trace.cc",
"src/core/lib/channel/channel_stack_trace.h",
"src/core/lib/channel/channel_trace.cc",
"src/core/lib/channel/channel_trace.h",
"src/core/lib/channel/channelz.cc",
"src/core/lib/channel/channelz.h",
"src/core/lib/channel/channelz_registry.cc",
"src/core/lib/channel/channelz_registry.h",
"src/core/lib/channel/connected_channel.cc",
"src/core/lib/channel/connected_channel.h",
"src/core/lib/channel/context.h",

@ -25,6 +25,7 @@ EXPERIMENT_ENABLES = {
"event_engine_dns": "event_engine_dns",
"event_engine_listener": "event_engine_listener",
"free_large_allocator": "free_large_allocator",
"http2_stats_fix": "http2_stats_fix",
"keepalive_fix": "keepalive_fix",
"keepalive_server_fix": "keepalive_server_fix",
"monitoring_experiment": "monitoring_experiment",

@ -102,6 +102,7 @@ def _update_visibility(visibility):
"chaotic_good": PRIVATE,
"client_channel": PRIVATE,
"cli": PRIVATE,
"core_credentials": PRIVATE,
"debug_location": PRIVATE,
"endpoint_tests": PRIVATE,
"exec_ctx": PRIVATE,
@ -119,6 +120,7 @@ def _update_visibility(visibility):
"iomgr_internal_errqueue": PRIVATE,
"iomgr_buffer_list": PRIVATE,
"json_reader_legacy": PRIVATE,
"otel_plugin": PRIVATE,
"public": PUBLIC,
"ref_counted_ptr": PRIVATE,
"tcp_tracer": PRIVATE,

@ -149,6 +149,7 @@ libs:
- include/grpc/byte_buffer_reader.h
- include/grpc/census.h
- include/grpc/compression.h
- include/grpc/credentials.h
- include/grpc/event_engine/endpoint_config.h
- include/grpc/event_engine/event_engine.h
- include/grpc/event_engine/extensible.h
@ -220,8 +221,10 @@ libs:
- include/grpc/support/time.h
- include/grpc/support/workaround_list.h
headers:
- src/core/channelz/channel_trace.h
- src/core/channelz/channelz.h
- src/core/channelz/channelz_registry.h
- src/core/client_channel/backup_poller.h
- src/core/client_channel/client_channel_channelz.h
- src/core/client_channel/client_channel_factory.h
- src/core/client_channel/client_channel_filter.h
- src/core/client_channel/client_channel_internal.h
@ -821,9 +824,6 @@ libs:
- src/core/lib/channel/channel_stack_builder.h
- src/core/lib/channel/channel_stack_builder_impl.h
- src/core/lib/channel/channel_stack_trace.h
- src/core/lib/channel/channel_trace.h
- src/core/lib/channel/channelz.h
- src/core/lib/channel/channelz_registry.h
- src/core/lib/channel/connected_channel.h
- src/core/lib/channel/context.h
- src/core/lib/channel/metrics.h
@ -1244,8 +1244,10 @@ libs:
- third_party/upb/upb/generated_code_support.h
- third_party/xxhash/xxhash.h
src:
- src/core/channelz/channel_trace.cc
- src/core/channelz/channelz.cc
- src/core/channelz/channelz_registry.cc
- src/core/client_channel/backup_poller.cc
- src/core/client_channel/client_channel_channelz.cc
- src/core/client_channel/client_channel_factory.cc
- src/core/client_channel/client_channel_filter.cc
- src/core/client_channel/client_channel_plugin.cc
@ -1670,9 +1672,6 @@ libs:
- src/core/lib/channel/channel_stack_builder.cc
- src/core/lib/channel/channel_stack_builder_impl.cc
- src/core/lib/channel/channel_stack_trace.cc
- src/core/lib/channel/channel_trace.cc
- src/core/lib/channel/channelz.cc
- src/core/lib/channel/channelz_registry.cc
- src/core/lib/channel/connected_channel.cc
- src/core/lib/channel/metrics.cc
- src/core/lib/channel/promise_based_filter.cc
@ -2136,6 +2135,7 @@ libs:
- include/grpc/byte_buffer_reader.h
- include/grpc/census.h
- include/grpc/compression.h
- include/grpc/credentials.h
- include/grpc/event_engine/endpoint_config.h
- include/grpc/event_engine/event_engine.h
- include/grpc/event_engine/extensible.h
@ -2207,8 +2207,10 @@ libs:
- include/grpc/support/time.h
- include/grpc/support/workaround_list.h
headers:
- src/core/channelz/channel_trace.h
- src/core/channelz/channelz.h
- src/core/channelz/channelz_registry.h
- src/core/client_channel/backup_poller.h
- src/core/client_channel/client_channel_channelz.h
- src/core/client_channel/client_channel_factory.h
- src/core/client_channel/client_channel_filter.h
- src/core/client_channel/client_channel_internal.h
@ -2325,9 +2327,6 @@ libs:
- src/core/lib/channel/channel_stack_builder.h
- src/core/lib/channel/channel_stack_builder_impl.h
- src/core/lib/channel/channel_stack_trace.h
- src/core/lib/channel/channel_trace.h
- src/core/lib/channel/channelz.h
- src/core/lib/channel/channelz_registry.h
- src/core/lib/channel/connected_channel.h
- src/core/lib/channel/context.h
- src/core/lib/channel/metrics.h
@ -2700,8 +2699,10 @@ libs:
- third_party/upb/upb/wire/reader.h
- third_party/upb/upb/wire/types.h
src:
- src/core/channelz/channel_trace.cc
- src/core/channelz/channelz.cc
- src/core/channelz/channelz_registry.cc
- src/core/client_channel/backup_poller.cc
- src/core/client_channel/client_channel_channelz.cc
- src/core/client_channel/client_channel_factory.cc
- src/core/client_channel/client_channel_filter.cc
- src/core/client_channel/client_channel_plugin.cc
@ -2795,9 +2796,6 @@ libs:
- src/core/lib/channel/channel_stack_builder.cc
- src/core/lib/channel/channel_stack_builder_impl.cc
- src/core/lib/channel/channel_stack_trace.cc
- src/core/lib/channel/channel_trace.cc
- src/core/lib/channel/channelz.cc
- src/core/lib/channel/channelz_registry.cc
- src/core/lib/channel/connected_channel.cc
- src/core/lib/channel/metrics.cc
- src/core/lib/channel/promise_based_filter.cc
@ -4321,6 +4319,7 @@ libs:
- include/grpc/byte_buffer.h
- include/grpc/byte_buffer_reader.h
- include/grpc/compression.h
- include/grpc/credentials.h
- include/grpc/event_engine/endpoint_config.h
- include/grpc/event_engine/event_engine.h
- include/grpc/event_engine/extensible.h
@ -4392,6 +4391,9 @@ libs:
- include/grpc/support/time.h
- include/grpc/support/workaround_list.h
headers:
- src/core/channelz/channel_trace.h
- src/core/channelz/channelz.h
- src/core/channelz/channelz_registry.h
- src/core/ext/upb-gen/google/protobuf/any.upb.h
- src/core/ext/upb-gen/google/protobuf/any.upb_minitable.h
- src/core/ext/upb-gen/google/rpc/status.upb.h
@ -4415,9 +4417,6 @@ libs:
- src/core/lib/channel/channel_stack_builder.h
- src/core/lib/channel/channel_stack_builder_impl.h
- src/core/lib/channel/channel_stack_trace.h
- src/core/lib/channel/channel_trace.h
- src/core/lib/channel/channelz.h
- src/core/lib/channel/channelz_registry.h
- src/core/lib/channel/connected_channel.h
- src/core/lib/channel/context.h
- src/core/lib/channel/metrics.h
@ -4744,6 +4743,9 @@ libs:
- third_party/upb/upb/wire/reader.h
- third_party/upb/upb/wire/types.h
src:
- src/core/channelz/channel_trace.cc
- src/core/channelz/channelz.cc
- src/core/channelz/channelz_registry.cc
- src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c
- src/core/ext/upb-gen/google/rpc/status.upb_minitable.c
- src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c
@ -4759,9 +4761,6 @@ libs:
- src/core/lib/channel/channel_stack_builder.cc
- src/core/lib/channel/channel_stack_builder_impl.cc
- src/core/lib/channel/channel_stack_trace.cc
- src/core/lib/channel/channel_trace.cc
- src/core/lib/channel/channelz.cc
- src/core/lib/channel/channelz_registry.cc
- src/core/lib/channel/connected_channel.cc
- src/core/lib/channel/metrics.cc
- src/core/lib/channel/promise_based_filter.cc
@ -5171,7 +5170,7 @@ targets:
- src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h
src:
- src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc
- test/core/client_channel/lb_policy/static_stride_scheduler_benchmark.cc
- test/core/load_balancing/static_stride_scheduler_benchmark.cc
deps:
- absl/algorithm:container
- absl/types:span
@ -5489,6 +5488,7 @@ targets:
- test/core/tsi/transport_security_test_lib.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: alts_grpc_record_protocol_test
gtest: true
@ -5775,6 +5775,7 @@ targets:
- test/core/util/tracer_util.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: backend_metrics_lb_policy_test
gtest: true
@ -5973,6 +5974,7 @@ targets:
- test/core/end2end/cq_verifier.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: badreq_bad_client_test
gtest: true
@ -5987,6 +5989,7 @@ targets:
- test/core/end2end/cq_verifier.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: basic_work_queue_test
gtest: true
@ -6105,7 +6108,7 @@ targets:
language: c++
headers: []
src:
- test/core/client_channel/resolvers/binder_resolver_test.cc
- test/core/resolver/binder_resolver_test.cc
deps:
- gtest
- grpc_test_util
@ -7573,7 +7576,7 @@ targets:
- test/cpp/util/channel_trace_proto_helper.h
src:
- src/proto/grpc/channelz/channelz.proto
- test/core/channel/channel_trace_test.cc
- test/core/channelz/channel_trace_test.cc
- test/cpp/util/channel_trace_proto_helper.cc
deps:
- gtest
@ -7585,7 +7588,7 @@ targets:
language: c++
headers: []
src:
- test/core/channel/channelz_registry_test.cc
- test/core/channelz/channelz_registry_test.cc
deps:
- gtest
- grpc++
@ -8270,6 +8273,7 @@ targets:
- test/core/end2end/cq_verifier.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: connection_refused_test
gtest: true
@ -8470,6 +8474,7 @@ targets:
- test/core/tsi/transport_security_test_lib.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
platforms:
- linux
@ -8657,7 +8662,7 @@ targets:
language: c++
headers: []
src:
- test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc
- test/core/resolver/dns_resolver_cooldown_test.cc
deps:
- gtest
- grpc_test_util
@ -8667,7 +8672,7 @@ targets:
language: c++
headers: []
src:
- test/core/client_channel/resolvers/dns_resolver_test.cc
- test/core/resolver/dns_resolver_test.cc
deps:
- gtest
- grpc_test_util
@ -8723,6 +8728,7 @@ targets:
- test/core/end2end/cq_verifier.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: empty_batch_test
gtest: true
@ -9454,7 +9460,7 @@ targets:
language: c++
headers: []
src:
- test/core/client_channel/resolvers/fake_resolver_test.cc
- test/core/resolver/fake_resolver_test.cc
deps:
- gtest
- grpc_test_util
@ -9469,6 +9475,7 @@ targets:
- test/core/tsi/transport_security_test_lib.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: fd_posix_test
gtest: true
@ -10260,7 +10267,7 @@ targets:
headers:
- test/core/util/fake_udp_and_tcp_server.h
src:
- test/core/client_channel/resolvers/google_c2p_resolver_test.cc
- test/core/resolver/google_c2p_resolver_test.cc
- test/core/util/fake_udp_and_tcp_server.cc
deps:
- gtest
@ -10691,6 +10698,7 @@ targets:
- test/core/util/tracer_util.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: grpc_tls_certificate_provider_test
gtest: true
@ -10721,6 +10729,7 @@ targets:
- test/core/util/tracer_util.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: grpc_tls_certificate_verifier_test
gtest: true
@ -10999,6 +11008,7 @@ targets:
- test/core/end2end/cq_verifier.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: headers_bad_client_test
gtest: true
@ -11013,6 +11023,7 @@ targets:
- test/core/end2end/cq_verifier.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: health_service_end2end_test
gtest: true
@ -11394,7 +11405,7 @@ targets:
headers:
- test/core/util/scoped_env_var.h
src:
- test/core/client_channel/http_proxy_mapper_test.cc
- test/core/handshake/http_proxy_mapper_test.cc
deps:
- gtest
- grpc_test_util
@ -11517,6 +11528,7 @@ targets:
- test/core/end2end/cq_verifier.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: inproc_test
gtest: true
@ -13363,6 +13375,7 @@ targets:
- test/core/end2end/cq_verifier.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: outlier_detection_lb_config_parser_test
gtest: true
@ -13371,7 +13384,7 @@ targets:
headers:
- test/core/util/scoped_env_var.h
src:
- test/core/client_channel/lb_policy/outlier_detection_lb_config_parser_test.cc
- test/core/load_balancing/outlier_detection_lb_config_parser_test.cc
deps:
- gtest
- grpc_test_util
@ -13381,14 +13394,14 @@ targets:
build: test
language: c++
headers:
- test/core/client_channel/lb_policy/lb_policy_test_lib.h
- test/core/event_engine/event_engine_test_utils.h
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h
- test/core/load_balancing/lb_policy_test_lib.h
src:
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto
- test/core/client_channel/lb_policy/outlier_detection_test.cc
- test/core/event_engine/event_engine_test_utils.cc
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
- test/core/load_balancing/outlier_detection_test.cc
deps:
- gtest
- absl/log:check
@ -13658,16 +13671,16 @@ targets:
build: test
language: c++
headers:
- test/core/client_channel/lb_policy/lb_policy_test_lib.h
- test/core/event_engine/event_engine_test_utils.h
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h
- test/core/load_balancing/lb_policy_test_lib.h
- test/core/util/fake_stats_plugin.h
- test/core/util/scoped_env_var.h
src:
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto
- test/core/client_channel/lb_policy/pick_first_test.cc
- test/core/event_engine/event_engine_test_utils.cc
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
- test/core/load_balancing/pick_first_test.cc
- test/core/util/fake_stats_plugin.cc
deps:
- gtest
@ -17169,14 +17182,14 @@ targets:
build: test
language: c++
headers:
- test/core/client_channel/lb_policy/lb_policy_test_lib.h
- test/core/event_engine/event_engine_test_utils.h
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h
- test/core/load_balancing/lb_policy_test_lib.h
src:
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto
- test/core/client_channel/lb_policy/ring_hash_test.cc
- test/core/event_engine/event_engine_test_utils.cc
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
- test/core/load_balancing/ring_hash_test.cc
deps:
- gtest
- absl/log:check
@ -17217,7 +17230,7 @@ targets:
language: c++
headers: []
src:
- test/core/client_channel/lb_policy/rls_lb_config_parser_test.cc
- test/core/load_balancing/rls_lb_config_parser_test.cc
deps:
- gtest
- grpc_test_util
@ -17227,14 +17240,14 @@ targets:
build: test
language: c++
headers:
- test/core/client_channel/lb_policy/lb_policy_test_lib.h
- test/core/event_engine/event_engine_test_utils.h
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h
- test/core/load_balancing/lb_policy_test_lib.h
src:
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto
- test/core/client_channel/lb_policy/round_robin_test.cc
- test/core/event_engine/event_engine_test_utils.cc
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
- test/core/load_balancing/round_robin_test.cc
deps:
- gtest
- absl/log:check
@ -17605,6 +17618,7 @@ targets:
- test/core/end2end/cq_verifier.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: server_request_call_test
gtest: true
@ -18079,6 +18093,7 @@ targets:
- test/core/end2end/cq_verifier.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: simple_request_test
gtest: true
@ -18207,7 +18222,7 @@ targets:
language: c++
headers: []
src:
- test/core/client_channel/resolvers/sockaddr_resolver_test.cc
- test/core/resolver/sockaddr_resolver_test.cc
deps:
- gtest
- grpc_test_util
@ -18289,6 +18304,7 @@ targets:
- test/core/tsi/transport_security_test_lib.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
platforms:
- linux
@ -18305,6 +18321,7 @@ targets:
- test/core/tsi/transport_security_test_lib.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
platforms:
- linux
@ -18344,7 +18361,7 @@ targets:
- src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h
src:
- src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc
- test/core/client_channel/lb_policy/static_stride_scheduler_test.cc
- test/core/load_balancing/static_stride_scheduler_test.cc
deps:
- gtest
- absl/types:span
@ -18782,7 +18799,7 @@ targets:
- absl/log:check
- grpc
uses_polling: false
- name: test_core_channel_channelz_test
- name: test_core_channelz_channelz_test
gtest: true
build: test
language: c++
@ -18791,7 +18808,7 @@ targets:
- test/cpp/util/channel_trace_proto_helper.h
src:
- src/proto/grpc/channelz/channelz.proto
- test/core/channel/channelz_test.cc
- test/core/channelz/channelz_test.cc
- test/core/event_engine/event_engine_test_utils.cc
- test/cpp/util/channel_trace_proto_helper.cc
deps:
@ -19024,6 +19041,7 @@ targets:
- test/core/util/tracer_util.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: test_core_security_ssl_credentials_test
gtest: true
@ -19545,6 +19563,7 @@ targets:
- test/core/util/tracer_util.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: too_many_pings_test
gtest: true
@ -19856,6 +19875,7 @@ targets:
- test/core/end2end/cq_verifier.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: uri_parser_test
gtest: true
@ -19963,7 +19983,7 @@ targets:
headers:
- test/core/util/fake_stats_plugin.h
src:
- test/core/client_channel/lb_policy/weighted_round_robin_config_test.cc
- test/core/load_balancing/weighted_round_robin_config_test.cc
- test/core/util/fake_stats_plugin.cc
deps:
- gtest
@ -19974,15 +19994,15 @@ targets:
build: test
language: c++
headers:
- test/core/client_channel/lb_policy/lb_policy_test_lib.h
- test/core/event_engine/event_engine_test_utils.h
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h
- test/core/load_balancing/lb_policy_test_lib.h
- test/core/util/fake_stats_plugin.h
src:
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto
- test/core/client_channel/lb_policy/weighted_round_robin_test.cc
- test/core/event_engine/event_engine_test_utils.cc
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
- test/core/load_balancing/weighted_round_robin_test.cc
- test/core/util/fake_stats_plugin.cc
deps:
- gtest
@ -20021,6 +20041,7 @@ targets:
- test/core/end2end/cq_verifier.cc
deps:
- gtest
- absl/log:check
- grpc_test_util
- name: windows_endpoint_test
gtest: true
@ -21371,7 +21392,7 @@ targets:
language: c++
headers: []
src:
- test/core/client_channel/lb_policy/xds_override_host_lb_config_parser_test.cc
- test/core/load_balancing/xds_override_host_lb_config_parser_test.cc
deps:
- gtest
- grpc_test_util
@ -21381,14 +21402,14 @@ targets:
build: test
language: c++
headers:
- test/core/client_channel/lb_policy/lb_policy_test_lib.h
- test/core/event_engine/event_engine_test_utils.h
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h
- test/core/load_balancing/lb_policy_test_lib.h
src:
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto
- test/core/client_channel/lb_policy/xds_override_host_test.cc
- test/core/event_engine/event_engine_test_utils.cc
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
- test/core/load_balancing/xds_override_host_test.cc
deps:
- gtest
- absl/log:check

8
config.m4 generated

@ -41,8 +41,10 @@ if test "$PHP_GRPC" != "no"; then
PHP_SUBST(GRPC_SHARED_LIBADD)
PHP_NEW_EXTENSION(grpc,
src/core/channelz/channel_trace.cc \
src/core/channelz/channelz.cc \
src/core/channelz/channelz_registry.cc \
src/core/client_channel/backup_poller.cc \
src/core/client_channel/client_channel_channelz.cc \
src/core/client_channel/client_channel_factory.cc \
src/core/client_channel/client_channel_filter.cc \
src/core/client_channel/client_channel_plugin.cc \
@ -467,9 +469,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/channel/channel_stack_builder.cc \
src/core/lib/channel/channel_stack_builder_impl.cc \
src/core/lib/channel/channel_stack_trace.cc \
src/core/lib/channel/channel_trace.cc \
src/core/lib/channel/channelz.cc \
src/core/lib/channel/channelz_registry.cc \
src/core/lib/channel/connected_channel.cc \
src/core/lib/channel/metrics.cc \
src/core/lib/channel/promise_based_filter.cc \
@ -1383,6 +1382,7 @@ if test "$PHP_GRPC" != "no"; then
-DGRPC_XDS_USER_AGENT_NAME_SUFFIX='"\"PHP\""' \
-DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"\"1.64.0dev\""')
PHP_ADD_BUILD_DIR($ext_builddir/src/core/channelz)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_channel)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/backend_metrics)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/census)

8
config.w32 generated

@ -6,8 +6,10 @@ ARG_WITH("grpc", "grpc support", "no");
if (PHP_GRPC != "no") {
EXTENSION("grpc",
"src\\core\\channelz\\channel_trace.cc " +
"src\\core\\channelz\\channelz.cc " +
"src\\core\\channelz\\channelz_registry.cc " +
"src\\core\\client_channel\\backup_poller.cc " +
"src\\core\\client_channel\\client_channel_channelz.cc " +
"src\\core\\client_channel\\client_channel_factory.cc " +
"src\\core\\client_channel\\client_channel_filter.cc " +
"src\\core\\client_channel\\client_channel_plugin.cc " +
@ -432,9 +434,6 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\channel\\channel_stack_builder.cc " +
"src\\core\\lib\\channel\\channel_stack_builder_impl.cc " +
"src\\core\\lib\\channel\\channel_stack_trace.cc " +
"src\\core\\lib\\channel\\channel_trace.cc " +
"src\\core\\lib\\channel\\channelz.cc " +
"src\\core\\lib\\channel\\channelz_registry.cc " +
"src\\core\\lib\\channel\\connected_channel.cc " +
"src\\core\\lib\\channel\\metrics.cc " +
"src\\core\\lib\\channel\\promise_based_filter.cc " +
@ -1375,6 +1374,7 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\channelz");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\client_channel");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters");

@ -41,6 +41,7 @@ cc_binary(
"//examples/protos:helloworld_cc_grpc",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/flags:parse",
"@com_google_absl//absl/log",
"@io_opentelemetry_cpp//exporters/prometheus:prometheus_exporter",
"@io_opentelemetry_cpp//sdk/src/metrics",
],

@ -22,6 +22,7 @@
#include "absl/flags/flag.h"
#include "absl/flags/parse.h"
#include "absl/log/log.h"
#include "absl/strings/str_cat.h"
#include "opentelemetry/exporters/prometheus/exporter_factory.h"
#include "opentelemetry/exporters/prometheus/exporter_options.h"
@ -91,7 +92,7 @@ void RunServer(const char* hostname) {
xds_builder.AddListeningPort(absl::StrCat("0.0.0.0:", port),
grpc::InsecureServerCredentials());
xds_enabled_server = xds_builder.BuildAndStart();
gpr_log(GPR_INFO, "Server starting on 0.0.0.0:%d", port);
LOG(INFO) << "Server starting on 0.0.0.0:" << port;
// Wait for the server to shutdown. Note that some other thread must be
// responsible for shutting down the server for this call to ever return.

@ -129,5 +129,6 @@ cc_binary(
"//examples/protos:helloworld_cc_grpc",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/flags:parse",
"@com_google_absl//absl/log",
],
)

@ -68,6 +68,7 @@ foreach(_target
absl::check
absl::flags
absl::flags_parse
absl::log
${_REFLECTION}
${_GRPC_GRPCPP}
${_PROTOBUF_LIBPROTOBUF})

@ -22,6 +22,7 @@
#include "absl/flags/flag.h"
#include "absl/flags/parse.h"
#include "absl/log/log.h"
#include "absl/strings/str_cat.h"
#include <grpcpp/ext/admin_services.h>
@ -79,21 +80,20 @@ void RunServer() {
absl::StrCat("0.0.0.0:", port),
grpc::XdsServerCredentials(grpc::InsecureServerCredentials()));
xds_enabled_server = xds_builder.BuildAndStart();
gpr_log(GPR_INFO, "Server starting on 0.0.0.0:%d", port);
LOG(INFO) << "Server starting on 0.0.0.0:" << port;
grpc::AddAdminServices(&builder);
// For the maintenance server, do not use any authentication mechanism.
builder.AddListeningPort(absl::StrCat("0.0.0.0:", maintenance_port),
grpc::InsecureServerCredentials());
server = builder.BuildAndStart();
gpr_log(GPR_INFO, "Maintenance server listening on 0.0.0.0:%d",
maintenance_port);
LOG(INFO) << "Maintenance server listening on 0.0.0.0:" << maintenance_port;
} else {
grpc::AddAdminServices(&xds_builder);
// Listen on the given address without any authentication mechanism.
builder.AddListeningPort(absl::StrCat("0.0.0.0:", port),
grpc::InsecureServerCredentials());
server = xds_builder.BuildAndStart();
gpr_log(GPR_INFO, "Server listening on 0.0.0.0:%d", port);
LOG(INFO) << "Server listening on 0.0.0.0:" << port;
}
// Wait for the server to shutdown. Note that some other thread must be

@ -58,7 +58,7 @@ target_link_libraries(hw_grpc_proto
# Targets greeter_[async_](client|server)
foreach(_target
greeter_callback_client greeter_callback_server
greeter_callback_client greeter_callback_server)
add_executable(${_target} "${_target}.cc")
target_link_libraries(${_target}
hw_grpc_proto

@ -37,5 +37,6 @@ cc_binary(
"//examples/protos:helloworld_cc_grpc",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/flags:parse",
"@com_google_absl//absl/log",
],
)

@ -22,6 +22,7 @@
#include "absl/flags/flag.h"
#include "absl/flags/parse.h"
#include "absl/log/log.h"
#include "absl/strings/str_cat.h"
#include <grpcpp/ext/admin_services.h>
@ -84,21 +85,20 @@ void RunServer() {
absl::StrCat("0.0.0.0:", port),
grpc::XdsServerCredentials(grpc::InsecureServerCredentials()));
xds_enabled_server = xds_builder.BuildAndStart();
gpr_log(GPR_INFO, "Server starting on 0.0.0.0:%d", port);
LOG(INFO) << "Server starting on 0.0.0.0:" << port;
grpc::AddAdminServices(&builder);
// For the maintenance server, do not use any authentication mechanism.
builder.AddListeningPort(absl::StrCat("0.0.0.0:", maintenance_port),
grpc::InsecureServerCredentials());
server = builder.BuildAndStart();
gpr_log(GPR_INFO, "Maintenance server listening on 0.0.0.0:%d",
maintenance_port);
LOG(INFO) << "Maintenance server listening on 0.0.0.0:" << maintenance_port;
} else {
grpc::AddAdminServices(&xds_builder);
// Listen on the given address without any authentication mechanism.
builder.AddListeningPort(absl::StrCat("0.0.0.0:", port),
grpc::InsecureServerCredentials());
server = xds_builder.BuildAndStart();
gpr_log(GPR_INFO, "Server listening on 0.0.0.0:%d", port);
LOG(INFO) << "Server listening on 0.0.0.0:" << port;
}
// Wait for the server to shutdown. Note that some other thread must be

20
gRPC-C++.podspec generated

@ -225,7 +225,7 @@ Pod::Spec.new do |s|
ss.dependency "#{s.name}/Privacy", version
ss.dependency "#{s.name}/Interface", version
ss.dependency 'gRPC-Core', version
abseil_version = '1.20240116.1'
abseil_version = '~> 1.20240116.2'
ss.dependency 'abseil/algorithm/container', abseil_version
ss.dependency 'abseil/base/base', abseil_version
ss.dependency 'abseil/base/config', abseil_version
@ -260,8 +260,10 @@ Pod::Spec.new do |s|
ss.dependency 'abseil/types/variant', abseil_version
ss.dependency 'abseil/utility/utility', abseil_version
ss.source_files = 'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_channelz.h',
ss.source_files = 'src/core/channelz/channel_trace.h',
'src/core/channelz/channelz.h',
'src/core/channelz/channelz_registry.h',
'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_factory.h',
'src/core/client_channel/client_channel_filter.h',
'src/core/client_channel/client_channel_internal.h',
@ -900,9 +902,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder.h',
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/channel_trace.h',
'src/core/lib/channel/channelz.h',
'src/core/lib/channel/channelz_registry.h',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
'src/core/lib/channel/metrics.h',
@ -1550,8 +1549,10 @@ Pod::Spec.new do |s|
'third_party/zlib/zlib.h',
'third_party/zlib/zutil.h'
ss.private_header_files = 'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_channelz.h',
ss.private_header_files = 'src/core/channelz/channel_trace.h',
'src/core/channelz/channelz.h',
'src/core/channelz/channelz_registry.h',
'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_factory.h',
'src/core/client_channel/client_channel_filter.h',
'src/core/client_channel/client_channel_internal.h',
@ -2172,9 +2173,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder.h',
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/channel_trace.h',
'src/core/lib/channel/channelz.h',
'src/core/lib/channel/channelz_registry.h',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
'src/core/lib/channel/metrics.h',

28
gRPC-Core.podspec generated

@ -46,7 +46,7 @@ Pod::Spec.new do |s|
s.requires_arc = false
name = 'grpc'
abseil_version = '1.20240116.1'
abseil_version = '~> 1.20240116.2'
# When creating a dynamic framework, name it grpc.framework instead of gRPC-Core.framework.
# This lets users write their includes like `#include <grpc/grpc.h>` as opposed to `#include
@ -119,6 +119,7 @@ Pod::Spec.new do |s|
'include/grpc/byte_buffer_reader.h',
'include/grpc/census.h',
'include/grpc/compression.h',
'include/grpc/credentials.h',
'include/grpc/event_engine/endpoint_config.h',
'include/grpc/event_engine/event_engine.h',
'include/grpc/event_engine/extensible.h',
@ -232,10 +233,14 @@ Pod::Spec.new do |s|
ss.dependency 'abseil/utility/utility', abseil_version
ss.compiler_flags = '-DBORINGSSL_PREFIX=GRPC -Wno-unreachable-code -Wno-shorten-64-to-32'
ss.source_files = 'src/core/client_channel/backup_poller.cc',
ss.source_files = 'src/core/channelz/channel_trace.cc',
'src/core/channelz/channel_trace.h',
'src/core/channelz/channelz.cc',
'src/core/channelz/channelz.h',
'src/core/channelz/channelz_registry.cc',
'src/core/channelz/channelz_registry.h',
'src/core/client_channel/backup_poller.cc',
'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_channelz.cc',
'src/core/client_channel/client_channel_channelz.h',
'src/core/client_channel/client_channel_factory.cc',
'src/core/client_channel/client_channel_factory.h',
'src/core/client_channel/client_channel_filter.cc',
@ -1259,12 +1264,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.cc',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/channel_trace.cc',
'src/core/lib/channel/channel_trace.h',
'src/core/lib/channel/channelz.cc',
'src/core/lib/channel/channelz.h',
'src/core/lib/channel/channelz_registry.cc',
'src/core/lib/channel/channelz_registry.h',
'src/core/lib/channel/connected_channel.cc',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
@ -2350,8 +2349,10 @@ Pod::Spec.new do |s|
'third_party/zlib/zlib.h',
'third_party/zlib/zutil.c',
'third_party/zlib/zutil.h'
ss.private_header_files = 'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_channelz.h',
ss.private_header_files = 'src/core/channelz/channel_trace.h',
'src/core/channelz/channelz.h',
'src/core/channelz/channelz_registry.h',
'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_factory.h',
'src/core/client_channel/client_channel_filter.h',
'src/core/client_channel/client_channel_internal.h',
@ -2951,9 +2952,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder.h',
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/channel_trace.h',
'src/core/lib/channel/channelz.h',
'src/core/lib/channel/channelz_registry.h',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
'src/core/lib/channel/metrics.h',

130
grpc.def generated

@ -19,6 +19,70 @@ EXPORTS
grpc_compression_options_enable_algorithm
grpc_compression_options_disable_algorithm
grpc_compression_options_is_algorithm_enabled
grpc_service_account_jwt_access_credentials_create
grpc_external_account_credentials_create
grpc_google_refresh_token_credentials_create
grpc_access_token_credentials_create
grpc_google_iam_credentials_create
grpc_sts_credentials_create
grpc_auth_metadata_context_copy
grpc_auth_metadata_context_reset
grpc_metadata_credentials_create_from_plugin
grpc_call_credentials_release
grpc_google_default_credentials_create
grpc_ssl_server_certificate_config_create
grpc_ssl_server_certificate_config_destroy
grpc_ssl_credentials_create
grpc_ssl_credentials_create_ex
grpc_ssl_server_credentials_create
grpc_ssl_server_credentials_create_ex
grpc_ssl_server_credentials_create_options_using_config
grpc_ssl_server_credentials_create_options_using_config_fetcher
grpc_ssl_server_credentials_options_destroy
grpc_ssl_server_credentials_create_with_options
grpc_server_credentials_set_auth_metadata_processor
grpc_composite_call_credentials_create
grpc_google_compute_engine_credentials_create
grpc_composite_channel_credentials_create
grpc_alts_credentials_client_options_create
grpc_alts_credentials_server_options_create
grpc_alts_credentials_client_options_add_target_service_account
grpc_alts_credentials_options_destroy
grpc_alts_credentials_create
grpc_alts_server_credentials_create
grpc_tls_identity_pairs_create
grpc_tls_identity_pairs_add_pair
grpc_tls_identity_pairs_destroy
grpc_tls_certificate_provider_static_data_create
grpc_tls_certificate_provider_file_watcher_create
grpc_tls_certificate_provider_release
grpc_tls_credentials_options_create
grpc_tls_credentials_options_set_min_tls_version
grpc_tls_credentials_options_set_max_tls_version
grpc_tls_credentials_options_copy
grpc_tls_credentials_options_destroy
grpc_tls_credentials_options_set_certificate_provider
grpc_tls_credentials_options_watch_root_certs
grpc_tls_credentials_options_set_root_cert_name
grpc_tls_credentials_options_watch_identity_key_cert_pairs
grpc_tls_credentials_options_set_identity_cert_name
grpc_tls_credentials_options_set_cert_request_type
grpc_tls_credentials_options_set_crl_directory
grpc_tls_credentials_options_set_verify_server_cert
grpc_tls_credentials_options_set_send_client_ca_list
grpc_ssl_session_cache_create_lru
grpc_ssl_session_cache_destroy
grpc_ssl_session_cache_create_channel_arg
grpc_set_ssl_roots_override_callback
grpc_max_auth_token_lifetime
grpc_insecure_credentials_create
grpc_insecure_server_credentials_create
grpc_xds_credentials_create
grpc_xds_server_credentials_create
grpc_local_credentials_create
grpc_local_server_credentials_create
grpc_tls_credentials_options_set_check_call_host
grpc_tls_credentials_options_set_tls_session_key_log_file_path
grpc_metadata_array_init
grpc_metadata_array_destroy
grpc_call_details_init
@ -64,6 +128,7 @@ EXPORTS
grpc_call_failed_before_recv_message
grpc_call_ref
grpc_call_unref
grpc_call_set_credentials
grpc_server_request_call
grpc_server_register_method
grpc_server_request_registered_call
@ -110,74 +175,9 @@ EXPORTS
grpc_auth_context_add_property
grpc_auth_context_add_cstring_property
grpc_auth_context_set_peer_identity_property_name
grpc_ssl_session_cache_create_lru
grpc_ssl_session_cache_destroy
grpc_ssl_session_cache_create_channel_arg
grpc_call_credentials_release
grpc_google_default_credentials_create
grpc_set_ssl_roots_override_callback
grpc_ssl_credentials_create
grpc_ssl_credentials_create_ex
grpc_composite_channel_credentials_create
grpc_composite_call_credentials_create
grpc_google_compute_engine_credentials_create
grpc_max_auth_token_lifetime
grpc_service_account_jwt_access_credentials_create
grpc_external_account_credentials_create
grpc_google_refresh_token_credentials_create
grpc_access_token_credentials_create
grpc_google_iam_credentials_create
grpc_sts_credentials_create
grpc_auth_metadata_context_copy
grpc_auth_metadata_context_reset
grpc_metadata_credentials_create_from_plugin
grpc_ssl_server_certificate_config_create
grpc_ssl_server_certificate_config_destroy
grpc_ssl_server_credentials_create
grpc_ssl_server_credentials_create_ex
grpc_ssl_server_credentials_create_options_using_config
grpc_ssl_server_credentials_create_options_using_config_fetcher
grpc_ssl_server_credentials_options_destroy
grpc_ssl_server_credentials_create_with_options
grpc_call_set_credentials
grpc_server_credentials_set_auth_metadata_processor
grpc_alts_credentials_client_options_create
grpc_alts_credentials_server_options_create
grpc_alts_credentials_client_options_add_target_service_account
grpc_alts_credentials_options_destroy
grpc_alts_credentials_create
grpc_alts_server_credentials_create
grpc_local_credentials_create
grpc_local_server_credentials_create
grpc_tls_identity_pairs_create
grpc_tls_identity_pairs_add_pair
grpc_tls_identity_pairs_destroy
grpc_tls_certificate_provider_static_data_create
grpc_tls_certificate_provider_file_watcher_create
grpc_tls_certificate_provider_release
grpc_tls_credentials_options_create
grpc_tls_credentials_options_set_min_tls_version
grpc_tls_credentials_options_set_max_tls_version
grpc_tls_credentials_options_copy
grpc_tls_credentials_options_destroy
grpc_tls_credentials_options_set_certificate_provider
grpc_tls_credentials_options_watch_root_certs
grpc_tls_credentials_options_set_root_cert_name
grpc_tls_credentials_options_watch_identity_key_cert_pairs
grpc_tls_credentials_options_set_identity_cert_name
grpc_tls_credentials_options_set_cert_request_type
grpc_tls_credentials_options_set_crl_directory
grpc_tls_credentials_options_set_verify_server_cert
grpc_tls_credentials_options_set_send_client_ca_list
grpc_tls_credentials_options_set_check_call_host
grpc_insecure_credentials_create
grpc_insecure_server_credentials_create
grpc_xds_credentials_create
grpc_xds_server_credentials_create
grpc_authorization_policy_provider_static_data_create
grpc_authorization_policy_provider_file_watcher_create
grpc_authorization_policy_provider_release
grpc_tls_credentials_options_set_tls_session_key_log_file_path
grpc_slice_ref
grpc_slice_unref
grpc_slice_copy

15
grpc.gemspec generated

@ -51,6 +51,7 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/byte_buffer_reader.h )
s.files += %w( include/grpc/census.h )
s.files += %w( include/grpc/compression.h )
s.files += %w( include/grpc/credentials.h )
s.files += %w( include/grpc/event_engine/endpoint_config.h )
s.files += %w( include/grpc/event_engine/event_engine.h )
s.files += %w( include/grpc/event_engine/extensible.h )
@ -122,10 +123,14 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/support/thd_id.h )
s.files += %w( include/grpc/support/time.h )
s.files += %w( include/grpc/support/workaround_list.h )
s.files += %w( src/core/channelz/channel_trace.cc )
s.files += %w( src/core/channelz/channel_trace.h )
s.files += %w( src/core/channelz/channelz.cc )
s.files += %w( src/core/channelz/channelz.h )
s.files += %w( src/core/channelz/channelz_registry.cc )
s.files += %w( src/core/channelz/channelz_registry.h )
s.files += %w( src/core/client_channel/backup_poller.cc )
s.files += %w( src/core/client_channel/backup_poller.h )
s.files += %w( src/core/client_channel/client_channel_channelz.cc )
s.files += %w( src/core/client_channel/client_channel_channelz.h )
s.files += %w( src/core/client_channel/client_channel_factory.cc )
s.files += %w( src/core/client_channel/client_channel_factory.h )
s.files += %w( src/core/client_channel/client_channel_filter.cc )
@ -1149,12 +1154,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/channel/channel_stack_builder_impl.h )
s.files += %w( src/core/lib/channel/channel_stack_trace.cc )
s.files += %w( src/core/lib/channel/channel_stack_trace.h )
s.files += %w( src/core/lib/channel/channel_trace.cc )
s.files += %w( src/core/lib/channel/channel_trace.h )
s.files += %w( src/core/lib/channel/channelz.cc )
s.files += %w( src/core/lib/channel/channelz.h )
s.files += %w( src/core/lib/channel/channelz_registry.cc )
s.files += %w( src/core/lib/channel/channelz_registry.h )
s.files += %w( src/core/lib/channel/connected_channel.cc )
s.files += %w( src/core/lib/channel/connected_channel.h )
s.files += %w( src/core/lib/channel/context.h )

File diff suppressed because it is too large Load Diff

@ -361,6 +361,13 @@ GRPCAPI void grpc_call_ref(grpc_call* call);
THREAD SAFETY: grpc_call_unref is thread-compatible */
GRPCAPI void grpc_call_unref(grpc_call* call);
typedef struct grpc_call_credentials grpc_call_credentials;
/** Sets a credentials to a call. Can only be called on the client side before
grpc_call_start_batch. */
GRPCAPI grpc_call_error grpc_call_set_credentials(grpc_call* call,
grpc_call_credentials* creds);
/** Request notification of a new call.
Once a call is received, a notification tagged with \a tag_new is added to
\a cq_for_notification. \a call, \a details and \a request_metadata are

@ -25,6 +25,7 @@
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
#include <grpc/credentials.h>
#include <grpc/grpc_security.h>
#include <grpc/support/port_platform.h>

File diff suppressed because it is too large Load Diff

@ -6,6 +6,7 @@ header "byte_buffer.h"
header "byte_buffer_reader.h"
header "census.h"
header "compression.h"
header "credentials.h"
header "fork.h"
header "grpc.h"
header "grpc_audit_logging.h"

@ -102,7 +102,7 @@ GPRAPI void gpr_assertion_failed(const char* filename, int line,
#ifndef NDEBUG
#define GPR_DEBUG_ASSERT(x) GPR_ASSERT(x)
#else
#define GPR_DEBUG_ASSERT(x)
#define GPR_DEBUG_ASSERT(x) GPR_ASSERT(true || (x))
#endif
#ifdef __cplusplus

@ -20,6 +20,7 @@
#include <memory>
#include <vector>
#include <grpc/credentials.h>
#include <grpc/grpc_security.h>
#include <grpc/grpc_security_constants.h>
#include <grpc/status.h>

@ -207,7 +207,9 @@ class CallbackWithSuccessTag : public grpc_completion_queue_functor {
auto* ops = ops_;
#endif
bool do_callback = ops_->FinalizeResult(&ignored, &ok);
#ifndef NDEBUG
GPR_DEBUG_ASSERT(ignored == ops);
#endif
if (do_callback) {
CatchingCallback(func_, ok);

15
package.xml generated

@ -33,6 +33,7 @@
<file baseinstalldir="/" name="include/grpc/byte_buffer_reader.h" role="src" />
<file baseinstalldir="/" name="include/grpc/census.h" role="src" />
<file baseinstalldir="/" name="include/grpc/compression.h" role="src" />
<file baseinstalldir="/" name="include/grpc/credentials.h" role="src" />
<file baseinstalldir="/" name="include/grpc/event_engine/endpoint_config.h" role="src" />
<file baseinstalldir="/" name="include/grpc/event_engine/event_engine.h" role="src" />
<file baseinstalldir="/" name="include/grpc/event_engine/extensible.h" role="src" />
@ -104,10 +105,14 @@
<file baseinstalldir="/" name="include/grpc/support/thd_id.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/time.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/workaround_list.h" role="src" />
<file baseinstalldir="/" name="src/core/channelz/channel_trace.cc" role="src" />
<file baseinstalldir="/" name="src/core/channelz/channel_trace.h" role="src" />
<file baseinstalldir="/" name="src/core/channelz/channelz.cc" role="src" />
<file baseinstalldir="/" name="src/core/channelz/channelz.h" role="src" />
<file baseinstalldir="/" name="src/core/channelz/channelz_registry.cc" role="src" />
<file baseinstalldir="/" name="src/core/channelz/channelz_registry.h" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/backup_poller.cc" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/backup_poller.h" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/client_channel_channelz.cc" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/client_channel_channelz.h" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/client_channel_factory.cc" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/client_channel_factory.h" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/client_channel_filter.cc" role="src" />
@ -1131,12 +1136,6 @@
<file baseinstalldir="/" name="src/core/lib/channel/channel_stack_builder_impl.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_stack_trace.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_stack_trace.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_trace.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_trace.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channelz.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channelz.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channelz_registry.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channelz_registry.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/connected_channel.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/connected_channel.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/context.h" role="src" />

File diff suppressed because it is too large Load Diff

@ -64,6 +64,10 @@ struct Parameters {
std::string message_header_extension;
// Whether to include headers corresponding to imports in source file.
bool include_import_headers;
// Whether to expose synchronous server API.
bool allow_sync_server_api;
// Whether to generate completion queue API.
bool allow_cq_api;
};
// Return the prologue of the generated header file.

@ -65,6 +65,8 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
generator_parameters.use_system_headers = true;
generator_parameters.generate_mock_code = false;
generator_parameters.include_import_headers = false;
generator_parameters.allow_sync_server_api = true;
generator_parameters.allow_cq_api = true;
ProtoBufFile pbfile(file);
@ -95,6 +97,24 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
*error = std::string("Invalid parameter: ") + *parameter_string;
return false;
}
} else if (param[0] == "allow_sync_server_api") {
if (param[1] == "true") {
generator_parameters.allow_sync_server_api = true;
} else if (param[1] == "false") {
generator_parameters.allow_sync_server_api = false;
} else {
*error = std::string("Invalid parameter: ") + *parameter_string;
return false;
}
} else if (param[0] == "allow_cq_api") {
if (param[1] == "true") {
generator_parameters.allow_cq_api = true;
} else if (param[1] == "false") {
generator_parameters.allow_cq_api = false;
} else {
*error = std::string("Invalid parameter: ") + *parameter_string;
return false;
}
} else if (param[0] == "gmock_search_path") {
generator_parameters.gmock_search_path = param[1];
} else if (param[0] == "additional_header_includes") {

@ -3309,29 +3309,6 @@ grpc_cc_library(
],
)
grpc_cc_library(
name = "client_channel_channelz",
srcs = [
"client_channel/client_channel_channelz.cc",
],
hdrs = [
"client_channel/client_channel_channelz.h",
],
external_deps = [
"absl/base:core_headers",
"absl/strings",
],
language = "c++",
deps = [
"connectivity_state",
"json",
"//:channelz",
"//:gpr",
"//:grpc_public_hdrs",
"//:ref_counted_ptr",
],
)
grpc_cc_library(
name = "service_config_channel_arg_filter",
srcs = [
@ -3655,6 +3632,7 @@ grpc_cc_library(
"validation_errors",
"//:alts_util",
"//:gpr",
"//:grpc_core_credentials_header",
"//:ref_counted_ptr",
],
)
@ -3808,6 +3786,7 @@ grpc_cc_library(
"//:exec_ctx",
"//:gpr",
"//:grpc_base",
"//:grpc_core_credentials_header",
"//:grpc_security_base",
"//:handshaker",
"//:iomgr",
@ -3846,6 +3825,7 @@ grpc_cc_library(
"//:exec_ctx",
"//:gpr",
"//:grpc_base",
"//:grpc_core_credentials_header",
"//:grpc_security_base",
"//:handshaker",
"//:iomgr",
@ -3905,6 +3885,7 @@ grpc_cc_library(
"//:gpr",
"//:grpc_base",
"//:grpc_client_channel",
"//:grpc_core_credentials_header",
"//:grpc_security_base",
"//:handshaker",
"//:iomgr",
@ -3948,6 +3929,7 @@ grpc_cc_library(
"//:exec_ctx",
"//:gpr",
"//:grpc_base",
"//:grpc_core_credentials_header",
"//:grpc_security_base",
"//:grpc_trace",
"//:handshaker",
@ -4004,6 +3986,7 @@ grpc_cc_library(
"//:gpr",
"//:grpc_alts_credentials",
"//:grpc_base",
"//:grpc_core_credentials_header",
"//:grpc_jwt_credentials",
"//:grpc_public_hdrs",
"//:grpc_security_base",
@ -4078,6 +4061,7 @@ grpc_cc_library(
"//:exec_ctx",
"//:gpr",
"//:grpc_base",
"//:grpc_core_credentials_header",
"//:grpc_credentials_util",
"//:grpc_public_hdrs",
"//:grpc_security_base",
@ -4117,6 +4101,7 @@ grpc_cc_library(
"//:exec_ctx",
"//:gpr",
"//:grpc_base",
"//:grpc_core_credentials_header",
"//:grpc_security_base",
"//:grpc_trace",
"//:promise",
@ -4164,6 +4149,7 @@ grpc_cc_library(
"//:api_trace",
"//:gpr",
"//:grpc_base",
"//:grpc_core_credentials_header",
"//:grpc_credentials_util",
"//:grpc_security_base",
"//:grpc_trace",
@ -4219,6 +4205,7 @@ grpc_cc_library(
"time",
"//:gpr",
"//:grpc_base",
"//:grpc_core_credentials_header",
"//:grpc_credentials_util",
"//:grpc_security_base",
"//:httpcli",
@ -4255,6 +4242,7 @@ grpc_cc_library(
"//:exec_ctx",
"//:gpr",
"//:grpc_base",
"//:grpc_core_credentials_header",
"//:grpc_security_base",
"//:handshaker",
"//:iomgr",
@ -5143,6 +5131,7 @@ grpc_cc_library(
"//:gpr",
"//:grpc_base",
"//:grpc_client_channel",
"//:grpc_core_credentials_header",
"//:grpc_credentials_util",
"//:grpc_public_hdrs",
"//:grpc_security_base",
@ -5222,6 +5211,7 @@ grpc_cc_library(
"//:exec_ctx",
"//:gpr",
"//:grpc_base",
"//:grpc_core_credentials_header",
"//:grpc_public_hdrs",
"//:grpc_security_base",
"//:grpc_service_config_impl",
@ -5256,6 +5246,7 @@ grpc_cc_library(
"//:config",
"//:gpr",
"//:gpr_platform",
"//:grpc_core_credentials_header",
"//:grpc_security_base",
"//:ref_counted_ptr",
],
@ -5497,7 +5488,6 @@ grpc_cc_library(
language = "c++",
deps = [
"channel_args",
"client_channel_channelz",
"client_channel_internal_header",
"closure",
"connectivity_state",
@ -6451,7 +6441,6 @@ grpc_cc_library(
"//:endpoint_addresses",
"//:gpr",
"//:grpc_base",
"//:grpc_client_channel",
"//:grpc_public_hdrs",
"//:grpc_resolver",
"//:grpc_service_config_impl",
@ -6967,6 +6956,7 @@ grpc_cc_library(
"//:gpr",
"//:gpr_platform",
"//:grpc_base",
"//:grpc_core_credentials_header",
"//:grpc_security_base",
"//:grpc_trace",
"//:httpcli",
@ -7341,7 +7331,6 @@ grpc_cc_library(
],
deps = [
"1999",
"call_final_info",
"for_each",
"if",
"latch",
@ -7353,6 +7342,7 @@ grpc_cc_library(
"status_flag",
"try_seq",
"//:gpr",
"//:promise",
],
)

@ -16,7 +16,7 @@
//
//
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/channelz/channel_trace.h"
#include <memory>
#include <utility>
@ -27,7 +27,7 @@
#include <grpc/support/json.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/channelz.h"
#include "src/core/channelz/channelz.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/slice/slice.h"

@ -16,8 +16,8 @@
//
//
#ifndef GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_TRACE_H
#define GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_TRACE_H
#ifndef GRPC_SRC_CORE_CHANNELZ_CHANNEL_TRACE_H
#define GRPC_SRC_CORE_CHANNELZ_CHANNEL_TRACE_H
#include <stddef.h>
#include <stdint.h>
@ -134,4 +134,4 @@ class ChannelTrace {
} // namespace channelz
} // namespace grpc_core
#endif // GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_TRACE_H
#endif // GRPC_SRC_CORE_CHANNELZ_CHANNEL_TRACE_H

@ -16,7 +16,7 @@
//
//
#include "src/core/lib/channel/channelz.h"
#include "src/core/channelz/channelz.h"
#include <algorithm>
#include <atomic>
@ -32,10 +32,10 @@
#include <grpc/support/port_platform.h>
#include <grpc/support/time.h>
#include "src/core/channelz/channelz_registry.h"
#include "src/core/lib/address_utils/parse_address.h"
#include "src/core/lib/address_utils/sockaddr_utils.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channelz_registry.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/resolved_address.h"
@ -262,6 +262,68 @@ void ChannelNode::RemoveChildSubchannel(intptr_t child_uuid) {
child_subchannels_.erase(child_uuid);
}
//
// SubchannelNode
//
SubchannelNode::SubchannelNode(std::string target_address,
size_t channel_tracer_max_nodes)
: BaseNode(EntityType::kSubchannel, target_address),
target_(std::move(target_address)),
trace_(channel_tracer_max_nodes) {}
SubchannelNode::~SubchannelNode() {}
void SubchannelNode::UpdateConnectivityState(grpc_connectivity_state state) {
connectivity_state_.store(state, std::memory_order_relaxed);
}
void SubchannelNode::SetChildSocket(RefCountedPtr<SocketNode> socket) {
MutexLock lock(&socket_mu_);
child_socket_ = std::move(socket);
}
Json SubchannelNode::RenderJson() {
// Create and fill the data child.
grpc_connectivity_state state =
connectivity_state_.load(std::memory_order_relaxed);
Json::Object data = {
{"state", Json::FromObject({
{"state", Json::FromString(ConnectivityStateName(state))},
})},
{"target", Json::FromString(target_)},
};
// Fill in the channel trace if applicable
Json trace_json = trace_.RenderJson();
if (trace_json.type() != Json::Type::kNull) {
data["trace"] = std::move(trace_json);
}
// Ask CallCountingHelper to populate call count data.
call_counter_.PopulateCallCounts(&data);
// Construct top-level object.
Json::Object object{
{"ref", Json::FromObject({
{"subchannelId", Json::FromString(absl::StrCat(uuid()))},
})},
{"data", Json::FromObject(std::move(data))},
};
// Populate the child socket.
RefCountedPtr<SocketNode> child_socket;
{
MutexLock lock(&socket_mu_);
child_socket = child_socket_;
}
if (child_socket != nullptr && child_socket->uuid() != 0) {
object["socketRef"] = Json::FromArray({
Json::FromObject({
{"socketId", Json::FromString(absl::StrCat(child_socket->uuid()))},
{"name", Json::FromString(child_socket->name())},
}),
});
}
return Json::FromObject(object);
}
//
// ServerNode
//

@ -16,8 +16,8 @@
//
//
#ifndef GRPC_SRC_CORE_LIB_CHANNEL_CHANNELZ_H
#define GRPC_SRC_CORE_LIB_CHANNEL_CHANNELZ_H
#ifndef GRPC_SRC_CORE_CHANNELZ_CHANNELZ_H
#define GRPC_SRC_CORE_CHANNELZ_CHANNELZ_H
#include <stddef.h>
@ -28,6 +28,7 @@
#include <string>
#include <utility>
#include "absl/base/thread_annotations.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
@ -36,7 +37,7 @@
#include <grpc/slice.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/channelz/channel_trace.h"
#include "src/core/lib/gpr/time_precise.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/per_cpu.h"
@ -245,6 +246,45 @@ class ChannelNode final : public BaseNode {
std::set<intptr_t> child_subchannels_;
};
// Handles channelz bookkeeping for subchannels
class SubchannelNode final : public BaseNode {
public:
SubchannelNode(std::string target_address, size_t channel_tracer_max_nodes);
~SubchannelNode() override;
// Sets the subchannel's connectivity state without health checking.
void UpdateConnectivityState(grpc_connectivity_state state);
// Used when the subchannel's child socket changes. This should be set when
// the subchannel's transport is created and set to nullptr when the
// subchannel unrefs the transport.
void SetChildSocket(RefCountedPtr<SocketNode> socket);
Json RenderJson() override;
// proxy methods to composed classes.
void AddTraceEvent(ChannelTrace::Severity severity, const grpc_slice& data) {
trace_.AddTraceEvent(severity, data);
}
void AddTraceEventWithReference(ChannelTrace::Severity severity,
const grpc_slice& data,
RefCountedPtr<BaseNode> referenced_channel) {
trace_.AddTraceEventWithReference(severity, data,
std::move(referenced_channel));
}
void RecordCallStarted() { call_counter_.RecordCallStarted(); }
void RecordCallFailed() { call_counter_.RecordCallFailed(); }
void RecordCallSucceeded() { call_counter_.RecordCallSucceeded(); }
private:
std::atomic<grpc_connectivity_state> connectivity_state_{GRPC_CHANNEL_IDLE};
Mutex socket_mu_;
RefCountedPtr<SocketNode> child_socket_ ABSL_GUARDED_BY(socket_mu_);
std::string target_;
CallCountingHelper call_counter_;
ChannelTrace trace_;
};
// Handles channelz bookkeeping for servers
class ServerNode final : public BaseNode {
public:
@ -380,4 +420,4 @@ class ListenSocketNode final : public BaseNode {
} // namespace channelz
} // namespace grpc_core
#endif // GRPC_SRC_CORE_LIB_CHANNEL_CHANNELZ_H
#endif // GRPC_SRC_CORE_CHANNELZ_CHANNELZ_H

@ -16,7 +16,7 @@
//
//
#include "src/core/lib/channel/channelz_registry.h"
#include "src/core/channelz/channelz_registry.h"
#include <algorithm>
#include <cstdint>
@ -30,7 +30,7 @@
#include <grpc/support/port_platform.h>
#include <grpc/support/string_util.h>
#include "src/core/lib/channel/channelz.h"
#include "src/core/channelz/channelz.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/json/json.h"

@ -16,8 +16,8 @@
//
//
#ifndef GRPC_SRC_CORE_LIB_CHANNEL_CHANNELZ_REGISTRY_H
#define GRPC_SRC_CORE_LIB_CHANNEL_CHANNELZ_REGISTRY_H
#ifndef GRPC_SRC_CORE_CHANNELZ_CHANNELZ_REGISTRY_H
#define GRPC_SRC_CORE_CHANNELZ_CHANNELZ_REGISTRY_H
#include <cstdint>
#include <map>
@ -27,7 +27,7 @@
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/channelz.h"
#include "src/core/channelz/channelz.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
@ -99,4 +99,4 @@ class ChannelzRegistry final {
} // namespace channelz
} // namespace grpc_core
#endif // GRPC_SRC_CORE_LIB_CHANNEL_CHANNELZ_REGISTRY_H
#endif // GRPC_SRC_CORE_CHANNELZ_CHANNELZ_REGISTRY_H

@ -1,93 +0,0 @@
//
//
// 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 <grpc/support/port_platform.h>
#include "src/core/client_channel/client_channel_channelz.h"
#include "absl/strings/str_cat.h"
#include <grpc/support/json.h>
#include "src/core/lib/transport/connectivity_state.h"
// IWYU pragma: no_include <type_traits>
namespace grpc_core {
namespace channelz {
SubchannelNode::SubchannelNode(std::string target_address,
size_t channel_tracer_max_nodes)
: BaseNode(EntityType::kSubchannel, target_address),
target_(std::move(target_address)),
trace_(channel_tracer_max_nodes) {}
SubchannelNode::~SubchannelNode() {}
void SubchannelNode::UpdateConnectivityState(grpc_connectivity_state state) {
connectivity_state_.store(state, std::memory_order_relaxed);
}
void SubchannelNode::SetChildSocket(RefCountedPtr<SocketNode> socket) {
MutexLock lock(&socket_mu_);
child_socket_ = std::move(socket);
}
Json SubchannelNode::RenderJson() {
// Create and fill the data child.
grpc_connectivity_state state =
connectivity_state_.load(std::memory_order_relaxed);
Json::Object data = {
{"state", Json::FromObject({
{"state", Json::FromString(ConnectivityStateName(state))},
})},
{"target", Json::FromString(target_)},
};
// Fill in the channel trace if applicable
Json trace_json = trace_.RenderJson();
if (trace_json.type() != Json::Type::kNull) {
data["trace"] = std::move(trace_json);
}
// Ask CallCountingHelper to populate call count data.
call_counter_.PopulateCallCounts(&data);
// Construct top-level object.
Json::Object object{
{"ref", Json::FromObject({
{"subchannelId", Json::FromString(absl::StrCat(uuid()))},
})},
{"data", Json::FromObject(std::move(data))},
};
// Populate the child socket.
RefCountedPtr<SocketNode> child_socket;
{
MutexLock lock(&socket_mu_);
child_socket = child_socket_;
}
if (child_socket != nullptr && child_socket->uuid() != 0) {
object["socketRef"] = Json::FromArray({
Json::FromObject({
{"socketId", Json::FromString(absl::StrCat(child_socket->uuid()))},
{"name", Json::FromString(child_socket->name())},
}),
});
}
return Json::FromObject(object);
}
} // namespace channelz
} // namespace grpc_core

@ -1,85 +0,0 @@
//
//
// 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.
//
//
#ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_CLIENT_CHANNEL_CHANNELZ_H
#define GRPC_SRC_CORE_CLIENT_CHANNEL_CLIENT_CHANNEL_CHANNELZ_H
#include <grpc/support/port_platform.h>
#include <stddef.h>
#include <atomic>
#include <string>
#include <utility>
#include "absl/base/thread_annotations.h"
#include <grpc/impl/connectivity_state.h>
#include <grpc/slice.h>
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/json/json.h"
namespace grpc_core {
namespace channelz {
class SubchannelNode final : public BaseNode {
public:
SubchannelNode(std::string target_address, size_t channel_tracer_max_nodes);
~SubchannelNode() override;
// Sets the subchannel's connectivity state without health checking.
void UpdateConnectivityState(grpc_connectivity_state state);
// Used when the subchannel's child socket changes. This should be set when
// the subchannel's transport is created and set to nullptr when the
// subchannel unrefs the transport.
void SetChildSocket(RefCountedPtr<SocketNode> socket);
Json RenderJson() override;
// proxy methods to composed classes.
void AddTraceEvent(ChannelTrace::Severity severity, const grpc_slice& data) {
trace_.AddTraceEvent(severity, data);
}
void AddTraceEventWithReference(ChannelTrace::Severity severity,
const grpc_slice& data,
RefCountedPtr<BaseNode> referenced_channel) {
trace_.AddTraceEventWithReference(severity, data,
std::move(referenced_channel));
}
void RecordCallStarted() { call_counter_.RecordCallStarted(); }
void RecordCallFailed() { call_counter_.RecordCallFailed(); }
void RecordCallSucceeded() { call_counter_.RecordCallSucceeded(); }
private:
std::atomic<grpc_connectivity_state> connectivity_state_{GRPC_CHANNEL_IDLE};
Mutex socket_mu_;
RefCountedPtr<SocketNode> child_socket_ ABSL_GUARDED_BY(socket_mu_);
std::string target_;
CallCountingHelper call_counter_;
ChannelTrace trace_;
};
} // namespace channelz
} // namespace grpc_core
#endif // GRPC_SRC_CORE_CLIENT_CHANNEL_CLIENT_CHANNEL_CHANNELZ_H

@ -49,8 +49,8 @@
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
#include "src/core/channelz/channel_trace.h"
#include "src/core/client_channel/backup_poller.h"
#include "src/core/client_channel/client_channel_channelz.h"
#include "src/core/client_channel/client_channel_internal.h"
#include "src/core/client_channel/client_channel_service_config.h"
#include "src/core/client_channel/config_selector.h"
@ -63,7 +63,6 @@
#include "src/core/ext/filters/deadline/deadline_filter.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/debug/trace.h"
@ -644,7 +643,9 @@ class ClientChannelFilter::SubchannelWrapper final
chand, this, subchannel_.get());
}
GRPC_CHANNEL_STACK_REF(chand_->owning_stack_, "SubchannelWrapper");
#ifndef NDEBUG
GPR_DEBUG_ASSERT(chand_->work_serializer_->RunningInWorkSerializer());
#endif
if (chand_->channelz_node_ != nullptr) {
auto* subchannel_node = subchannel_->channelz_node();
if (subchannel_node != nullptr) {

@ -37,6 +37,7 @@
#include <grpc/grpc.h>
#include <grpc/impl/connectivity_state.h>
#include "src/core/channelz/channelz.h"
#include "src/core/client_channel/client_channel_factory.h"
#include "src/core/client_channel/config_selector.h"
#include "src/core/client_channel/dynamic_filters.h"
@ -46,7 +47,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/channel/context.h"
#include "src/core/lib/gpr/time_precise.h"
#include "src/core/lib/gprpp/orphanable.h"
@ -63,7 +63,6 @@
#include "src/core/lib/promise/activity.h"
#include "src/core/lib/promise/arena_promise.h"
#include "src/core/lib/resource_quota/arena.h"
#include "src/core/service_config/service_config.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/lib/transport/metadata_batch.h"
@ -71,6 +70,7 @@
#include "src/core/load_balancing/backend_metric_data.h"
#include "src/core/load_balancing/lb_policy.h"
#include "src/core/resolver/resolver.h"
#include "src/core/service_config/service_config.h"
//
// Client channel filter

@ -29,8 +29,8 @@
#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/unique_type_name.h"
#include "src/core/lib/resource_quota/arena.h"
#include "src/core/service_config/service_config_call_data.h"
#include "src/core/load_balancing/lb_policy.h"
#include "src/core/service_config/service_config_call_data.h"
//
// This file contains internal interfaces used to allow various plugins

@ -35,8 +35,8 @@
#include "src/core/lib/json/json.h"
#include "src/core/lib/json/json_args.h"
#include "src/core/lib/json/json_object_loader.h"
#include "src/core/service_config/service_config_parser.h"
#include "src/core/load_balancing/lb_policy.h"
#include "src/core/service_config/service_config_parser.h"
namespace grpc_core {
namespace internal {

@ -36,9 +36,9 @@
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/resource_quota/arena.h"
#include "src/core/service_config/service_config.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/transport/metadata_batch.h"
#include "src/core/service_config/service_config.h"
// Channel arg key for ConfigSelector.
#define GRPC_ARG_CONFIG_SELECTOR "grpc.internal.config_selector"

@ -19,8 +19,8 @@
#include <grpc/support/port_platform.h>
#include "src/core/channelz/channelz.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"

@ -35,9 +35,9 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/uri/uri_parser.h"
#include "src/core/service_config/service_config.h"
#include "src/core/service_config/service_config_call_data.h"
#include "src/core/lib/uri/uri_parser.h"
//
// Retry filter

@ -37,14 +37,14 @@
#include <grpc/status.h>
#include <grpc/support/log.h>
#include "src/core/channelz/channel_trace.h"
#include "src/core/channelz/channelz.h"
#include "src/core/client_channel/subchannel_pool_interface.h"
#include "src/core/lib/address_utils/sockaddr_utils.h"
#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/channel_stack_builder_impl.h"
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/debug/stats_data.h"

@ -31,7 +31,6 @@
#include <grpc/event_engine/event_engine.h>
#include <grpc/impl/connectivity_state.h>
#include "src/core/client_channel/client_channel_channelz.h"
#include "src/core/client_channel/connector.h"
#include "src/core/client_channel/subchannel_pool_interface.h"
#include "src/core/lib/backoff/backoff.h"

@ -34,6 +34,7 @@
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/promise_based_filter.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/experiments/experiments.h"
@ -121,9 +122,9 @@ const grpc_channel_filter BackendMetricFilter::kFilter =
MakePromiseBasedFilter<BackendMetricFilter, FilterEndpoint::kServer>(
"backend_metric");
absl::StatusOr<BackendMetricFilter> BackendMetricFilter::Create(
const ChannelArgs&, ChannelFilter::Args) {
return BackendMetricFilter();
absl::StatusOr<std::unique_ptr<BackendMetricFilter>>
BackendMetricFilter::Create(const ChannelArgs&, ChannelFilter::Args) {
return std::make_unique<BackendMetricFilter>();
}
void BackendMetricFilter::Call::OnServerTrailingMetadata(ServerMetadata& md) {

@ -35,8 +35,8 @@ class BackendMetricFilter : public ImplementChannelFilter<BackendMetricFilter> {
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<BackendMetricFilter> Create(const ChannelArgs& args,
ChannelFilter::Args);
static absl::StatusOr<std::unique_ptr<BackendMetricFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args);
class Call {
public:

@ -25,6 +25,7 @@
#include "absl/base/thread_annotations.h"
#include "absl/meta/type_traits.h"
#include "absl/random/random.h"
#include "absl/status/statusor.h"
#include "absl/types/optional.h"
#include <grpc/impl/channel_arg_names.h>
@ -133,18 +134,17 @@ struct LegacyMaxAgeFilter::Config {
// will be removed at that time also, so just disable the deprecation warning
// for now.
ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING
absl::StatusOr<LegacyClientIdleFilter> LegacyClientIdleFilter::Create(
const ChannelArgs& args, ChannelFilter::Args filter_args) {
LegacyClientIdleFilter filter(filter_args.channel_stack(),
GetClientIdleTimeout(args));
return absl::StatusOr<LegacyClientIdleFilter>(std::move(filter));
absl::StatusOr<std::unique_ptr<LegacyClientIdleFilter>>
LegacyClientIdleFilter::Create(const ChannelArgs& args,
ChannelFilter::Args filter_args) {
return std::make_unique<LegacyClientIdleFilter>(filter_args.channel_stack(),
GetClientIdleTimeout(args));
}
absl::StatusOr<LegacyMaxAgeFilter> LegacyMaxAgeFilter::Create(
absl::StatusOr<std::unique_ptr<LegacyMaxAgeFilter>> LegacyMaxAgeFilter::Create(
const ChannelArgs& args, ChannelFilter::Args filter_args) {
LegacyMaxAgeFilter filter(filter_args.channel_stack(),
Config::FromChannelArgs(args));
return absl::StatusOr<LegacyMaxAgeFilter>(std::move(filter));
return std::make_unique<LegacyMaxAgeFilter>(filter_args.channel_stack(),
Config::FromChannelArgs(args));
}
ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING

@ -42,6 +42,11 @@ namespace grpc_core {
class LegacyChannelIdleFilter : public ChannelFilter {
public:
LegacyChannelIdleFilter(grpc_channel_stack* channel_stack,
Duration client_idle_timeout)
: channel_stack_(channel_stack),
client_idle_timeout_(client_idle_timeout) {}
~LegacyChannelIdleFilter() override = default;
LegacyChannelIdleFilter(const LegacyChannelIdleFilter&) = delete;
@ -59,11 +64,6 @@ class LegacyChannelIdleFilter : public ChannelFilter {
using SingleSetActivityPtr =
SingleSetPtr<Activity, typename ActivityPtr::deleter_type>;
LegacyChannelIdleFilter(grpc_channel_stack* channel_stack,
Duration client_idle_timeout)
: channel_stack_(channel_stack),
client_idle_timeout_(client_idle_timeout) {}
grpc_channel_stack* channel_stack() { return channel_stack_; };
virtual void Shutdown();
@ -94,10 +94,9 @@ class LegacyClientIdleFilter final : public LegacyChannelIdleFilter {
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<LegacyClientIdleFilter> Create(
static absl::StatusOr<std::unique_ptr<LegacyClientIdleFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args filter_args);
private:
using LegacyChannelIdleFilter::LegacyChannelIdleFilter;
};
@ -106,9 +105,12 @@ class LegacyMaxAgeFilter final : public LegacyChannelIdleFilter {
static const grpc_channel_filter kFilter;
struct Config;
static absl::StatusOr<LegacyMaxAgeFilter> Create(
static absl::StatusOr<std::unique_ptr<LegacyMaxAgeFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args filter_args);
LegacyMaxAgeFilter(grpc_channel_stack* channel_stack,
const Config& max_age_config);
void PostInit() override;
private:
@ -128,9 +130,6 @@ class LegacyMaxAgeFilter final : public LegacyChannelIdleFilter {
LegacyMaxAgeFilter* filter_;
};
LegacyMaxAgeFilter(grpc_channel_stack* channel_stack,
const Config& max_age_config);
void Shutdown() override;
SingleSetActivityPtr max_age_activity_;

@ -370,8 +370,9 @@ const grpc_channel_filter grpc_server_deadline_filter = {
return next_promise_factory(std::move(call_args));
},
[](grpc_channel_element*, grpc_core::CallSpineInterface* spine) {
spine->client_initial_metadata().receiver.InterceptAndMap(
[](grpc_core::ClientMetadataHandle md) {
grpc_core::DownCast<grpc_core::PipeBasedCallSpine*>(spine)
->client_initial_metadata()
.receiver.InterceptAndMap([](grpc_core::ClientMetadataHandle md) {
auto deadline = md->get(grpc_core::GrpcTimeoutMetadata());
if (deadline.has_value()) {
grpc_core::GetContext<grpc_core::CallContext>()->UpdateDeadline(

@ -29,6 +29,7 @@
#include "absl/meta/type_traits.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/numbers.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
@ -135,16 +136,16 @@ class FaultInjectionFilter::InjectionDecision {
FaultHandle active_fault_{false};
};
absl::StatusOr<FaultInjectionFilter> FaultInjectionFilter::Create(
const ChannelArgs&, ChannelFilter::Args filter_args) {
return FaultInjectionFilter(filter_args);
absl::StatusOr<std::unique_ptr<FaultInjectionFilter>>
FaultInjectionFilter::Create(const ChannelArgs&,
ChannelFilter::Args filter_args) {
return std::make_unique<FaultInjectionFilter>(filter_args);
}
FaultInjectionFilter::FaultInjectionFilter(ChannelFilter::Args filter_args)
: index_(filter_args.instance_id()),
service_config_parser_index_(
FaultInjectionServiceConfigParser::ParserIndex()),
mu_(new Mutex) {}
FaultInjectionServiceConfigParser::ParserIndex()) {}
// Construct a promise for one call.
ArenaPromise<absl::Status> FaultInjectionFilter::Call::OnClientInitialMetadata(
@ -226,7 +227,7 @@ FaultInjectionFilter::MakeInjectionDecision(
bool delay_request = delay != Duration::Zero();
bool abort_request = abort_code != GRPC_STATUS_OK;
if (delay_request || abort_request) {
MutexLock lock(mu_.get());
MutexLock lock(&mu_);
if (delay_request) {
delay_request =
UnderFraction(&delay_rand_generator_, delay_percentage_numerator,

@ -45,9 +45,11 @@ class FaultInjectionFilter
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<FaultInjectionFilter> Create(
static absl::StatusOr<std::unique_ptr<FaultInjectionFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args filter_args);
explicit FaultInjectionFilter(ChannelFilter::Args filter_args);
// Construct a promise for one call.
class Call {
public:
@ -61,8 +63,6 @@ class FaultInjectionFilter
};
private:
explicit FaultInjectionFilter(ChannelFilter::Args filter_args);
class InjectionDecision;
InjectionDecision MakeInjectionDecision(
const ClientMetadata& initial_metadata);
@ -70,7 +70,7 @@ class FaultInjectionFilter
// The relative index of instances of the same filter.
size_t index_;
const size_t service_config_parser_index_;
std::unique_ptr<Mutex> mu_;
Mutex mu_;
absl::InsecureBitGen abort_rand_generator_ ABSL_GUARDED_BY(mu_);
absl::InsecureBitGen delay_rand_generator_ ABSL_GUARDED_BY(mu_);
};

@ -27,6 +27,7 @@
#include <vector>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"
@ -136,16 +137,16 @@ HttpClientFilter::HttpClientFilter(HttpSchemeMetadata::ValueType scheme,
Slice user_agent,
bool test_only_use_put_requests)
: scheme_(scheme),
user_agent_(std::move(user_agent)),
test_only_use_put_requests_(test_only_use_put_requests) {}
test_only_use_put_requests_(test_only_use_put_requests),
user_agent_(std::move(user_agent)) {}
absl::StatusOr<HttpClientFilter> HttpClientFilter::Create(
absl::StatusOr<std::unique_ptr<HttpClientFilter>> HttpClientFilter::Create(
const ChannelArgs& args, ChannelFilter::Args) {
auto* transport = args.GetObject<Transport>();
if (transport == nullptr) {
return absl::InvalidArgumentError("HttpClientFilter needs a transport");
}
return HttpClientFilter(
return std::make_unique<HttpClientFilter>(
SchemeFromArgs(args),
UserAgentFromArgs(args, transport->GetTransportName()),
args.GetInt(GRPC_ARG_TEST_ONLY_USE_PUT_REQUESTS).value_or(false));

@ -35,9 +35,12 @@ class HttpClientFilter : public ImplementChannelFilter<HttpClientFilter> {
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<HttpClientFilter> Create(
static absl::StatusOr<std::unique_ptr<HttpClientFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args filter_args);
HttpClientFilter(HttpSchemeMetadata::ValueType scheme, Slice user_agent,
bool test_only_use_put_requests);
class Call {
public:
void OnClientInitialMetadata(ClientMetadata& md, HttpClientFilter* filter);
@ -49,12 +52,9 @@ class HttpClientFilter : public ImplementChannelFilter<HttpClientFilter> {
};
private:
HttpClientFilter(HttpSchemeMetadata::ValueType scheme, Slice user_agent,
bool test_only_use_put_requests);
HttpSchemeMetadata::ValueType scheme_;
Slice user_agent_;
bool test_only_use_put_requests_;
Slice user_agent_;
};
// A test-only channel arg to allow testing gRPC Core server behavior on PUT

@ -43,8 +43,8 @@ const NoInterceptor ClientAuthorityFilter::Call::OnClientToServerMessage;
const NoInterceptor ClientAuthorityFilter::Call::OnServerToClientMessage;
const NoInterceptor ClientAuthorityFilter::Call::OnFinalize;
absl::StatusOr<ClientAuthorityFilter> ClientAuthorityFilter::Create(
const ChannelArgs& args, ChannelFilter::Args) {
absl::StatusOr<std::unique_ptr<ClientAuthorityFilter>>
ClientAuthorityFilter::Create(const ChannelArgs& args, ChannelFilter::Args) {
absl::optional<absl::string_view> default_authority =
args.GetString(GRPC_ARG_DEFAULT_AUTHORITY);
if (!default_authority.has_value()) {
@ -52,7 +52,8 @@ absl::StatusOr<ClientAuthorityFilter> ClientAuthorityFilter::Create(
"GRPC_ARG_DEFAULT_AUTHORITY string channel arg. not found. Note that "
"direct channels must explicitly specify a value for this argument.");
}
return ClientAuthorityFilter(Slice::FromCopiedString(*default_authority));
return std::make_unique<ClientAuthorityFilter>(
Slice::FromCopiedString(*default_authority));
}
void ClientAuthorityFilter::Call::OnClientInitialMetadata(

@ -39,8 +39,11 @@ class ClientAuthorityFilter final
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<ClientAuthorityFilter> Create(const ChannelArgs& args,
ChannelFilter::Args);
static absl::StatusOr<std::unique_ptr<ClientAuthorityFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args);
explicit ClientAuthorityFilter(Slice default_authority)
: default_authority_(std::move(default_authority)) {}
class Call {
public:
@ -54,8 +57,6 @@ class ClientAuthorityFilter final
};
private:
explicit ClientAuthorityFilter(Slice default_authority)
: default_authority_(std::move(default_authority)) {}
Slice default_authority_;
};

@ -72,14 +72,14 @@ const grpc_channel_filter ServerCompressionFilter::kFilter =
kFilterExaminesInboundMessages |
kFilterExaminesOutboundMessages>("compression");
absl::StatusOr<ClientCompressionFilter> ClientCompressionFilter::Create(
const ChannelArgs& args, ChannelFilter::Args) {
return ClientCompressionFilter(args);
absl::StatusOr<std::unique_ptr<ClientCompressionFilter>>
ClientCompressionFilter::Create(const ChannelArgs& args, ChannelFilter::Args) {
return std::make_unique<ClientCompressionFilter>(args);
}
absl::StatusOr<ServerCompressionFilter> ServerCompressionFilter::Create(
const ChannelArgs& args, ChannelFilter::Args) {
return ServerCompressionFilter(args);
absl::StatusOr<std::unique_ptr<ServerCompressionFilter>>
ServerCompressionFilter::Create(const ChannelArgs& args, ChannelFilter::Args) {
return std::make_unique<ServerCompressionFilter>(args);
}
ChannelCompression::ChannelCompression(const ChannelArgs& args)

@ -110,9 +110,12 @@ class ClientCompressionFilter final
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<ClientCompressionFilter> Create(
static absl::StatusOr<std::unique_ptr<ClientCompressionFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args filter_args);
explicit ClientCompressionFilter(const ChannelArgs& args)
: compression_engine_(args) {}
// Construct a promise for one call.
class Call {
public:
@ -135,9 +138,6 @@ class ClientCompressionFilter final
};
private:
explicit ClientCompressionFilter(const ChannelArgs& args)
: compression_engine_(args) {}
ChannelCompression compression_engine_;
};
@ -146,9 +146,12 @@ class ServerCompressionFilter final
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<ServerCompressionFilter> Create(
static absl::StatusOr<std::unique_ptr<ServerCompressionFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args filter_args);
explicit ServerCompressionFilter(const ChannelArgs& args)
: compression_engine_(args) {}
// Construct a promise for one call.
class Call {
public:
@ -171,9 +174,6 @@ class ServerCompressionFilter final
};
private:
explicit ServerCompressionFilter(const ChannelArgs& args)
: compression_engine_(args) {}
ChannelCompression compression_engine_;
};

@ -152,9 +152,9 @@ void HttpServerFilter::Call::OnServerTrailingMetadata(ServerMetadata& md) {
FilterOutgoingMetadata(&md);
}
absl::StatusOr<HttpServerFilter> HttpServerFilter::Create(
absl::StatusOr<std::unique_ptr<HttpServerFilter>> HttpServerFilter::Create(
const ChannelArgs& args, ChannelFilter::Args) {
return HttpServerFilter(
return std::make_unique<HttpServerFilter>(
args.GetBool(GRPC_ARG_SURFACE_USER_AGENT).value_or(true),
args.GetBool(
GRPC_ARG_DO_NOT_USE_UNLESS_YOU_HAVE_PERMISSION_FROM_GRPC_TEAM_ALLOW_BROKEN_PUT_REQUESTS)

@ -36,9 +36,13 @@ class HttpServerFilter : public ImplementChannelFilter<HttpServerFilter> {
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<HttpServerFilter> Create(
static absl::StatusOr<std::unique_ptr<HttpServerFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args filter_args);
HttpServerFilter(bool surface_user_agent, bool allow_put_requests)
: surface_user_agent_(surface_user_agent),
allow_put_requests_(allow_put_requests) {}
class Call {
public:
ServerMetadataHandle OnClientInitialMetadata(ClientMetadata& md,
@ -51,10 +55,6 @@ class HttpServerFilter : public ImplementChannelFilter<HttpServerFilter> {
};
private:
HttpServerFilter(bool surface_user_agent, bool allow_put_requests)
: surface_user_agent_(surface_user_agent),
allow_put_requests_(allow_put_requests) {}
bool surface_user_agent_;
bool allow_put_requests_;
};

@ -76,10 +76,11 @@ const NoInterceptor ServerLoadReportingFilter::Call::OnServerInitialMetadata;
const NoInterceptor ServerLoadReportingFilter::Call::OnClientToServerMessage;
const NoInterceptor ServerLoadReportingFilter::Call::OnServerToClientMessage;
absl::StatusOr<ServerLoadReportingFilter> ServerLoadReportingFilter::Create(
const ChannelArgs& channel_args, ChannelFilter::Args) {
absl::StatusOr<std::unique_ptr<ServerLoadReportingFilter>>
ServerLoadReportingFilter::Create(const ChannelArgs& channel_args,
ChannelFilter::Args) {
// Find and record the peer_identity.
ServerLoadReportingFilter filter;
auto filter = std::make_unique<ServerLoadReportingFilter>();
const auto* auth_context = channel_args.GetObject<grpc_auth_context>();
if (auth_context != nullptr &&
grpc_auth_context_peer_is_authenticated(auth_context)) {
@ -88,7 +89,7 @@ absl::StatusOr<ServerLoadReportingFilter> ServerLoadReportingFilter::Create(
const grpc_auth_property* auth_property =
grpc_auth_property_iterator_next(&auth_it);
if (auth_property != nullptr) {
filter.peer_identity_ =
filter->peer_identity_ =
std::string(auth_property->value, auth_property->value_length);
}
}

@ -39,7 +39,7 @@ class ServerLoadReportingFilter
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<ServerLoadReportingFilter> Create(
static absl::StatusOr<std::unique_ptr<ServerLoadReportingFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args);
// Getters.

@ -342,21 +342,23 @@ class CallData {
} // namespace
absl::StatusOr<ClientLoggingFilter> ClientLoggingFilter::Create(
const ChannelArgs& args, ChannelFilter::Args /*filter_args*/) {
absl::StatusOr<std::unique_ptr<ClientLoggingFilter>>
ClientLoggingFilter::Create(const ChannelArgs& args,
ChannelFilter::Args /*filter_args*/) {
absl::optional<absl::string_view> default_authority =
args.GetString(GRPC_ARG_DEFAULT_AUTHORITY);
if (default_authority.has_value()) {
return ClientLoggingFilter(std::string(default_authority.value()));
return std::make_unique<ClientLoggingFilter>(
std::string(default_authority.value()));
}
absl::optional<std::string> server_uri =
args.GetOwnedString(GRPC_ARG_SERVER_URI);
if (server_uri.has_value()) {
return ClientLoggingFilter(
return std::make_unique<ClientLoggingFilter>(
CoreConfiguration::Get().resolver_registry().GetDefaultAuthority(
*server_uri));
}
return ClientLoggingFilter("");
return std::make_unique<ClientLoggingFilter>("");
}
// Construct a promise for one call.
@ -445,9 +447,10 @@ const grpc_channel_filter ClientLoggingFilter::kFilter =
kFilterExaminesInboundMessages |
kFilterExaminesOutboundMessages>("logging");
absl::StatusOr<ServerLoggingFilter> ServerLoggingFilter::Create(
const ChannelArgs& /*args*/, ChannelFilter::Args /*filter_args*/) {
return ServerLoggingFilter();
absl::StatusOr<std::unique_ptr<ServerLoggingFilter>>
ServerLoggingFilter::Create(const ChannelArgs& /*args*/,
ChannelFilter::Args /*filter_args*/) {
return std::make_unique<ServerLoggingFilter>();
}
// Construct a promise for one call.

@ -39,24 +39,25 @@ class ClientLoggingFilter final : public ChannelFilter {
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<ClientLoggingFilter> Create(
static absl::StatusOr<std::unique_ptr<ClientLoggingFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args /*filter_args*/);
explicit ClientLoggingFilter(std::string default_authority)
: default_authority_(std::move(default_authority)) {}
// Construct a promise for one call.
ArenaPromise<ServerMetadataHandle> MakeCallPromise(
CallArgs call_args, NextPromiseFactory next_promise_factory) override;
private:
explicit ClientLoggingFilter(std::string default_authority)
: default_authority_(std::move(default_authority)) {}
std::string default_authority_;
const std::string default_authority_;
};
class ServerLoggingFilter final : public ChannelFilter {
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<ServerLoggingFilter> Create(
static absl::StatusOr<std::unique_ptr<ServerLoggingFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args /*filter_args*/);
// Construct a promise for one call.

@ -25,7 +25,6 @@
#include "absl/strings/str_format.h"
#include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/status.h>
#include <grpc/support/log.h>
@ -142,19 +141,20 @@ const grpc_channel_filter ClientMessageSizeFilter::kFilter =
MakePromiseBasedFilter<ClientMessageSizeFilter, FilterEndpoint::kClient,
kFilterExaminesOutboundMessages |
kFilterExaminesInboundMessages>("message_size");
const grpc_channel_filter ServerMessageSizeFilter::kFilter =
MakePromiseBasedFilter<ServerMessageSizeFilter, FilterEndpoint::kServer,
kFilterExaminesOutboundMessages |
kFilterExaminesInboundMessages>("message_size");
absl::StatusOr<ClientMessageSizeFilter> ClientMessageSizeFilter::Create(
const ChannelArgs& args, ChannelFilter::Args) {
return ClientMessageSizeFilter(args);
absl::StatusOr<std::unique_ptr<ClientMessageSizeFilter>>
ClientMessageSizeFilter::Create(const ChannelArgs& args, ChannelFilter::Args) {
return std::make_unique<ClientMessageSizeFilter>(args);
}
absl::StatusOr<ServerMessageSizeFilter> ServerMessageSizeFilter::Create(
const ChannelArgs& args, ChannelFilter::Args) {
return ServerMessageSizeFilter(args);
absl::StatusOr<std::unique_ptr<ServerMessageSizeFilter>>
ServerMessageSizeFilter::Create(const ChannelArgs& args, ChannelFilter::Args) {
return std::make_unique<ServerMessageSizeFilter>(args);
}
namespace {
@ -168,7 +168,7 @@ ServerMetadataHandle CheckPayload(const Message& msg,
is_send ? "send" : "recv", msg.payload()->Length(), *max_length);
}
if (msg.payload()->Length() <= *max_length) return nullptr;
auto r = GetContext<Arena>()->MakePooled<ServerMetadata>();
auto r = Arena::MakePooled<ServerMetadata>();
r->Set(GrpcStatusMetadata(), GRPC_STATUS_RESOURCE_EXHAUSTED);
r->Set(GrpcMessageMetadata(),
Slice::FromCopiedString(absl::StrFormat(

@ -91,9 +91,12 @@ class ServerMessageSizeFilter final
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<ServerMessageSizeFilter> Create(
static absl::StatusOr<std::unique_ptr<ServerMessageSizeFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args filter_args);
explicit ServerMessageSizeFilter(const ChannelArgs& args)
: parsed_config_(MessageSizeParsedConfig::GetFromChannelArgs(args)) {}
class Call {
public:
static const NoInterceptor OnClientInitialMetadata;
@ -107,8 +110,6 @@ class ServerMessageSizeFilter final
};
private:
explicit ServerMessageSizeFilter(const ChannelArgs& args)
: parsed_config_(MessageSizeParsedConfig::GetFromChannelArgs(args)) {}
const MessageSizeParsedConfig parsed_config_;
};
@ -117,9 +118,12 @@ class ClientMessageSizeFilter final
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<ClientMessageSizeFilter> Create(
static absl::StatusOr<std::unique_ptr<ClientMessageSizeFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args filter_args);
explicit ClientMessageSizeFilter(const ChannelArgs& args)
: parsed_config_(MessageSizeParsedConfig::GetFromChannelArgs(args)) {}
class Call {
public:
explicit Call(ClientMessageSizeFilter* filter);
@ -136,8 +140,6 @@ class ClientMessageSizeFilter final
};
private:
explicit ClientMessageSizeFilter(const ChannelArgs& args)
: parsed_config_(MessageSizeParsedConfig::GetFromChannelArgs(args)) {}
const size_t service_config_parser_index_{MessageSizeParser::ParserIndex()};
const MessageSizeParsedConfig parsed_config_;
};

@ -82,14 +82,21 @@ RbacFilter::RbacFilter(size_t index,
service_config_parser_index_(RbacServiceConfigParser::ParserIndex()),
per_channel_evaluate_args_(std::move(per_channel_evaluate_args)) {}
absl::StatusOr<RbacFilter> RbacFilter::Create(const ChannelArgs& args,
ChannelFilter::Args filter_args) {
absl::StatusOr<std::unique_ptr<RbacFilter>> RbacFilter::Create(
const ChannelArgs& args, ChannelFilter::Args filter_args) {
auto* auth_context = args.GetObject<grpc_auth_context>();
if (auth_context == nullptr) {
return GRPC_ERROR_CREATE("No auth context found");
}
return RbacFilter(filter_args.instance_id(),
EvaluateArgs::PerChannelArgs(auth_context, args));
auto* transport = args.GetObject<Transport>();
if (transport == nullptr) {
// This should never happen since the transport is always set on the server
// side.
return GRPC_ERROR_CREATE("No transport configured");
}
return std::make_unique<RbacFilter>(
filter_args.instance_id(),
EvaluateArgs::PerChannelArgs(auth_context, args));
}
void RbacFilterRegister(CoreConfiguration::Builder* builder) {

@ -42,8 +42,11 @@ class RbacFilter : public ImplementChannelFilter<RbacFilter> {
// and enforces the RBAC policy.
static const grpc_channel_filter kFilterVtable;
static absl::StatusOr<RbacFilter> Create(const ChannelArgs& args,
ChannelFilter::Args filter_args);
static absl::StatusOr<std::unique_ptr<RbacFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args filter_args);
RbacFilter(size_t index,
EvaluateArgs::PerChannelArgs per_channel_evaluate_args);
class Call {
public:
@ -57,9 +60,6 @@ class RbacFilter : public ImplementChannelFilter<RbacFilter> {
};
private:
RbacFilter(size_t index,
EvaluateArgs::PerChannelArgs per_channel_evaluate_args);
// The index of this filter instance among instances of the same filter.
size_t index_;
// Assigned index for service config data from the parser.

@ -49,19 +49,22 @@ namespace grpc_core {
namespace {
class ServerConfigSelectorFilter final
: public ImplementChannelFilter<ServerConfigSelectorFilter> {
: public ImplementChannelFilter<ServerConfigSelectorFilter>,
public InternallyRefCounted<ServerConfigSelectorFilter> {
public:
~ServerConfigSelectorFilter() override;
explicit ServerConfigSelectorFilter(
RefCountedPtr<ServerConfigSelectorProvider>
server_config_selector_provider);
ServerConfigSelectorFilter(const ServerConfigSelectorFilter&) = delete;
ServerConfigSelectorFilter& operator=(const ServerConfigSelectorFilter&) =
delete;
ServerConfigSelectorFilter(ServerConfigSelectorFilter&&) = default;
ServerConfigSelectorFilter& operator=(ServerConfigSelectorFilter&&) = default;
static absl::StatusOr<ServerConfigSelectorFilter> Create(
static absl::StatusOr<OrphanablePtr<ServerConfigSelectorFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args);
void Orphan() override;
class Call {
public:
absl::Status OnClientInitialMetadata(ClientMetadata& md,
@ -74,70 +77,66 @@ class ServerConfigSelectorFilter final
};
absl::StatusOr<RefCountedPtr<ServerConfigSelector>> config_selector() {
MutexLock lock(&state_->mu);
return state_->config_selector.value();
MutexLock lock(&mu_);
return config_selector_.value();
}
private:
struct State {
Mutex mu;
absl::optional<absl::StatusOr<RefCountedPtr<ServerConfigSelector>>>
config_selector ABSL_GUARDED_BY(mu);
};
class ServerConfigSelectorWatcher
: public ServerConfigSelectorProvider::ServerConfigSelectorWatcher {
public:
explicit ServerConfigSelectorWatcher(std::shared_ptr<State> state)
: state_(state) {}
explicit ServerConfigSelectorWatcher(
RefCountedPtr<ServerConfigSelectorFilter> filter)
: filter_(filter) {}
void OnServerConfigSelectorUpdate(
absl::StatusOr<RefCountedPtr<ServerConfigSelector>> update) override {
MutexLock lock(&state_->mu);
state_->config_selector = std::move(update);
MutexLock lock(&filter_->mu_);
filter_->config_selector_ = std::move(update);
}
private:
std::shared_ptr<State> state_;
RefCountedPtr<ServerConfigSelectorFilter> filter_;
};
explicit ServerConfigSelectorFilter(
RefCountedPtr<ServerConfigSelectorProvider>
server_config_selector_provider);
RefCountedPtr<ServerConfigSelectorProvider> server_config_selector_provider_;
std::shared_ptr<State> state_;
Mutex mu_;
absl::optional<absl::StatusOr<RefCountedPtr<ServerConfigSelector>>>
config_selector_ ABSL_GUARDED_BY(mu_);
};
absl::StatusOr<ServerConfigSelectorFilter> ServerConfigSelectorFilter::Create(
const ChannelArgs& args, ChannelFilter::Args) {
absl::StatusOr<OrphanablePtr<ServerConfigSelectorFilter>>
ServerConfigSelectorFilter::Create(const ChannelArgs& args,
ChannelFilter::Args) {
ServerConfigSelectorProvider* server_config_selector_provider =
args.GetObject<ServerConfigSelectorProvider>();
if (server_config_selector_provider == nullptr) {
return absl::UnknownError("No ServerConfigSelectorProvider object found");
}
return ServerConfigSelectorFilter(server_config_selector_provider->Ref());
return MakeOrphanable<ServerConfigSelectorFilter>(
server_config_selector_provider->Ref());
}
ServerConfigSelectorFilter::ServerConfigSelectorFilter(
RefCountedPtr<ServerConfigSelectorProvider> server_config_selector_provider)
: server_config_selector_provider_(
std::move(server_config_selector_provider)),
state_(std::make_shared<State>()) {
std::move(server_config_selector_provider)) {
GPR_ASSERT(server_config_selector_provider_ != nullptr);
auto server_config_selector_watcher =
std::make_unique<ServerConfigSelectorWatcher>(state_);
std::make_unique<ServerConfigSelectorWatcher>(Ref());
auto config_selector = server_config_selector_provider_->Watch(
std::move(server_config_selector_watcher));
MutexLock lock(&state_->mu);
MutexLock lock(&mu_);
// It's possible for the watcher to have already updated config_selector_
if (!state_->config_selector.has_value()) {
state_->config_selector = std::move(config_selector);
if (!config_selector_.has_value()) {
config_selector_ = std::move(config_selector);
}
}
ServerConfigSelectorFilter::~ServerConfigSelectorFilter() {
void ServerConfigSelectorFilter::Orphan() {
if (server_config_selector_provider_ != nullptr) {
server_config_selector_provider_->CancelWatch();
}
Unref();
}
absl::Status ServerConfigSelectorFilter::Call::OnClientInitialMetadata(

@ -72,9 +72,10 @@ const grpc_channel_filter StatefulSessionFilter::kFilter =
kFilterExaminesServerInitialMetadata>(
"stateful_session_filter");
absl::StatusOr<StatefulSessionFilter> StatefulSessionFilter::Create(
const ChannelArgs&, ChannelFilter::Args filter_args) {
return StatefulSessionFilter(filter_args);
absl::StatusOr<std::unique_ptr<StatefulSessionFilter>>
StatefulSessionFilter::Create(const ChannelArgs&,
ChannelFilter::Args filter_args) {
return std::make_unique<StatefulSessionFilter>(filter_args);
}
StatefulSessionFilter::StatefulSessionFilter(ChannelFilter::Args filter_args)

@ -74,9 +74,11 @@ class StatefulSessionFilter
public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<StatefulSessionFilter> Create(
static absl::StatusOr<std::unique_ptr<StatefulSessionFilter>> Create(
const ChannelArgs& args, ChannelFilter::Args filter_args);
explicit StatefulSessionFilter(ChannelFilter::Args filter_args);
class Call {
public:
void OnClientInitialMetadata(ClientMetadata& md,
@ -97,7 +99,6 @@ class StatefulSessionFilter
};
private:
explicit StatefulSessionFilter(ChannelFilter::Args filter_args);
// The relative index of instances of the same filter.
const size_t index_;
// Index of the service config parser.

@ -28,6 +28,7 @@
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include <grpc/credentials.h>
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
#include <grpc/support/log.h>

@ -5,9 +5,6 @@ DerivePointerAlignment: false
PointerAlignment: Left
IncludeBlocks: Regroup
IncludeCategories:
# port_platform.h is before almost everything
- Regex: '^<grpc/(support|impl/codegen)/port_platform.h>'
Priority: -100
# ruby.h is even more first if it's included
- Regex: '^<ruby/ruby.h>'
Priority: -200

@ -15,8 +15,6 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_BINDER_CONNECTOR_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_BINDER_CONNECTOR_H
#include <grpc/support/port_platform.h>
#include <memory>
#include <utility>
@ -24,6 +22,7 @@
#include "absl/strings/strip.h"
#include <grpc/impl/grpc_types.h>
#include <grpc/support/port_platform.h>
#include <grpcpp/channel.h>
#include <grpcpp/support/channel_arguments.h>

@ -34,13 +34,12 @@
#ifdef GPR_SUPPORT_BINDER_TRANSPORT
#include <grpc/support/port_platform.h>
#include "absl/memory/memory.h"
#include "absl/strings/substitute.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include <grpc/support/port_platform.h>
#include <grpcpp/impl/grpc_library.h>
#include "src/core/client_channel/client_channel_filter.h"

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/client/channel_create_impl.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include <memory>

@ -16,7 +16,6 @@
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_CHANNEL_CREATE_IMPL_H
#include <grpc/support/port_platform.h>
#include <grpcpp/security/binder_security_policy.h>
#include "src/core/ext/transport/binder/wire_format/binder.h"

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/client/connection_id_generator.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include "absl/strings/str_cat.h"

@ -15,12 +15,12 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_CONNECTION_ID_GENERATOR_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_CONNECTION_ID_GENERATOR_H
#include <grpc/support/port_platform.h>
#include <map>
#include "absl/strings/string_view.h"
#include <grpc/support/port_platform.h>
#include "src/core/lib/gprpp/sync.h"
namespace grpc_binder {

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/client/endpoint_binder_pool.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include "src/core/ext/transport/binder/client/jni_utils.h"

@ -15,13 +15,13 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_ENDPOINT_BINDER_POOL_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_ENDPOINT_BINDER_POOL_H
#include <grpc/support/port_platform.h>
#include <functional>
#include <string>
#include "absl/container/flat_hash_map.h"
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/binder.h"
#include "src/core/lib/gprpp/sync.h"

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/client/jni_utils.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include <grpc/support/log.h>

@ -17,8 +17,6 @@
#if defined(ANDROID) || defined(__ANDROID__)
#include <grpc/support/port_platform.h>
#include <jni.h>
#include <functional>
@ -26,6 +24,8 @@
#include "absl/strings/string_view.h"
#include <grpc/support/port_platform.h>
namespace grpc_binder {
// Finds NativeConnectionHelper Java class and caches it. This is useful because

@ -15,11 +15,10 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_SECURITY_POLICY_SETTING_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_SECURITY_POLICY_SETTING_H
#include <grpc/support/port_platform.h>
#include "absl/container/flat_hash_map.h"
#include "absl/strings/string_view.h"
#include <grpc/support/port_platform.h>
#include <grpcpp/security/binder_security_policy.h>
#include "src/core/lib/gprpp/sync.h"

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/server/binder_server.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include <memory>

@ -15,13 +15,12 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_SERVER_BINDER_SERVER_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_SERVER_BINDER_SERVER_H
#include <grpc/support/port_platform.h>
#include <string>
#include "absl/container/flat_hash_map.h"
#include "absl/status/status.h"
#include <grpc/support/port_platform.h>
#include <grpcpp/security/binder_security_policy.h>
#include "src/core/ext/transport/binder/transport/binder_transport.h"

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/transport/binder_transport.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include <cstdint>

@ -15,8 +15,6 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_TRANSPORT_BINDER_TRANSPORT_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_TRANSPORT_BINDER_TRANSPORT_H
#include <grpc/support/port_platform.h>
#include <atomic>
#include <memory>
#include <string>
@ -26,6 +24,7 @@
#include "absl/container/flat_hash_map.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include <grpcpp/security/binder_security_policy.h>
#include "src/core/ext/transport/binder/utils/transport_stream_receiver.h"

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/utils/ndk_binder.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#ifdef GPR_SUPPORT_BINDER_TRANSPORT

@ -15,14 +15,14 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_H
#include <grpc/support/port_platform.h>
#include <functional>
#include <string>
#include <vector>
#include "absl/status/statusor.h"
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/transaction.h"
namespace grpc_binder {

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include <functional>

@ -15,8 +15,6 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_IMPL_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_IMPL_H
#include <grpc/support/port_platform.h>
#include <functional>
#include <map>
#include <queue>
@ -24,6 +22,8 @@
#include <string>
#include <vector>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/utils/transport_stream_receiver.h"
#include "src/core/lib/gprpp/sync.h"

@ -15,8 +15,6 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_H
#include <grpc/support/port_platform.h>
#include <cstdint>
#include <functional>
#include <memory>
@ -25,6 +23,8 @@
#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/binder_constants.h"
#include "src/core/lib/gprpp/orphanable.h"

@ -15,12 +15,12 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_CONSTANTS_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_CONSTANTS_H
#include <grpc/support/port_platform.h>
#include <cstdint>
#include "absl/base/attributes.h"
#include <grpc/support/port_platform.h>
using transaction_code_t = uint32_t;
ABSL_CONST_INIT extern const int FIRST_CALL_TRANSACTION;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save