grpc 1.83.1 → 1.84.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +21 -17
  3. data/include/grpc/credentials.h +10 -0
  4. data/include/grpc/grpc_security_constants.h +2 -0
  5. data/include/grpc/impl/channel_arg_names.h +9 -0
  6. data/src/core/call/call_filters.h +4 -2
  7. data/src/core/call/client_call.cc +20 -8
  8. data/src/core/call/client_call.h +4 -0
  9. data/src/core/call/interception_chain.cc +2 -0
  10. data/src/core/call/interception_chain.h +14 -1
  11. data/src/core/call/metadata.cc +1 -3
  12. data/src/core/call/metadata_batch.h +13 -5
  13. data/src/core/call/server_call.cc +31 -14
  14. data/src/core/call/server_call.h +4 -0
  15. data/src/core/channelz/text_encode.cc +9 -4
  16. data/src/core/channelz/v2tov1/convert.cc +2 -2
  17. data/src/core/client_channel/backup_poller.cc +1 -2
  18. data/src/core/client_channel/client_channel.cc +6 -33
  19. data/src/core/client_channel/client_channel_filter.cc +22 -55
  20. data/src/core/client_channel/client_channel_filter.h +2 -2
  21. data/src/core/client_channel/client_channel_service_config.cc +3 -19
  22. data/src/core/client_channel/direct_channel.cc +7 -1
  23. data/src/core/client_channel/direct_channel.h +2 -2
  24. data/src/core/client_channel/load_balanced_call_destination.cc +5 -3
  25. data/src/core/client_channel/retry_filter_legacy_call_data.cc +5 -12
  26. data/src/core/client_channel/subchannel.cc +310 -1058
  27. data/src/core/client_channel/subchannel.h +44 -329
  28. data/src/core/client_channel/subchannel_metrics.cc +48 -0
  29. data/src/core/client_channel/subchannel_metrics.h +60 -0
  30. data/src/core/credentials/call/external/file_external_account_credentials.cc +1 -1
  31. data/src/core/credentials/call/external/url_external_account_credentials.cc +2 -3
  32. data/src/core/credentials/call/gcp_service_account_identity/gcp_service_account_identity_credentials.cc +8 -24
  33. data/src/core/credentials/call/gcp_service_account_identity/gcp_service_account_identity_credentials.h +3 -6
  34. data/src/core/credentials/call/gdch_service_account/gdch_service_account_credentials.cc +525 -0
  35. data/src/core/credentials/call/gdch_service_account/gdch_service_account_credentials.h +138 -0
  36. data/src/core/credentials/call/json_util.h +1 -0
  37. data/src/core/credentials/call/jwt/json_token.cc +10 -2
  38. data/src/core/credentials/call/jwt/jwt_verifier.cc +15 -1
  39. data/src/core/credentials/call/jwt_token_file/jwt_token_file_call_credentials.cc +1 -1
  40. data/src/core/credentials/call/oauth2/oauth2_credentials.cc +42 -79
  41. data/src/core/credentials/call/oauth2/oauth2_credentials.h +2 -5
  42. data/src/core/credentials/call/token_fetcher/token_fetcher_credentials.cc +52 -31
  43. data/src/core/credentials/call/token_fetcher/token_fetcher_credentials.h +21 -8
  44. data/src/core/credentials/transport/google_default/google_default_credentials.cc +3 -4
  45. data/src/core/credentials/transport/ssl/ssl_credentials.cc +59 -72
  46. data/src/core/credentials/transport/ssl/ssl_credentials.h +9 -8
  47. data/src/core/credentials/transport/ssl/ssl_security_connector.cc +12 -6
  48. data/src/core/credentials/transport/ssl/ssl_security_connector.h +4 -4
  49. data/src/core/credentials/transport/tls/grpc_tls_certificate_distributor.cc +29 -18
  50. data/src/core/credentials/transport/tls/grpc_tls_certificate_distributor.h +9 -6
  51. data/src/core/credentials/transport/tls/grpc_tls_certificate_provider.cc +45 -56
  52. data/src/core/credentials/transport/tls/grpc_tls_certificate_provider.h +5 -4
  53. data/src/core/credentials/transport/tls/grpc_tls_certificate_selector.h +26 -0
  54. data/src/core/credentials/transport/tls/grpc_tls_crl_provider.cc +1 -1
  55. data/src/core/credentials/transport/tls/load_system_roots.h +2 -6
  56. data/src/core/credentials/transport/tls/load_system_roots_fallback.cc +2 -4
  57. data/src/core/credentials/transport/tls/load_system_roots_supported.cc +13 -15
  58. data/src/core/credentials/transport/tls/load_system_roots_supported.h +3 -2
  59. data/src/core/credentials/transport/tls/load_system_roots_windows.cc +5 -8
  60. data/src/core/credentials/transport/tls/spiffe_utils.cc +1 -1
  61. data/src/core/credentials/transport/tls/ssl_utils.cc +39 -28
  62. data/src/core/credentials/transport/tls/ssl_utils.h +12 -49
  63. data/src/core/credentials/transport/tls/tls_security_connector.cc +48 -33
  64. data/src/core/credentials/transport/tls/tls_security_connector.h +31 -10
  65. data/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc +15 -11
  66. data/src/core/ext/filters/http/http_filters_plugin.cc +20 -9
  67. data/src/core/ext/filters/rbac/rbac_filter.cc +43 -21
  68. data/src/core/ext/filters/rbac/rbac_filter.h +21 -3
  69. data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +2 -2
  70. data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +1 -1
  71. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +6 -20
  72. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +32 -67
  73. data/src/core/ext/transport/chttp2/transport/flow_control.cc +2 -0
  74. data/src/core/ext/transport/chttp2/transport/flow_control.h +78 -4
  75. data/src/core/ext/transport/chttp2/transport/frame.h +2 -0
  76. data/src/core/ext/transport/chttp2/transport/frame_data.cc +3 -4
  77. data/src/core/ext/transport/chttp2/transport/goaway.h +7 -0
  78. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +5 -3
  79. data/src/core/ext/transport/chttp2/transport/hpack_parser.h +3 -1
  80. data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +141 -130
  81. data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +22 -22
  82. data/src/core/ext/transport/chttp2/transport/http2_server_transport.cc +402 -269
  83. data/src/core/ext/transport/chttp2/transport/http2_server_transport.h +80 -49
  84. data/src/core/ext/transport/chttp2/transport/http2_settings_promises.h +1 -2
  85. data/src/core/ext/transport/chttp2/transport/http2_status.h +38 -37
  86. data/src/core/ext/transport/chttp2/transport/http2_transport.cc +178 -5
  87. data/src/core/ext/transport/chttp2/transport/http2_transport.h +345 -5
  88. data/src/core/ext/transport/chttp2/transport/parsing.cc +5 -5
  89. data/src/core/ext/transport/chttp2/transport/ping_promise.cc +3 -2
  90. data/src/core/ext/transport/chttp2/transport/ping_promise.h +25 -5
  91. data/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +3 -4
  92. data/src/core/ext/transport/chttp2/transport/read_context.h +30 -3
  93. data/src/core/ext/transport/chttp2/transport/stream.h +65 -23
  94. data/src/core/ext/transport/chttp2/transport/writing.cc +0 -3
  95. data/src/core/ext/transport/inproc/inproc_transport.cc +1 -5
  96. data/src/core/ext/transport/inproc/legacy_inproc_transport.cc +4 -17
  97. data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb.h +1912 -0
  98. data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb_minitable.c +300 -0
  99. data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb_minitable.h +37 -0
  100. data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upb.h +187 -0
  101. data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upb_minitable.c +64 -0
  102. data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upb_minitable.h +31 -0
  103. data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb.h +2362 -0
  104. data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.c +556 -0
  105. data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.h +47 -0
  106. data/src/core/ext/upb-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upb.h +5 -5
  107. data/src/core/ext/upb-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upb_minitable.c +3 -3
  108. data/src/core/ext/upb-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upb_minitable.h +5 -5
  109. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upbdefs.c +453 -0
  110. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upbdefs.h +67 -0
  111. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upbdefs.c +142 -0
  112. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upbdefs.h +37 -0
  113. data/src/core/ext/upbdefs-gen/grpc/channelz/v1/channelz.upbdefs.c +715 -0
  114. data/src/core/ext/upbdefs-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upbdefs.h +44 -44
  115. data/src/core/filter/auth/server_auth_filter.cc +2 -3
  116. data/src/core/filter/composite/composite_filter.cc +45 -33
  117. data/src/core/filter/composite/composite_filter.h +5 -4
  118. data/src/core/filter/ext_proc/ext_proc_filter.cc +224 -0
  119. data/src/core/filter/ext_proc/ext_proc_filter.h +155 -0
  120. data/src/core/filter/ext_proc/ext_proc_messages.cc +701 -0
  121. data/src/core/filter/ext_proc/ext_proc_messages.h +297 -0
  122. data/src/core/filter/filter_args.h +13 -2
  123. data/src/core/handshaker/http_connect/http_proxy_mapper.cc +30 -3
  124. data/src/core/handshaker/security/security_handshaker.cc +9 -6
  125. data/src/core/lib/channel/channel_stack.cc +3 -0
  126. data/src/core/lib/channel/channel_stack.h +2 -0
  127. data/src/core/lib/channel/channel_stack_builder_impl.cc +1 -2
  128. data/src/core/lib/channel/promise_based_filter.cc +132 -20
  129. data/src/core/lib/channel/promise_based_filter.h +42 -12
  130. data/src/core/lib/compression/compression_internal.cc +4 -5
  131. data/src/core/lib/debug/trace_flags.cc +8 -0
  132. data/src/core/lib/debug/trace_flags.h +3 -0
  133. data/src/core/lib/event_engine/ares_resolver.cc +54 -50
  134. data/src/core/lib/event_engine/ares_resolver.h +3 -2
  135. data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +3 -3
  136. data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +4 -10
  137. data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +74 -33
  138. data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +4 -4
  139. data/src/core/lib/event_engine/posix_engine/posix_engine.cc +6 -2
  140. data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +3 -0
  141. data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +3 -0
  142. data/src/core/lib/event_engine/windows/windows_endpoint.cc +1 -3
  143. data/src/core/lib/experiments/experiments.cc +60 -96
  144. data/src/core/lib/experiments/experiments.h +34 -50
  145. data/src/core/lib/iomgr/cfstream_handle.cc +2 -6
  146. data/src/core/lib/iomgr/endpoint_cfstream.cc +3 -10
  147. data/src/core/lib/iomgr/error.cc +2 -6
  148. data/src/core/lib/iomgr/error_cfstream.cc +1 -1
  149. data/src/core/lib/iomgr/ev_poll_posix.cc +5 -9
  150. data/src/core/lib/iomgr/event_engine_shims/closure.cc +1 -1
  151. data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +1 -2
  152. data/src/core/lib/iomgr/event_engine_shims/tcp_client.cc +1 -2
  153. data/src/core/lib/iomgr/iomgr_posix.cc +0 -4
  154. data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +0 -4
  155. data/src/core/lib/iomgr/iomgr_windows.cc +0 -4
  156. data/src/core/lib/iomgr/socket_factory_posix.h +1 -1
  157. data/src/core/lib/iomgr/socket_utils_posix.cc +3 -0
  158. data/src/core/lib/iomgr/socket_utils_posix.h +3 -0
  159. data/src/core/lib/iomgr/systemd_utils.cc +0 -1
  160. data/src/core/lib/iomgr/tcp_client.h +1 -1
  161. data/src/core/lib/iomgr/tcp_posix.cc +23 -15
  162. data/src/core/lib/iomgr/tcp_server.h +1 -1
  163. data/src/core/lib/iomgr/tcp_server_posix.cc +2 -3
  164. data/src/core/lib/iomgr/tcp_server_utils_posix.h +0 -1
  165. data/src/core/lib/iomgr/tcp_server_windows.cc +0 -1
  166. data/src/core/lib/iomgr/tcp_windows.cc +5 -10
  167. data/src/core/lib/iomgr/unix_sockets_posix.cc +2 -4
  168. data/src/core/lib/iomgr/unix_sockets_posix.h +3 -1
  169. data/src/core/lib/iomgr/vsock.h +3 -1
  170. data/src/core/lib/resource_quota/memory_quota.cc +1 -1
  171. data/src/core/lib/security/authorization/rbac_policy.cc +139 -56
  172. data/src/core/lib/security/authorization/rbac_policy.h +21 -3
  173. data/src/core/lib/surface/call.cc +3 -9
  174. data/src/core/lib/surface/call_utils.h +113 -0
  175. data/src/core/lib/surface/channel_create.cc +1 -1
  176. data/src/core/lib/surface/channel_create.h +0 -2
  177. data/src/core/lib/surface/channel_init.cc +77 -38
  178. data/src/core/lib/surface/channel_init.h +30 -16
  179. data/src/core/lib/surface/filter_stack_call.cc +5 -10
  180. data/src/core/lib/surface/init.cc +13 -27
  181. data/src/core/lib/surface/version.cc +1 -1
  182. data/src/core/lib/transport/error_utils.cc +0 -27
  183. data/src/core/lib/transport/error_utils.h +0 -16
  184. data/src/core/lib/transport/transport.h +7 -5
  185. data/src/core/load_balancing/pick_first/pick_first.cc +2 -0
  186. data/src/core/load_balancing/rls/rls.cc +28 -11
  187. data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc +33 -42
  188. data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.h +0 -2
  189. data/src/core/load_balancing/xds/cds.cc +3 -1
  190. data/src/core/load_balancing/xds/xds_cluster_impl.cc +0 -1
  191. data/src/core/mitigation_engine/mitigation.h +14 -5
  192. data/src/core/mitigation_engine/mitigation_engine.h +7 -3
  193. data/src/core/mitigation_engine/mitigation_provider.h +2 -1
  194. data/src/core/plugin_registry/grpc_plugin_registry.cc +39 -8
  195. data/src/core/resolver/dns/{event_engine/event_engine_client_channel_resolver.cc → dns_resolver.cc} +42 -41
  196. data/src/core/resolver/dns/{event_engine/event_engine_client_channel_resolver.h → dns_resolver.h} +8 -5
  197. data/src/core/resolver/dns/{event_engine/service_config_helper.cc → service_config_helper.cc} +1 -1
  198. data/src/core/resolver/dns/{event_engine/service_config_helper.h → service_config_helper.h} +3 -3
  199. data/src/core/resolver/endpoint_addresses.h +3 -0
  200. data/src/core/resolver/google_c2p/google_c2p_resolver.cc +2 -1
  201. data/src/core/resolver/xds/xds_resolver.cc +35 -9
  202. data/src/core/server/server.cc +2 -6
  203. data/src/core/server/server_config_selector.h +18 -3
  204. data/src/core/server/server_config_selector_filter.cc +178 -91
  205. data/src/core/server/server_config_selector_filter.h +58 -3
  206. data/src/core/server/xds_server_config_fetcher.cc +196 -129
  207. data/src/core/server/xds_server_config_fetcher.h +49 -0
  208. data/src/core/server/xds_server_config_fetcher_legacy.cc +41 -37
  209. data/src/core/telemetry/histogram.h +94 -14
  210. data/src/core/telemetry/instrument.cc +179 -74
  211. data/src/core/telemetry/instrument.h +78 -30
  212. data/src/core/telemetry/metrics.h +5 -0
  213. data/src/core/{resolver/dns/dns_resolver_plugin.h → telemetry/telemetry_label.h} +12 -8
  214. data/src/core/tsi/alts/crypt/aes_gcm.cc +10 -13
  215. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +2 -2
  216. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +3 -1
  217. data/src/core/tsi/ssl_telemetry_utils.cc +216 -259
  218. data/src/core/tsi/ssl_telemetry_utils.h +12 -2
  219. data/src/core/tsi/ssl_transport_security.cc +238 -80
  220. data/src/core/tsi/ssl_transport_security.h +63 -33
  221. data/src/core/tsi/tls_telemetry.cc +31 -0
  222. data/src/core/tsi/tls_telemetry.h +47 -0
  223. data/src/core/tsi/transport_security.cc +2 -2
  224. data/src/core/tsi/transport_security.h +1 -1
  225. data/src/core/tsi/transport_security_interface.h +1 -1
  226. data/src/core/{resolver/dns/native/dns_resolver.h → util/address_sorting_init.cc} +21 -8
  227. data/src/core/{resolver/dns/c_ares/grpc_ares_wrapper_posix.cc → util/address_sorting_init.h} +7 -8
  228. data/src/core/util/http_client/httpcli.cc +16 -53
  229. data/src/core/util/http_client/httpcli.h +0 -7
  230. data/src/core/util/http_client/httpcli_security_connector.cc +13 -8
  231. data/src/core/util/linux/cpu.cc +1 -1
  232. data/src/core/util/load_file.cc +3 -9
  233. data/src/core/util/load_file.h +3 -4
  234. data/src/core/util/matchers.h +8 -0
  235. data/src/core/util/posix/cpu.cc +1 -1
  236. data/src/core/util/status_helper.cc +0 -20
  237. data/src/core/util/status_helper.h +3 -14
  238. data/src/core/xds/grpc/xds_audit_logger_registry.cc +51 -31
  239. data/src/core/xds/grpc/xds_audit_logger_registry.h +17 -3
  240. data/src/core/xds/grpc/xds_bootstrap_grpc.cc +2 -10
  241. data/src/core/xds/grpc/xds_bootstrap_grpc.h +8 -6
  242. data/src/core/xds/grpc/xds_bootstrap_grpc_builder.cc +488 -0
  243. data/src/core/xds/grpc/xds_bootstrap_grpc_builder.h +97 -0
  244. data/src/core/xds/grpc/xds_certificate_provider.cc +7 -7
  245. data/src/core/xds/grpc/xds_client_grpc.cc +4 -8
  246. data/src/core/xds/grpc/xds_client_grpc.h +0 -4
  247. data/src/core/xds/grpc/xds_cluster.h +1 -0
  248. data/src/core/xds/grpc/xds_cluster_parser.cc +1 -5
  249. data/src/core/xds/grpc/xds_cluster_parser.h +0 -2
  250. data/src/core/xds/grpc/xds_cluster_specifier_plugin.cc +0 -2
  251. data/src/core/xds/grpc/xds_cluster_specifier_plugin.h +0 -2
  252. data/src/core/xds/grpc/xds_common_types.cc +0 -91
  253. data/src/core/xds/grpc/xds_common_types.h +1 -47
  254. data/src/core/xds/grpc/xds_common_types_parser.cc +84 -378
  255. data/src/core/xds/grpc/xds_common_types_parser.h +9 -11
  256. data/src/core/xds/grpc/xds_endpoint_parser.cc +0 -2
  257. data/src/core/xds/grpc/xds_grpc_service_parser.cc +177 -0
  258. data/src/core/{resolver/dns/c_ares/dns_resolver_ares.h → xds/grpc/xds_grpc_service_parser.h} +14 -9
  259. data/src/core/xds/grpc/xds_http_composite_filter.cc +26 -21
  260. data/src/core/xds/grpc/xds_http_composite_filter.h +4 -3
  261. data/src/core/xds/grpc/xds_http_ext_proc_filter.cc +418 -0
  262. data/src/core/xds/grpc/xds_http_ext_proc_filter.h +89 -0
  263. data/src/core/xds/grpc/xds_http_fault_filter.cc +9 -12
  264. data/src/core/xds/grpc/xds_http_fault_filter.h +1 -4
  265. data/src/core/xds/grpc/xds_http_filter.cc +2 -1
  266. data/src/core/xds/grpc/xds_http_filter.h +6 -5
  267. data/src/core/xds/grpc/xds_http_filter_registry.cc +10 -127
  268. data/src/core/xds/grpc/xds_http_filter_registry.h +7 -59
  269. data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +13 -14
  270. data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +3 -2
  271. data/src/core/xds/grpc/xds_http_rbac_filter.cc +403 -25
  272. data/src/core/xds/grpc/xds_http_rbac_filter.h +1 -3
  273. data/src/core/xds/grpc/xds_http_stateful_session_filter.cc +8 -13
  274. data/src/core/xds/grpc/xds_http_stateful_session_filter.h +1 -4
  275. data/src/core/xds/grpc/xds_lb_policy_registry.cc +0 -292
  276. data/src/core/xds/grpc/xds_lb_policy_registry.h +7 -3
  277. data/src/core/xds/grpc/xds_listener.cc +2 -0
  278. data/src/core/xds/grpc/xds_listener.h +5 -0
  279. data/src/core/xds/grpc/xds_listener_parser.cc +16 -11
  280. data/src/core/xds/grpc/xds_matcher_parse.h +3 -1
  281. data/src/core/xds/grpc/xds_metadata_parser.cc +6 -1
  282. data/src/core/xds/grpc/xds_metadata_parser.h +2 -0
  283. data/src/core/xds/grpc/xds_route_config.cc +2 -0
  284. data/src/core/xds/grpc/xds_route_config.h +3 -1
  285. data/src/core/xds/grpc/xds_route_config_parser.cc +13 -79
  286. data/src/core/xds/grpc/xds_route_config_parser.h +0 -3
  287. data/src/core/xds/grpc/xds_routing.cc +116 -69
  288. data/src/core/xds/grpc/xds_routing.h +19 -8
  289. data/src/core/xds/grpc/xds_tls_context.cc +117 -0
  290. data/src/core/xds/grpc/xds_tls_context.h +76 -0
  291. data/src/core/xds/grpc/xds_tls_context_parser.cc +275 -0
  292. data/src/core/xds/grpc/xds_tls_context_parser.h +35 -0
  293. data/src/core/xds/grpc/xds_transport_grpc.cc +41 -38
  294. data/src/core/xds/grpc/xds_transport_grpc.h +4 -2
  295. data/src/ruby/ext/grpc/rb_call.c +26 -15
  296. data/src/ruby/ext/grpc/rb_completion_queue.c +6 -5
  297. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +2 -0
  298. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +3 -0
  299. data/src/ruby/lib/grpc/version.rb +1 -1
  300. data/src/ruby/pb/test/client.rb +5 -4
  301. data/src/ruby/spec/call_spec.rb +14 -0
  302. data/src/ruby/spec/generic/server_interceptors_spec.rb +3 -6
  303. metadata +50 -35
  304. data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/channelz.upbdefs.c +0 -716
  305. data/src/core/lib/iomgr/resolve_address.cc +0 -59
  306. data/src/core/lib/iomgr/resolve_address.h +0 -125
  307. data/src/core/lib/iomgr/resolve_address_impl.h +0 -58
  308. data/src/core/lib/iomgr/resolve_address_posix.cc +0 -184
  309. data/src/core/lib/iomgr/resolve_address_posix.h +0 -78
  310. data/src/core/lib/iomgr/resolve_address_windows.cc +0 -169
  311. data/src/core/lib/iomgr/resolve_address_windows.h +0 -76
  312. data/src/core/resolver/dns/c_ares/dns_resolver_ares.cc +0 -781
  313. data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h +0 -93
  314. data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +0 -203
  315. data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +0 -838
  316. data/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc +0 -1237
  317. data/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h +0 -130
  318. data/src/core/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +0 -35
  319. data/src/core/resolver/dns/dns_resolver_plugin.cc +0 -64
  320. data/src/core/resolver/dns/native/dns_resolver.cc +0 -173
  321. data/src/core/util/json/json_util.cc +0 -101
  322. data/src/core/util/json/json_util.h +0 -163
@@ -1,6 +1,6 @@
1
1
  /* This file was generated by upb_generator from the input file:
2
2
  *
3
- * src/proto/grpc/channelz/channelz.proto
3
+ * grpc/channelz/v1/channelz.proto
4
4
  *
5
5
  * Do not edit -- your changes will be discarded when the file is
6
6
  * regenerated.
@@ -8,8 +8,8 @@
8
8
 
9
9
 
10
10
 
11
- #ifndef SRC_PROTO_GRPC_CHANNELZ_CHANNELZ_PROTO_UPB_H__UPBDEFS_H_
12
- #define SRC_PROTO_GRPC_CHANNELZ_CHANNELZ_PROTO_UPB_H__UPBDEFS_H_
11
+ #ifndef GRPC_CHANNELZ_V1_CHANNELZ_PROTO_UPB_H__UPBDEFS_H_
12
+ #define GRPC_CHANNELZ_V1_CHANNELZ_PROTO_UPB_H__UPBDEFS_H_
13
13
 
14
14
  #include "upb/reflection/def.h"
15
15
  #include "upb/reflection/internal/def_pool.h"
@@ -20,200 +20,200 @@
20
20
  extern "C" {
21
21
  #endif
22
22
 
23
- extern _upb_DefPool_Init src_proto_grpc_channelz_channelz_proto_upbdefinit;
23
+ extern _upb_DefPool_Init grpc_channelz_v1_channelz_proto_upbdefinit;
24
24
 
25
25
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_Channel_getmsgdef(upb_DefPool *s) {
26
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
26
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
27
27
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.Channel");
28
28
  }
29
29
 
30
30
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_Subchannel_getmsgdef(upb_DefPool *s) {
31
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
31
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
32
32
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.Subchannel");
33
33
  }
34
34
 
35
35
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_ChannelConnectivityState_getmsgdef(upb_DefPool *s) {
36
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
36
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
37
37
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.ChannelConnectivityState");
38
38
  }
39
39
 
40
40
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_ChannelData_getmsgdef(upb_DefPool *s) {
41
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
41
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
42
42
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.ChannelData");
43
43
  }
44
44
 
45
45
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_ChannelTraceEvent_getmsgdef(upb_DefPool *s) {
46
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
46
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
47
47
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.ChannelTraceEvent");
48
48
  }
49
49
 
50
50
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_ChannelTrace_getmsgdef(upb_DefPool *s) {
51
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
51
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
52
52
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.ChannelTrace");
53
53
  }
54
54
 
55
55
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_ChannelRef_getmsgdef(upb_DefPool *s) {
56
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
56
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
57
57
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.ChannelRef");
58
58
  }
59
59
 
60
60
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_SubchannelRef_getmsgdef(upb_DefPool *s) {
61
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
61
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
62
62
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.SubchannelRef");
63
63
  }
64
64
 
65
65
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_SocketRef_getmsgdef(upb_DefPool *s) {
66
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
66
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
67
67
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.SocketRef");
68
68
  }
69
69
 
70
70
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_ServerRef_getmsgdef(upb_DefPool *s) {
71
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
71
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
72
72
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.ServerRef");
73
73
  }
74
74
 
75
75
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_Server_getmsgdef(upb_DefPool *s) {
76
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
76
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
77
77
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.Server");
78
78
  }
79
79
 
80
80
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_ServerData_getmsgdef(upb_DefPool *s) {
81
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
81
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
82
82
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.ServerData");
83
83
  }
84
84
 
85
85
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_Socket_getmsgdef(upb_DefPool *s) {
86
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
86
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
87
87
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.Socket");
88
88
  }
89
89
 
90
90
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_SocketData_getmsgdef(upb_DefPool *s) {
91
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
91
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
92
92
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.SocketData");
93
93
  }
94
94
 
95
95
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_Address_getmsgdef(upb_DefPool *s) {
96
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
96
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
97
97
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.Address");
98
98
  }
99
99
 
100
100
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_Address_TcpIpAddress_getmsgdef(upb_DefPool *s) {
101
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
101
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
102
102
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.Address.TcpIpAddress");
103
103
  }
104
104
 
105
105
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_Address_UdsAddress_getmsgdef(upb_DefPool *s) {
106
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
106
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
107
107
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.Address.UdsAddress");
108
108
  }
109
109
 
110
110
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_Address_OtherAddress_getmsgdef(upb_DefPool *s) {
111
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
111
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
112
112
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.Address.OtherAddress");
113
113
  }
114
114
 
115
115
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_Security_getmsgdef(upb_DefPool *s) {
116
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
116
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
117
117
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.Security");
118
118
  }
119
119
 
120
120
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_Security_Tls_getmsgdef(upb_DefPool *s) {
121
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
121
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
122
122
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.Security.Tls");
123
123
  }
124
124
 
125
125
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_Security_OtherSecurity_getmsgdef(upb_DefPool *s) {
126
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
126
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
127
127
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.Security.OtherSecurity");
128
128
  }
129
129
 
130
130
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_SocketOption_getmsgdef(upb_DefPool *s) {
131
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
131
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
132
132
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.SocketOption");
133
133
  }
134
134
 
135
135
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_SocketOptionTimeout_getmsgdef(upb_DefPool *s) {
136
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
136
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
137
137
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.SocketOptionTimeout");
138
138
  }
139
139
 
140
140
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_SocketOptionLinger_getmsgdef(upb_DefPool *s) {
141
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
141
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
142
142
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.SocketOptionLinger");
143
143
  }
144
144
 
145
145
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_SocketOptionTcpInfo_getmsgdef(upb_DefPool *s) {
146
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
146
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
147
147
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.SocketOptionTcpInfo");
148
148
  }
149
149
 
150
150
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetTopChannelsRequest_getmsgdef(upb_DefPool *s) {
151
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
151
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
152
152
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetTopChannelsRequest");
153
153
  }
154
154
 
155
155
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetTopChannelsResponse_getmsgdef(upb_DefPool *s) {
156
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
156
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
157
157
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetTopChannelsResponse");
158
158
  }
159
159
 
160
160
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetServersRequest_getmsgdef(upb_DefPool *s) {
161
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
161
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
162
162
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetServersRequest");
163
163
  }
164
164
 
165
165
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetServersResponse_getmsgdef(upb_DefPool *s) {
166
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
166
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
167
167
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetServersResponse");
168
168
  }
169
169
 
170
170
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetServerRequest_getmsgdef(upb_DefPool *s) {
171
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
171
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
172
172
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetServerRequest");
173
173
  }
174
174
 
175
175
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetServerResponse_getmsgdef(upb_DefPool *s) {
176
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
176
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
177
177
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetServerResponse");
178
178
  }
179
179
 
180
180
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetServerSocketsRequest_getmsgdef(upb_DefPool *s) {
181
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
181
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
182
182
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetServerSocketsRequest");
183
183
  }
184
184
 
185
185
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetServerSocketsResponse_getmsgdef(upb_DefPool *s) {
186
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
186
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
187
187
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetServerSocketsResponse");
188
188
  }
189
189
 
190
190
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetChannelRequest_getmsgdef(upb_DefPool *s) {
191
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
191
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
192
192
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetChannelRequest");
193
193
  }
194
194
 
195
195
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetChannelResponse_getmsgdef(upb_DefPool *s) {
196
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
196
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
197
197
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetChannelResponse");
198
198
  }
199
199
 
200
200
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetSubchannelRequest_getmsgdef(upb_DefPool *s) {
201
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
201
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
202
202
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetSubchannelRequest");
203
203
  }
204
204
 
205
205
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetSubchannelResponse_getmsgdef(upb_DefPool *s) {
206
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
206
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
207
207
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetSubchannelResponse");
208
208
  }
209
209
 
210
210
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetSocketRequest_getmsgdef(upb_DefPool *s) {
211
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
211
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
212
212
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetSocketRequest");
213
213
  }
214
214
 
215
215
  UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetSocketResponse_getmsgdef(upb_DefPool *s) {
216
- _upb_DefPool_LoadDefInit(s, &src_proto_grpc_channelz_channelz_proto_upbdefinit);
216
+ _upb_DefPool_LoadDefInit(s, &grpc_channelz_v1_channelz_proto_upbdefinit);
217
217
  return upb_DefPool_FindMessageByName(s, "grpc.channelz.v1.GetSocketResponse");
218
218
  }
219
219
 
@@ -224,4 +224,4 @@ UPB_INLINE const upb_MessageDef *grpc_channelz_v1_GetSocketResponse_getmsgdef(up
224
224
 
225
225
  #include "upb/port/undef.inc"
226
226
 
227
- #endif /* SRC_PROTO_GRPC_CHANNELZ_CHANNELZ_PROTO_UPB_H__UPBDEFS_H_ */
227
+ #endif /* GRPC_CHANNELZ_V1_CHANNELZ_PROTO_UPB_H__UPBDEFS_H_ */
@@ -164,9 +164,8 @@ void ServerAuthFilter::RunApplicationCode::OnMdProcessingDone(
164
164
  if (error_details == nullptr) {
165
165
  error_details = "Authentication metadata processing failed.";
166
166
  }
167
- state->client_metadata = grpc_error_set_int(
168
- absl::Status(static_cast<absl::StatusCode>(status), error_details),
169
- StatusIntProperty::kRpcStatus, status);
167
+ state->client_metadata =
168
+ absl::Status(static_cast<absl::StatusCode>(status), error_details);
170
169
  }
171
170
 
172
171
  // Clean up.
@@ -64,8 +64,16 @@ absl::StatusOr<RefCountedPtr<CompositeFilter>> CompositeFilter::Create(
64
64
  return absl::InternalError("composite filter config has wrong type");
65
65
  }
66
66
  auto config = filter_args.config().TakeAsSubclass<const Config>();
67
- return MakeRefCounted<CompositeFilter>(args, std::move(config),
68
- std::move(filter_args));
67
+ return MakeRefCounted<CompositeFilter>(args, std::move(config));
68
+ }
69
+
70
+ CompositeFilter::CompositeFilter(const ChannelArgs& args,
71
+ RefCountedPtr<const Config> config)
72
+ : V3InterceptorToV2Bridge<CompositeFilter>(args),
73
+ config_(std::move(config)) {
74
+ if (!args.GetBool(GRPC_ARG_USE_V3_STACK).value_or(false)) {
75
+ Init(args);
76
+ }
69
77
  }
70
78
 
71
79
  namespace {
@@ -92,12 +100,11 @@ class InterceptionChainBuilderWrapper final : public FilterChainBuilder {
92
100
 
93
101
  } // namespace
94
102
 
95
- CompositeFilter::CompositeFilter(const ChannelArgs& args,
96
- RefCountedPtr<const Config> config,
97
- ChannelFilter::Args filter_args)
98
- : config_(std::move(config)) {
103
+ void CompositeFilter::Init(const ChannelArgs& args) {
99
104
  if (config_->matcher == nullptr) return;
100
105
  // Populate filter_chain_map_ from config_.
106
+ const bool is_server =
107
+ args.GetBool(GRPC_ARG_IS_SERVER_FILTER_STACK).value_or(false);
101
108
  config_->matcher->ForEachAction([&](const XdsMatcher::Action& action) {
102
109
  if (action.type() != ExecuteFilterAction::Type()) return;
103
110
  const auto& execute_filter_action =
@@ -110,31 +117,36 @@ CompositeFilter::CompositeFilter(const ChannelArgs& args,
110
117
  InterceptionChainBuilder builder(args);
111
118
  InterceptionChainBuilderWrapper builder_wrapper(builder);
112
119
  for (size_t i = 0; i < merged_configs.size(); ++i) {
113
- const auto* filter_impl =
114
- execute_filter_action.filter_chain()[i].filter_impl;
120
+ const auto* factory = execute_filter_action.filter_chain()[i].factory;
115
121
  const auto& filter_config = merged_configs[i];
116
- // TODO(roth): Currently, this code assumes that it is always
117
- // running on the client side, so we'll need to remove this
118
- // assumption in order to make this filter work on the server
119
- // side. There are two ways we might do this:
120
- // 1. If we finish the v3 migration before we need to support this
121
- // filter on the server side, then any filter impl will
122
- // automatically work fine on both the client and server side,
123
- // in which case this problem will go away, and we can remove
124
- // the IsSupportedOnClients() and IsSupportedOnServers()
125
- // methods from the xDS HTTP filter API.
126
- // 2. If we need to support this filter on the server side before
127
- // we finish the v3 migration, then we'll need to add an
128
- // is_client parameter to the xDS HTTP filter AddFilter()
129
- // method, and use that to do this initialization differently
130
- // on client side vs. server side.
131
- if (!filter_impl->IsSupportedOnClients()) {
132
- filter_chain_map_[&execute_filter_action] = absl::UnavailableError(
133
- absl::StrCat(filter_impl->ConfigProtoName(),
134
- " filter not supported on clients"));
135
- return;
122
+ // If a filter is not supported on the client or server side
123
+ // (whichever one we're constructing a filter stack for), then we
124
+ // need to fail filter chain construction. This means that any
125
+ // RPC that uses that filter chain will fail.
126
+ //
127
+ // Ideally, we would catch this case at xDS resource validation
128
+ // time, so that we can reject the invalid update instead of
129
+ // failing RPCs. Unfortunately, the composite filter config can
130
+ // be overridden in an RDS resource, and we don't know at RDS
131
+ // resource validation time whether the RDS resource will be used
132
+ // on the client side or server side, so we can't always catch the
133
+ // problem at resource validation time.
134
+ if (is_server) {
135
+ if (!factory->IsSupportedOnServers()) {
136
+ filter_chain_map_[&execute_filter_action] = absl::UnavailableError(
137
+ absl::StrCat(factory->ConfigProtoName(),
138
+ " filter not supported on servers"));
139
+ return;
140
+ }
141
+ } else {
142
+ if (!factory->IsSupportedOnClients()) {
143
+ filter_chain_map_[&execute_filter_action] = absl::UnavailableError(
144
+ absl::StrCat(factory->ConfigProtoName(),
145
+ " filter not supported on clients"));
146
+ return;
147
+ }
136
148
  }
137
- filter_impl->AddFilter(builder_wrapper, filter_config);
149
+ factory->AddFilter(builder_wrapper, filter_config);
138
150
  }
139
151
  filter_chain_map_[&execute_filter_action] =
140
152
  builder.Build(wrapped_destination());
@@ -152,7 +164,7 @@ void CompositeFilter::InterceptCall(
152
164
  handler.PullClientInitialMetadata(),
153
165
  [handler, self](ClientMetadataHandle metadata) {
154
166
  if (self->config_->matcher == nullptr) {
155
- GRPC_TRACE_LOG(channel, INFO)
167
+ GRPC_TRACE_LOG(composite_filter, INFO)
156
168
  << "[composite " << self.get()
157
169
  << "]: no matcher configured, starting child call";
158
170
  CallInitiator initiator = self->MakeChildCall(
@@ -177,7 +189,7 @@ void CompositeFilter::InterceptCall(
177
189
  // call to the next filter without sending it
178
190
  // through any child filter chain.
179
191
  if (action->type() == SkipFilterAction::Type()) {
180
- GRPC_TRACE_LOG(channel, INFO)
192
+ GRPC_TRACE_LOG(composite_filter, INFO)
181
193
  << "[composite " << self.get()
182
194
  << "]: found SkipFilter, starting child call";
183
195
  CallInitiator initiator = self->MakeChildCall(
@@ -201,7 +213,7 @@ void CompositeFilter::InterceptCall(
201
213
  bool sampled =
202
214
  random_value < execute_filter_action.sample_per_million();
203
215
  if (!sampled) {
204
- GRPC_TRACE_LOG(channel, INFO)
216
+ GRPC_TRACE_LOG(composite_filter, INFO)
205
217
  << "[composite " << self.get()
206
218
  << "]: not sampled, starting child call";
207
219
  CallInitiator initiator = self->MakeChildCall(
@@ -215,7 +227,7 @@ void CompositeFilter::InterceptCall(
215
227
  if (it == self->filter_chain_map_.end()) {
216
228
  return absl::InternalError("no filter chain found for action");
217
229
  }
218
- GRPC_TRACE_LOG(channel, INFO)
230
+ GRPC_TRACE_LOG(composite_filter, INFO)
219
231
  << "[composite " << self.get()
220
232
  << "]: starting call on filter chain";
221
233
  auto& unstarted_destination = it->second;
@@ -58,11 +58,11 @@ class CompositeFilter final : public V3InterceptorToV2Bridge<CompositeFilter> {
58
58
  class ExecuteFilterAction final : public XdsMatcher::Action {
59
59
  public:
60
60
  struct Filter {
61
- const XdsHttpFilterImpl* filter_impl;
61
+ const XdsHttpFilterFactory* factory;
62
62
  RefCountedPtr<const FilterConfig> filter_config;
63
63
 
64
64
  bool operator==(const Filter& other) const {
65
- if (filter_impl != other.filter_impl) return false;
65
+ if (factory != other.factory) return false;
66
66
  if (filter_config == nullptr) return other.filter_config == nullptr;
67
67
  if (other.filter_config == nullptr) return false;
68
68
  return *filter_config == *other.filter_config;
@@ -136,10 +136,11 @@ class CompositeFilter final : public V3InterceptorToV2Bridge<CompositeFilter> {
136
136
  static absl::StatusOr<RefCountedPtr<CompositeFilter>> Create(
137
137
  const ChannelArgs& args, ChannelFilter::Args filter_args);
138
138
 
139
- CompositeFilter(const ChannelArgs& args, RefCountedPtr<const Config> config,
140
- ChannelFilter::Args filter_args);
139
+ CompositeFilter(const ChannelArgs& args, RefCountedPtr<const Config> config);
141
140
 
142
141
  private:
142
+ void Init(const ChannelArgs& args) override;
143
+
143
144
  void Orphaned() override {}
144
145
 
145
146
  void InterceptCall(UnstartedCallHandler unstarted_call_handler) override;