grpc 1.37.0 → 1.45.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

Files changed (2039) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +501 -260
  3. data/etc/roots.pem +335 -326
  4. data/include/grpc/byte_buffer.h +1 -1
  5. data/include/grpc/byte_buffer_reader.h +1 -1
  6. data/include/grpc/event_engine/README.md +38 -0
  7. data/include/grpc/event_engine/endpoint_config.h +43 -0
  8. data/include/grpc/event_engine/event_engine.h +399 -0
  9. data/include/grpc/event_engine/internal/memory_allocator_impl.h +68 -0
  10. data/include/grpc/event_engine/memory_allocator.h +226 -0
  11. data/include/grpc/event_engine/memory_request.h +57 -0
  12. data/include/grpc/event_engine/port.h +39 -0
  13. data/include/grpc/fork.h +1 -1
  14. data/include/grpc/grpc.h +65 -22
  15. data/include/grpc/grpc_posix.h +22 -18
  16. data/include/grpc/grpc_security.h +358 -191
  17. data/include/grpc/grpc_security_constants.h +17 -14
  18. data/include/grpc/impl/codegen/atm.h +5 -3
  19. data/include/grpc/impl/codegen/atm_gcc_atomic.h +2 -0
  20. data/include/grpc/impl/codegen/atm_gcc_sync.h +2 -0
  21. data/include/grpc/impl/codegen/atm_windows.h +2 -0
  22. data/include/grpc/impl/codegen/byte_buffer.h +2 -0
  23. data/include/grpc/impl/codegen/byte_buffer_reader.h +2 -0
  24. data/include/grpc/impl/codegen/compression_types.h +2 -2
  25. data/include/grpc/impl/codegen/connectivity_state.h +2 -0
  26. data/include/grpc/impl/codegen/fork.h +2 -0
  27. data/include/grpc/impl/codegen/gpr_slice.h +2 -0
  28. data/include/grpc/impl/codegen/gpr_types.h +2 -0
  29. data/include/grpc/impl/codegen/grpc_types.h +61 -28
  30. data/include/grpc/impl/codegen/log.h +2 -0
  31. data/include/grpc/impl/codegen/port_platform.h +83 -22
  32. data/include/grpc/impl/codegen/propagation_bits.h +2 -0
  33. data/include/grpc/impl/codegen/slice.h +6 -1
  34. data/include/grpc/impl/codegen/status.h +2 -0
  35. data/include/grpc/impl/codegen/sync.h +8 -5
  36. data/include/grpc/impl/codegen/sync_abseil.h +2 -0
  37. data/include/grpc/impl/codegen/sync_custom.h +2 -0
  38. data/include/grpc/impl/codegen/sync_generic.h +3 -0
  39. data/include/grpc/impl/codegen/sync_posix.h +4 -2
  40. data/include/grpc/impl/codegen/sync_windows.h +2 -0
  41. data/include/grpc/module.modulemap +14 -14
  42. data/include/grpc/slice.h +1 -12
  43. data/include/grpc/status.h +1 -1
  44. data/include/grpc/support/atm.h +1 -1
  45. data/include/grpc/support/atm_gcc_atomic.h +1 -1
  46. data/include/grpc/support/atm_gcc_sync.h +1 -1
  47. data/include/grpc/support/atm_windows.h +1 -1
  48. data/include/grpc/support/log.h +1 -1
  49. data/include/grpc/support/port_platform.h +1 -1
  50. data/include/grpc/support/sync.h +1 -1
  51. data/include/grpc/support/sync_abseil.h +1 -1
  52. data/include/grpc/support/sync_custom.h +1 -1
  53. data/include/grpc/support/sync_generic.h +1 -1
  54. data/include/grpc/support/sync_posix.h +1 -1
  55. data/include/grpc/support/sync_windows.h +1 -1
  56. data/include/grpc/support/time.h +2 -2
  57. data/src/core/ext/filters/census/grpc_context.cc +1 -0
  58. data/src/core/ext/filters/client_channel/backend_metric.cc +24 -27
  59. data/src/core/ext/filters/client_channel/backend_metric.h +4 -3
  60. data/src/core/ext/filters/client_channel/backup_poller.cc +17 -12
  61. data/src/core/ext/filters/client_channel/backup_poller.h +1 -0
  62. data/src/core/ext/filters/client_channel/channel_connectivity.cc +158 -202
  63. data/src/core/ext/filters/client_channel/client_channel.cc +1231 -3574
  64. data/src/core/ext/filters/client_channel/client_channel.h +563 -56
  65. data/src/core/ext/filters/client_channel/client_channel_channelz.cc +6 -5
  66. data/src/core/ext/filters/client_channel/client_channel_channelz.h +2 -2
  67. data/src/core/ext/filters/client_channel/client_channel_factory.cc +2 -1
  68. data/src/core/ext/filters/client_channel/client_channel_factory.h +17 -19
  69. data/src/core/ext/filters/client_channel/client_channel_plugin.cc +19 -22
  70. data/src/core/ext/filters/client_channel/config_selector.cc +2 -1
  71. data/src/core/ext/filters/client_channel/config_selector.h +22 -10
  72. data/src/core/ext/filters/client_channel/connector.h +20 -20
  73. data/src/core/ext/filters/client_channel/dynamic_filters.cc +15 -17
  74. data/src/core/ext/filters/client_channel/dynamic_filters.h +5 -5
  75. data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +2 -22
  76. data/src/core/ext/filters/client_channel/global_subchannel_pool.h +3 -16
  77. data/src/core/ext/filters/client_channel/health/health_check_client.cc +72 -68
  78. data/src/core/ext/filters/client_channel/health/health_check_client.h +38 -36
  79. data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +54 -55
  80. data/src/core/ext/filters/client_channel/http_connect_handshaker.h +10 -2
  81. data/src/core/ext/filters/client_channel/http_proxy.cc +16 -1
  82. data/src/core/ext/filters/client_channel/lb_policy/address_filtering.cc +4 -3
  83. data/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +6 -5
  84. data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +6 -2
  85. data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +12 -24
  86. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +300 -201
  87. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +3 -6
  88. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc +1 -1
  89. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +1 -1
  90. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +3 -4
  91. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +6 -5
  92. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +17 -18
  93. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +4 -4
  94. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +86 -61
  95. data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +73 -68
  96. data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +785 -0
  97. data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h +10 -0
  98. data/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +2551 -0
  99. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +77 -78
  100. data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +19 -14
  101. data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +37 -34
  102. data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +112 -167
  103. data/src/core/ext/filters/client_channel/lb_policy/xds/xds.h +1 -1
  104. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h +1 -1
  105. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +188 -111
  106. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +46 -65
  107. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +198 -312
  108. data/src/core/ext/filters/client_channel/lb_policy.cc +17 -30
  109. data/src/core/ext/filters/client_channel/lb_policy.h +170 -137
  110. data/src/core/ext/filters/client_channel/lb_policy_factory.h +2 -1
  111. data/src/core/ext/filters/client_channel/lb_policy_registry.cc +8 -11
  112. data/src/core/ext/filters/client_channel/lb_policy_registry.h +1 -1
  113. data/src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc +133 -0
  114. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +292 -149
  115. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +23 -12
  116. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc +31 -0
  117. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +24 -19
  118. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +51 -69
  119. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +168 -281
  120. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +39 -26
  121. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc +28 -0
  122. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +2 -2
  123. data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +138 -120
  124. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +42 -47
  125. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +9 -6
  126. data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +102 -79
  127. data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +41 -40
  128. data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +547 -468
  129. data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +42 -253
  130. data/src/core/ext/filters/client_channel/resolver_result_parsing.h +34 -57
  131. data/src/core/ext/filters/client_channel/retry_filter.cc +2640 -0
  132. data/src/core/ext/filters/{workarounds/workaround_cronet_compression_filter.h → client_channel/retry_filter.h} +9 -6
  133. data/src/core/ext/filters/client_channel/retry_service_config.cc +314 -0
  134. data/src/core/ext/filters/client_channel/retry_service_config.h +102 -0
  135. data/src/core/ext/filters/client_channel/retry_throttle.cc +14 -59
  136. data/src/core/ext/filters/client_channel/retry_throttle.h +11 -5
  137. data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +56 -41
  138. data/src/core/ext/filters/client_channel/subchannel.cc +143 -207
  139. data/src/core/ext/filters/client_channel/subchannel.h +43 -62
  140. data/src/core/ext/filters/client_channel/subchannel_pool_interface.cc +22 -7
  141. data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +11 -2
  142. data/src/core/ext/filters/client_idle/client_idle_filter.cc +109 -348
  143. data/src/core/ext/filters/client_idle/idle_filter_state.cc +96 -0
  144. data/src/core/ext/filters/client_idle/idle_filter_state.h +66 -0
  145. data/src/core/ext/filters/deadline/deadline_filter.cc +41 -43
  146. data/src/core/ext/filters/deadline/deadline_filter.h +3 -2
  147. data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +105 -102
  148. data/src/core/ext/filters/fault_injection/service_config_parser.cc +21 -31
  149. data/src/core/ext/filters/fault_injection/service_config_parser.h +11 -5
  150. data/src/core/ext/filters/http/client/http_client_filter.cc +108 -183
  151. data/src/core/ext/filters/http/client_authority_filter.cc +36 -95
  152. data/src/core/ext/filters/http/client_authority_filter.h +23 -5
  153. data/src/core/ext/filters/http/http_filters_plugin.cc +52 -73
  154. data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +67 -157
  155. data/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +43 -56
  156. data/src/core/ext/filters/http/server/http_server_filter.cc +115 -207
  157. data/src/core/ext/filters/max_age/max_age_filter.cc +75 -69
  158. data/src/core/ext/filters/message_size/message_size_filter.cc +63 -69
  159. data/src/core/ext/filters/message_size/message_size_filter.h +11 -4
  160. data/src/core/ext/filters/rbac/rbac_filter.cc +162 -0
  161. data/src/core/ext/filters/rbac/rbac_filter.h +76 -0
  162. data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +606 -0
  163. data/src/core/ext/filters/rbac/rbac_service_config_parser.h +75 -0
  164. data/src/core/ext/filters/server_config_selector/server_config_selector.cc +67 -0
  165. data/src/core/ext/filters/server_config_selector/server_config_selector.h +71 -0
  166. data/src/core/ext/filters/server_config_selector/server_config_selector_filter.cc +271 -0
  167. data/src/core/{lib/transport/authority_override.h → ext/filters/server_config_selector/server_config_selector_filter.h} +8 -13
  168. data/src/core/ext/transport/chttp2/alpn/alpn.cc +2 -1
  169. data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +251 -19
  170. data/src/core/ext/transport/chttp2/client/chttp2_connector.h +7 -7
  171. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +339 -138
  172. data/src/core/ext/transport/chttp2/server/chttp2_server.h +2 -2
  173. data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +4 -2
  174. data/src/core/ext/transport/chttp2/transport/bin_decoder.h +2 -1
  175. data/src/core/ext/transport/chttp2/transport/bin_encoder.cc +1 -0
  176. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +386 -463
  177. data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +12 -4
  178. data/src/core/ext/transport/chttp2/transport/context_list.cc +4 -6
  179. data/src/core/ext/transport/chttp2/transport/context_list.h +4 -6
  180. data/src/core/ext/transport/chttp2/transport/flow_control.cc +66 -47
  181. data/src/core/ext/transport/chttp2/transport/flow_control.h +27 -21
  182. data/src/core/ext/transport/chttp2/transport/frame_data.cc +23 -24
  183. data/src/core/ext/transport/chttp2/transport/frame_data.h +11 -10
  184. data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +21 -20
  185. data/src/core/ext/transport/chttp2/transport/frame_goaway.h +7 -6
  186. data/src/core/ext/transport/chttp2/transport/frame_ping.cc +17 -17
  187. data/src/core/ext/transport/chttp2/transport/frame_ping.h +8 -6
  188. data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +17 -15
  189. data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +7 -6
  190. data/src/core/ext/transport/chttp2/transport/frame_settings.cc +49 -17
  191. data/src/core/ext/transport/chttp2/transport/frame_settings.h +7 -6
  192. data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +16 -13
  193. data/src/core/ext/transport/chttp2/transport/frame_window_update.h +5 -6
  194. data/src/core/ext/transport/chttp2/transport/hpack_constants.h +41 -0
  195. data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +520 -749
  196. data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +183 -71
  197. data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc +86 -0
  198. data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.h +71 -0
  199. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +811 -1193
  200. data/src/core/ext/transport/chttp2/transport/hpack_parser.h +101 -83
  201. data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +239 -0
  202. data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +115 -0
  203. data/src/core/ext/transport/chttp2/transport/internal.h +51 -74
  204. data/src/core/ext/transport/chttp2/transport/parsing.cc +157 -293
  205. data/src/core/ext/transport/chttp2/transport/stream_lists.cc +2 -2
  206. data/src/core/ext/transport/chttp2/transport/varint.cc +13 -7
  207. data/src/core/ext/transport/chttp2/transport/varint.h +39 -28
  208. data/src/core/ext/transport/chttp2/transport/writing.cc +113 -164
  209. data/src/core/ext/transport/inproc/inproc_plugin.cc +0 -4
  210. data/src/core/ext/transport/inproc/inproc_transport.cc +186 -215
  211. data/src/core/ext/transport/inproc/inproc_transport.h +1 -4
  212. data/src/core/ext/upb-generated/envoy/admin/v3/certs.upb.c +114 -0
  213. data/src/core/ext/upb-generated/envoy/admin/v3/certs.upb.h +402 -0
  214. data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.c +119 -0
  215. data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.h +453 -0
  216. data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c +244 -210
  217. data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h +932 -575
  218. data/src/core/ext/upb-generated/envoy/admin/v3/init_dump.upb.c +56 -0
  219. data/src/core/ext/upb-generated/envoy/admin/v3/init_dump.upb.h +138 -0
  220. data/src/core/ext/upb-generated/envoy/admin/v3/listeners.upb.c +62 -0
  221. data/src/core/ext/upb-generated/envoy/admin/v3/listeners.upb.h +146 -0
  222. data/src/core/ext/upb-generated/envoy/admin/v3/memory.upb.c +46 -0
  223. data/src/core/ext/upb-generated/envoy/admin/v3/memory.upb.h +106 -0
  224. data/src/core/ext/upb-generated/envoy/admin/v3/metrics.upb.c +43 -0
  225. data/src/core/ext/upb-generated/envoy/admin/v3/metrics.upb.h +93 -0
  226. data/src/core/ext/upb-generated/envoy/admin/v3/mutex_stats.upb.c +43 -0
  227. data/src/core/ext/upb-generated/envoy/admin/v3/mutex_stats.upb.h +88 -0
  228. data/src/core/ext/upb-generated/envoy/admin/v3/server_info.upb.c +103 -0
  229. data/src/core/ext/upb-generated/envoy/admin/v3/server_info.upb.h +466 -0
  230. data/src/core/ext/upb-generated/envoy/admin/v3/tap.upb.c +48 -0
  231. data/src/core/ext/upb-generated/envoy/admin/v3/tap.upb.h +95 -0
  232. data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c +44 -1
  233. data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +20 -1
  234. data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +31 -5
  235. data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +40 -19
  236. data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +144 -117
  237. data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +513 -317
  238. data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c +241 -188
  239. data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h +954 -530
  240. data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c +44 -29
  241. data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h +137 -81
  242. data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +328 -250
  243. data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +1266 -657
  244. data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c +21 -8
  245. data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h +41 -23
  246. data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c +41 -28
  247. data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h +136 -80
  248. data/src/core/ext/upb-generated/envoy/config/common/matcher/v3/matcher.upb.c +290 -0
  249. data/src/core/ext/upb-generated/envoy/config/common/matcher/v3/matcher.upb.h +1122 -0
  250. data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +73 -54
  251. data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +265 -159
  252. data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c +21 -8
  253. data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h +41 -23
  254. data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +238 -153
  255. data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +894 -471
  256. data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +63 -46
  257. data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +210 -130
  258. data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c +20 -7
  259. data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h +33 -19
  260. data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c +32 -18
  261. data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h +88 -53
  262. data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_method_list.upb.c +58 -0
  263. data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_method_list.upb.h +138 -0
  264. data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +144 -118
  265. data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +529 -329
  266. data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +112 -91
  267. data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +425 -259
  268. data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c +22 -9
  269. data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h +44 -26
  270. data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +212 -91
  271. data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +932 -266
  272. data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c +18 -5
  273. data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h +33 -17
  274. data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.c +60 -0
  275. data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.h +152 -0
  276. data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c +23 -10
  277. data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +47 -25
  278. data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +28 -14
  279. data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h +53 -35
  280. data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.c +48 -0
  281. data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.h +108 -0
  282. data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c +52 -36
  283. data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h +133 -85
  284. data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +91 -39
  285. data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +325 -107
  286. data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c +71 -54
  287. data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h +244 -144
  288. data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c +20 -7
  289. data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h +36 -20
  290. data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +97 -69
  291. data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +400 -226
  292. data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +99 -78
  293. data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +340 -213
  294. data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.c +61 -0
  295. data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.h +199 -0
  296. data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +27 -11
  297. data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +86 -49
  298. data/src/core/ext/upb-generated/envoy/config/metrics/v3/metrics_service.upb.c +53 -0
  299. data/src/core/ext/upb-generated/envoy/config/metrics/v3/metrics_service.upb.h +120 -0
  300. data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c +82 -62
  301. data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h +294 -185
  302. data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c +93 -60
  303. data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h +349 -181
  304. data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +127 -100
  305. data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +307 -185
  306. data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +59 -27
  307. data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +195 -88
  308. data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +648 -559
  309. data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +2460 -1505
  310. data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +39 -20
  311. data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +127 -64
  312. data/src/core/ext/upb-generated/envoy/config/tap/v3/common.upb.c +216 -0
  313. data/src/core/ext/upb-generated/envoy/config/tap/v3/common.upb.h +870 -0
  314. data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.c +44 -0
  315. data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.h +82 -0
  316. data/src/core/ext/upb-generated/envoy/config/trace/v3/dynamic_ot.upb.c +49 -0
  317. data/src/core/ext/upb-generated/envoy/config/trace/v3/dynamic_ot.upb.h +95 -0
  318. data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c +28 -14
  319. data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h +69 -40
  320. data/src/core/ext/upb-generated/envoy/config/trace/v3/lightstep.upb.c +52 -0
  321. data/src/core/ext/upb-generated/envoy/config/trace/v3/lightstep.upb.h +119 -0
  322. data/src/core/ext/upb-generated/envoy/config/trace/v3/opencensus.upb.c +62 -0
  323. data/src/core/ext/upb-generated/envoy/config/trace/v3/opencensus.upb.h +203 -0
  324. data/src/core/ext/upb-generated/envoy/config/trace/v3/service.upb.c +47 -0
  325. data/src/core/ext/upb-generated/envoy/config/trace/v3/service.upb.h +89 -0
  326. data/src/core/ext/upb-generated/envoy/config/trace/v3/skywalking.upb.c +69 -0
  327. data/src/core/ext/upb-generated/envoy/config/trace/v3/skywalking.upb.h +184 -0
  328. data/src/core/ext/upb-generated/envoy/config/trace/v3/trace.upb.c +32 -0
  329. data/src/core/ext/upb-generated/envoy/config/trace/v3/trace.upb.h +42 -0
  330. data/src/core/ext/upb-generated/envoy/config/trace/v3/xray.upb.c +71 -0
  331. data/src/core/ext/upb-generated/envoy/config/trace/v3/xray.upb.h +192 -0
  332. data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.c +54 -0
  333. data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.h +126 -0
  334. data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c +18 -5
  335. data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h +37 -23
  336. data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c +46 -29
  337. data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h +156 -92
  338. data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c +52 -36
  339. data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h +175 -107
  340. data/src/core/ext/upb-generated/envoy/extensions/filters/http/rbac/v3/rbac.upb.c +63 -0
  341. data/src/core/ext/upb-generated/envoy/extensions/filters/http/rbac/v3/rbac.upb.h +165 -0
  342. data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c +27 -13
  343. data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h +69 -41
  344. data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +272 -200
  345. data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +1095 -552
  346. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c +10 -1
  347. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +7 -4
  348. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +108 -52
  349. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +448 -171
  350. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +42 -27
  351. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +115 -71
  352. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +103 -83
  353. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +341 -213
  354. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.c +62 -0
  355. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.h +146 -0
  356. data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c +16 -3
  357. data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h +29 -15
  358. data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +92 -73
  359. data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +335 -218
  360. data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c +32 -18
  361. data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h +87 -54
  362. data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c +85 -40
  363. data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h +303 -104
  364. data/src/core/ext/upb-generated/envoy/type/http/v3/cookie.upb.c +48 -0
  365. data/src/core/ext/upb-generated/envoy/type/http/v3/cookie.upb.h +101 -0
  366. data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.c +76 -0
  367. data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.h +228 -0
  368. data/src/core/ext/upb-generated/envoy/type/matcher/v3/http_inputs.upb.c +74 -0
  369. data/src/core/ext/upb-generated/envoy/type/matcher/v3/http_inputs.upb.h +202 -0
  370. data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +29 -14
  371. data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +81 -46
  372. data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c +22 -9
  373. data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h +42 -26
  374. data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c +21 -8
  375. data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h +33 -19
  376. data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c +20 -7
  377. data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h +33 -19
  378. data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +37 -21
  379. data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +105 -61
  380. data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +32 -18
  381. data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +79 -52
  382. data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c +27 -13
  383. data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h +70 -43
  384. data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c +38 -23
  385. data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h +94 -58
  386. data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c +51 -32
  387. data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h +206 -124
  388. data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c +54 -37
  389. data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h +191 -115
  390. data/src/core/ext/upb-generated/envoy/type/v3/hash_policy.upb.c +66 -0
  391. data/src/core/ext/upb-generated/envoy/type/v3/hash_policy.upb.h +183 -0
  392. data/src/core/ext/upb-generated/envoy/type/v3/http.upb.c +10 -1
  393. data/src/core/ext/upb-generated/envoy/type/v3/http.upb.h +4 -1
  394. data/src/core/ext/upb-generated/envoy/type/v3/http_status.upb.c +42 -0
  395. data/src/core/ext/upb-generated/envoy/type/v3/http_status.upb.h +136 -0
  396. data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c +24 -10
  397. data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h +65 -34
  398. data/src/core/ext/upb-generated/envoy/type/v3/range.upb.c +31 -16
  399. data/src/core/ext/upb-generated/envoy/type/v3/range.upb.h +100 -52
  400. data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_unit.upb.c +26 -0
  401. data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_unit.upb.h +41 -0
  402. data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c +20 -7
  403. data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h +39 -19
  404. data/src/core/ext/upb-generated/envoy/type/v3/token_bucket.upb.c +51 -0
  405. data/src/core/ext/upb-generated/envoy/type/v3/token_bucket.upb.h +114 -0
  406. data/src/core/ext/upb-generated/google/api/annotations.upb.c +23 -1
  407. data/src/core/ext/upb-generated/google/api/annotations.upb.h +9 -1
  408. data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c +151 -126
  409. data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h +439 -281
  410. data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +153 -127
  411. data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +483 -298
  412. data/src/core/ext/upb-generated/google/api/http.upb.c +44 -29
  413. data/src/core/ext/upb-generated/google/api/http.upb.h +137 -89
  414. data/src/core/ext/upb-generated/google/api/httpbody.upb.c +46 -0
  415. data/src/core/ext/upb-generated/google/api/httpbody.upb.h +99 -0
  416. data/src/core/ext/upb-generated/google/protobuf/any.upb.c +19 -6
  417. data/src/core/ext/upb-generated/google/protobuf/any.upb.h +40 -22
  418. data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +367 -277
  419. data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +1252 -764
  420. data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +19 -6
  421. data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +36 -18
  422. data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +16 -3
  423. data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +29 -15
  424. data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +48 -32
  425. data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +100 -64
  426. data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +19 -6
  427. data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +36 -18
  428. data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +58 -37
  429. data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +269 -149
  430. data/src/core/ext/upb-generated/google/rpc/status.upb.c +22 -9
  431. data/src/core/ext/upb-generated/google/rpc/status.upb.h +44 -26
  432. data/src/core/ext/upb-generated/opencensus/proto/trace/v1/trace_config.upb.c +84 -0
  433. data/src/core/ext/upb-generated/opencensus/proto/trace/v1/trace_config.upb.h +276 -0
  434. data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +33 -19
  435. data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +68 -42
  436. data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +132 -108
  437. data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +458 -285
  438. data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +27 -13
  439. data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +72 -39
  440. data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +23 -9
  441. data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +64 -35
  442. data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +82 -62
  443. data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +321 -197
  444. data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c +70 -0
  445. data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h +175 -0
  446. data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +76 -14
  447. data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +132 -63
  448. data/src/core/ext/upb-generated/udpa/annotations/security.upb.c +32 -8
  449. data/src/core/ext/upb-generated/udpa/annotations/security.upb.h +41 -18
  450. data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c +22 -1
  451. data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +9 -1
  452. data/src/core/ext/upb-generated/udpa/annotations/status.upb.c +32 -6
  453. data/src/core/ext/upb-generated/udpa/annotations/status.upb.h +41 -18
  454. data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c +31 -5
  455. data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h +40 -19
  456. data/src/core/ext/upb-generated/validate/validate.upb.c +396 -295
  457. data/src/core/ext/upb-generated/validate/validate.upb.h +1395 -768
  458. data/src/core/ext/upb-generated/xds/annotations/v3/migrate.upb.c +110 -0
  459. data/src/core/ext/upb-generated/xds/annotations/v3/migrate.upb.h +191 -0
  460. data/src/core/ext/upb-generated/xds/annotations/v3/security.upb.c +55 -0
  461. data/src/core/ext/upb-generated/xds/annotations/v3/security.upb.h +87 -0
  462. data/src/core/ext/upb-generated/xds/annotations/v3/sensitive.upb.c +38 -0
  463. data/src/core/ext/upb-generated/xds/annotations/v3/sensitive.upb.h +38 -0
  464. data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.c +105 -0
  465. data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.h +230 -0
  466. data/src/core/ext/upb-generated/xds/annotations/v3/versioning.upb.c +53 -0
  467. data/src/core/ext/upb-generated/xds/annotations/v3/versioning.upb.h +81 -0
  468. data/src/core/ext/upb-generated/xds/core/v3/authority.upb.c +19 -6
  469. data/src/core/ext/upb-generated/xds/core/v3/authority.upb.h +35 -19
  470. data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c +32 -18
  471. data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h +77 -46
  472. data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c +27 -13
  473. data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h +39 -25
  474. data/src/core/ext/upb-generated/xds/core/v3/extension.upb.c +46 -0
  475. data/src/core/ext/upb-generated/xds/core/v3/extension.upb.h +95 -0
  476. data/src/core/ext/upb-generated/xds/core/v3/resource.upb.c +24 -11
  477. data/src/core/ext/upb-generated/xds/core/v3/resource.upb.h +47 -27
  478. data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c +35 -21
  479. data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h +87 -54
  480. data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c +24 -11
  481. data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h +51 -29
  482. data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.c +73 -0
  483. data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.h +144 -0
  484. data/src/core/ext/upb-generated/xds/type/matcher/v3/matcher.upb.c +203 -0
  485. data/src/core/ext/upb-generated/xds/type/matcher/v3/matcher.upb.h +726 -0
  486. data/src/core/ext/upb-generated/xds/type/matcher/v3/regex.upb.c +52 -0
  487. data/src/core/ext/upb-generated/xds/type/matcher/v3/regex.upb.h +132 -0
  488. data/src/core/ext/upb-generated/xds/type/matcher/v3/string.upb.c +65 -0
  489. data/src/core/ext/upb-generated/xds/type/matcher/v3/string.upb.h +173 -0
  490. data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.c +46 -0
  491. data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.h +95 -0
  492. data/src/core/ext/upbdefs-generated/envoy/admin/v3/certs.upbdefs.c +84 -0
  493. data/src/core/ext/upbdefs-generated/envoy/admin/v3/certs.upbdefs.h +55 -0
  494. data/src/core/ext/upbdefs-generated/envoy/admin/v3/clusters.upbdefs.c +127 -0
  495. data/src/core/ext/upbdefs-generated/envoy/admin/v3/clusters.upbdefs.h +50 -0
  496. data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c +16 -61
  497. data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.h +67 -67
  498. data/src/core/ext/upbdefs-generated/envoy/admin/v3/init_dump.upbdefs.c +43 -0
  499. data/src/core/ext/upbdefs-generated/envoy/admin/v3/init_dump.upbdefs.h +40 -0
  500. data/src/core/ext/upbdefs-generated/envoy/admin/v3/listeners.upbdefs.c +53 -0
  501. data/src/core/ext/upbdefs-generated/envoy/admin/v3/listeners.upbdefs.h +40 -0
  502. data/src/core/ext/upbdefs-generated/envoy/admin/v3/memory.upbdefs.c +49 -0
  503. data/src/core/ext/upbdefs-generated/envoy/admin/v3/memory.upbdefs.h +35 -0
  504. data/src/core/ext/upbdefs-generated/envoy/admin/v3/metrics.upbdefs.c +46 -0
  505. data/src/core/ext/upbdefs-generated/envoy/admin/v3/metrics.upbdefs.h +35 -0
  506. data/src/core/ext/upbdefs-generated/envoy/admin/v3/mutex_stats.upbdefs.c +46 -0
  507. data/src/core/ext/upbdefs-generated/envoy/admin/v3/mutex_stats.upbdefs.h +35 -0
  508. data/src/core/ext/upbdefs-generated/envoy/admin/v3/server_info.upbdefs.c +142 -0
  509. data/src/core/ext/upbdefs-generated/envoy/admin/v3/server_info.upbdefs.h +40 -0
  510. data/src/core/ext/upbdefs-generated/envoy/admin/v3/tap.upbdefs.c +51 -0
  511. data/src/core/ext/upbdefs-generated/envoy/admin/v3/tap.upbdefs.h +35 -0
  512. data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c +22 -12
  513. data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h +1 -1
  514. data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c +10 -13
  515. data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h +4 -4
  516. data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c +69 -98
  517. data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h +46 -46
  518. data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +349 -339
  519. data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h +57 -52
  520. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +18 -24
  521. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h +10 -10
  522. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +488 -484
  523. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +80 -70
  524. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c +16 -18
  525. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h +4 -4
  526. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c +18 -20
  527. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h +4 -4
  528. data/src/core/ext/upbdefs-generated/envoy/config/common/matcher/v3/matcher.upbdefs.c +206 -0
  529. data/src/core/ext/upbdefs-generated/envoy/config/common/matcher/v3/matcher.upbdefs.h +105 -0
  530. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c +17 -32
  531. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h +22 -22
  532. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c +17 -19
  533. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h +4 -4
  534. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +224 -229
  535. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h +79 -64
  536. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c +23 -33
  537. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h +16 -16
  538. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c +16 -19
  539. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h +4 -4
  540. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c +17 -21
  541. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h +7 -7
  542. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_method_list.upbdefs.c +53 -0
  543. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_method_list.upbdefs.h +40 -0
  544. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c +23 -51
  545. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h +43 -43
  546. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c +76 -89
  547. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h +25 -25
  548. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c +16 -19
  549. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h +4 -4
  550. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +267 -200
  551. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h +59 -34
  552. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c +14 -16
  553. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h +4 -4
  554. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.c +55 -0
  555. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.h +40 -0
  556. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c +16 -18
  557. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h +4 -4
  558. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c +40 -38
  559. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h +4 -4
  560. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.c +49 -0
  561. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.h +35 -0
  562. data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c +20 -28
  563. data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h +13 -13
  564. data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +98 -83
  565. data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h +23 -13
  566. data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c +20 -30
  567. data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h +16 -16
  568. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c +16 -18
  569. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h +4 -4
  570. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +157 -155
  571. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h +21 -16
  572. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c +147 -153
  573. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h +22 -22
  574. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.c +88 -0
  575. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.h +35 -0
  576. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c +40 -36
  577. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h +7 -7
  578. data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/metrics_service.upbdefs.c +69 -0
  579. data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/metrics_service.upbdefs.h +35 -0
  580. data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c +19 -35
  581. data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.h +25 -25
  582. data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c +40 -47
  583. data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h +30 -25
  584. data/src/core/ext/upbdefs-generated/envoy/config/rbac/v3/rbac.upbdefs.c +190 -0
  585. data/src/core/ext/upbdefs-generated/envoy/config/rbac/v3/rbac.upbdefs.h +70 -0
  586. data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +79 -71
  587. data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +12 -7
  588. data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +717 -773
  589. data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +162 -157
  590. data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c +54 -48
  591. data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h +10 -10
  592. data/src/core/ext/upbdefs-generated/envoy/config/tap/v3/common.upbdefs.c +188 -0
  593. data/src/core/ext/upbdefs-generated/envoy/config/tap/v3/common.upbdefs.h +85 -0
  594. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/datadog.upbdefs.c +54 -0
  595. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/datadog.upbdefs.h +35 -0
  596. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/dynamic_ot.upbdefs.c +57 -0
  597. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/dynamic_ot.upbdefs.h +35 -0
  598. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c +17 -21
  599. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h +7 -7
  600. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/lightstep.upbdefs.c +72 -0
  601. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/lightstep.upbdefs.h +35 -0
  602. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/opencensus.upbdefs.c +99 -0
  603. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/opencensus.upbdefs.h +35 -0
  604. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/service.upbdefs.c +52 -0
  605. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/service.upbdefs.h +35 -0
  606. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/skywalking.upbdefs.c +71 -0
  607. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/skywalking.upbdefs.h +40 -0
  608. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/trace.upbdefs.c +57 -0
  609. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/trace.upbdefs.h +30 -0
  610. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/xray.upbdefs.c +75 -0
  611. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/xray.upbdefs.h +40 -0
  612. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/zipkin.upbdefs.c +77 -0
  613. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/zipkin.upbdefs.h +35 -0
  614. data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c +17 -18
  615. data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h +4 -4
  616. data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c +19 -29
  617. data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.h +16 -16
  618. data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c +27 -30
  619. data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.h +10 -10
  620. data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/rbac/v3/rbac.upbdefs.c +59 -0
  621. data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/rbac/v3/rbac.upbdefs.h +40 -0
  622. data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c +26 -24
  623. data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.h +4 -4
  624. data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +455 -429
  625. data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +62 -52
  626. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c +17 -13
  627. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h +1 -1
  628. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +178 -138
  629. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h +26 -16
  630. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c +21 -27
  631. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h +10 -10
  632. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +194 -200
  633. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h +19 -19
  634. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.c +58 -0
  635. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.h +40 -0
  636. data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c +16 -18
  637. data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h +4 -4
  638. data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c +19 -33
  639. data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h +22 -22
  640. data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c +18 -22
  641. data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h +7 -7
  642. data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c +120 -97
  643. data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h +18 -13
  644. data/src/core/ext/upbdefs-generated/envoy/type/http/v3/cookie.upbdefs.c +46 -0
  645. data/src/core/ext/upbdefs-generated/envoy/type/http/v3/cookie.upbdefs.h +35 -0
  646. data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.c +56 -0
  647. data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.h +50 -0
  648. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/http_inputs.upbdefs.c +52 -0
  649. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/http_inputs.upbdefs.h +50 -0
  650. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c +24 -27
  651. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h +7 -7
  652. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c +17 -19
  653. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.h +4 -4
  654. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c +17 -19
  655. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h +4 -4
  656. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c +17 -19
  657. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h +4 -4
  658. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +45 -48
  659. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h +10 -10
  660. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c +17 -21
  661. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h +7 -7
  662. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c +16 -21
  663. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.h +7 -7
  664. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c +18 -24
  665. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h +10 -10
  666. data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c +15 -29
  667. data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h +22 -22
  668. data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c +16 -26
  669. data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h +16 -16
  670. data/src/core/ext/upbdefs-generated/envoy/type/v3/hash_policy.upbdefs.c +53 -0
  671. data/src/core/ext/upbdefs-generated/envoy/type/v3/hash_policy.upbdefs.h +45 -0
  672. data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c +12 -10
  673. data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.h +1 -1
  674. data/src/core/ext/upbdefs-generated/envoy/type/v3/http_status.upbdefs.c +94 -0
  675. data/src/core/ext/upbdefs-generated/envoy/type/v3/http_status.upbdefs.h +35 -0
  676. data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c +14 -19
  677. data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h +7 -7
  678. data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c +13 -19
  679. data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h +10 -10
  680. data/src/core/ext/upbdefs-generated/envoy/type/v3/ratelimit_unit.upbdefs.c +38 -0
  681. data/src/core/ext/upbdefs-generated/envoy/type/v3/ratelimit_unit.upbdefs.h +30 -0
  682. data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c +13 -16
  683. data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h +4 -4
  684. data/src/core/ext/upbdefs-generated/envoy/type/v3/token_bucket.upbdefs.c +57 -0
  685. data/src/core/ext/upbdefs-generated/envoy/type/v3/token_bucket.upbdefs.h +35 -0
  686. data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c +7 -7
  687. data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h +1 -1
  688. data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/checked.upbdefs.c +154 -0
  689. data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/checked.upbdefs.h +95 -0
  690. data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/syntax.upbdefs.c +153 -0
  691. data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/syntax.upbdefs.h +100 -0
  692. data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c +5 -14
  693. data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h +10 -10
  694. data/src/core/ext/upbdefs-generated/google/api/httpbody.upbdefs.c +39 -0
  695. data/src/core/ext/upbdefs-generated/google/api/httpbody.upbdefs.h +35 -0
  696. data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c +5 -10
  697. data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h +4 -4
  698. data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c +107 -164
  699. data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h +82 -82
  700. data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c +5 -10
  701. data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h +4 -4
  702. data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c +5 -10
  703. data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h +4 -4
  704. data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c +5 -16
  705. data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h +13 -13
  706. data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c +5 -10
  707. data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h +4 -4
  708. data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c +5 -26
  709. data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h +28 -28
  710. data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c +9 -14
  711. data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h +4 -4
  712. data/src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c +67 -0
  713. data/src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.h +50 -0
  714. data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c +10 -18
  715. data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h +10 -10
  716. data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c +24 -33
  717. data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h +4 -4
  718. data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c +9 -8
  719. data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h +1 -1
  720. data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c +10 -13
  721. data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h +4 -4
  722. data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c +10 -14
  723. data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h +4 -4
  724. data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c +189 -216
  725. data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h +70 -70
  726. data/src/core/ext/upbdefs-generated/xds/annotations/v3/migrate.upbdefs.c +63 -0
  727. data/src/core/ext/upbdefs-generated/xds/annotations/v3/migrate.upbdefs.h +45 -0
  728. data/src/core/ext/upbdefs-generated/xds/annotations/v3/security.upbdefs.c +47 -0
  729. data/src/core/ext/upbdefs-generated/xds/annotations/v3/security.upbdefs.h +35 -0
  730. data/src/core/ext/upbdefs-generated/xds/annotations/v3/sensitive.upbdefs.c +35 -0
  731. data/src/core/ext/upbdefs-generated/xds/annotations/v3/sensitive.upbdefs.h +30 -0
  732. data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.c +64 -0
  733. data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.h +50 -0
  734. data/src/core/ext/upbdefs-generated/xds/annotations/v3/versioning.upbdefs.c +40 -0
  735. data/src/core/ext/upbdefs-generated/xds/annotations/v3/versioning.upbdefs.h +35 -0
  736. data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c +18 -22
  737. data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.h +4 -4
  738. data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c +32 -38
  739. data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.h +7 -7
  740. data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c +20 -26
  741. data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.h +7 -7
  742. data/src/core/ext/upbdefs-generated/xds/core/v3/extension.upbdefs.c +41 -0
  743. data/src/core/ext/upbdefs-generated/xds/core/v3/extension.upbdefs.h +35 -0
  744. data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c +23 -27
  745. data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.h +4 -4
  746. data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c +39 -45
  747. data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.h +7 -7
  748. data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c +25 -29
  749. data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.h +4 -4
  750. data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/matcher.upbdefs.c +126 -0
  751. data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/matcher.upbdefs.h +80 -0
  752. data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/regex.upbdefs.c +40 -0
  753. data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/regex.upbdefs.h +40 -0
  754. data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/string.upbdefs.c +52 -0
  755. data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/string.upbdefs.h +40 -0
  756. data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.c +40 -0
  757. data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.h +35 -0
  758. data/src/core/ext/xds/certificate_provider_factory.h +1 -1
  759. data/src/core/ext/xds/certificate_provider_registry.cc +3 -3
  760. data/src/core/ext/xds/certificate_provider_store.h +4 -4
  761. data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +7 -7
  762. data/src/core/ext/xds/file_watcher_certificate_provider_factory.h +4 -4
  763. data/src/core/ext/xds/upb_utils.h +67 -0
  764. data/src/core/ext/xds/xds_api.cc +232 -3313
  765. data/src/core/ext/xds/xds_api.h +70 -550
  766. data/src/core/ext/xds/xds_bootstrap.cc +315 -300
  767. data/src/core/ext/xds/xds_bootstrap.h +54 -33
  768. data/src/core/ext/xds/xds_certificate_provider.cc +7 -7
  769. data/src/core/ext/xds/xds_certificate_provider.h +6 -6
  770. data/src/core/ext/xds/xds_channel_args.h +5 -2
  771. data/src/core/ext/xds/xds_channel_stack_modifier.cc +109 -0
  772. data/src/core/ext/xds/xds_channel_stack_modifier.h +53 -0
  773. data/src/core/ext/xds/xds_client.cc +1093 -957
  774. data/src/core/ext/xds/xds_client.h +143 -168
  775. data/src/core/ext/xds/xds_client_stats.cc +31 -30
  776. data/src/core/ext/xds/xds_client_stats.h +15 -13
  777. data/src/core/ext/xds/xds_cluster.cc +453 -0
  778. data/src/core/ext/xds/xds_cluster.h +108 -0
  779. data/src/core/ext/xds/xds_common_types.cc +388 -0
  780. data/src/core/ext/xds/xds_common_types.h +95 -0
  781. data/src/core/ext/xds/xds_endpoint.cc +364 -0
  782. data/src/core/ext/xds/xds_endpoint.h +135 -0
  783. data/src/core/ext/xds/xds_http_fault_filter.cc +10 -9
  784. data/src/core/ext/xds/xds_http_fault_filter.h +6 -5
  785. data/src/core/ext/xds/xds_http_filters.cc +15 -7
  786. data/src/core/ext/xds/xds_http_filters.h +7 -4
  787. data/src/core/ext/xds/xds_http_rbac_filter.cc +563 -0
  788. data/src/core/ext/xds/xds_http_rbac_filter.h +54 -0
  789. data/src/core/ext/xds/xds_listener.cc +1039 -0
  790. data/src/core/ext/xds/xds_listener.h +220 -0
  791. data/src/core/{lib/transport/authority_override.cc → ext/xds/xds_resource_type.cc} +10 -17
  792. data/src/core/ext/xds/xds_resource_type.h +98 -0
  793. data/src/core/ext/xds/xds_resource_type_impl.h +87 -0
  794. data/src/core/ext/xds/xds_route_config.cc +985 -0
  795. data/src/core/ext/xds/xds_route_config.h +215 -0
  796. data/src/core/ext/xds/xds_routing.cc +250 -0
  797. data/src/core/ext/xds/xds_routing.h +101 -0
  798. data/src/core/ext/xds/xds_server_config_fetcher.cc +1083 -296
  799. data/src/core/lib/{iomgr → address_utils}/parse_address.cc +43 -25
  800. data/src/core/lib/{iomgr → address_utils}/parse_address.h +12 -7
  801. data/src/core/lib/{iomgr → address_utils}/sockaddr_utils.cc +34 -41
  802. data/src/core/lib/{iomgr → address_utils}/sockaddr_utils.h +5 -15
  803. data/src/core/lib/avl/avl.h +389 -88
  804. data/src/core/lib/backoff/backoff.cc +9 -38
  805. data/src/core/lib/backoff/backoff.h +11 -11
  806. data/src/core/lib/channel/call_finalization.h +86 -0
  807. data/src/core/lib/channel/call_tracer.h +85 -0
  808. data/src/core/lib/channel/channel_args.cc +87 -9
  809. data/src/core/lib/channel/channel_args.h +13 -1
  810. data/src/core/lib/channel/channel_args_preconditioning.cc +48 -0
  811. data/src/core/lib/channel/channel_args_preconditioning.h +62 -0
  812. data/src/core/lib/channel/channel_stack.cc +25 -15
  813. data/src/core/lib/channel/channel_stack.h +53 -16
  814. data/src/core/lib/channel/channel_stack_builder.cc +68 -262
  815. data/src/core/lib/channel/channel_stack_builder.h +95 -155
  816. data/src/core/lib/channel/channel_trace.cc +8 -10
  817. data/src/core/lib/channel/channel_trace.h +2 -1
  818. data/src/core/lib/channel/channelz.cc +65 -52
  819. data/src/core/lib/channel/channelz.h +32 -29
  820. data/src/core/lib/channel/channelz_registry.cc +8 -7
  821. data/src/core/lib/channel/channelz_registry.h +1 -1
  822. data/src/core/lib/channel/connected_channel.cc +14 -10
  823. data/src/core/lib/channel/connected_channel.h +1 -2
  824. data/src/core/lib/channel/context.h +14 -0
  825. data/src/core/lib/channel/handshaker.cc +10 -8
  826. data/src/core/lib/channel/handshaker.h +7 -8
  827. data/src/core/lib/channel/handshaker_factory.h +10 -2
  828. data/src/core/lib/channel/handshaker_registry.cc +15 -70
  829. data/src/core/lib/channel/handshaker_registry.h +29 -12
  830. data/src/core/lib/channel/promise_based_filter.cc +669 -0
  831. data/src/core/lib/channel/promise_based_filter.h +423 -0
  832. data/src/core/lib/channel/status_util.h +6 -2
  833. data/src/core/lib/compression/compression.cc +22 -114
  834. data/src/core/lib/compression/compression_internal.cc +145 -207
  835. data/src/core/lib/compression/compression_internal.h +64 -69
  836. data/src/core/lib/compression/message_compress.cc +13 -13
  837. data/src/core/lib/compression/message_compress.h +2 -2
  838. data/src/core/lib/config/core_configuration.cc +104 -0
  839. data/src/core/lib/config/core_configuration.h +196 -0
  840. data/src/core/lib/debug/stats.cc +1 -1
  841. data/src/core/lib/debug/stats.h +2 -1
  842. data/src/core/lib/debug/stats_data.cc +15 -14
  843. data/src/core/lib/debug/stats_data.h +1 -0
  844. data/src/core/lib/debug/trace.cc +1 -0
  845. data/src/core/lib/debug/trace.h +4 -3
  846. data/src/core/lib/event_engine/channel_args_endpoint_config.cc +46 -0
  847. data/src/core/lib/event_engine/channel_args_endpoint_config.h +42 -0
  848. data/src/core/lib/event_engine/default_event_engine_factory.cc +27 -0
  849. data/src/core/lib/event_engine/event_engine.cc +52 -0
  850. data/src/core/lib/event_engine/event_engine_factory.h +36 -0
  851. data/src/core/lib/event_engine/memory_allocator.cc +66 -0
  852. data/src/core/lib/event_engine/resolved_address.cc +39 -0
  853. data/src/core/lib/event_engine/sockaddr.cc +40 -0
  854. data/src/core/lib/event_engine/sockaddr.h +44 -0
  855. data/src/core/lib/gpr/alloc.cc +4 -3
  856. data/src/core/lib/gpr/atm.cc +1 -1
  857. data/src/core/lib/gpr/cpu_posix.cc +1 -1
  858. data/src/core/lib/gpr/env_linux.cc +1 -2
  859. data/src/core/lib/gpr/env_posix.cc +2 -3
  860. data/src/core/lib/gpr/log.cc +3 -3
  861. data/src/core/lib/gpr/log_android.cc +3 -2
  862. data/src/core/lib/gpr/log_linux.cc +7 -4
  863. data/src/core/lib/gpr/log_posix.cc +6 -3
  864. data/src/core/lib/gpr/murmur_hash.cc +4 -2
  865. data/src/core/lib/gpr/string.cc +2 -2
  866. data/src/core/lib/gpr/string.h +2 -2
  867. data/src/core/lib/gpr/sync.cc +2 -2
  868. data/src/core/lib/gpr/sync_abseil.cc +7 -6
  869. data/src/core/lib/gpr/sync_posix.cc +4 -3
  870. data/src/core/lib/gpr/time.cc +5 -3
  871. data/src/core/lib/gpr/time_windows.cc +3 -2
  872. data/src/core/lib/gpr/tls.h +125 -40
  873. data/src/core/lib/gpr/tmpfile_posix.cc +1 -2
  874. data/src/core/lib/gpr/useful.h +97 -32
  875. data/src/core/lib/gpr/wrap_memcpy.cc +2 -1
  876. data/src/core/lib/gprpp/atomic_utils.h +47 -0
  877. data/src/core/lib/gprpp/bitset.h +195 -0
  878. data/src/core/lib/gprpp/capture.h +76 -0
  879. data/src/core/lib/gprpp/chunked_vector.h +253 -0
  880. data/src/core/lib/gprpp/construct_destruct.h +39 -0
  881. data/src/core/lib/gprpp/cpp_impl_of.h +45 -0
  882. data/src/core/lib/gprpp/debug_location.h +2 -0
  883. data/src/core/lib/gprpp/dual_ref_counted.h +25 -26
  884. data/src/core/lib/gprpp/fork.cc +14 -12
  885. data/src/core/lib/gprpp/fork.h +4 -4
  886. data/src/core/lib/gprpp/global_config.h +1 -2
  887. data/src/core/lib/gprpp/global_config_env.cc +14 -14
  888. data/src/core/lib/gprpp/global_config_env.h +2 -2
  889. data/src/core/lib/gprpp/global_config_generic.h +2 -2
  890. data/src/core/lib/gprpp/manual_constructor.h +11 -9
  891. data/src/core/lib/gprpp/memory.h +9 -3
  892. data/src/core/lib/gprpp/mpscq.cc +7 -7
  893. data/src/core/lib/gprpp/mpscq.h +6 -5
  894. data/src/core/lib/gprpp/orphanable.h +7 -7
  895. data/src/core/lib/gprpp/ref_counted.h +47 -33
  896. data/src/core/lib/gprpp/ref_counted_ptr.h +2 -4
  897. data/src/core/lib/gprpp/status_helper.cc +419 -0
  898. data/src/core/lib/gprpp/status_helper.h +181 -0
  899. data/src/core/lib/gprpp/sync.h +5 -31
  900. data/src/core/lib/gprpp/table.h +434 -0
  901. data/src/core/lib/gprpp/thd_posix.cc +5 -5
  902. data/src/core/lib/gprpp/thd_windows.cc +4 -11
  903. data/src/core/lib/gprpp/time.cc +186 -0
  904. data/src/core/lib/gprpp/time.h +292 -0
  905. data/src/core/lib/gprpp/time_util.cc +2 -2
  906. data/src/core/lib/gprpp/time_util.h +2 -2
  907. data/src/core/lib/http/format_request.cc +28 -23
  908. data/src/core/lib/http/format_request.h +8 -6
  909. data/src/core/lib/http/httpcli.cc +299 -209
  910. data/src/core/lib/http/httpcli.h +183 -85
  911. data/src/core/lib/http/httpcli_security_connector.cc +71 -81
  912. data/src/core/lib/http/httpcli_ssl_credentials.h +37 -0
  913. data/src/core/lib/http/parser.cc +18 -18
  914. data/src/core/lib/http/parser.h +6 -5
  915. data/src/core/lib/iomgr/buffer_list.cc +16 -17
  916. data/src/core/lib/iomgr/buffer_list.h +22 -24
  917. data/src/core/lib/iomgr/call_combiner.cc +55 -23
  918. data/src/core/lib/iomgr/call_combiner.h +12 -14
  919. data/src/core/lib/iomgr/cfstream_handle.cc +4 -4
  920. data/src/core/lib/iomgr/cfstream_handle.h +1 -1
  921. data/src/core/lib/iomgr/closure.h +33 -12
  922. data/src/core/lib/iomgr/combiner.cc +46 -36
  923. data/src/core/lib/iomgr/combiner.h +3 -2
  924. data/src/core/lib/iomgr/dualstack_socket_posix.cc +1 -0
  925. data/src/core/lib/iomgr/endpoint.cc +1 -5
  926. data/src/core/lib/iomgr/endpoint.h +3 -6
  927. data/src/core/lib/iomgr/endpoint_cfstream.cc +25 -54
  928. data/src/core/lib/iomgr/endpoint_cfstream.h +4 -4
  929. data/src/core/lib/iomgr/endpoint_pair.h +1 -0
  930. data/src/core/lib/iomgr/endpoint_pair_event_engine.cc +32 -0
  931. data/src/core/lib/iomgr/endpoint_pair_posix.cc +11 -9
  932. data/src/core/lib/iomgr/endpoint_pair_windows.cc +5 -6
  933. data/src/core/lib/iomgr/error.cc +270 -99
  934. data/src/core/lib/iomgr/error.h +277 -113
  935. data/src/core/lib/iomgr/error_cfstream.cc +10 -4
  936. data/src/core/lib/iomgr/error_cfstream.h +2 -2
  937. data/src/core/lib/iomgr/error_internal.h +6 -1
  938. data/src/core/lib/iomgr/ev_apple.cc +10 -9
  939. data/src/core/lib/iomgr/ev_apple.h +1 -1
  940. data/src/core/lib/iomgr/ev_epoll1_linux.cc +42 -48
  941. data/src/core/lib/iomgr/ev_epollex_linux.cc +80 -81
  942. data/src/core/lib/iomgr/ev_poll_posix.cc +73 -73
  943. data/src/core/lib/iomgr/ev_posix.cc +12 -12
  944. data/src/core/lib/iomgr/ev_posix.h +9 -9
  945. data/src/core/lib/iomgr/event_engine/closure.cc +77 -0
  946. data/src/core/lib/iomgr/event_engine/closure.h +42 -0
  947. data/src/core/lib/iomgr/event_engine/endpoint.cc +172 -0
  948. data/src/core/lib/iomgr/event_engine/endpoint.h +52 -0
  949. data/src/core/lib/iomgr/event_engine/iomgr.cc +85 -0
  950. data/src/core/lib/iomgr/event_engine/pollset.cc +87 -0
  951. data/src/core/lib/iomgr/event_engine/pollset.h +25 -0
  952. data/src/core/lib/iomgr/event_engine/promise.h +51 -0
  953. data/src/core/lib/iomgr/event_engine/resolved_address_internal.cc +47 -0
  954. data/src/core/lib/iomgr/event_engine/resolved_address_internal.h +37 -0
  955. data/src/core/lib/iomgr/event_engine/resolver.cc +133 -0
  956. data/src/core/lib/iomgr/event_engine/resolver.h +56 -0
  957. data/src/core/lib/iomgr/event_engine/tcp.cc +296 -0
  958. data/src/core/lib/iomgr/event_engine/timer.cc +62 -0
  959. data/src/core/lib/iomgr/exec_ctx.cc +29 -102
  960. data/src/core/lib/iomgr/exec_ctx.h +32 -57
  961. data/src/core/lib/iomgr/executor/mpmcqueue.cc +15 -16
  962. data/src/core/lib/iomgr/executor/mpmcqueue.h +7 -11
  963. data/src/core/lib/iomgr/executor/threadpool.cc +4 -5
  964. data/src/core/lib/iomgr/executor/threadpool.h +4 -3
  965. data/src/core/lib/iomgr/executor.cc +37 -46
  966. data/src/core/lib/iomgr/executor.h +3 -3
  967. data/src/core/lib/iomgr/fork_posix.cc +3 -2
  968. data/src/core/lib/iomgr/grpc_if_nametoindex_posix.cc +2 -2
  969. data/src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc +2 -2
  970. data/src/core/lib/iomgr/internal_errqueue.cc +3 -2
  971. data/src/core/lib/iomgr/iocp_windows.cc +10 -9
  972. data/src/core/lib/iomgr/iocp_windows.h +1 -1
  973. data/src/core/lib/iomgr/iomgr.cc +5 -3
  974. data/src/core/lib/iomgr/iomgr.h +3 -3
  975. data/src/core/lib/iomgr/iomgr_internal.cc +8 -12
  976. data/src/core/lib/iomgr/iomgr_internal.h +6 -5
  977. data/src/core/lib/iomgr/iomgr_posix.cc +5 -3
  978. data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +44 -14
  979. data/src/core/lib/iomgr/iomgr_windows.cc +4 -5
  980. data/src/core/lib/iomgr/is_epollexclusive_available.cc +4 -4
  981. data/src/core/lib/iomgr/load_file.cc +6 -6
  982. data/src/core/lib/iomgr/load_file.h +2 -2
  983. data/src/core/lib/iomgr/lockfree_event.cc +23 -5
  984. data/src/core/lib/iomgr/lockfree_event.h +1 -1
  985. data/src/core/lib/iomgr/polling_entity.cc +2 -2
  986. data/src/core/lib/iomgr/polling_entity.h +6 -0
  987. data/src/core/lib/iomgr/pollset.cc +5 -5
  988. data/src/core/lib/iomgr/pollset.h +9 -9
  989. data/src/core/lib/iomgr/pollset_set_windows.cc +1 -0
  990. data/src/core/lib/iomgr/pollset_windows.cc +6 -6
  991. data/src/core/lib/iomgr/port.h +8 -14
  992. data/src/core/lib/iomgr/python_util.h +3 -2
  993. data/src/core/lib/iomgr/resolve_address.cc +10 -24
  994. data/src/core/lib/iomgr/resolve_address.h +48 -43
  995. data/src/core/lib/iomgr/resolve_address_impl.h +59 -0
  996. data/src/core/lib/iomgr/resolve_address_posix.cc +91 -79
  997. data/src/core/lib/iomgr/resolve_address_posix.h +47 -0
  998. data/src/core/lib/iomgr/resolve_address_windows.cc +102 -85
  999. data/src/core/lib/iomgr/resolve_address_windows.h +47 -0
  1000. data/src/core/lib/iomgr/resolved_address.h +39 -0
  1001. data/src/core/lib/iomgr/sockaddr.h +2 -1
  1002. data/src/core/lib/iomgr/{socket_utils_uv.cc → sockaddr_utils_posix.cc} +21 -8
  1003. data/src/core/lib/iomgr/socket_factory_posix.cc +5 -5
  1004. data/src/core/lib/iomgr/socket_factory_posix.h +1 -0
  1005. data/src/core/lib/iomgr/socket_mutator.cc +17 -4
  1006. data/src/core/lib/iomgr/socket_mutator.h +27 -3
  1007. data/src/core/lib/iomgr/socket_utils_common_posix.cc +28 -44
  1008. data/src/core/lib/iomgr/socket_utils_linux.cc +4 -4
  1009. data/src/core/lib/iomgr/socket_utils_posix.cc +2 -2
  1010. data/src/core/lib/iomgr/socket_utils_posix.h +22 -22
  1011. data/src/core/lib/iomgr/socket_utils_windows.cc +2 -2
  1012. data/src/core/lib/iomgr/tcp_client.cc +1 -1
  1013. data/src/core/lib/iomgr/tcp_client.h +5 -2
  1014. data/src/core/lib/iomgr/tcp_client_cfstream.cc +12 -28
  1015. data/src/core/lib/iomgr/tcp_client_posix.cc +38 -45
  1016. data/src/core/lib/iomgr/tcp_client_posix.h +7 -6
  1017. data/src/core/lib/iomgr/tcp_client_windows.cc +15 -15
  1018. data/src/core/lib/iomgr/tcp_posix.cc +129 -159
  1019. data/src/core/lib/iomgr/tcp_posix.h +17 -12
  1020. data/src/core/lib/iomgr/tcp_server.cc +6 -6
  1021. data/src/core/lib/iomgr/tcp_server.h +16 -14
  1022. data/src/core/lib/iomgr/tcp_server_posix.cc +44 -34
  1023. data/src/core/lib/iomgr/tcp_server_utils_posix.h +34 -29
  1024. data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +23 -20
  1025. data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +12 -12
  1026. data/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc +4 -4
  1027. data/src/core/lib/iomgr/tcp_server_windows.cc +32 -35
  1028. data/src/core/lib/iomgr/tcp_windows.cc +35 -52
  1029. data/src/core/lib/iomgr/tcp_windows.h +3 -3
  1030. data/src/core/lib/iomgr/timer.cc +3 -2
  1031. data/src/core/lib/iomgr/timer.h +17 -8
  1032. data/src/core/lib/iomgr/timer_generic.cc +116 -127
  1033. data/src/core/lib/iomgr/timer_generic.h +1 -0
  1034. data/src/core/lib/iomgr/timer_heap.cc +2 -3
  1035. data/src/core/lib/iomgr/timer_manager.cc +16 -15
  1036. data/src/core/lib/iomgr/unix_sockets_posix.cc +25 -39
  1037. data/src/core/lib/iomgr/unix_sockets_posix.h +6 -10
  1038. data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +12 -18
  1039. data/src/core/lib/iomgr/wakeup_fd_eventfd.cc +3 -3
  1040. data/src/core/lib/iomgr/wakeup_fd_nospecial.cc +1 -0
  1041. data/src/core/lib/iomgr/wakeup_fd_pipe.cc +6 -7
  1042. data/src/core/lib/iomgr/wakeup_fd_posix.cc +4 -3
  1043. data/src/core/lib/iomgr/wakeup_fd_posix.h +8 -6
  1044. data/src/core/lib/iomgr/work_serializer.cc +120 -44
  1045. data/src/core/lib/iomgr/work_serializer.h +33 -5
  1046. data/src/core/lib/json/json.h +1 -1
  1047. data/src/core/lib/json/json_reader.cc +97 -58
  1048. data/src/core/lib/json/json_util.cc +71 -3
  1049. data/src/core/lib/json/json_util.h +66 -116
  1050. data/src/core/lib/json/json_writer.cc +0 -3
  1051. data/src/core/lib/matchers/matchers.cc +47 -59
  1052. data/src/core/lib/matchers/matchers.h +30 -30
  1053. data/src/core/lib/profiling/basic_timers.cc +8 -6
  1054. data/src/core/lib/profiling/stap_timers.cc +2 -2
  1055. data/src/core/lib/promise/activity.cc +121 -0
  1056. data/src/core/lib/promise/activity.h +540 -0
  1057. data/src/core/lib/promise/arena_promise.h +188 -0
  1058. data/src/core/lib/promise/context.h +86 -0
  1059. data/src/core/lib/promise/detail/basic_seq.h +496 -0
  1060. data/src/core/lib/promise/detail/promise_factory.h +189 -0
  1061. data/src/core/lib/promise/detail/promise_like.h +85 -0
  1062. data/src/core/lib/promise/detail/status.h +49 -0
  1063. data/src/core/lib/promise/detail/switch.h +1455 -0
  1064. data/src/core/lib/promise/exec_ctx_wakeup_scheduler.h +48 -0
  1065. data/src/core/lib/promise/loop.h +134 -0
  1066. data/src/core/lib/promise/map.h +88 -0
  1067. data/src/core/lib/promise/poll.h +66 -0
  1068. data/src/core/lib/promise/promise.h +95 -0
  1069. data/src/core/lib/promise/race.h +84 -0
  1070. data/src/core/lib/promise/seq.h +89 -0
  1071. data/src/core/lib/promise/sleep.cc +74 -0
  1072. data/src/core/lib/promise/sleep.h +66 -0
  1073. data/src/core/lib/promise/try_seq.h +157 -0
  1074. data/src/core/{ext/filters/client_channel → lib/resolver}/resolver.cc +17 -25
  1075. data/src/core/{ext/filters/client_channel → lib/resolver}/resolver.h +43 -44
  1076. data/src/core/{ext/filters/client_channel → lib/resolver}/resolver_factory.h +32 -29
  1077. data/src/core/lib/resolver/resolver_registry.cc +156 -0
  1078. data/src/core/lib/resolver/resolver_registry.h +113 -0
  1079. data/src/core/{ext/filters/client_channel → lib/resolver}/server_address.cc +2 -2
  1080. data/src/core/{ext/filters/client_channel → lib/resolver}/server_address.h +5 -5
  1081. data/src/core/lib/resource_quota/api.cc +108 -0
  1082. data/src/core/lib/resource_quota/api.h +40 -0
  1083. data/src/core/lib/{gprpp → resource_quota}/arena.cc +18 -14
  1084. data/src/core/lib/{gprpp → resource_quota}/arena.h +37 -16
  1085. data/src/core/lib/resource_quota/memory_quota.cc +478 -0
  1086. data/src/core/lib/resource_quota/memory_quota.h +457 -0
  1087. data/src/core/lib/resource_quota/resource_quota.cc +33 -0
  1088. data/src/core/lib/resource_quota/resource_quota.h +58 -0
  1089. data/src/core/lib/resource_quota/thread_quota.cc +43 -0
  1090. data/src/core/lib/resource_quota/thread_quota.h +57 -0
  1091. data/src/core/lib/resource_quota/trace.cc +19 -0
  1092. data/src/core/lib/resource_quota/trace.h +24 -0
  1093. data/src/core/lib/security/authorization/authorization_engine.h +44 -0
  1094. data/src/core/lib/security/authorization/authorization_policy_provider.h +33 -0
  1095. data/src/core/lib/security/authorization/authorization_policy_provider_vtable.cc +46 -0
  1096. data/src/core/lib/security/authorization/evaluate_args.cc +212 -0
  1097. data/src/core/lib/security/authorization/evaluate_args.h +92 -0
  1098. data/src/core/lib/security/authorization/grpc_authorization_engine.cc +60 -0
  1099. data/src/core/lib/security/authorization/grpc_authorization_engine.h +62 -0
  1100. data/src/core/lib/security/authorization/grpc_server_authz_filter.cc +109 -0
  1101. data/src/core/lib/security/authorization/grpc_server_authz_filter.h +51 -0
  1102. data/src/core/lib/security/authorization/matchers.cc +227 -0
  1103. data/src/core/lib/security/authorization/matchers.h +211 -0
  1104. data/src/core/lib/security/authorization/rbac_policy.cc +442 -0
  1105. data/src/core/lib/security/authorization/rbac_policy.h +171 -0
  1106. data/src/core/lib/security/context/security_context.cc +15 -10
  1107. data/src/core/lib/security/context/security_context.h +1 -1
  1108. data/src/core/lib/security/credentials/alts/alts_credentials.h +6 -0
  1109. data/src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc +2 -2
  1110. data/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc +2 -2
  1111. data/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +2 -2
  1112. data/src/core/lib/security/credentials/call_creds_util.cc +87 -0
  1113. data/src/core/lib/security/credentials/call_creds_util.h +42 -0
  1114. data/src/core/lib/security/credentials/channel_creds_registry.h +97 -0
  1115. data/src/core/lib/security/credentials/channel_creds_registry_init.cc +70 -0
  1116. data/src/core/lib/security/credentials/composite/composite_credentials.cc +21 -84
  1117. data/src/core/lib/security/credentials/composite/composite_credentials.h +21 -9
  1118. data/src/core/lib/security/credentials/credentials.cc +11 -10
  1119. data/src/core/lib/security/credentials/credentials.h +75 -59
  1120. data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +78 -72
  1121. data/src/core/lib/security/credentials/external/aws_external_account_credentials.h +15 -13
  1122. data/src/core/lib/security/credentials/external/aws_request_signer.cc +5 -4
  1123. data/src/core/lib/security/credentials/external/aws_request_signer.h +1 -1
  1124. data/src/core/lib/security/credentials/external/external_account_credentials.cc +127 -80
  1125. data/src/core/lib/security/credentials/external/external_account_credentials.h +15 -17
  1126. data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +5 -5
  1127. data/src/core/lib/security/credentials/external/file_external_account_credentials.h +4 -3
  1128. data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +43 -26
  1129. data/src/core/lib/security/credentials/external/url_external_account_credentials.h +10 -7
  1130. data/src/core/lib/security/credentials/fake/fake_credentials.cc +18 -18
  1131. data/src/core/lib/security/credentials/fake/fake_credentials.h +14 -16
  1132. data/src/core/lib/security/credentials/google_default/credentials_generic.cc +1 -2
  1133. data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +85 -30
  1134. data/src/core/lib/security/credentials/google_default/google_default_credentials.h +6 -0
  1135. data/src/core/lib/security/credentials/iam/iam_credentials.cc +21 -28
  1136. data/src/core/lib/security/credentials/iam/iam_credentials.h +11 -9
  1137. data/src/core/lib/security/credentials/insecure/insecure_credentials.cc +13 -7
  1138. data/src/core/lib/security/credentials/jwt/json_token.cc +7 -9
  1139. data/src/core/lib/security/credentials/jwt/json_token.h +2 -1
  1140. data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +52 -51
  1141. data/src/core/lib/security/credentials/jwt/jwt_credentials.h +23 -15
  1142. data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +66 -59
  1143. data/src/core/lib/security/credentials/jwt/jwt_verifier.h +4 -4
  1144. data/src/core/lib/security/credentials/local/local_credentials.h +6 -0
  1145. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +166 -193
  1146. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +54 -34
  1147. data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +97 -157
  1148. data/src/core/lib/security/credentials/plugin/plugin_credentials.h +54 -27
  1149. data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +5 -14
  1150. data/src/core/lib/security/credentials/ssl/ssl_credentials.h +6 -4
  1151. data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +11 -9
  1152. data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +19 -15
  1153. data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +80 -25
  1154. data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +20 -12
  1155. data/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc +201 -0
  1156. data/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h +106 -0
  1157. data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +35 -85
  1158. data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +38 -85
  1159. data/src/core/lib/security/credentials/tls/tls_credentials.cc +21 -10
  1160. data/src/core/lib/security/credentials/tls/tls_credentials.h +6 -0
  1161. data/src/core/lib/security/credentials/tls/tls_utils.cc +32 -0
  1162. data/src/core/lib/security/credentials/tls/tls_utils.h +13 -0
  1163. data/src/core/lib/security/credentials/xds/xds_credentials.cc +31 -36
  1164. data/src/core/lib/security/credentials/xds/xds_credentials.h +6 -1
  1165. data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +22 -18
  1166. data/src/core/lib/security/security_connector/alts/alts_security_connector.h +3 -3
  1167. data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +24 -25
  1168. data/src/core/lib/security/security_connector/fake/fake_security_connector.h +0 -2
  1169. data/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc +8 -18
  1170. data/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +21 -16
  1171. data/src/core/lib/security/security_connector/load_system_roots_fallback.cc +1 -0
  1172. data/src/core/lib/security/security_connector/load_system_roots_linux.cc +5 -6
  1173. data/src/core/lib/security/security_connector/local/local_security_connector.cc +32 -24
  1174. data/src/core/lib/security/security_connector/security_connector.cc +8 -15
  1175. data/src/core/lib/security/security_connector/security_connector.h +24 -24
  1176. data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +24 -22
  1177. data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +1 -2
  1178. data/src/core/lib/security/security_connector/ssl_utils.cc +67 -39
  1179. data/src/core/lib/security/security_connector/ssl_utils.h +17 -21
  1180. data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +409 -272
  1181. data/src/core/lib/security/security_connector/tls/tls_security_connector.h +118 -79
  1182. data/src/core/lib/security/transport/auth_filters.h +38 -4
  1183. data/src/core/lib/security/transport/client_auth_filter.cc +88 -353
  1184. data/src/core/lib/security/transport/secure_endpoint.cc +8 -18
  1185. data/src/core/lib/security/transport/secure_endpoint.h +1 -0
  1186. data/src/core/lib/security/transport/security_handshaker.cc +138 -90
  1187. data/src/core/lib/security/transport/security_handshaker.h +2 -1
  1188. data/src/core/lib/security/transport/server_auth_filter.cc +58 -48
  1189. data/src/core/lib/security/transport/tsi_error.cc +5 -6
  1190. data/src/core/lib/security/transport/tsi_error.h +2 -1
  1191. data/src/core/lib/security/util/json_util.cc +8 -10
  1192. data/src/core/lib/security/util/json_util.h +1 -1
  1193. data/src/core/lib/service_config/service_config.h +82 -0
  1194. data/src/core/{ext/filters/client_channel → lib/service_config}/service_config_call_data.h +17 -31
  1195. data/src/core/{ext/filters/client_channel/service_config.cc → lib/service_config/service_config_impl.cc} +31 -27
  1196. data/src/core/{ext/filters/client_channel/service_config.h → lib/service_config/service_config_impl.h} +22 -23
  1197. data/src/core/{ext/filters/client_channel → lib/service_config}/service_config_parser.cc +35 -31
  1198. data/src/core/lib/service_config/service_config_parser.h +106 -0
  1199. data/src/core/lib/slice/percent_encoding.cc +84 -97
  1200. data/src/core/lib/slice/percent_encoding.h +23 -28
  1201. data/src/core/lib/slice/slice.cc +81 -191
  1202. data/src/core/lib/slice/slice.h +384 -0
  1203. data/src/core/lib/{gpr/tls_pthread.cc → slice/slice_api.cc} +15 -6
  1204. data/src/core/lib/slice/slice_buffer.cc +10 -7
  1205. data/src/core/lib/slice/slice_internal.h +15 -276
  1206. data/src/core/lib/slice/slice_refcount.cc +35 -0
  1207. data/src/core/lib/slice/slice_refcount.h +46 -0
  1208. data/src/core/lib/slice/slice_refcount_base.h +61 -0
  1209. data/src/core/lib/slice/slice_split.cc +100 -0
  1210. data/src/core/lib/slice/slice_split.h +40 -0
  1211. data/src/core/lib/slice/slice_string_helpers.cc +0 -83
  1212. data/src/core/lib/slice/slice_string_helpers.h +0 -11
  1213. data/src/core/lib/surface/api_trace.cc +2 -1
  1214. data/src/core/lib/surface/api_trace.h +1 -0
  1215. data/src/core/lib/surface/builtins.cc +49 -0
  1216. data/src/core/lib/surface/builtins.h +26 -0
  1217. data/src/core/lib/surface/byte_buffer_reader.cc +1 -1
  1218. data/src/core/lib/surface/call.cc +316 -521
  1219. data/src/core/lib/surface/call.h +14 -9
  1220. data/src/core/lib/surface/call_details.cc +2 -2
  1221. data/src/core/lib/surface/call_log_batch.cc +2 -2
  1222. data/src/core/lib/surface/channel.cc +75 -107
  1223. data/src/core/lib/surface/channel.h +17 -24
  1224. data/src/core/lib/surface/channel_init.cc +23 -76
  1225. data/src/core/lib/surface/channel_init.h +52 -44
  1226. data/src/core/lib/surface/channel_ping.cc +2 -3
  1227. data/src/core/lib/surface/channel_stack_type.cc +2 -1
  1228. data/src/core/lib/surface/completion_queue.cc +136 -145
  1229. data/src/core/lib/surface/completion_queue.h +3 -2
  1230. data/src/core/lib/surface/completion_queue_factory.cc +3 -3
  1231. data/src/core/lib/surface/completion_queue_factory.h +1 -0
  1232. data/src/core/lib/surface/event_string.cc +1 -0
  1233. data/src/core/lib/surface/init.cc +82 -60
  1234. data/src/core/lib/surface/init.h +10 -4
  1235. data/src/core/lib/surface/lame_client.cc +50 -35
  1236. data/src/core/lib/surface/lame_client.h +1 -1
  1237. data/src/core/lib/surface/metadata_array.cc +2 -2
  1238. data/src/core/lib/surface/server.cc +100 -128
  1239. data/src/core/lib/surface/server.h +58 -53
  1240. data/src/core/lib/surface/validate_metadata.cc +55 -24
  1241. data/src/core/lib/surface/validate_metadata.h +3 -2
  1242. data/src/core/lib/surface/version.cc +2 -2
  1243. data/src/core/lib/transport/bdp_estimator.cc +11 -12
  1244. data/src/core/lib/transport/bdp_estimator.h +2 -2
  1245. data/src/core/lib/transport/byte_stream.cc +9 -5
  1246. data/src/core/lib/transport/byte_stream.h +9 -8
  1247. data/src/core/lib/transport/connectivity_state.cc +9 -6
  1248. data/src/core/lib/transport/connectivity_state.h +2 -2
  1249. data/src/core/lib/transport/error_utils.cc +68 -29
  1250. data/src/core/lib/transport/error_utils.h +13 -6
  1251. data/src/core/lib/transport/metadata_batch.h +1348 -163
  1252. data/src/core/lib/transport/parsed_metadata.cc +37 -0
  1253. data/src/core/lib/transport/parsed_metadata.h +401 -0
  1254. data/src/core/lib/transport/pid_controller.cc +4 -4
  1255. data/src/core/lib/transport/status_conversion.cc +2 -2
  1256. data/src/core/lib/transport/status_conversion.h +1 -1
  1257. data/src/core/lib/transport/timeout_encoding.cc +204 -67
  1258. data/src/core/lib/transport/timeout_encoding.h +40 -10
  1259. data/src/core/lib/transport/transport.cc +15 -35
  1260. data/src/core/lib/transport/transport.h +94 -8
  1261. data/src/core/lib/transport/transport_impl.h +13 -0
  1262. data/src/core/lib/transport/transport_op_string.cc +13 -35
  1263. data/src/core/lib/uri/uri_parser.cc +237 -63
  1264. data/src/core/lib/uri/uri_parser.h +39 -23
  1265. data/src/core/plugin_registry/grpc_plugin_registry.cc +75 -102
  1266. data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +85 -0
  1267. data/src/core/tsi/alts/crypt/aes_gcm.cc +6 -3
  1268. data/src/core/tsi/alts/crypt/gsec.h +5 -0
  1269. data/src/core/tsi/alts/frame_protector/alts_frame_protector.cc +13 -12
  1270. data/src/core/tsi/alts/frame_protector/frame_handler.cc +10 -11
  1271. data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +36 -31
  1272. data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +2 -3
  1273. data/src/core/tsi/alts/handshaker/alts_shared_resource.cc +9 -1
  1274. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +38 -19
  1275. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +2 -1
  1276. data/src/core/tsi/alts/handshaker/alts_tsi_utils.cc +2 -2
  1277. data/src/core/tsi/alts/handshaker/alts_tsi_utils.h +1 -1
  1278. data/src/core/tsi/alts/handshaker/transport_security_common_api.cc +2 -2
  1279. data/src/core/tsi/alts/handshaker/transport_security_common_api.h +2 -2
  1280. data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc +2 -2
  1281. data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc +1 -1
  1282. data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +2 -2
  1283. data/src/core/tsi/fake_transport_security.cc +15 -7
  1284. data/src/core/tsi/local_transport_security.cc +42 -87
  1285. data/src/core/tsi/local_transport_security.h +1 -4
  1286. data/src/core/tsi/ssl/key_logging/ssl_key_logging.cc +141 -0
  1287. data/src/core/tsi/ssl/key_logging/ssl_key_logging.h +81 -0
  1288. data/src/core/tsi/ssl/session_cache/ssl_session.h +2 -4
  1289. data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +20 -53
  1290. data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +6 -7
  1291. data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +2 -2
  1292. data/src/core/tsi/ssl_transport_security.cc +186 -38
  1293. data/src/core/tsi/ssl_transport_security.h +45 -11
  1294. data/src/core/tsi/transport_security.cc +15 -3
  1295. data/src/core/tsi/transport_security.h +16 -1
  1296. data/src/core/tsi/transport_security_grpc.h +1 -0
  1297. data/src/core/tsi/transport_security_interface.h +26 -0
  1298. data/src/ruby/bin/math_services_pb.rb +1 -1
  1299. data/src/ruby/ext/grpc/extconf.rb +22 -10
  1300. data/src/ruby/ext/grpc/rb_byte_buffer.c +2 -1
  1301. data/src/ruby/ext/grpc/rb_call.c +5 -5
  1302. data/src/ruby/ext/grpc/rb_call_credentials.c +5 -5
  1303. data/src/ruby/ext/grpc/rb_channel.c +15 -10
  1304. data/src/ruby/ext/grpc/rb_channel_args.c +2 -2
  1305. data/src/ruby/ext/grpc/rb_channel_credentials.c +4 -4
  1306. data/src/ruby/ext/grpc/rb_channel_credentials.h +1 -0
  1307. data/src/ruby/ext/grpc/rb_completion_queue.c +3 -2
  1308. data/src/ruby/ext/grpc/rb_compression_options.c +5 -4
  1309. data/src/ruby/ext/grpc/rb_event_thread.c +4 -4
  1310. data/src/ruby/ext/grpc/rb_grpc.c +5 -4
  1311. data/src/ruby/ext/grpc/rb_grpc.h +1 -0
  1312. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +36 -34
  1313. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +56 -53
  1314. data/src/ruby/ext/grpc/rb_server.c +13 -9
  1315. data/src/ruby/ext/grpc/rb_server_credentials.c +3 -3
  1316. data/src/ruby/ext/grpc/rb_server_credentials.h +1 -0
  1317. data/src/ruby/ext/grpc/rb_xds_channel_credentials.c +8 -5
  1318. data/src/ruby/ext/grpc/rb_xds_channel_credentials.h +3 -1
  1319. data/src/ruby/ext/grpc/rb_xds_server_credentials.c +6 -5
  1320. data/src/ruby/ext/grpc/rb_xds_server_credentials.h +3 -1
  1321. data/src/ruby/lib/grpc/version.rb +1 -1
  1322. data/src/ruby/pb/grpc/health/v1/health_services_pb.rb +1 -1
  1323. data/src/ruby/pb/src/proto/grpc/testing/test_pb.rb +1 -0
  1324. data/src/ruby/pb/src/proto/grpc/testing/test_services_pb.rb +6 -6
  1325. data/src/ruby/spec/client_server_spec.rb +1 -1
  1326. data/third_party/abseil-cpp/absl/algorithm/container.h +104 -94
  1327. data/third_party/abseil-cpp/absl/base/attributes.h +88 -35
  1328. data/third_party/abseil-cpp/absl/base/call_once.h +2 -9
  1329. data/third_party/abseil-cpp/absl/base/config.h +102 -44
  1330. data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +25 -36
  1331. data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +4 -1
  1332. data/third_party/abseil-cpp/absl/base/internal/endian.h +61 -0
  1333. data/third_party/abseil-cpp/absl/base/internal/fast_type_id.h +48 -0
  1334. data/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +2 -3
  1335. data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +34 -32
  1336. data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +16 -6
  1337. data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +11 -2
  1338. data/third_party/abseil-cpp/absl/base/internal/spinlock.h +17 -6
  1339. data/third_party/abseil-cpp/absl/base/internal/spinlock_akaros.inc +2 -2
  1340. data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +3 -3
  1341. data/third_party/abseil-cpp/absl/base/internal/spinlock_posix.inc +2 -2
  1342. data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.h +13 -11
  1343. data/third_party/abseil-cpp/absl/base/internal/spinlock_win32.inc +5 -5
  1344. data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +70 -1
  1345. data/third_party/abseil-cpp/absl/base/internal/thread_identity.cc +9 -6
  1346. data/third_party/abseil-cpp/absl/base/internal/thread_identity.h +58 -52
  1347. data/third_party/abseil-cpp/absl/base/internal/throw_delegate.cc +111 -7
  1348. data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +0 -76
  1349. data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +17 -3
  1350. data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +4 -4
  1351. data/third_party/abseil-cpp/absl/base/log_severity.h +4 -4
  1352. data/third_party/abseil-cpp/absl/base/macros.h +11 -0
  1353. data/third_party/abseil-cpp/absl/base/optimization.h +10 -7
  1354. data/third_party/abseil-cpp/absl/base/options.h +1 -1
  1355. data/third_party/abseil-cpp/absl/base/port.h +0 -1
  1356. data/third_party/abseil-cpp/absl/base/thread_annotations.h +1 -1
  1357. data/third_party/abseil-cpp/absl/container/fixed_array.h +2 -7
  1358. data/third_party/abseil-cpp/absl/container/inlined_vector.h +110 -100
  1359. data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +1 -1
  1360. data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +17 -15
  1361. data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +23 -103
  1362. data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +39 -79
  1363. data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc +2 -1
  1364. data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +469 -429
  1365. data/third_party/abseil-cpp/absl/container/internal/layout.h +4 -4
  1366. data/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +3 -2
  1367. data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +21 -2
  1368. data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +374 -243
  1369. data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +27 -13
  1370. data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +12 -11
  1371. data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +6 -2
  1372. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +5 -2
  1373. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +15 -17
  1374. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_emscripten-inl.inc +110 -0
  1375. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +6 -1
  1376. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +234 -0
  1377. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +25 -7
  1378. data/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +11 -7
  1379. data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +21 -3
  1380. data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +2 -0
  1381. data/third_party/abseil-cpp/absl/debugging/symbolize.cc +2 -0
  1382. data/third_party/abseil-cpp/absl/debugging/symbolize_darwin.inc +2 -2
  1383. data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +16 -2
  1384. data/third_party/abseil-cpp/absl/debugging/symbolize_emscripten.inc +72 -0
  1385. data/third_party/abseil-cpp/absl/functional/function_ref.h +4 -1
  1386. data/third_party/abseil-cpp/absl/hash/hash.h +22 -0
  1387. data/third_party/abseil-cpp/absl/hash/internal/city.cc +15 -12
  1388. data/third_party/abseil-cpp/absl/hash/internal/city.h +1 -19
  1389. data/third_party/abseil-cpp/absl/hash/internal/hash.cc +27 -13
  1390. data/third_party/abseil-cpp/absl/hash/internal/hash.h +145 -45
  1391. data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.cc +123 -0
  1392. data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.h +50 -0
  1393. data/third_party/abseil-cpp/absl/memory/memory.h +1 -1
  1394. data/third_party/abseil-cpp/absl/meta/type_traits.h +47 -3
  1395. data/third_party/abseil-cpp/absl/numeric/bits.h +177 -0
  1396. data/third_party/abseil-cpp/absl/numeric/int128.cc +6 -13
  1397. data/third_party/abseil-cpp/absl/numeric/int128.h +146 -73
  1398. data/third_party/abseil-cpp/absl/numeric/int128_have_intrinsic.inc +19 -25
  1399. data/third_party/abseil-cpp/absl/numeric/int128_no_intrinsic.inc +73 -70
  1400. data/third_party/abseil-cpp/absl/numeric/internal/bits.h +358 -0
  1401. data/third_party/abseil-cpp/absl/numeric/internal/representation.h +55 -0
  1402. data/third_party/abseil-cpp/absl/{base → profiling}/internal/exponential_biased.cc +4 -4
  1403. data/third_party/abseil-cpp/absl/{base → profiling}/internal/exponential_biased.h +6 -6
  1404. data/third_party/abseil-cpp/absl/profiling/internal/sample_recorder.h +230 -0
  1405. data/third_party/abseil-cpp/absl/random/bernoulli_distribution.h +200 -0
  1406. data/third_party/abseil-cpp/absl/random/beta_distribution.h +427 -0
  1407. data/third_party/abseil-cpp/absl/random/discrete_distribution.cc +98 -0
  1408. data/third_party/abseil-cpp/absl/random/discrete_distribution.h +247 -0
  1409. data/third_party/abseil-cpp/absl/random/distributions.h +452 -0
  1410. data/third_party/abseil-cpp/absl/random/exponential_distribution.h +165 -0
  1411. data/third_party/abseil-cpp/absl/random/gaussian_distribution.cc +104 -0
  1412. data/third_party/abseil-cpp/absl/random/gaussian_distribution.h +275 -0
  1413. data/third_party/abseil-cpp/absl/random/internal/distribution_caller.h +92 -0
  1414. data/third_party/abseil-cpp/absl/random/internal/fast_uniform_bits.h +268 -0
  1415. data/third_party/abseil-cpp/absl/random/internal/fastmath.h +57 -0
  1416. data/third_party/abseil-cpp/absl/random/internal/generate_real.h +144 -0
  1417. data/third_party/abseil-cpp/absl/random/internal/iostream_state_saver.h +245 -0
  1418. data/third_party/abseil-cpp/absl/random/internal/nonsecure_base.h +150 -0
  1419. data/third_party/abseil-cpp/absl/random/internal/pcg_engine.h +308 -0
  1420. data/third_party/abseil-cpp/absl/random/internal/platform.h +171 -0
  1421. data/third_party/abseil-cpp/absl/random/internal/pool_urbg.cc +253 -0
  1422. data/third_party/abseil-cpp/absl/random/internal/pool_urbg.h +131 -0
  1423. data/third_party/abseil-cpp/absl/random/internal/randen.cc +91 -0
  1424. data/third_party/abseil-cpp/absl/random/internal/randen.h +102 -0
  1425. data/third_party/abseil-cpp/absl/random/internal/randen_detect.cc +221 -0
  1426. data/third_party/abseil-cpp/absl/random/internal/randen_detect.h +33 -0
  1427. data/third_party/abseil-cpp/absl/random/internal/randen_engine.h +239 -0
  1428. data/third_party/abseil-cpp/absl/random/internal/randen_hwaes.cc +526 -0
  1429. data/third_party/abseil-cpp/absl/random/internal/randen_hwaes.h +50 -0
  1430. data/third_party/abseil-cpp/absl/random/internal/randen_round_keys.cc +462 -0
  1431. data/third_party/abseil-cpp/absl/random/internal/randen_slow.cc +471 -0
  1432. data/third_party/abseil-cpp/absl/random/internal/randen_slow.h +40 -0
  1433. data/third_party/abseil-cpp/absl/random/internal/randen_traits.h +88 -0
  1434. data/third_party/abseil-cpp/absl/random/internal/salted_seed_seq.h +167 -0
  1435. data/third_party/abseil-cpp/absl/random/internal/seed_material.cc +267 -0
  1436. data/third_party/abseil-cpp/absl/random/internal/seed_material.h +104 -0
  1437. data/third_party/abseil-cpp/absl/random/internal/traits.h +101 -0
  1438. data/third_party/abseil-cpp/absl/random/internal/uniform_helper.h +244 -0
  1439. data/third_party/abseil-cpp/absl/random/internal/wide_multiply.h +111 -0
  1440. data/third_party/abseil-cpp/absl/random/log_uniform_int_distribution.h +257 -0
  1441. data/third_party/abseil-cpp/absl/random/poisson_distribution.h +258 -0
  1442. data/third_party/abseil-cpp/absl/random/random.h +189 -0
  1443. data/third_party/abseil-cpp/absl/random/seed_gen_exception.cc +46 -0
  1444. data/third_party/abseil-cpp/absl/random/seed_gen_exception.h +55 -0
  1445. data/third_party/abseil-cpp/absl/random/seed_sequences.cc +29 -0
  1446. data/third_party/abseil-cpp/absl/random/seed_sequences.h +110 -0
  1447. data/third_party/abseil-cpp/absl/random/uniform_int_distribution.h +275 -0
  1448. data/third_party/abseil-cpp/absl/random/uniform_real_distribution.h +202 -0
  1449. data/third_party/abseil-cpp/absl/random/zipf_distribution.h +271 -0
  1450. data/third_party/abseil-cpp/absl/status/internal/status_internal.h +18 -0
  1451. data/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +4 -7
  1452. data/third_party/abseil-cpp/absl/status/status.cc +27 -28
  1453. data/third_party/abseil-cpp/absl/status/status.h +98 -33
  1454. data/third_party/abseil-cpp/absl/status/statusor.cc +34 -2
  1455. data/third_party/abseil-cpp/absl/status/statusor.h +34 -24
  1456. data/third_party/abseil-cpp/absl/strings/charconv.cc +8 -8
  1457. data/third_party/abseil-cpp/absl/strings/charconv.h +3 -2
  1458. data/third_party/abseil-cpp/absl/strings/cord.cc +619 -570
  1459. data/third_party/abseil-cpp/absl/strings/cord.h +346 -101
  1460. data/third_party/abseil-cpp/absl/strings/escaping.cc +4 -4
  1461. data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +7 -7
  1462. data/third_party/abseil-cpp/absl/strings/internal/cord_internal.cc +89 -0
  1463. data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +478 -31
  1464. data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.cc +1128 -0
  1465. data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.h +939 -0
  1466. data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.cc +185 -0
  1467. data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.h +265 -0
  1468. data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.cc +68 -0
  1469. data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.h +211 -0
  1470. data/third_party/abseil-cpp/absl/strings/internal/cord_rep_consume.cc +129 -0
  1471. data/third_party/abseil-cpp/absl/strings/internal/cord_rep_consume.h +50 -0
  1472. data/third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h +146 -0
  1473. data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.cc +771 -0
  1474. data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.h +607 -0
  1475. data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring_reader.h +118 -0
  1476. data/third_party/abseil-cpp/absl/strings/internal/cordz_functions.cc +96 -0
  1477. data/third_party/abseil-cpp/absl/strings/internal/cordz_functions.h +85 -0
  1478. data/third_party/abseil-cpp/absl/strings/internal/cordz_handle.cc +139 -0
  1479. data/third_party/abseil-cpp/absl/strings/internal/cordz_handle.h +131 -0
  1480. data/third_party/abseil-cpp/absl/strings/internal/cordz_info.cc +445 -0
  1481. data/third_party/abseil-cpp/absl/strings/internal/cordz_info.h +298 -0
  1482. data/third_party/abseil-cpp/absl/strings/internal/cordz_statistics.h +87 -0
  1483. data/third_party/abseil-cpp/absl/strings/internal/cordz_update_scope.h +71 -0
  1484. data/third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h +121 -0
  1485. data/third_party/abseil-cpp/absl/strings/internal/resize_uninitialized.h +48 -2
  1486. data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +14 -0
  1487. data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +22 -0
  1488. data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +18 -5
  1489. data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +20 -5
  1490. data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +14 -0
  1491. data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +6 -6
  1492. data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +36 -18
  1493. data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +36 -18
  1494. data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +14 -0
  1495. data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +76 -73
  1496. data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +38 -16
  1497. data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +49 -74
  1498. data/third_party/abseil-cpp/absl/strings/internal/string_constant.h +64 -0
  1499. data/third_party/abseil-cpp/absl/strings/match.cc +6 -3
  1500. data/third_party/abseil-cpp/absl/strings/match.h +16 -6
  1501. data/third_party/abseil-cpp/absl/strings/numbers.cc +133 -5
  1502. data/third_party/abseil-cpp/absl/strings/numbers.h +44 -10
  1503. data/third_party/abseil-cpp/absl/strings/str_cat.cc +4 -4
  1504. data/third_party/abseil-cpp/absl/strings/str_format.h +1 -2
  1505. data/third_party/abseil-cpp/absl/strings/str_join.h +1 -1
  1506. data/third_party/abseil-cpp/absl/strings/str_split.h +38 -4
  1507. data/third_party/abseil-cpp/absl/strings/string_view.cc +16 -21
  1508. data/third_party/abseil-cpp/absl/strings/string_view.h +120 -39
  1509. data/third_party/abseil-cpp/absl/strings/substitute.cc +2 -1
  1510. data/third_party/abseil-cpp/absl/strings/substitute.h +99 -74
  1511. data/third_party/abseil-cpp/absl/synchronization/blocking_counter.cc +25 -15
  1512. data/third_party/abseil-cpp/absl/synchronization/blocking_counter.h +5 -3
  1513. data/third_party/abseil-cpp/absl/synchronization/internal/futex.h +154 -0
  1514. data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +2 -1
  1515. data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc +2 -2
  1516. data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +4 -4
  1517. data/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc +2 -66
  1518. data/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +2 -6
  1519. data/third_party/abseil-cpp/absl/synchronization/mutex.cc +71 -59
  1520. data/third_party/abseil-cpp/absl/synchronization/mutex.h +82 -65
  1521. data/third_party/abseil-cpp/absl/time/civil_time.cc +1 -3
  1522. data/third_party/abseil-cpp/absl/time/clock.cc +146 -130
  1523. data/third_party/abseil-cpp/absl/time/clock.h +2 -2
  1524. data/third_party/abseil-cpp/absl/time/duration.cc +3 -2
  1525. data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h +7 -11
  1526. data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +93 -20
  1527. data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc +1 -1
  1528. data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.h +2 -1
  1529. data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc +83 -21
  1530. data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc +7 -1
  1531. data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +49 -0
  1532. data/third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h +5 -5
  1533. data/third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc +2 -3
  1534. data/third_party/abseil-cpp/absl/time/time.cc +4 -3
  1535. data/third_party/abseil-cpp/absl/time/time.h +93 -60
  1536. data/third_party/abseil-cpp/absl/types/bad_optional_access.h +1 -1
  1537. data/third_party/abseil-cpp/absl/types/bad_variant_access.h +2 -2
  1538. data/third_party/abseil-cpp/absl/types/internal/variant.h +1 -1
  1539. data/third_party/abseil-cpp/absl/types/span.h +3 -3
  1540. data/third_party/abseil-cpp/absl/types/variant.h +9 -4
  1541. data/third_party/address_sorting/address_sorting_posix.c +1 -0
  1542. data/third_party/boringssl-with-bazel/err_data.c +696 -662
  1543. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c +67 -54
  1544. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c +22 -23
  1545. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.c +0 -2
  1546. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.c +6 -1
  1547. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_mbstr.c +16 -23
  1548. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c +64 -44
  1549. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_print.c +19 -29
  1550. data/third_party/boringssl-with-bazel/src/crypto/{x509 → asn1}/a_strex.c +269 -272
  1551. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strnid.c +106 -153
  1552. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_time.c +4 -4
  1553. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_type.c +19 -9
  1554. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c +1 -40
  1555. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utf8.c +1 -1
  1556. data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c +60 -49
  1557. data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_par.c +1 -1
  1558. data/third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.c +24 -28
  1559. data/third_party/boringssl-with-bazel/src/crypto/{x509 → asn1}/charmap.h +0 -0
  1560. data/third_party/boringssl-with-bazel/src/crypto/asn1/f_int.c +5 -0
  1561. data/third_party/boringssl-with-bazel/src/crypto/asn1/{asn1_locl.h → internal.h} +91 -1
  1562. data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c +57 -281
  1563. data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c +292 -200
  1564. data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c +10 -10
  1565. data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c +10 -14
  1566. data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c +8 -6
  1567. data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c +2 -1
  1568. data/third_party/boringssl-with-bazel/src/crypto/asn1/time_support.c +1 -1
  1569. data/third_party/boringssl-with-bazel/src/crypto/base64/base64.c +24 -8
  1570. data/third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.c +1 -7
  1571. data/third_party/boringssl-with-bazel/src/crypto/bio/connect.c +1 -5
  1572. data/third_party/boringssl-with-bazel/src/crypto/bio/fd.c +0 -4
  1573. data/third_party/boringssl-with-bazel/src/crypto/bio/file.c +1 -7
  1574. data/third_party/boringssl-with-bazel/src/crypto/bio/pair.c +1 -6
  1575. data/third_party/boringssl-with-bazel/src/crypto/bio/socket.c +3 -17
  1576. data/third_party/boringssl-with-bazel/src/crypto/blake2/blake2.c +4 -6
  1577. data/third_party/boringssl-with-bazel/src/crypto/bytestring/ber.c +3 -1
  1578. data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbb.c +9 -0
  1579. data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c +8 -0
  1580. data/third_party/boringssl-with-bazel/src/crypto/chacha/chacha.c +38 -47
  1581. data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.c +49 -65
  1582. data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_tls.c +1 -88
  1583. data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/internal.h +14 -3
  1584. data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/tls_cbc.c +119 -273
  1585. data/third_party/boringssl-with-bazel/src/crypto/conf/conf.c +14 -3
  1586. data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519.c +1 -1
  1587. data/third_party/boringssl-with-bazel/src/crypto/curve25519/internal.h +1 -1
  1588. data/third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c +6 -3
  1589. data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c +21 -0
  1590. data/third_party/boringssl-with-bazel/src/crypto/err/err.c +87 -80
  1591. data/third_party/boringssl-with-bazel/src/crypto/evp/evp.c +9 -0
  1592. data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c +2 -2
  1593. data/third_party/boringssl-with-bazel/src/crypto/evp/scrypt.c +32 -34
  1594. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.c +1 -0
  1595. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div.c +26 -9
  1596. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd_extra.c +3 -2
  1597. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h +6 -3
  1598. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/prime.c +0 -4
  1599. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/sqrt.c +5 -9
  1600. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/cipher.c +23 -3
  1601. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c +35 -2
  1602. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/des/des.c +10 -11
  1603. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/des/internal.h +1 -3
  1604. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c +9 -0
  1605. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digests.c +10 -2
  1606. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/md32_common.h +87 -160
  1607. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec.c +4 -0
  1608. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_key.c +0 -1
  1609. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h +0 -4
  1610. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa.c +105 -95
  1611. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/internal.h +39 -0
  1612. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md4/md4.c +56 -72
  1613. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/md5.c +56 -73
  1614. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cbc.c +33 -22
  1615. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cfb.c +9 -8
  1616. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ctr.c +9 -8
  1617. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm.c +17 -13
  1618. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c +1 -1
  1619. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/internal.h +1 -22
  1620. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ofb.c +2 -1
  1621. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/internal.h +6 -13
  1622. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c +2 -15
  1623. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/urandom.c +30 -13
  1624. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +50 -33
  1625. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +14 -9
  1626. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/fips.c +79 -0
  1627. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c +21 -16
  1628. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha1.c +93 -107
  1629. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha256.c +91 -113
  1630. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha512.c +50 -86
  1631. data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +397 -311
  1632. data/third_party/boringssl-with-bazel/src/crypto/hrss/hrss.c +219 -121
  1633. data/third_party/boringssl-with-bazel/src/crypto/hrss/internal.h +9 -2
  1634. data/third_party/boringssl-with-bazel/src/crypto/internal.h +125 -0
  1635. data/third_party/boringssl-with-bazel/src/crypto/lhash/internal.h +253 -0
  1636. data/third_party/boringssl-with-bazel/src/crypto/lhash/lhash.c +28 -23
  1637. data/third_party/boringssl-with-bazel/src/crypto/mem.c +46 -9
  1638. data/third_party/boringssl-with-bazel/src/crypto/obj/obj.c +10 -6
  1639. data/third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c +0 -9
  1640. data/third_party/boringssl-with-bazel/src/crypto/pem/pem_info.c +0 -2
  1641. data/third_party/boringssl-with-bazel/src/crypto/pem/pem_lib.c +0 -8
  1642. data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pk8.c +0 -2
  1643. data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pkey.c +0 -4
  1644. data/third_party/boringssl-with-bazel/src/crypto/pkcs7/internal.h +16 -7
  1645. data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7.c +38 -4
  1646. data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.c +156 -15
  1647. data/third_party/boringssl-with-bazel/src/crypto/pkcs8/internal.h +0 -1
  1648. data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8.c +1 -1
  1649. data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c +96 -49
  1650. data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305.c +1 -1
  1651. data/third_party/boringssl-with-bazel/src/crypto/pool/internal.h +5 -1
  1652. data/third_party/boringssl-with-bazel/src/crypto/pool/pool.c +59 -22
  1653. data/third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c +4 -0
  1654. data/third_party/boringssl-with-bazel/src/crypto/rand_extra/fuchsia.c +4 -0
  1655. data/third_party/boringssl-with-bazel/src/crypto/rand_extra/passive.c +2 -2
  1656. data/third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c +1 -1
  1657. data/third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c +4 -0
  1658. data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_asn1.c +1 -2
  1659. data/third_party/boringssl-with-bazel/src/crypto/siphash/siphash.c +6 -6
  1660. data/third_party/boringssl-with-bazel/src/crypto/thread_pthread.c +0 -28
  1661. data/third_party/boringssl-with-bazel/src/crypto/x509/a_verify.c +15 -11
  1662. data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c +1 -1
  1663. data/third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.c +2 -18
  1664. data/third_party/boringssl-with-bazel/src/crypto/x509/by_dir.c +1 -0
  1665. data/third_party/boringssl-with-bazel/src/crypto/x509/by_file.c +2 -0
  1666. data/third_party/boringssl-with-bazel/src/crypto/x509/internal.h +351 -13
  1667. data/third_party/boringssl-with-bazel/src/crypto/x509/name_print.c +246 -0
  1668. data/third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c +15 -4
  1669. data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +10 -5
  1670. data/third_party/boringssl-with-bazel/src/crypto/x509/t_req.c +2 -0
  1671. data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +0 -179
  1672. data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c +7 -2
  1673. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_att.c +24 -47
  1674. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c +3 -2
  1675. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.c +2 -2
  1676. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_lu.c +1 -5
  1677. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c +1 -0
  1678. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_req.c +42 -89
  1679. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c +9 -16
  1680. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c +2 -0
  1681. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.c +25 -22
  1682. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +25 -69
  1683. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c +54 -74
  1684. data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c +32 -0
  1685. data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +2 -4
  1686. data/third_party/boringssl-with-bazel/src/crypto/x509/x509rset.c +3 -0
  1687. data/third_party/boringssl-with-bazel/src/crypto/x509/x_algor.c +21 -19
  1688. data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +3 -16
  1689. data/third_party/boringssl-with-bazel/src/crypto/x509/x_attrib.c +7 -25
  1690. data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c +14 -11
  1691. data/third_party/boringssl-with-bazel/src/crypto/x509/x_exten.c +2 -0
  1692. data/third_party/boringssl-with-bazel/src/crypto/x509/x_name.c +23 -21
  1693. data/third_party/boringssl-with-bazel/src/crypto/x509/x_pubkey.c +25 -22
  1694. data/third_party/boringssl-with-bazel/src/crypto/x509/x_req.c +5 -8
  1695. data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c +5 -0
  1696. data/third_party/boringssl-with-bazel/src/crypto/x509/x_val.c +2 -0
  1697. data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +12 -11
  1698. data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.c +3 -0
  1699. data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +239 -11
  1700. data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_cache.c +2 -1
  1701. data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c +2 -2
  1702. data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_lib.c +1 -1
  1703. data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_map.c +2 -1
  1704. data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_node.c +1 -1
  1705. data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_tree.c +5 -4
  1706. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akey.c +24 -5
  1707. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c +18 -8
  1708. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bitst.c +3 -0
  1709. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c +1 -0
  1710. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c +8 -11
  1711. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_crld.c +4 -2
  1712. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_enum.c +5 -0
  1713. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_lib.c +23 -4
  1714. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ncons.c +112 -55
  1715. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pci.c +2 -1
  1716. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c +14 -13
  1717. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +2 -2
  1718. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_skey.c +1 -0
  1719. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +80 -38
  1720. data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +1 -4
  1721. data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +66 -1
  1722. data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +1517 -495
  1723. data/third_party/boringssl-with-bazel/src/include/openssl/asn1t.h +5 -12
  1724. data/third_party/boringssl-with-bazel/src/include/openssl/base.h +57 -13
  1725. data/third_party/boringssl-with-bazel/src/include/openssl/base64.h +8 -0
  1726. data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +3 -1
  1727. data/third_party/boringssl-with-bazel/src/include/openssl/bn.h +3 -3
  1728. data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +10 -0
  1729. data/third_party/boringssl-with-bazel/src/include/openssl/chacha.h +1 -1
  1730. data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +21 -11
  1731. data/third_party/boringssl-with-bazel/src/include/openssl/conf.h +8 -5
  1732. data/third_party/boringssl-with-bazel/src/include/openssl/crypto.h +24 -4
  1733. data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +4 -12
  1734. data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +9 -2
  1735. data/third_party/boringssl-with-bazel/src/include/openssl/dsa.h +27 -41
  1736. data/third_party/boringssl-with-bazel/src/include/openssl/ec.h +5 -2
  1737. data/third_party/boringssl-with-bazel/src/include/openssl/ec_key.h +12 -27
  1738. data/third_party/boringssl-with-bazel/src/include/openssl/ecdsa.h +41 -10
  1739. data/third_party/boringssl-with-bazel/src/include/openssl/err.h +3 -2
  1740. data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +55 -104
  1741. data/third_party/boringssl-with-bazel/src/{crypto/x509/x509_r2x.c → include/openssl/evp_errors.h} +41 -58
  1742. data/third_party/boringssl-with-bazel/src/include/openssl/hkdf.h +4 -0
  1743. data/third_party/boringssl-with-bazel/src/include/openssl/hpke.h +350 -0
  1744. data/third_party/boringssl-with-bazel/src/include/openssl/hrss.h +14 -12
  1745. data/third_party/boringssl-with-bazel/src/include/openssl/lhash.h +4 -205
  1746. data/third_party/boringssl-with-bazel/src/include/openssl/mem.h +12 -3
  1747. data/third_party/boringssl-with-bazel/src/include/openssl/obj.h +26 -6
  1748. data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +0 -20
  1749. data/third_party/boringssl-with-bazel/src/include/openssl/pkcs7.h +42 -18
  1750. data/third_party/boringssl-with-bazel/src/include/openssl/pkcs8.h +15 -2
  1751. data/third_party/boringssl-with-bazel/src/include/openssl/pool.h +7 -1
  1752. data/third_party/boringssl-with-bazel/src/include/openssl/rand.h +2 -2
  1753. data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +128 -91
  1754. data/third_party/boringssl-with-bazel/src/include/openssl/span.h +37 -15
  1755. data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +386 -104
  1756. data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +41 -48
  1757. data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +1160 -331
  1758. data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +16 -679
  1759. data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +54 -17
  1760. data/third_party/boringssl-with-bazel/src/ssl/d1_both.cc +16 -18
  1761. data/third_party/boringssl-with-bazel/src/ssl/d1_srtp.cc +1 -1
  1762. data/third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc +1084 -0
  1763. data/third_party/boringssl-with-bazel/src/ssl/{t1_lib.cc → extensions.cc} +660 -747
  1764. data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +298 -22
  1765. data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +90 -43
  1766. data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +307 -201
  1767. data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +173 -36
  1768. data/third_party/boringssl-with-bazel/src/ssl/internal.h +474 -156
  1769. data/third_party/boringssl-with-bazel/src/ssl/s3_both.cc +9 -3
  1770. data/third_party/boringssl-with-bazel/src/ssl/s3_lib.cc +0 -1
  1771. data/third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc +14 -19
  1772. data/third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc +4 -6
  1773. data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +2 -2
  1774. data/third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc +34 -31
  1775. data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +56 -110
  1776. data/third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc +2 -0
  1777. data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +129 -96
  1778. data/third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc +3 -0
  1779. data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +10 -15
  1780. data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +11 -3
  1781. data/third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc +28 -23
  1782. data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +79 -34
  1783. data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +235 -178
  1784. data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +146 -110
  1785. data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +241 -132
  1786. data/third_party/boringssl-with-bazel/src/ssl/tls_method.cc +4 -2
  1787. data/third_party/cares/cares/{ares.h → include/ares.h} +73 -1
  1788. data/third_party/cares/cares/{ares_dns.h → include/ares_dns.h} +9 -0
  1789. data/third_party/cares/cares/{ares_rules.h → include/ares_rules.h} +0 -0
  1790. data/third_party/cares/cares/{ares_version.h → include/ares_version.h} +3 -3
  1791. data/third_party/cares/cares/{ares__close_sockets.c → src/lib/ares__close_sockets.c} +2 -2
  1792. data/third_party/cares/cares/{ares__get_hostent.c → src/lib/ares__get_hostent.c} +1 -2
  1793. data/third_party/cares/cares/src/lib/ares__parse_into_addrinfo.c +260 -0
  1794. data/third_party/cares/cares/{ares__read_line.c → src/lib/ares__read_line.c} +0 -0
  1795. data/third_party/cares/cares/src/lib/ares__readaddrinfo.c +264 -0
  1796. data/third_party/cares/cares/src/lib/ares__sortaddrinfo.c +499 -0
  1797. data/third_party/cares/cares/{ares__timeval.c → src/lib/ares__timeval.c} +0 -0
  1798. data/third_party/cares/cares/src/lib/ares_android.c +444 -0
  1799. data/third_party/cares/cares/src/lib/ares_android.h +27 -0
  1800. data/third_party/cares/cares/{ares_cancel.c → src/lib/ares_cancel.c} +0 -0
  1801. data/third_party/cares/cares/{ares_create_query.c → src/lib/ares_create_query.c} +8 -17
  1802. data/third_party/cares/cares/{ares_data.c → src/lib/ares_data.c} +18 -0
  1803. data/third_party/cares/cares/{ares_data.h → src/lib/ares_data.h} +2 -0
  1804. data/third_party/cares/cares/{ares_destroy.c → src/lib/ares_destroy.c} +0 -0
  1805. data/third_party/cares/cares/{ares_expand_name.c → src/lib/ares_expand_name.c} +114 -23
  1806. data/third_party/cares/cares/{ares_expand_string.c → src/lib/ares_expand_string.c} +2 -5
  1807. data/third_party/cares/cares/{ares_fds.c → src/lib/ares_fds.c} +0 -0
  1808. data/third_party/cares/cares/{ares_free_hostent.c → src/lib/ares_free_hostent.c} +6 -4
  1809. data/third_party/cares/cares/{ares_free_string.c → src/lib/ares_free_string.c} +0 -0
  1810. data/third_party/cares/cares/src/lib/ares_freeaddrinfo.c +59 -0
  1811. data/third_party/cares/cares/src/lib/ares_getaddrinfo.c +772 -0
  1812. data/third_party/cares/cares/{ares_getenv.c → src/lib/ares_getenv.c} +0 -2
  1813. data/third_party/cares/cares/{ares_getenv.h → src/lib/ares_getenv.h} +0 -0
  1814. data/third_party/cares/cares/{ares_gethostbyaddr.c → src/lib/ares_gethostbyaddr.c} +2 -9
  1815. data/third_party/cares/cares/{ares_gethostbyname.c → src/lib/ares_gethostbyname.c} +25 -20
  1816. data/third_party/cares/cares/{ares_getnameinfo.c → src/lib/ares_getnameinfo.c} +4 -10
  1817. data/third_party/cares/cares/{ares_getsock.c → src/lib/ares_getsock.c} +0 -0
  1818. data/third_party/cares/cares/{ares_inet_net_pton.h → src/lib/ares_inet_net_pton.h} +0 -0
  1819. data/third_party/cares/cares/{ares_init.c → src/lib/ares_init.c} +79 -40
  1820. data/third_party/cares/cares/{ares_iphlpapi.h → src/lib/ares_iphlpapi.h} +0 -0
  1821. data/third_party/cares/cares/{ares_ipv6.h → src/lib/ares_ipv6.h} +7 -0
  1822. data/third_party/cares/cares/{ares_library_init.c → src/lib/ares_library_init.c} +7 -2
  1823. data/third_party/cares/cares/{ares_library_init.h → src/lib/ares_library_init.h} +1 -1
  1824. data/third_party/cares/cares/{ares_llist.c → src/lib/ares_llist.c} +0 -0
  1825. data/third_party/cares/cares/{ares_llist.h → src/lib/ares_llist.h} +0 -0
  1826. data/third_party/cares/cares/{ares_mkquery.c → src/lib/ares_mkquery.c} +0 -0
  1827. data/third_party/cares/cares/src/lib/ares_nameser.h +482 -0
  1828. data/third_party/cares/cares/{ares_nowarn.c → src/lib/ares_nowarn.c} +0 -0
  1829. data/third_party/cares/cares/{ares_nowarn.h → src/lib/ares_nowarn.h} +0 -0
  1830. data/third_party/cares/cares/{ares_options.c → src/lib/ares_options.c} +0 -0
  1831. data/third_party/cares/cares/src/lib/ares_parse_a_reply.c +209 -0
  1832. data/third_party/cares/cares/src/lib/ares_parse_aaaa_reply.c +212 -0
  1833. data/third_party/cares/cares/src/lib/ares_parse_caa_reply.c +199 -0
  1834. data/third_party/cares/cares/{ares_parse_mx_reply.c → src/lib/ares_parse_mx_reply.c} +2 -8
  1835. data/third_party/cares/cares/{ares_parse_naptr_reply.c → src/lib/ares_parse_naptr_reply.c} +2 -13
  1836. data/third_party/cares/cares/{ares_parse_ns_reply.c → src/lib/ares_parse_ns_reply.c} +5 -11
  1837. data/third_party/cares/cares/{ares_parse_ptr_reply.c → src/lib/ares_parse_ptr_reply.c} +53 -46
  1838. data/third_party/cares/cares/src/lib/ares_parse_soa_reply.c +179 -0
  1839. data/third_party/cares/cares/{ares_parse_srv_reply.c → src/lib/ares_parse_srv_reply.c} +2 -13
  1840. data/third_party/cares/cares/{ares_parse_txt_reply.c → src/lib/ares_parse_txt_reply.c} +3 -9
  1841. data/third_party/cares/cares/{ares_platform.c → src/lib/ares_platform.c} +0 -0
  1842. data/third_party/cares/cares/{ares_platform.h → src/lib/ares_platform.h} +0 -0
  1843. data/third_party/cares/cares/{ares_private.h → src/lib/ares_private.h} +52 -11
  1844. data/third_party/cares/cares/{ares_process.c → src/lib/ares_process.c} +127 -52
  1845. data/third_party/cares/cares/{ares_query.c → src/lib/ares_query.c} +3 -9
  1846. data/third_party/cares/cares/{ares_search.c → src/lib/ares_search.c} +5 -7
  1847. data/third_party/cares/cares/{ares_send.c → src/lib/ares_send.c} +2 -8
  1848. data/third_party/cares/cares/{ares_setup.h → src/lib/ares_setup.h} +4 -1
  1849. data/third_party/cares/cares/{ares_strcasecmp.c → src/lib/ares_strcasecmp.c} +0 -0
  1850. data/third_party/cares/cares/{ares_strcasecmp.h → src/lib/ares_strcasecmp.h} +0 -0
  1851. data/third_party/cares/cares/{ares_strdup.c → src/lib/ares_strdup.c} +0 -0
  1852. data/third_party/cares/cares/{ares_strdup.h → src/lib/ares_strdup.h} +0 -0
  1853. data/third_party/cares/cares/{ares_strerror.c → src/lib/ares_strerror.c} +0 -0
  1854. data/third_party/cares/cares/{ares_strsplit.c → src/lib/ares_strsplit.c} +4 -0
  1855. data/third_party/cares/cares/{ares_strsplit.h → src/lib/ares_strsplit.h} +0 -0
  1856. data/third_party/cares/cares/{ares_timeout.c → src/lib/ares_timeout.c} +0 -0
  1857. data/third_party/cares/cares/{ares_version.c → src/lib/ares_version.c} +0 -0
  1858. data/third_party/cares/cares/{ares_writev.c → src/lib/ares_writev.c} +0 -0
  1859. data/third_party/cares/cares/src/lib/ares_writev.h +36 -0
  1860. data/third_party/cares/cares/{bitncmp.c → src/lib/bitncmp.c} +0 -0
  1861. data/third_party/cares/cares/{bitncmp.h → src/lib/bitncmp.h} +0 -0
  1862. data/third_party/cares/cares/src/lib/config-dos.h +115 -0
  1863. data/third_party/cares/cares/{config-win32.h → src/lib/config-win32.h} +0 -0
  1864. data/third_party/cares/cares/{inet_net_pton.c → src/lib/inet_net_pton.c} +2 -8
  1865. data/third_party/cares/cares/{inet_ntop.c → src/lib/inet_ntop.c} +2 -8
  1866. data/third_party/cares/cares/{setup_once.h → src/lib/setup_once.h} +0 -0
  1867. data/third_party/cares/cares/{windows_port.c → src/lib/windows_port.c} +0 -0
  1868. data/third_party/re2/re2/compile.cc +91 -109
  1869. data/third_party/re2/re2/dfa.cc +27 -39
  1870. data/third_party/re2/re2/filtered_re2.cc +18 -2
  1871. data/third_party/re2/re2/filtered_re2.h +10 -5
  1872. data/third_party/re2/re2/nfa.cc +1 -1
  1873. data/third_party/re2/re2/parse.cc +42 -23
  1874. data/third_party/re2/re2/perl_groups.cc +34 -34
  1875. data/third_party/re2/re2/prefilter.cc +3 -2
  1876. data/third_party/re2/re2/prog.cc +182 -4
  1877. data/third_party/re2/re2/prog.h +28 -9
  1878. data/third_party/re2/re2/re2.cc +87 -118
  1879. data/third_party/re2/re2/re2.h +156 -141
  1880. data/third_party/re2/re2/regexp.cc +12 -5
  1881. data/third_party/re2/re2/regexp.h +8 -2
  1882. data/third_party/re2/re2/set.cc +31 -9
  1883. data/third_party/re2/re2/set.h +9 -4
  1884. data/third_party/re2/re2/simplify.cc +11 -3
  1885. data/third_party/re2/re2/tostring.cc +1 -1
  1886. data/third_party/re2/re2/walker-inl.h +1 -1
  1887. data/third_party/re2/util/mutex.h +2 -2
  1888. data/third_party/re2/util/pcre.h +3 -3
  1889. data/third_party/upb/third_party/utf8_range/naive.c +92 -0
  1890. data/third_party/upb/third_party/utf8_range/range2-neon.c +157 -0
  1891. data/third_party/upb/third_party/utf8_range/range2-sse.c +170 -0
  1892. data/third_party/upb/third_party/utf8_range/utf8_range.h +9 -0
  1893. data/third_party/upb/upb/decode.c +758 -351
  1894. data/third_party/upb/upb/decode.h +66 -12
  1895. data/third_party/upb/upb/decode_fast.c +596 -581
  1896. data/third_party/upb/upb/decode_fast.h +40 -13
  1897. data/third_party/upb/upb/decode_internal.h +211 -0
  1898. data/third_party/upb/upb/def.c +2089 -1069
  1899. data/third_party/upb/upb/def.h +341 -256
  1900. data/third_party/upb/upb/def.hpp +160 -161
  1901. data/third_party/upb/upb/encode.c +285 -165
  1902. data/third_party/upb/upb/encode.h +38 -13
  1903. data/third_party/upb/upb/msg.c +276 -102
  1904. data/third_party/upb/upb/msg.h +84 -582
  1905. data/third_party/upb/upb/msg_internal.h +818 -0
  1906. data/third_party/upb/upb/port_def.inc +85 -24
  1907. data/third_party/upb/upb/port_undef.inc +38 -1
  1908. data/third_party/upb/upb/reflection.c +312 -240
  1909. data/third_party/upb/upb/reflection.h +119 -67
  1910. data/third_party/upb/upb/reflection.hpp +37 -0
  1911. data/third_party/upb/upb/table.c +398 -193
  1912. data/third_party/upb/upb/table_internal.h +383 -0
  1913. data/third_party/upb/upb/text_encode.c +141 -90
  1914. data/third_party/upb/upb/text_encode.h +31 -5
  1915. data/third_party/upb/upb/upb.c +164 -66
  1916. data/third_party/upb/upb/upb.h +145 -139
  1917. data/third_party/upb/upb/upb.hpp +50 -23
  1918. data/third_party/upb/upb/upb_internal.h +68 -0
  1919. data/third_party/xxhash/xxhash.h +679 -542
  1920. metadata +597 -254
  1921. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +0 -44
  1922. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +0 -84
  1923. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +0 -179
  1924. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc +0 -38
  1925. data/src/core/ext/filters/client_channel/resolver_registry.cc +0 -197
  1926. data/src/core/ext/filters/client_channel/resolver_registry.h +0 -89
  1927. data/src/core/ext/filters/client_channel/service_config_parser.h +0 -92
  1928. data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc +0 -210
  1929. data/src/core/ext/filters/workarounds/workaround_utils.cc +0 -53
  1930. data/src/core/ext/filters/workarounds/workaround_utils.h +0 -39
  1931. data/src/core/ext/transport/chttp2/client/authority.cc +0 -42
  1932. data/src/core/ext/transport/chttp2/client/authority.h +0 -36
  1933. data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +0 -125
  1934. data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +0 -90
  1935. data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +0 -213
  1936. data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +0 -55
  1937. data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +0 -76
  1938. data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +0 -130
  1939. data/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc +0 -37
  1940. data/src/core/ext/transport/chttp2/transport/hpack_table.cc +0 -242
  1941. data/src/core/ext/transport/chttp2/transport/hpack_table.h +0 -148
  1942. data/src/core/ext/transport/chttp2/transport/incoming_metadata.cc +0 -66
  1943. data/src/core/ext/transport/chttp2/transport/incoming_metadata.h +0 -58
  1944. data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.c +0 -27
  1945. data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h +0 -56
  1946. data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.c +0 -27
  1947. data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h +0 -56
  1948. data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.c +0 -27
  1949. data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h +0 -56
  1950. data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.c +0 -27
  1951. data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h +0 -56
  1952. data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.c +0 -27
  1953. data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h +0 -56
  1954. data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c +0 -58
  1955. data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h +0 -124
  1956. data/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.c +0 -33
  1957. data/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.h +0 -77
  1958. data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c +0 -72
  1959. data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.h +0 -35
  1960. data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c +0 -73
  1961. data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.h +0 -35
  1962. data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c +0 -72
  1963. data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.h +0 -35
  1964. data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c +0 -80
  1965. data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.h +0 -35
  1966. data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c +0 -74
  1967. data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.h +0 -35
  1968. data/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.c +0 -44
  1969. data/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.h +0 -35
  1970. data/src/core/lib/avl/avl.cc +0 -306
  1971. data/src/core/lib/compression/algorithm_metadata.h +0 -61
  1972. data/src/core/lib/compression/compression_args.cc +0 -135
  1973. data/src/core/lib/compression/compression_args.h +0 -56
  1974. data/src/core/lib/compression/stream_compression.cc +0 -80
  1975. data/src/core/lib/compression/stream_compression.h +0 -116
  1976. data/src/core/lib/compression/stream_compression_gzip.cc +0 -230
  1977. data/src/core/lib/compression/stream_compression_gzip.h +0 -28
  1978. data/src/core/lib/compression/stream_compression_identity.cc +0 -90
  1979. data/src/core/lib/compression/stream_compression_identity.h +0 -29
  1980. data/src/core/lib/gpr/arena.h +0 -47
  1981. data/src/core/lib/gpr/tls_gcc.h +0 -52
  1982. data/src/core/lib/gpr/tls_msvc.h +0 -54
  1983. data/src/core/lib/gpr/tls_pthread.h +0 -56
  1984. data/src/core/lib/gpr/tls_stdcpp.h +0 -48
  1985. data/src/core/lib/gprpp/atomic.h +0 -104
  1986. data/src/core/lib/iomgr/endpoint_pair_uv.cc +0 -40
  1987. data/src/core/lib/iomgr/iomgr_custom.cc +0 -79
  1988. data/src/core/lib/iomgr/iomgr_custom.h +0 -49
  1989. data/src/core/lib/iomgr/iomgr_uv.cc +0 -43
  1990. data/src/core/lib/iomgr/poller/eventmanager_libuv.cc +0 -88
  1991. data/src/core/lib/iomgr/poller/eventmanager_libuv.h +0 -88
  1992. data/src/core/lib/iomgr/pollset_custom.cc +0 -106
  1993. data/src/core/lib/iomgr/pollset_custom.h +0 -35
  1994. data/src/core/lib/iomgr/pollset_set_custom.cc +0 -48
  1995. data/src/core/lib/iomgr/pollset_set_custom.h +0 -26
  1996. data/src/core/lib/iomgr/pollset_uv.cc +0 -93
  1997. data/src/core/lib/iomgr/pollset_uv.h +0 -32
  1998. data/src/core/lib/iomgr/resolve_address_custom.cc +0 -168
  1999. data/src/core/lib/iomgr/resolve_address_custom.h +0 -45
  2000. data/src/core/lib/iomgr/resource_quota.cc +0 -1016
  2001. data/src/core/lib/iomgr/resource_quota.h +0 -177
  2002. data/src/core/lib/iomgr/sockaddr_custom.h +0 -54
  2003. data/src/core/lib/iomgr/tcp_client_custom.cc +0 -161
  2004. data/src/core/lib/iomgr/tcp_custom.cc +0 -391
  2005. data/src/core/lib/iomgr/tcp_custom.h +0 -84
  2006. data/src/core/lib/iomgr/tcp_server_custom.cc +0 -483
  2007. data/src/core/lib/iomgr/tcp_uv.cc +0 -419
  2008. data/src/core/lib/iomgr/timer_custom.cc +0 -95
  2009. data/src/core/lib/iomgr/timer_custom.h +0 -43
  2010. data/src/core/lib/iomgr/timer_uv.cc +0 -66
  2011. data/src/core/lib/iomgr/udp_server.cc +0 -747
  2012. data/src/core/lib/iomgr/udp_server.h +0 -103
  2013. data/src/core/lib/security/credentials/credentials_metadata.cc +0 -62
  2014. data/src/core/lib/slice/slice_intern.cc +0 -373
  2015. data/src/core/lib/slice/slice_utils.h +0 -200
  2016. data/src/core/lib/surface/init_secure.cc +0 -81
  2017. data/src/core/lib/transport/metadata.cc +0 -693
  2018. data/src/core/lib/transport/metadata.h +0 -446
  2019. data/src/core/lib/transport/metadata_batch.cc +0 -419
  2020. data/src/core/lib/transport/static_metadata.cc +0 -1249
  2021. data/src/core/lib/transport/static_metadata.h +0 -604
  2022. data/src/core/lib/transport/status_metadata.cc +0 -62
  2023. data/src/core/lib/transport/status_metadata.h +0 -48
  2024. data/third_party/abseil-cpp/absl/base/internal/bits.h +0 -219
  2025. data/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.inc +0 -249
  2026. data/third_party/boringssl-with-bazel/src/crypto/asn1/f_enum.c +0 -93
  2027. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/is_fips.c +0 -29
  2028. data/third_party/boringssl-with-bazel/src/crypto/hpke/internal.h +0 -246
  2029. data/third_party/boringssl-with-bazel/src/crypto/x509/vpm_int.h +0 -71
  2030. data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_int.h +0 -217
  2031. data/third_party/cares/cares/ares_getopt.c +0 -122
  2032. data/third_party/cares/cares/ares_getopt.h +0 -53
  2033. data/third_party/cares/cares/ares_parse_a_reply.c +0 -264
  2034. data/third_party/cares/cares/ares_parse_aaaa_reply.c +0 -264
  2035. data/third_party/cares/cares/ares_parse_soa_reply.c +0 -133
  2036. data/third_party/upb/third_party/wyhash/wyhash.h +0 -145
  2037. data/third_party/upb/upb/decode.int.h +0 -163
  2038. data/third_party/upb/upb/table.int.h +0 -475
  2039. data/third_party/upb/upb/upb.int.h +0 -29
@@ -23,183 +23,1368 @@
23
23
 
24
24
  #include <stdbool.h>
25
25
 
26
+ #include <cstdint>
27
+ #include <limits>
28
+
29
+ #include "absl/strings/escaping.h"
30
+ #include "absl/strings/match.h"
31
+ #include "absl/strings/str_join.h"
26
32
  #include "absl/types/optional.h"
27
33
 
28
34
  #include <grpc/grpc.h>
29
35
  #include <grpc/slice.h>
36
+ #include <grpc/status.h>
30
37
  #include <grpc/support/time.h>
31
38
 
39
+ #include "src/core/lib/compression/compression_internal.h"
40
+ #include "src/core/lib/gprpp/chunked_vector.h"
41
+ #include "src/core/lib/gprpp/table.h"
32
42
  #include "src/core/lib/iomgr/exec_ctx.h"
33
- #include "src/core/lib/transport/metadata.h"
34
- #include "src/core/lib/transport/static_metadata.h"
35
-
36
- typedef struct grpc_linked_mdelem {
37
- grpc_linked_mdelem() {}
38
-
39
- grpc_mdelem md;
40
- struct grpc_linked_mdelem* next = nullptr;
41
- struct grpc_linked_mdelem* prev = nullptr;
42
- void* reserved;
43
- } grpc_linked_mdelem;
44
-
45
- typedef struct grpc_mdelem_list {
46
- size_t count;
47
- size_t default_count; // Number of default keys.
48
- grpc_linked_mdelem* head;
49
- grpc_linked_mdelem* tail;
50
- } grpc_mdelem_list;
51
-
52
- typedef struct grpc_metadata_batch {
53
- /** Metadata elements in this batch */
54
- grpc_mdelem_list list;
55
- grpc_metadata_batch_callouts idx;
56
- /** Used to calculate grpc-timeout at the point of sending,
57
- or GRPC_MILLIS_INF_FUTURE if this batch does not need to send a
58
- grpc-timeout */
59
- grpc_millis deadline;
60
- } grpc_metadata_batch;
61
-
62
- void grpc_metadata_batch_init(grpc_metadata_batch* batch);
63
- void grpc_metadata_batch_destroy(grpc_metadata_batch* batch);
64
- void grpc_metadata_batch_clear(grpc_metadata_batch* batch);
65
- bool grpc_metadata_batch_is_empty(grpc_metadata_batch* batch);
66
-
67
- /* Returns the transport size of the batch. */
68
- size_t grpc_metadata_batch_size(grpc_metadata_batch* batch);
69
-
70
- /** Remove \a storage from the batch, unreffing the mdelem contained */
71
- void grpc_metadata_batch_remove(grpc_metadata_batch* batch,
72
- grpc_linked_mdelem* storage);
73
- void grpc_metadata_batch_remove(grpc_metadata_batch* batch,
74
- grpc_metadata_batch_callouts_index idx);
75
-
76
- /** Substitute a new mdelem for an old value */
77
- grpc_error* grpc_metadata_batch_substitute(grpc_metadata_batch* batch,
78
- grpc_linked_mdelem* storage,
79
- grpc_mdelem new_mdelem);
80
-
81
- void grpc_metadata_batch_set_value(grpc_linked_mdelem* storage,
82
- const grpc_slice& value);
83
-
84
- /** Returns metadata value(s) for the specified key.
85
- If the key is not present in the batch, returns absl::nullopt.
86
- If the key is present exactly once in the batch, returns a string_view of
87
- that value.
88
- If the key is present more than once in the batch, constructs a
89
- comma-concatenated string of all values in concatenated_value and returns a
90
- string_view of that string. */
91
- absl::optional<absl::string_view> grpc_metadata_batch_get_value(
92
- grpc_metadata_batch* batch, absl::string_view target_key,
93
- std::string* concatenated_value);
94
-
95
- /** Add \a storage to the beginning of \a batch. storage->md is
96
- assumed to be valid.
97
- \a storage is owned by the caller and must survive for the
98
- lifetime of batch. This usually means it should be around
99
- for the lifetime of the call. */
100
- grpc_error* grpc_metadata_batch_link_head(grpc_metadata_batch* batch,
101
- grpc_linked_mdelem* storage)
102
- GRPC_MUST_USE_RESULT;
103
- grpc_error* grpc_metadata_batch_link_head(
104
- grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
105
- grpc_metadata_batch_callouts_index idx) GRPC_MUST_USE_RESULT;
106
-
107
- /** Add \a storage to the end of \a batch. storage->md is
108
- assumed to be valid.
109
- \a storage is owned by the caller and must survive for the
110
- lifetime of batch. This usually means it should be around
111
- for the lifetime of the call. */
112
- grpc_error* grpc_metadata_batch_link_tail(grpc_metadata_batch* batch,
113
- grpc_linked_mdelem* storage)
114
- GRPC_MUST_USE_RESULT;
115
- grpc_error* grpc_metadata_batch_link_tail(
116
- grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
117
- grpc_metadata_batch_callouts_index idx) GRPC_MUST_USE_RESULT;
118
-
119
- /** Add \a elem_to_add as the first element in \a batch, using
120
- \a storage as backing storage for the linked list element.
121
- \a storage is owned by the caller and must survive for the
122
- lifetime of batch. This usually means it should be around
123
- for the lifetime of the call.
124
- Takes ownership of \a elem_to_add */
125
- grpc_error* grpc_metadata_batch_add_head(
126
- grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
127
- grpc_mdelem elem_to_add) GRPC_MUST_USE_RESULT;
128
-
129
- // TODO(arjunroy, roth): Remove redundant methods.
130
- // add/link_head/tail are almost identical.
131
- inline grpc_error* GRPC_MUST_USE_RESULT grpc_metadata_batch_add_head(
132
- grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
133
- grpc_metadata_batch_callouts_index idx) {
134
- return grpc_metadata_batch_link_head(batch, storage, idx);
43
+ #include "src/core/lib/slice/slice.h"
44
+ #include "src/core/lib/surface/validate_metadata.h"
45
+ #include "src/core/lib/transport/parsed_metadata.h"
46
+ #include "src/core/lib/transport/timeout_encoding.h"
47
+
48
+ namespace grpc_core {
49
+
50
+ // grpc-timeout metadata trait.
51
+ // ValueType is defined as Timestamp - an absolute timestamp (i.e. a
52
+ // deadline!), that is converted to a duration by transports before being
53
+ // sent.
54
+ // TODO(ctiller): Move this elsewhere. During the transition we need to be able
55
+ // to name this in MetadataMap, but ultimately once the transition is done we
56
+ // should not need to.
57
+ struct GrpcTimeoutMetadata {
58
+ static constexpr bool kRepeatable = false;
59
+ using ValueType = Timestamp;
60
+ using MementoType = Duration;
61
+ static absl::string_view key() { return "grpc-timeout"; }
62
+ static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error) {
63
+ auto timeout = ParseTimeout(value);
64
+ if (!timeout.has_value()) {
65
+ on_error("invalid value", value);
66
+ return Duration::Infinity();
67
+ }
68
+ return *timeout;
69
+ }
70
+ static ValueType MementoToValue(MementoType timeout) {
71
+ if (timeout == Duration::Infinity()) {
72
+ return Timestamp::InfFuture();
73
+ }
74
+ return ExecCtx::Get()->Now() + timeout;
75
+ }
76
+ static Slice Encode(ValueType x) {
77
+ return Timeout::FromDuration(x - ExecCtx::Get()->Now()).Encode();
78
+ }
79
+ static std::string DisplayValue(MementoType x) { return x.ToString(); }
80
+ };
81
+
82
+ // TE metadata trait.
83
+ struct TeMetadata {
84
+ static constexpr bool kRepeatable = false;
85
+ // HTTP2 says that TE can either be empty or "trailers".
86
+ // Empty means this trait is not included, "trailers" means kTrailers, and
87
+ // kInvalid is used to remember an invalid value.
88
+ enum ValueType : uint8_t {
89
+ kTrailers,
90
+ kInvalid,
91
+ };
92
+ using MementoType = ValueType;
93
+ static absl::string_view key() { return "te"; }
94
+ static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error) {
95
+ auto out = kInvalid;
96
+ if (value == "trailers") {
97
+ out = kTrailers;
98
+ } else {
99
+ on_error("invalid value", value);
100
+ }
101
+ return out;
102
+ }
103
+ static ValueType MementoToValue(MementoType te) { return te; }
104
+ static StaticSlice Encode(ValueType x) {
105
+ GPR_ASSERT(x == kTrailers);
106
+ return StaticSlice::FromStaticString("trailers");
107
+ }
108
+ static const char* DisplayValue(MementoType te) {
109
+ switch (te) {
110
+ case ValueType::kTrailers:
111
+ return "trailers";
112
+ default:
113
+ return "<discarded-invalid-value>";
114
+ }
115
+ }
116
+ };
117
+
118
+ // content-type metadata trait.
119
+ struct ContentTypeMetadata {
120
+ static constexpr bool kRepeatable = false;
121
+ // gRPC says that content-type can be application/grpc[;something]
122
+ // Core has only ever verified the prefix.
123
+ // IF we want to start verifying more, we can expand this type.
124
+ enum ValueType {
125
+ kApplicationGrpc,
126
+ kEmpty,
127
+ kInvalid,
128
+ };
129
+ using MementoType = ValueType;
130
+ static absl::string_view key() { return "content-type"; }
131
+ static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error) {
132
+ auto out = kInvalid;
133
+ auto value_string = value.as_string_view();
134
+ if (value_string == "application/grpc") {
135
+ out = kApplicationGrpc;
136
+ } else if (absl::StartsWith(value_string, "application/grpc;")) {
137
+ out = kApplicationGrpc;
138
+ } else if (absl::StartsWith(value_string, "application/grpc+")) {
139
+ out = kApplicationGrpc;
140
+ } else if (value_string.empty()) {
141
+ out = kEmpty;
142
+ } else {
143
+ on_error("invalid value", value);
144
+ }
145
+ return out;
146
+ }
147
+ static ValueType MementoToValue(MementoType content_type) {
148
+ return content_type;
149
+ }
150
+ static StaticSlice Encode(ValueType x) {
151
+ switch (x) {
152
+ case kEmpty:
153
+ return StaticSlice::FromStaticString("");
154
+ case kApplicationGrpc:
155
+ return StaticSlice::FromStaticString("application/grpc");
156
+ case kInvalid:
157
+ return StaticSlice::FromStaticString("application/grpc+unknown");
158
+ }
159
+ GPR_UNREACHABLE_CODE(
160
+ return StaticSlice::FromStaticString("unrepresentable value"));
161
+ }
162
+ static const char* DisplayValue(MementoType content_type) {
163
+ switch (content_type) {
164
+ case ValueType::kApplicationGrpc:
165
+ return "application/grpc";
166
+ case ValueType::kEmpty:
167
+ return "";
168
+ default:
169
+ return "<discarded-invalid-value>";
170
+ }
171
+ }
172
+ };
173
+
174
+ // scheme metadata trait.
175
+ struct HttpSchemeMetadata {
176
+ static constexpr bool kRepeatable = false;
177
+ enum ValueType {
178
+ kHttp,
179
+ kHttps,
180
+ kInvalid,
181
+ };
182
+ using MementoType = ValueType;
183
+ static absl::string_view key() { return ":scheme"; }
184
+ static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error) {
185
+ return Parse(value.as_string_view(), on_error);
186
+ }
187
+ static ValueType Parse(absl::string_view value,
188
+ MetadataParseErrorFn on_error) {
189
+ if (value == "http") {
190
+ return kHttp;
191
+ } else if (value == "https") {
192
+ return kHttps;
193
+ }
194
+ on_error("invalid value", Slice::FromCopiedBuffer(value));
195
+ return kInvalid;
196
+ }
197
+ static ValueType MementoToValue(MementoType content_type) {
198
+ return content_type;
199
+ }
200
+ static StaticSlice Encode(ValueType x) {
201
+ switch (x) {
202
+ case kHttp:
203
+ return StaticSlice::FromStaticString("http");
204
+ case kHttps:
205
+ return StaticSlice::FromStaticString("https");
206
+ default:
207
+ abort();
208
+ }
209
+ }
210
+ static const char* DisplayValue(MementoType content_type) {
211
+ switch (content_type) {
212
+ case kHttp:
213
+ return "http";
214
+ case kHttps:
215
+ return "https";
216
+ default:
217
+ return "<discarded-invalid-value>";
218
+ }
219
+ }
220
+ };
221
+
222
+ // method metadata trait.
223
+ struct HttpMethodMetadata {
224
+ static constexpr bool kRepeatable = false;
225
+ enum ValueType {
226
+ kPost,
227
+ kPut,
228
+ kGet,
229
+ kInvalid,
230
+ };
231
+ using MementoType = ValueType;
232
+ static absl::string_view key() { return ":method"; }
233
+ static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error) {
234
+ auto out = kInvalid;
235
+ auto value_string = value.as_string_view();
236
+ if (value_string == "POST") {
237
+ out = kPost;
238
+ } else if (value_string == "PUT") {
239
+ out = kPut;
240
+ } else if (value_string == "GET") {
241
+ out = kGet;
242
+ } else {
243
+ on_error("invalid value", value);
244
+ }
245
+ return out;
246
+ }
247
+ static ValueType MementoToValue(MementoType content_type) {
248
+ return content_type;
249
+ }
250
+ static StaticSlice Encode(ValueType x) {
251
+ switch (x) {
252
+ case kPost:
253
+ return StaticSlice::FromStaticString("POST");
254
+ case kPut:
255
+ return StaticSlice::FromStaticString("PUT");
256
+ case kGet:
257
+ return StaticSlice::FromStaticString("GET");
258
+ default:
259
+ abort();
260
+ }
261
+ }
262
+ static const char* DisplayValue(MementoType content_type) {
263
+ switch (content_type) {
264
+ case kPost:
265
+ return "POST";
266
+ case kPut:
267
+ return "PUT";
268
+ case kGet:
269
+ return "GET";
270
+ default:
271
+ return "<discarded-invalid-value>";
272
+ }
273
+ }
274
+ };
275
+
276
+ // Base type for metadata pertaining to a single compression algorithm
277
+ // (e.g., "grpc-encoding").
278
+ struct CompressionAlgorithmBasedMetadata {
279
+ using ValueType = grpc_compression_algorithm;
280
+ using MementoType = ValueType;
281
+ static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error) {
282
+ auto algorithm = ParseCompressionAlgorithm(value.as_string_view());
283
+ if (!algorithm.has_value()) {
284
+ on_error("invalid value", value);
285
+ return GRPC_COMPRESS_NONE;
286
+ }
287
+ return *algorithm;
288
+ }
289
+ static ValueType MementoToValue(MementoType x) { return x; }
290
+ static Slice Encode(ValueType x) {
291
+ GPR_ASSERT(x != GRPC_COMPRESS_ALGORITHMS_COUNT);
292
+ return Slice::FromStaticString(CompressionAlgorithmAsString(x));
293
+ }
294
+ static const char* DisplayValue(MementoType x) {
295
+ if (const char* p = CompressionAlgorithmAsString(x)) {
296
+ return p;
297
+ } else {
298
+ return "<discarded-invalid-value>";
299
+ }
300
+ }
301
+ };
302
+
303
+ // grpc-encoding metadata trait.
304
+ struct GrpcEncodingMetadata : public CompressionAlgorithmBasedMetadata {
305
+ static constexpr bool kRepeatable = false;
306
+ static absl::string_view key() { return "grpc-encoding"; }
307
+ };
308
+
309
+ // grpc-internal-encoding-request metadata trait.
310
+ struct GrpcInternalEncodingRequest : public CompressionAlgorithmBasedMetadata {
311
+ static constexpr bool kRepeatable = false;
312
+ static absl::string_view key() { return "grpc-internal-encoding-request"; }
313
+ };
314
+
315
+ // grpc-accept-encoding metadata trait.
316
+ struct GrpcAcceptEncodingMetadata {
317
+ static constexpr bool kRepeatable = false;
318
+ static absl::string_view key() { return "grpc-accept-encoding"; }
319
+ using ValueType = CompressionAlgorithmSet;
320
+ using MementoType = ValueType;
321
+ static MementoType ParseMemento(Slice value, MetadataParseErrorFn) {
322
+ return CompressionAlgorithmSet::FromString(value.as_string_view());
323
+ }
324
+ static ValueType MementoToValue(MementoType x) { return x; }
325
+ static Slice Encode(ValueType x) { return x.ToSlice(); }
326
+ static std::string DisplayValue(MementoType x) { return x.ToString(); }
327
+ };
328
+
329
+ struct SimpleSliceBasedMetadata {
330
+ using ValueType = Slice;
331
+ using MementoType = Slice;
332
+ static MementoType ParseMemento(Slice value, MetadataParseErrorFn) {
333
+ return value.TakeOwned();
334
+ }
335
+ static ValueType MementoToValue(MementoType value) { return value; }
336
+ static Slice Encode(const ValueType& x) { return x.Ref(); }
337
+ static absl::string_view DisplayValue(const MementoType& value) {
338
+ return value.as_string_view();
339
+ }
340
+ };
341
+
342
+ // user-agent metadata trait.
343
+ struct UserAgentMetadata : public SimpleSliceBasedMetadata {
344
+ static constexpr bool kRepeatable = false;
345
+ static absl::string_view key() { return "user-agent"; }
346
+ };
347
+
348
+ // grpc-message metadata trait.
349
+ struct GrpcMessageMetadata : public SimpleSliceBasedMetadata {
350
+ static constexpr bool kRepeatable = false;
351
+ static absl::string_view key() { return "grpc-message"; }
352
+ };
353
+
354
+ // host metadata trait.
355
+ struct HostMetadata : public SimpleSliceBasedMetadata {
356
+ static constexpr bool kRepeatable = false;
357
+ static absl::string_view key() { return "host"; }
358
+ };
359
+
360
+ // x-endpoint-load-metrics-bin metadata trait.
361
+ struct XEndpointLoadMetricsBinMetadata : public SimpleSliceBasedMetadata {
362
+ static constexpr bool kRepeatable = false;
363
+ static absl::string_view key() { return "x-endpoint-load-metrics-bin"; }
364
+ };
365
+
366
+ // grpc-server-stats-bin metadata trait.
367
+ struct GrpcServerStatsBinMetadata : public SimpleSliceBasedMetadata {
368
+ static constexpr bool kRepeatable = false;
369
+ static absl::string_view key() { return "grpc-server-stats-bin"; }
370
+ };
371
+
372
+ // grpc-trace-bin metadata trait.
373
+ struct GrpcTraceBinMetadata : public SimpleSliceBasedMetadata {
374
+ static constexpr bool kRepeatable = false;
375
+ static absl::string_view key() { return "grpc-trace-bin"; }
376
+ };
377
+
378
+ // grpc-tags-bin metadata trait.
379
+ struct GrpcTagsBinMetadata : public SimpleSliceBasedMetadata {
380
+ static constexpr bool kRepeatable = false;
381
+ static absl::string_view key() { return "grpc-tags-bin"; }
382
+ };
383
+
384
+ // :authority metadata trait.
385
+ struct HttpAuthorityMetadata : public SimpleSliceBasedMetadata {
386
+ static constexpr bool kRepeatable = false;
387
+ static absl::string_view key() { return ":authority"; }
388
+ };
389
+
390
+ // :path metadata trait.
391
+ struct HttpPathMetadata : public SimpleSliceBasedMetadata {
392
+ static constexpr bool kRepeatable = false;
393
+ static absl::string_view key() { return ":path"; }
394
+ };
395
+
396
+ // We separate SimpleIntBasedMetadata into two pieces: one that does not depend
397
+ // on the invalid value, and one that does. This allows the compiler to easily
398
+ // see the functions that are shared, and helps reduce code bloat here.
399
+ template <typename Int>
400
+ struct SimpleIntBasedMetadataBase {
401
+ using ValueType = Int;
402
+ using MementoType = Int;
403
+ static ValueType MementoToValue(MementoType value) { return value; }
404
+ static Slice Encode(ValueType x) { return Slice::FromInt64(x); }
405
+ static Int DisplayValue(MementoType x) { return x; }
406
+ };
407
+
408
+ template <typename Int, Int kInvalidValue>
409
+ struct SimpleIntBasedMetadata : public SimpleIntBasedMetadataBase<Int> {
410
+ static constexpr Int invalid_value() { return kInvalidValue; }
411
+ static Int ParseMemento(Slice value, MetadataParseErrorFn on_error) {
412
+ Int out;
413
+ if (!absl::SimpleAtoi(value.as_string_view(), &out)) {
414
+ on_error("not an integer", value);
415
+ out = kInvalidValue;
416
+ }
417
+ return out;
418
+ }
419
+ };
420
+
421
+ // grpc-status metadata trait.
422
+ struct GrpcStatusMetadata
423
+ : public SimpleIntBasedMetadata<grpc_status_code, GRPC_STATUS_UNKNOWN> {
424
+ static constexpr bool kRepeatable = false;
425
+ static absl::string_view key() { return "grpc-status"; }
426
+ };
427
+
428
+ // grpc-previous-rpc-attempts metadata trait.
429
+ struct GrpcPreviousRpcAttemptsMetadata
430
+ : public SimpleIntBasedMetadata<uint32_t, 0> {
431
+ static constexpr bool kRepeatable = false;
432
+ static absl::string_view key() { return "grpc-previous-rpc-attempts"; }
433
+ };
434
+
435
+ // grpc-retry-pushback-ms metadata trait.
436
+ struct GrpcRetryPushbackMsMetadata {
437
+ static constexpr bool kRepeatable = false;
438
+ static absl::string_view key() { return "grpc-retry-pushback-ms"; }
439
+ using ValueType = Duration;
440
+ using MementoType = Duration;
441
+ static ValueType MementoToValue(MementoType x) { return x; }
442
+ static Slice Encode(Duration x) { return Slice::FromInt64(x.millis()); }
443
+ static int64_t DisplayValue(Duration x) { return x.millis(); }
444
+ static Duration ParseMemento(Slice value, MetadataParseErrorFn on_error) {
445
+ int64_t out;
446
+ if (!absl::SimpleAtoi(value.as_string_view(), &out)) {
447
+ on_error("not an integer", value);
448
+ return Duration::NegativeInfinity();
449
+ }
450
+ return Duration::Milliseconds(out);
451
+ }
452
+ };
453
+
454
+ // :status metadata trait.
455
+ // TODO(ctiller): consider moving to uint16_t
456
+ struct HttpStatusMetadata : public SimpleIntBasedMetadata<uint32_t, 0> {
457
+ static constexpr bool kRepeatable = false;
458
+ static absl::string_view key() { return ":status"; }
459
+ };
460
+
461
+ // "secret" metadata trait used to pass load balancing token between filters.
462
+ // This should not be exposed outside of gRPC core.
463
+ class GrpcLbClientStats;
464
+ struct GrpcLbClientStatsMetadata {
465
+ static constexpr bool kRepeatable = false;
466
+ static absl::string_view key() { return "grpclb_client_stats"; }
467
+ using ValueType = GrpcLbClientStats*;
468
+ using MementoType = ValueType;
469
+ static ValueType MementoToValue(MementoType value) { return value; }
470
+ static Slice Encode(ValueType) { abort(); }
471
+ static const char* DisplayValue(MementoType) { return "<internal-lb-stats>"; }
472
+ static MementoType ParseMemento(Slice, MetadataParseErrorFn) {
473
+ return nullptr;
474
+ }
475
+ };
476
+
477
+ // lb-token metadata
478
+ struct LbTokenMetadata : public SimpleSliceBasedMetadata {
479
+ static constexpr bool kRepeatable = false;
480
+ static absl::string_view key() { return "lb-token"; }
481
+ };
482
+
483
+ // lb-cost-bin metadata
484
+ struct LbCostBinMetadata {
485
+ static constexpr bool kRepeatable = true;
486
+ static absl::string_view key() { return "lb-cost-bin"; }
487
+ struct ValueType {
488
+ double cost;
489
+ std::string name;
490
+ };
491
+ using MementoType = ValueType;
492
+ static ValueType MementoToValue(MementoType value) { return value; }
493
+ static Slice Encode(const ValueType& x) {
494
+ auto slice =
495
+ MutableSlice::CreateUninitialized(sizeof(double) + x.name.length());
496
+ memcpy(slice.data(), &x.cost, sizeof(double));
497
+ memcpy(slice.data() + sizeof(double), x.name.data(), x.name.length());
498
+ return Slice(std::move(slice));
499
+ }
500
+ static std::string DisplayValue(MementoType x) {
501
+ return absl::StrCat(x.name, ":", x.cost);
502
+ }
503
+ static MementoType ParseMemento(Slice value, MetadataParseErrorFn on_error) {
504
+ if (value.length() < sizeof(double)) {
505
+ on_error("too short", value);
506
+ return {0, ""};
507
+ }
508
+ MementoType out;
509
+ memcpy(&out.cost, value.data(), sizeof(double));
510
+ out.name = std::string(
511
+ reinterpret_cast<const char*>(value.data()) + sizeof(double),
512
+ value.length() - sizeof(double));
513
+ return out;
514
+ }
515
+ };
516
+
517
+ // Annotation added by a transport to note whether a failed request was never
518
+ // placed on the wire, or never seen by a server.
519
+ struct GrpcStreamNetworkState {
520
+ static absl::string_view DebugKey() { return "GrpcStreamNetworkState"; }
521
+ static constexpr bool kRepeatable = false;
522
+ enum ValueType : uint8_t {
523
+ kNotSentOnWire,
524
+ kNotSeenByServer,
525
+ };
526
+ static std::string DisplayValue(ValueType x) {
527
+ switch (x) {
528
+ case kNotSentOnWire:
529
+ return "not sent on wire";
530
+ case kNotSeenByServer:
531
+ return "not seen by server";
532
+ }
533
+ }
534
+ };
535
+
536
+ // Annotation added by various systems to describe the reason for a failure.
537
+ struct GrpcStatusContext {
538
+ static absl::string_view DebugKey() { return "GrpcStatusContext"; }
539
+ static constexpr bool kRepeatable = true;
540
+ using ValueType = std::string;
541
+ static const std::string& DisplayValue(const std::string& x) { return x; }
542
+ };
543
+
544
+ namespace metadata_detail {
545
+
546
+ // IsEncodable: Given a trait, determine if that trait is encodable, or is just
547
+ // a value attached to a MetadataMap.
548
+ // We use the presence of the key() static method to determine if a trait is
549
+ // encodable or not - encodable traits have string names, and non-encodable
550
+ // traits do not.
551
+ template <typename Trait, typename Ignored = void>
552
+ struct IsEncodableTrait {
553
+ static const bool value = false;
554
+ };
555
+
556
+ template <typename Trait>
557
+ struct IsEncodableTrait<Trait, absl::void_t<decltype(Trait::key())>> {
558
+ static const bool value = true;
559
+ };
560
+
561
+ // Helper type - maps a string name to a trait.
562
+ template <typename MustBeVoid, typename... Traits>
563
+ struct NameLookup;
564
+
565
+ template <typename Trait, typename... Traits>
566
+ struct NameLookup<absl::enable_if_t<IsEncodableTrait<Trait>::value, void>,
567
+ Trait, Traits...> {
568
+ // Call op->Found(Trait()) if op->name == Trait::key() for some Trait in
569
+ // Traits. If not found, call op->NotFound().
570
+ template <typename Op>
571
+ static auto Lookup(absl::string_view key, Op* op)
572
+ -> decltype(op->Found(Trait())) {
573
+ if (key == Trait::key()) {
574
+ return op->Found(Trait());
575
+ }
576
+ return NameLookup<void, Traits...>::Lookup(key, op);
577
+ }
578
+ };
579
+
580
+ template <typename Trait, typename... Traits>
581
+ struct NameLookup<absl::enable_if_t<!IsEncodableTrait<Trait>::value, void>,
582
+ Trait, Traits...> {
583
+ template <typename Op>
584
+ static auto Lookup(absl::string_view key, Op* op)
585
+ -> decltype(NameLookup<void, Traits...>::Lookup(key, op)) {
586
+ return NameLookup<void, Traits...>::Lookup(key, op);
587
+ }
588
+ };
589
+
590
+ template <>
591
+ struct NameLookup<void> {
592
+ template <typename Op>
593
+ static auto Lookup(absl::string_view key, Op* op)
594
+ -> decltype(op->NotFound(key)) {
595
+ return op->NotFound(key);
596
+ }
597
+ };
598
+
599
+ // Helper to take a slice to a memento to a value.
600
+ // By splitting this part out we can scale code size as the number of (memento,
601
+ // value) types, rather than as the number of traits.
602
+ template <typename ParseMementoFn, typename MementoToValueFn>
603
+ struct ParseValue {
604
+ template <ParseMementoFn parse_memento, MementoToValueFn memento_to_value>
605
+ static GPR_ATTRIBUTE_NOINLINE auto Parse(Slice* value,
606
+ MetadataParseErrorFn on_error)
607
+ -> decltype(memento_to_value(parse_memento(std::move(*value),
608
+ on_error))) {
609
+ return memento_to_value(parse_memento(std::move(*value), on_error));
610
+ }
611
+ };
612
+
613
+ // This is an "Op" type for NameLookup.
614
+ // Used for MetadataMap::Parse, its Found/NotFound methods turn a slice into a
615
+ // ParsedMetadata object.
616
+ template <typename Container>
617
+ class ParseHelper {
618
+ public:
619
+ ParseHelper(Slice value, MetadataParseErrorFn on_error, size_t transport_size)
620
+ : value_(std::move(value)),
621
+ on_error_(on_error),
622
+ transport_size_(transport_size) {}
623
+
624
+ template <typename Trait>
625
+ GPR_ATTRIBUTE_NOINLINE ParsedMetadata<Container> Found(Trait trait) {
626
+ return ParsedMetadata<Container>(
627
+ trait,
628
+ ParseValueToMemento<typename Trait::MementoType, Trait::ParseMemento>(),
629
+ transport_size_);
630
+ }
631
+
632
+ GPR_ATTRIBUTE_NOINLINE ParsedMetadata<Container> NotFound(
633
+ absl::string_view key) {
634
+ return ParsedMetadata<Container>(Slice::FromCopiedString(key),
635
+ std::move(value_));
636
+ }
637
+
638
+ private:
639
+ template <typename T, T (*parse_memento)(Slice, MetadataParseErrorFn)>
640
+ GPR_ATTRIBUTE_NOINLINE T ParseValueToMemento() {
641
+ return parse_memento(std::move(value_), on_error_);
642
+ }
643
+
644
+ Slice value_;
645
+ MetadataParseErrorFn on_error_;
646
+ const size_t transport_size_;
647
+ };
648
+
649
+ // This is an "Op" type for NameLookup.
650
+ // Used for MetadataMap::Append, its Found/NotFound methods turn a slice into a
651
+ // value and add it to a container.
652
+ template <typename Container>
653
+ class AppendHelper {
654
+ public:
655
+ AppendHelper(Container* container, Slice value, MetadataParseErrorFn on_error)
656
+ : container_(container), value_(std::move(value)), on_error_(on_error) {}
657
+
658
+ template <typename Trait>
659
+ GPR_ATTRIBUTE_NOINLINE void Found(Trait trait) {
660
+ container_->Set(
661
+ trait, ParseValue<decltype(Trait::ParseMemento),
662
+ decltype(Trait::MementoToValue)>::
663
+ template Parse<Trait::ParseMemento, Trait::MementoToValue>(
664
+ &value_, on_error_));
665
+ }
666
+
667
+ GPR_ATTRIBUTE_NOINLINE void NotFound(absl::string_view key) {
668
+ container_->AppendUnknown(key, std::move(value_));
669
+ }
670
+
671
+ private:
672
+ Container* const container_;
673
+ Slice value_;
674
+ MetadataParseErrorFn on_error_;
675
+ };
676
+
677
+ // This is an "Op" type for NameLookup.
678
+ // Used for MetadataMap::Remove, its Found/NotFound methods remove a key from
679
+ // the container.
680
+ template <typename Container>
681
+ class RemoveHelper {
682
+ public:
683
+ explicit RemoveHelper(Container* container) : container_(container) {}
684
+
685
+ template <typename Trait>
686
+ GPR_ATTRIBUTE_NOINLINE void Found(Trait trait) {
687
+ container_->Remove(trait);
688
+ }
689
+
690
+ GPR_ATTRIBUTE_NOINLINE void NotFound(absl::string_view key) {
691
+ container_->RemoveUnknown(key);
692
+ }
693
+
694
+ private:
695
+ Container* const container_;
696
+ };
697
+
698
+ // This is an "Op" type for NameLookup.
699
+ // Used for MetadataMap::GetStringValue, its Found/NotFound methods generated a
700
+ // string value from the container.
701
+ template <typename Container>
702
+ class GetStringValueHelper {
703
+ public:
704
+ explicit GetStringValueHelper(const Container* container,
705
+ std::string* backing)
706
+ : container_(container), backing_(backing) {}
707
+
708
+ template <typename Trait>
709
+ GPR_ATTRIBUTE_NOINLINE absl::enable_if_t<
710
+ Trait::kRepeatable == false &&
711
+ std::is_same<Slice, typename Trait::ValueType>::value,
712
+ absl::optional<absl::string_view>>
713
+ Found(Trait) {
714
+ const auto* value = container_->get_pointer(Trait());
715
+ if (value == nullptr) return absl::nullopt;
716
+ return value->as_string_view();
717
+ }
718
+
719
+ template <typename Trait>
720
+ GPR_ATTRIBUTE_NOINLINE absl::enable_if_t<
721
+ Trait::kRepeatable == true &&
722
+ !std::is_same<Slice, typename Trait::ValueType>::value,
723
+ absl::optional<absl::string_view>>
724
+ Found(Trait) {
725
+ const auto* value = container_->get_pointer(Trait());
726
+ if (value == nullptr) return absl::nullopt;
727
+ backing_->clear();
728
+ for (const auto& v : *value) {
729
+ if (!backing_->empty()) backing_->push_back(',');
730
+ auto new_segment = Trait::Encode(v);
731
+ backing_->append(new_segment.begin(), new_segment.end());
732
+ }
733
+ return *backing_;
734
+ }
735
+
736
+ template <typename Trait>
737
+ GPR_ATTRIBUTE_NOINLINE absl::enable_if_t<
738
+ Trait::kRepeatable == false &&
739
+ !std::is_same<Slice, typename Trait::ValueType>::value,
740
+ absl::optional<absl::string_view>>
741
+ Found(Trait) {
742
+ const auto* value = container_->get_pointer(Trait());
743
+ if (value == nullptr) return absl::nullopt;
744
+ *backing_ = std::string(Trait::Encode(*value).as_string_view());
745
+ return *backing_;
746
+ }
747
+
748
+ GPR_ATTRIBUTE_NOINLINE absl::optional<absl::string_view> NotFound(
749
+ absl::string_view key) {
750
+ return container_->GetStringValueUnknown(key, backing_);
751
+ }
752
+
753
+ private:
754
+ const Container* const container_;
755
+ std::string* backing_;
756
+ };
757
+
758
+ // Sink for key value logs
759
+ using LogFn = absl::FunctionRef<void(absl::string_view, absl::string_view)>;
760
+
761
+ template <typename T>
762
+ struct AdaptDisplayValueToLog {
763
+ static std::string ToString(const T& value) { return absl::StrCat(value); }
764
+ };
765
+
766
+ template <>
767
+ struct AdaptDisplayValueToLog<Slice> {
768
+ static std::string ToString(Slice value) {
769
+ return std::string(value.as_string_view());
770
+ }
771
+ };
772
+
773
+ template <>
774
+ struct AdaptDisplayValueToLog<StaticSlice> {
775
+ static absl::string_view ToString(StaticSlice value) {
776
+ return value.as_string_view();
777
+ }
778
+ };
779
+
780
+ template <typename T, typename U, typename V>
781
+ GPR_ATTRIBUTE_NOINLINE void LogKeyValueTo(absl::string_view key, const T& value,
782
+ V (*display_value)(U), LogFn log_fn) {
783
+ log_fn(key, AdaptDisplayValueToLog<V>::ToString(display_value(value)));
784
+ }
785
+
786
+ // Generate a strong type for metadata values per trait.
787
+ template <typename Which, typename Ignored = void>
788
+ struct Value;
789
+
790
+ template <typename Which>
791
+ struct Value<Which, absl::enable_if_t<Which::kRepeatable == false &&
792
+ IsEncodableTrait<Which>::value,
793
+ void>> {
794
+ Value() = default;
795
+ explicit Value(const typename Which::ValueType& value) : value(value) {}
796
+ explicit Value(typename Which::ValueType&& value)
797
+ : value(std::forward<typename Which::ValueType>(value)) {}
798
+ Value(const Value&) = delete;
799
+ Value& operator=(const Value&) = delete;
800
+ Value(Value&&) noexcept = default;
801
+ Value& operator=(Value&& other) noexcept {
802
+ value = std::move(other.value);
803
+ return *this;
804
+ }
805
+ template <typename Encoder>
806
+ void EncodeTo(Encoder* encoder) const {
807
+ encoder->Encode(Which(), value);
808
+ }
809
+ void LogTo(LogFn log_fn) const {
810
+ LogKeyValueTo(Which::key(), value, Which::Encode, log_fn);
811
+ }
812
+ using StorageType = typename Which::ValueType;
813
+ GPR_NO_UNIQUE_ADDRESS StorageType value;
814
+ };
815
+
816
+ template <typename Which>
817
+ struct Value<Which, absl::enable_if_t<Which::kRepeatable == false &&
818
+ !IsEncodableTrait<Which>::value,
819
+ void>> {
820
+ Value() = default;
821
+ explicit Value(const typename Which::ValueType& value) : value(value) {}
822
+ explicit Value(typename Which::ValueType&& value)
823
+ : value(std::forward<typename Which::ValueType>(value)) {}
824
+ Value(const Value&) = delete;
825
+ Value& operator=(const Value&) = delete;
826
+ Value(Value&&) noexcept = default;
827
+ Value& operator=(Value&& other) noexcept {
828
+ value = std::move(other.value);
829
+ return *this;
830
+ }
831
+ template <typename Encoder>
832
+ void EncodeTo(Encoder*) const {}
833
+ void LogTo(LogFn log_fn) const {
834
+ LogKeyValueTo(Which::DebugKey(), value, Which::DisplayValue, log_fn);
835
+ }
836
+ using StorageType = typename Which::ValueType;
837
+ GPR_NO_UNIQUE_ADDRESS StorageType value;
838
+ };
839
+
840
+ template <typename Which>
841
+ struct Value<Which, absl::enable_if_t<Which::kRepeatable == true &&
842
+ IsEncodableTrait<Which>::value,
843
+ void>> {
844
+ Value() = default;
845
+ explicit Value(const typename Which::ValueType& value) {
846
+ this->value.push_back(value);
847
+ }
848
+ explicit Value(typename Which::ValueType&& value) {
849
+ this->value.emplace_back(std::forward<typename Which::ValueType>(value));
850
+ }
851
+ Value(const Value&) = delete;
852
+ Value& operator=(const Value&) = delete;
853
+ Value(Value&& other) noexcept : value(std::move(other.value)) {}
854
+ Value& operator=(Value&& other) noexcept {
855
+ value = std::move(other.value);
856
+ return *this;
857
+ }
858
+ template <typename Encoder>
859
+ void EncodeTo(Encoder* encoder) const {
860
+ for (const auto& v : value) {
861
+ encoder->Encode(Which(), v);
862
+ }
863
+ }
864
+ void LogTo(LogFn log_fn) const {
865
+ for (const auto& v : value) {
866
+ LogKeyValueTo(Which::key(), v, Which::Encode, log_fn);
867
+ }
868
+ }
869
+ using StorageType = absl::InlinedVector<typename Which::ValueType, 1>;
870
+ StorageType value;
871
+ };
872
+
873
+ template <typename Which>
874
+ struct Value<Which, absl::enable_if_t<Which::kRepeatable == true &&
875
+ !IsEncodableTrait<Which>::value,
876
+ void>> {
877
+ Value() = default;
878
+ explicit Value(const typename Which::ValueType& value) {
879
+ this->value.push_back(value);
880
+ }
881
+ explicit Value(typename Which::ValueType&& value) {
882
+ this->value.emplace_back(std::forward<typename Which::ValueType>(value));
883
+ }
884
+ Value(const Value&) = delete;
885
+ Value& operator=(const Value&) = delete;
886
+ Value(Value&& other) noexcept : value(std::move(other.value)) {}
887
+ Value& operator=(Value&& other) noexcept {
888
+ value = std::move(other.value);
889
+ return *this;
890
+ }
891
+ template <typename Encoder>
892
+ void EncodeTo(Encoder*) const {}
893
+ void LogTo(LogFn log_fn) const {
894
+ for (const auto& v : value) {
895
+ LogKeyValueTo(Which::DebugKey(), v, Which::DisplayValue, log_fn);
896
+ }
897
+ }
898
+ using StorageType = absl::InlinedVector<typename Which::ValueType, 1>;
899
+ StorageType value;
900
+ };
901
+
902
+ // Encoder to copy some metadata
903
+ template <typename Output>
904
+ class CopySink {
905
+ public:
906
+ explicit CopySink(Output* dst) : dst_(dst) {}
907
+
908
+ template <class T, class V>
909
+ void Encode(T trait, V value) {
910
+ dst_->Set(trait, value);
911
+ }
912
+
913
+ template <class T>
914
+ void Encode(T trait, const Slice& value) {
915
+ dst_->Set(trait, std::move(value.AsOwned()));
916
+ }
917
+
918
+ void Encode(const Slice& key, const Slice& value) {
919
+ dst_->AppendUnknown(key.as_string_view(), value.Ref());
920
+ }
921
+
922
+ private:
923
+ Output* dst_;
924
+ };
925
+
926
+ // Callable for the ForEach in Encode() -- for each value, call the
927
+ // appropriate encoder method.
928
+ template <typename Encoder>
929
+ struct EncodeWrapper {
930
+ Encoder* encoder;
931
+ template <typename Which>
932
+ void operator()(const Value<Which>& which) {
933
+ which.EncodeTo(encoder);
934
+ }
935
+ };
936
+
937
+ // Callable for the ForEach in Log()
938
+ struct LogWrapper {
939
+ LogFn log_fn;
940
+ template <typename Which>
941
+ void operator()(const Value<Which>& which) {
942
+ which.LogTo(log_fn);
943
+ }
944
+ };
945
+
946
+ // Encoder to compute TransportSize
947
+ class TransportSizeEncoder {
948
+ public:
949
+ void Encode(const Slice& key, const Slice& value) {
950
+ size_ += key.length() + value.length() + 32;
951
+ }
952
+
953
+ template <typename Which>
954
+ void Encode(Which, const typename Which::ValueType& value) {
955
+ Add(Which(), value);
956
+ }
957
+
958
+ void Encode(ContentTypeMetadata,
959
+ const typename ContentTypeMetadata::ValueType& value) {
960
+ if (value == ContentTypeMetadata::kInvalid) return;
961
+ Add(ContentTypeMetadata(), value);
962
+ }
963
+
964
+ size_t size() const { return size_; }
965
+
966
+ private:
967
+ template <typename Which>
968
+ void Add(Which, const typename Which::ValueType& value) {
969
+ size_ += Which::key().length() + Which::Encode(value).length() + 32;
970
+ }
971
+
972
+ uint32_t size_ = 0;
973
+ };
974
+
975
+ } // namespace metadata_detail
976
+
977
+ // Helper function for encoders
978
+ // Given a metadata trait, convert the value to a slice.
979
+ template <typename Which>
980
+ absl::enable_if_t<std::is_same<typename Which::ValueType, Slice>::value,
981
+ const Slice&>
982
+ MetadataValueAsSlice(const Slice& slice) {
983
+ return slice;
984
+ }
985
+
986
+ template <typename Which>
987
+ absl::enable_if_t<!std::is_same<typename Which::ValueType, Slice>::value, Slice>
988
+ MetadataValueAsSlice(typename Which::ValueType value) {
989
+ return Slice(Which::Encode(value));
990
+ }
991
+
992
+ // MetadataMap encodes the mapping of metadata keys to metadata values.
993
+ //
994
+ // MetadataMap takes a derived class and list of traits. Each of these trait
995
+ // objects defines one metadata field that is used by core, and so should have
996
+ // more specialized handling than just using the generic APIs.
997
+ //
998
+ // MetadataMap is the backing type for some derived type via the curiously
999
+ // recursive template pattern. This is because many types consumed by
1000
+ // MetadataMap require the container type to operate on, and many of those
1001
+ // types are instantiated one per trait. A naive implementation without the
1002
+ // Derived type would, for traits A,B,C, then instantiate for some
1003
+ // T<Container, Trait>:
1004
+ // - T<MetadataMap<A,B,C>, A>,
1005
+ // - T<MetadataMap<A,B,C>, B>,
1006
+ // - T<MetadataMap<A,B,C>, C>.
1007
+ // Since these types ultimately need to be recorded in the .dynstr segment
1008
+ // for dynamic linkers (if gRPC is linked as a static library) this would
1009
+ // create O(N^2) bytes of symbols even in stripped libraries. To avoid this
1010
+ // we use the derived type (e.g. grpc_metadata_batch right now) to capture
1011
+ // the container type, and we would write T<grpc_metadata_batch, A>, etc...
1012
+ // Note that now the container type uses a number of bytes that is independent
1013
+ // of the number of traits, and so we return to a linear symbol table growth
1014
+ // function.
1015
+ //
1016
+ // Each trait object has one of two possible signatures, depending on whether
1017
+ // that traits field is encodable or not.
1018
+ // Non-encodable traits are carried in a MetadataMap, but are never passed to
1019
+ // the application nor serialized to wire.
1020
+ //
1021
+ // Encodable traits have the following signature:
1022
+ // // Traits for the "grpc-xyz" metadata field:
1023
+ // struct GrpcXyzMetadata {
1024
+ // // Can this metadata field be repeated?
1025
+ // static constexpr bool kRepeatable = ...;
1026
+ // // The type that's stored on MetadataBatch
1027
+ // using ValueType = ...;
1028
+ // // The type that's stored in compression/decompression tables
1029
+ // using MementoType = ...;
1030
+ // // The string key for this metadata type (for transports that require it)
1031
+ // static absl::string_view key() { return "grpc-xyz"; }
1032
+ // // Parse a memento from a slice
1033
+ // // Takes ownership of value
1034
+ // // Calls fn in the case of an error that should be reported to the user
1035
+ // static MementoType ParseMemento(Slice value, MementoParseErrorFn fn) { ...
1036
+ // }
1037
+ // // Convert a memento to a value
1038
+ // static ValueType MementoToValue(MementoType memento) { ... }
1039
+ // // Convert a value to its canonical text wire format (the format that
1040
+ // // ParseMemento will accept!)
1041
+ // static Slice Encode(const ValueType& value);
1042
+ // // Convert a value to something that can be passed to StrCat and displayed
1043
+ // // for debugging
1044
+ // static SomeStrCatableType DisplayValue(MementoType value) { ... }
1045
+ // };
1046
+ //
1047
+ // Non-encodable traits are determined by missing the key() method, and have the
1048
+ // following signature (and by convention omit the Metadata part of the type
1049
+ // name):
1050
+ // // Traits for the GrpcXyz field:
1051
+ // struct GrpcXyz {
1052
+ // // The string key that should be used for debug dumps - should not be a
1053
+ // // valid http2 key (ie all lower case)
1054
+ // static absl::string_view DebugKey() { return "GRPC_XYZ"; }
1055
+ // // Can this metadata field be repeated?
1056
+ // static constexpr bool kRepeatable = ...;
1057
+ // // The type that's stored on MetadataBatch
1058
+ // using ValueType = ...;
1059
+ // // Convert a value to something that can be passed to StrCat and displayed
1060
+ // // for debugging
1061
+ // static SomeStrCatableType DisplayValue(ValueType value) { ... }
1062
+ // };
1063
+ //
1064
+ // About parsing and mementos:
1065
+ //
1066
+ // Many gRPC transports exchange metadata as key/value strings, but also allow
1067
+ // for a more efficient representation as a single integer. We can use this
1068
+ // integer representation to avoid reparsing too, by storing the parsed value
1069
+ // in the compression table. This is what mementos are used for.
1070
+ //
1071
+ // A trait offers the capability to turn a slice into a memento via
1072
+ // ParseMemento. This is exposed to users of MetadataMap via the Parse() method,
1073
+ // that returns a ParsedMetadata object. That ParsedMetadata object can in turn
1074
+ // be used to set the same value on many different MetadataMaps without having
1075
+ // to reparse.
1076
+ //
1077
+ // Implementation wise, ParsedMetadata is a type erased wrapper around
1078
+ // MementoType. When we set a value on MetadataMap, we first turn that memento
1079
+ // into a value. For most types, this is going to be a no-op, but for example
1080
+ // for grpc-timeout we make the memento the timeout expressed on the wire, but
1081
+ // we make the value the timestamp of when the timeout will expire (i.e. the
1082
+ // deadline).
1083
+ template <class Derived, typename... Traits>
1084
+ class MetadataMap {
1085
+ public:
1086
+ explicit MetadataMap(Arena* arena);
1087
+ ~MetadataMap();
1088
+
1089
+ MetadataMap(const MetadataMap&) = delete;
1090
+ MetadataMap& operator=(const MetadataMap&) = delete;
1091
+ MetadataMap(MetadataMap&&) noexcept;
1092
+ // We never create MetadataMap directly, instead we create Derived, but we
1093
+ // want to be able to move it without redeclaring this.
1094
+ // NOLINTNEXTLINE(misc-unconventional-assign-operator)
1095
+ Derived& operator=(MetadataMap&&) noexcept;
1096
+
1097
+ // Encode this metadata map into some encoder.
1098
+ // For each field that is set in the MetadataMap, call
1099
+ // encoder->Encode.
1100
+ //
1101
+ // For fields for which we have traits, this will be a method with
1102
+ // the signature:
1103
+ // void Encode(TraitsType, typename TraitsType::ValueType value);
1104
+ // For fields for which we do not have traits, this will be a method
1105
+ // with the signature:
1106
+ // void Encode(grpc_mdelem md);
1107
+ // TODO(ctiller): It's expected that the latter Encode method will
1108
+ // become Encode(Slice, Slice) by the end of the current metadata API
1109
+ // transitions.
1110
+ template <typename Encoder>
1111
+ void Encode(Encoder* encoder) const {
1112
+ table_.ForEach(metadata_detail::EncodeWrapper<Encoder>{encoder});
1113
+ for (const auto& unk : unknown_) {
1114
+ encoder->Encode(unk.first, unk.second);
1115
+ }
1116
+ }
1117
+
1118
+ // Similar to Encode, but targeted at logging: for each metadatum,
1119
+ // call f(key, value) as absl::string_views.
1120
+ void Log(metadata_detail::LogFn log_fn) const {
1121
+ table_.ForEach(metadata_detail::LogWrapper{log_fn});
1122
+ for (const auto& unk : unknown_) {
1123
+ log_fn(unk.first.as_string_view(), unk.second.as_string_view());
1124
+ }
1125
+ }
1126
+
1127
+ std::string DebugString() const {
1128
+ std::string out;
1129
+ Log([&out](absl::string_view key, absl::string_view value) {
1130
+ if (!out.empty()) out.append(", ");
1131
+ absl::StrAppend(&out, absl::CEscape(key), ": ", absl::CEscape(value));
1132
+ });
1133
+ return out;
1134
+ }
1135
+
1136
+ // Get the pointer to the value of some known metadata.
1137
+ // Returns nullptr if the metadata is not present.
1138
+ // Causes a compilation error if Which is not an element of Traits.
1139
+ template <typename Which>
1140
+ const typename metadata_detail::Value<Which>::StorageType* get_pointer(
1141
+ Which) const {
1142
+ if (auto* p = table_.template get<Value<Which>>()) return &p->value;
1143
+ return nullptr;
1144
+ }
1145
+
1146
+ // Get the pointer to the value of some known metadata.
1147
+ // Returns nullptr if the metadata is not present.
1148
+ // Causes a compilation error if Which is not an element of Traits.
1149
+ template <typename Which>
1150
+ typename metadata_detail::Value<Which>::StorageType* get_pointer(Which) {
1151
+ if (auto* p = table_.template get<Value<Which>>()) return &p->value;
1152
+ return nullptr;
1153
+ }
1154
+
1155
+ // Get the pointer to the value of some known metadata.
1156
+ // Adds the default value for the metadata is not present.
1157
+ // Causes a compilation error if Which is not an element of Traits.
1158
+ template <typename Which>
1159
+ typename metadata_detail::Value<Which>::StorageType* GetOrCreatePointer(
1160
+ Which) {
1161
+ return &table_.template get_or_create<Value<Which>>()->value;
1162
+ }
1163
+
1164
+ // Get the value of some known metadata.
1165
+ // Returns nullopt if the metadata is not present.
1166
+ // Causes a compilation error if Which is not an element of Traits.
1167
+ template <typename Which>
1168
+ absl::optional<typename Which::ValueType> get(Which) const {
1169
+ if (auto* p = table_.template get<Value<Which>>()) return p->value;
1170
+ return absl::nullopt;
1171
+ }
1172
+
1173
+ // Set the value of some known metadata.
1174
+ // Returns a pointer to the new value.
1175
+ template <typename Which, typename... Args>
1176
+ absl::enable_if_t<Which::kRepeatable == false, void> Set(Which,
1177
+ Args&&... args) {
1178
+ table_.template set<Value<Which>>(std::forward<Args>(args)...);
1179
+ }
1180
+ template <typename Which, typename... Args>
1181
+ absl::enable_if_t<Which::kRepeatable == true, void> Set(Which,
1182
+ Args&&... args) {
1183
+ GetOrCreatePointer(Which())->emplace_back(std::forward<Args>(args)...);
1184
+ }
1185
+
1186
+ // Remove a specific piece of known metadata.
1187
+ template <typename Which>
1188
+ void Remove(Which) {
1189
+ table_.template clear<Value<Which>>();
1190
+ }
1191
+
1192
+ // Remove some metadata by name
1193
+ void Remove(absl::string_view key) {
1194
+ metadata_detail::RemoveHelper<Derived> helper(static_cast<Derived*>(this));
1195
+ metadata_detail::NameLookup<void, Traits...>::Lookup(key, &helper);
1196
+ }
1197
+
1198
+ void Remove(const char* key) { Remove(absl::string_view(key)); }
1199
+
1200
+ // Retrieve some metadata by name
1201
+ absl::optional<absl::string_view> GetStringValue(absl::string_view name,
1202
+ std::string* buffer) const {
1203
+ metadata_detail::GetStringValueHelper<Derived> helper(
1204
+ static_cast<const Derived*>(this), buffer);
1205
+ return metadata_detail::NameLookup<void, Traits...>::Lookup(name, &helper);
1206
+ }
1207
+
1208
+ // Extract a piece of known metadata.
1209
+ // Returns nullopt if the metadata was not present, or the value if it was.
1210
+ // The same as:
1211
+ // auto value = m.get(T());
1212
+ // m.Remove(T());
1213
+ template <typename Which>
1214
+ absl::enable_if_t<Which::kRepeatable == false,
1215
+ absl::optional<typename Which::ValueType>>
1216
+ Take(Which which) {
1217
+ if (auto* p = get_pointer(which)) {
1218
+ absl::optional<typename Which::ValueType> value(std::move(*p));
1219
+ Remove(which);
1220
+ return value;
1221
+ }
1222
+ return {};
1223
+ }
1224
+
1225
+ // Extract repeated known metadata.
1226
+ // Returns an empty vector if the metadata was not present.
1227
+ template <typename Which>
1228
+ absl::enable_if_t<Which::kRepeatable == true,
1229
+ typename metadata_detail::Value<Which>::StorageType>
1230
+ Take(Which which) {
1231
+ if (auto* p = get_pointer(which)) {
1232
+ typename Value<Which>::StorageType value = std::move(*p);
1233
+ Remove(which);
1234
+ return value;
1235
+ }
1236
+ return {};
1237
+ }
1238
+
1239
+ // Parse metadata from a key/value pair, and return an object representing
1240
+ // that result.
1241
+ // TODO(ctiller): key should probably be an absl::string_view.
1242
+ // Once we don't care about interning anymore, make that change!
1243
+ static ParsedMetadata<Derived> Parse(absl::string_view key, Slice value,
1244
+ uint32_t transport_size,
1245
+ MetadataParseErrorFn on_error) {
1246
+ metadata_detail::ParseHelper<Derived> helper(value.TakeOwned(), on_error,
1247
+ transport_size);
1248
+ return metadata_detail::NameLookup<void, Traits...>::Lookup(key, &helper);
1249
+ }
1250
+
1251
+ // Set a value from a parsed metadata object.
1252
+ void Set(const ParsedMetadata<Derived>& m) {
1253
+ m.SetOnContainer(static_cast<Derived*>(this));
1254
+ }
1255
+
1256
+ // Append a key/value pair - takes ownership of value
1257
+ void Append(absl::string_view key, Slice value,
1258
+ MetadataParseErrorFn on_error) {
1259
+ metadata_detail::AppendHelper<Derived> helper(static_cast<Derived*>(this),
1260
+ value.TakeOwned(), on_error);
1261
+ metadata_detail::NameLookup<void, Traits...>::Lookup(key, &helper);
1262
+ }
1263
+
1264
+ void Clear();
1265
+ size_t TransportSize() const;
1266
+ Derived Copy() const;
1267
+ bool empty() const { return table_.empty() && unknown_.empty(); }
1268
+ size_t count() const { return table_.count() + unknown_.size(); }
1269
+
1270
+ private:
1271
+ friend class metadata_detail::AppendHelper<Derived>;
1272
+ friend class metadata_detail::GetStringValueHelper<Derived>;
1273
+ friend class metadata_detail::RemoveHelper<Derived>;
1274
+ friend class metadata_detail::CopySink<Derived>;
1275
+ friend class ParsedMetadata<Derived>;
1276
+
1277
+ template <typename Which>
1278
+ using Value = metadata_detail::Value<Which>;
1279
+
1280
+ void AppendUnknown(absl::string_view key, Slice value) {
1281
+ unknown_.EmplaceBack(Slice::FromCopiedString(key), value.Ref());
1282
+ }
1283
+
1284
+ void RemoveUnknown(absl::string_view key) {
1285
+ unknown_.SetEnd(std::remove_if(unknown_.begin(), unknown_.end(),
1286
+ [key](const std::pair<Slice, Slice>& p) {
1287
+ return p.first.as_string_view() == key;
1288
+ }));
1289
+ }
1290
+
1291
+ absl::optional<absl::string_view> GetStringValueUnknown(
1292
+ absl::string_view key, std::string* backing) const {
1293
+ absl::optional<absl::string_view> out;
1294
+ for (const auto& p : unknown_) {
1295
+ if (p.first.as_string_view() == key) {
1296
+ if (!out.has_value()) {
1297
+ out = p.second.as_string_view();
1298
+ } else {
1299
+ out = *backing = absl::StrCat(*out, ",", p.second.as_string_view());
1300
+ }
1301
+ }
1302
+ }
1303
+ return out;
1304
+ }
1305
+
1306
+ // Table of known metadata types.
1307
+ Table<Value<Traits>...> table_;
1308
+ // Backing store for added metadata.
1309
+ ChunkedVector<std::pair<Slice, Slice>, 10> unknown_;
1310
+ };
1311
+
1312
+ // Ok/not-ok check for metadata maps that contain GrpcStatusMetadata, so that
1313
+ // they can be used as result types for TrySeq.
1314
+ template <typename Derived, typename... Args>
1315
+ inline bool IsStatusOk(const MetadataMap<Derived, Args...>& m) {
1316
+ return m.get(GrpcStatusMetadata()).value_or(GRPC_STATUS_UNKNOWN) ==
1317
+ GRPC_STATUS_OK;
135
1318
  }
136
1319
 
137
- inline grpc_error* GRPC_MUST_USE_RESULT grpc_metadata_batch_add_head(
138
- grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
139
- grpc_mdelem elem_to_add, grpc_metadata_batch_callouts_index idx) {
140
- GPR_DEBUG_ASSERT(!GRPC_MDISNULL(elem_to_add));
141
- storage->md = elem_to_add;
142
- return grpc_metadata_batch_add_head(batch, storage, idx);
1320
+ template <typename Derived, typename... Traits>
1321
+ MetadataMap<Derived, Traits...>::MetadataMap(Arena* arena) : unknown_(arena) {}
1322
+
1323
+ template <typename Derived, typename... Traits>
1324
+ MetadataMap<Derived, Traits...>::MetadataMap(MetadataMap&& other) noexcept
1325
+ : table_(std::move(other.table_)), unknown_(std::move(other.unknown_)) {}
1326
+
1327
+ // We never create MetadataMap directly, instead we create Derived, but we want
1328
+ // to be able to move it without redeclaring this.
1329
+ // NOLINTNEXTLINE(misc-unconventional-assign-operator)
1330
+ template <typename Derived, typename... Traits>
1331
+ Derived& MetadataMap<Derived, Traits...>::operator=(
1332
+ MetadataMap&& other) noexcept {
1333
+ table_ = std::move(other.table_);
1334
+ unknown_ = std::move(other.unknown_);
1335
+ return static_cast<Derived&>(*this);
143
1336
  }
144
1337
 
145
- /** Add \a elem_to_add as the last element in \a batch, using
146
- \a storage as backing storage for the linked list element.
147
- \a storage is owned by the caller and must survive for the
148
- lifetime of batch. This usually means it should be around
149
- for the lifetime of the call.
150
- Takes ownership of \a elem_to_add */
151
- grpc_error* grpc_metadata_batch_add_tail(
152
- grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
153
- grpc_mdelem elem_to_add) GRPC_MUST_USE_RESULT;
154
-
155
- inline grpc_error* GRPC_MUST_USE_RESULT grpc_metadata_batch_add_tail(
156
- grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
157
- grpc_metadata_batch_callouts_index idx) {
158
- return grpc_metadata_batch_link_tail(batch, storage, idx);
1338
+ template <typename Derived, typename... Traits>
1339
+ MetadataMap<Derived, Traits...>::~MetadataMap() = default;
1340
+
1341
+ template <typename Derived, typename... Traits>
1342
+ void MetadataMap<Derived, Traits...>::Clear() {
1343
+ table_.ClearAll();
1344
+ unknown_.Clear();
159
1345
  }
160
1346
 
161
- inline grpc_error* GRPC_MUST_USE_RESULT grpc_metadata_batch_add_tail(
162
- grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
163
- grpc_mdelem elem_to_add, grpc_metadata_batch_callouts_index idx) {
164
- GPR_DEBUG_ASSERT(!GRPC_MDISNULL(elem_to_add));
165
- storage->md = elem_to_add;
166
- return grpc_metadata_batch_add_tail(batch, storage, idx);
1347
+ template <typename Derived, typename... Traits>
1348
+ size_t MetadataMap<Derived, Traits...>::TransportSize() const {
1349
+ metadata_detail::TransportSizeEncoder enc;
1350
+ Encode(&enc);
1351
+ return enc.size();
167
1352
  }
168
1353
 
169
- grpc_error* grpc_attach_md_to_error(grpc_error* src, grpc_mdelem md);
170
-
171
- struct grpc_filtered_mdelem {
172
- grpc_error* error;
173
- grpc_mdelem md;
174
- };
175
- #define GRPC_FILTERED_ERROR(error) \
176
- { (error), GRPC_MDNULL }
177
- #define GRPC_FILTERED_MDELEM(md) \
178
- { GRPC_ERROR_NONE, (md) }
179
- #define GRPC_FILTERED_REMOVE() \
180
- { GRPC_ERROR_NONE, GRPC_MDNULL }
181
-
182
- typedef grpc_filtered_mdelem (*grpc_metadata_batch_filter_func)(
183
- void* user_data, grpc_mdelem elem);
184
- grpc_error* grpc_metadata_batch_filter(
185
- grpc_metadata_batch* batch, grpc_metadata_batch_filter_func func,
186
- void* user_data, const char* composite_error_string) GRPC_MUST_USE_RESULT;
187
-
188
- #ifndef NDEBUG
189
- void grpc_metadata_batch_assert_ok(grpc_metadata_batch* batch);
190
- #else
191
- #define grpc_metadata_batch_assert_ok(batch) \
192
- do { \
193
- } while (0)
194
- #endif
195
-
196
- /// Copies \a src to \a dst. \a storage must point to an array of
197
- /// \a grpc_linked_mdelem structs of at least the same size as \a src.
198
- void grpc_metadata_batch_copy(grpc_metadata_batch* src,
199
- grpc_metadata_batch* dst,
200
- grpc_linked_mdelem* storage);
201
-
202
- void grpc_metadata_batch_move(grpc_metadata_batch* src,
203
- grpc_metadata_batch* dst);
1354
+ template <typename Derived, typename... Traits>
1355
+ Derived MetadataMap<Derived, Traits...>::Copy() const {
1356
+ Derived out(unknown_.arena());
1357
+ metadata_detail::CopySink<Derived> sink(&out);
1358
+ Encode(&sink);
1359
+ return out;
1360
+ }
1361
+
1362
+ } // namespace grpc_core
1363
+
1364
+ struct grpc_metadata_batch;
1365
+
1366
+ using grpc_metadata_batch_base = grpc_core::MetadataMap<
1367
+ grpc_metadata_batch,
1368
+ // Colon prefixed headers first
1369
+ grpc_core::HttpPathMetadata, grpc_core::HttpAuthorityMetadata,
1370
+ grpc_core::HttpMethodMetadata, grpc_core::HttpStatusMetadata,
1371
+ grpc_core::HttpSchemeMetadata,
1372
+ // Non-colon prefixed headers begin here
1373
+ grpc_core::ContentTypeMetadata, grpc_core::TeMetadata,
1374
+ grpc_core::GrpcEncodingMetadata, grpc_core::GrpcInternalEncodingRequest,
1375
+ grpc_core::GrpcAcceptEncodingMetadata, grpc_core::GrpcStatusMetadata,
1376
+ grpc_core::GrpcTimeoutMetadata, grpc_core::GrpcPreviousRpcAttemptsMetadata,
1377
+ grpc_core::GrpcRetryPushbackMsMetadata, grpc_core::UserAgentMetadata,
1378
+ grpc_core::GrpcMessageMetadata, grpc_core::HostMetadata,
1379
+ grpc_core::XEndpointLoadMetricsBinMetadata,
1380
+ grpc_core::GrpcServerStatsBinMetadata, grpc_core::GrpcTraceBinMetadata,
1381
+ grpc_core::GrpcTagsBinMetadata, grpc_core::GrpcLbClientStatsMetadata,
1382
+ grpc_core::LbCostBinMetadata, grpc_core::LbTokenMetadata,
1383
+ // Non-encodable things
1384
+ grpc_core::GrpcStreamNetworkState, grpc_core::GrpcStatusContext>;
1385
+
1386
+ struct grpc_metadata_batch : public grpc_metadata_batch_base {
1387
+ using grpc_metadata_batch_base::grpc_metadata_batch_base;
1388
+ };
204
1389
 
205
1390
  #endif /* GRPC_CORE_LIB_TRANSPORT_METADATA_BATCH_H */