grpc 0.14.1 → 0.15.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 (277) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +1398 -817
  3. data/include/grpc/compression.h +2 -1
  4. data/include/grpc/grpc.h +10 -1
  5. data/include/grpc/grpc_cronet.h +51 -0
  6. data/include/grpc/grpc_posix.h +70 -0
  7. data/include/grpc/impl/codegen/atm.h +2 -2
  8. data/include/grpc/impl/codegen/{atm_win32.h → atm_windows.h} +3 -3
  9. data/include/grpc/impl/codegen/compression_types.h +39 -5
  10. data/include/grpc/impl/codegen/connectivity_state.h +1 -1
  11. data/include/grpc/impl/codegen/grpc_types.h +10 -0
  12. data/include/grpc/impl/codegen/log.h +2 -1
  13. data/include/grpc/impl/codegen/port_platform.h +30 -12
  14. data/include/grpc/impl/codegen/slice_buffer.h +2 -3
  15. data/include/grpc/impl/codegen/sync.h +2 -2
  16. data/include/grpc/impl/codegen/{sync_win32.h → sync_windows.h} +3 -3
  17. data/include/grpc/support/{sync_win32.h → atm_windows.h} +4 -4
  18. data/include/grpc/support/avl.h +5 -0
  19. data/include/grpc/support/{log_win32.h → log_windows.h} +3 -3
  20. data/include/grpc/support/string_util.h +2 -1
  21. data/include/grpc/support/{atm_win32.h → sync_windows.h} +4 -4
  22. data/src/core/ext/census/gen/census.pb.c +179 -0
  23. data/src/core/ext/census/gen/census.pb.h +294 -0
  24. data/src/core/ext/census/grpc_filter.c +11 -7
  25. data/src/core/ext/client_config/channel_connectivity.c +28 -14
  26. data/src/core/ext/client_config/client_channel.c +77 -53
  27. data/src/core/ext/client_config/connector.h +1 -1
  28. data/src/core/ext/client_config/lb_policy.c +9 -6
  29. data/src/core/ext/client_config/lb_policy.h +9 -5
  30. data/src/core/ext/client_config/subchannel.c +58 -39
  31. data/src/core/ext/client_config/subchannel.h +3 -2
  32. data/src/core/ext/client_config/subchannel_call_holder.c +34 -19
  33. data/src/core/ext/client_config/subchannel_call_holder.h +2 -1
  34. data/src/core/ext/client_config/subchannel_index.c +20 -9
  35. data/src/core/ext/lb_policy/grpclb/load_balancer_api.c +7 -7
  36. data/src/core/ext/lb_policy/grpclb/load_balancer_api.h +5 -5
  37. data/src/core/ext/lb_policy/grpclb/proto/grpc/lb/{v0 → v1}/load_balancer.pb.c +29 -30
  38. data/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +178 -0
  39. data/src/core/ext/lb_policy/pick_first/pick_first.c +65 -45
  40. data/src/core/ext/lb_policy/round_robin/round_robin.c +84 -43
  41. data/src/core/ext/load_reporting/load_reporting.c +133 -0
  42. data/src/core/ext/load_reporting/load_reporting.h +75 -0
  43. data/src/core/ext/load_reporting/load_reporting_filter.c +151 -0
  44. data/src/core/ext/load_reporting/load_reporting_filter.h +41 -0
  45. data/src/core/ext/resolver/dns/native/dns_resolver.c +22 -8
  46. data/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +2 -2
  47. data/src/core/ext/transport/chttp2/client/insecure/channel_create.c +4 -4
  48. data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c +95 -0
  49. data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +14 -18
  50. data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +49 -24
  51. data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +82 -0
  52. data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +104 -60
  53. data/src/core/ext/transport/chttp2/transport/bin_decoder.c +232 -0
  54. data/src/{ruby/ext/grpc/rb_signal.c → core/ext/transport/chttp2/transport/bin_decoder.h} +27 -31
  55. data/src/core/ext/transport/chttp2/transport/chttp2_transport.c +481 -260
  56. data/src/core/ext/transport/chttp2/transport/frame.h +1 -7
  57. data/src/core/ext/transport/chttp2/transport/frame_data.c +44 -27
  58. data/src/core/ext/transport/chttp2/transport/frame_data.h +6 -5
  59. data/src/core/ext/transport/chttp2/transport/frame_goaway.c +23 -17
  60. data/src/core/ext/transport/chttp2/transport/frame_goaway.h +2 -2
  61. data/src/core/ext/transport/chttp2/transport/frame_ping.c +12 -7
  62. data/src/core/ext/transport/chttp2/transport/frame_ping.h +3 -3
  63. data/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +25 -12
  64. data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +2 -2
  65. data/src/core/ext/transport/chttp2/transport/frame_settings.c +23 -21
  66. data/src/core/ext/transport/chttp2/transport/frame_settings.h +2 -2
  67. data/src/core/ext/transport/chttp2/transport/frame_window_update.c +17 -9
  68. data/src/core/ext/transport/chttp2/transport/frame_window_update.h +2 -2
  69. data/src/core/ext/transport/chttp2/transport/hpack_parser.c +365 -287
  70. data/src/core/ext/transport/chttp2/transport/hpack_parser.h +8 -6
  71. data/src/core/ext/transport/chttp2/transport/hpack_table.c +24 -20
  72. data/src/core/ext/transport/chttp2/transport/hpack_table.h +5 -4
  73. data/src/core/ext/transport/chttp2/transport/incoming_metadata.c +1 -0
  74. data/src/core/ext/transport/chttp2/transport/incoming_metadata.h +1 -0
  75. data/src/core/ext/transport/chttp2/transport/internal.h +34 -32
  76. data/src/core/ext/transport/chttp2/transport/parsing.c +296 -212
  77. data/src/core/ext/transport/chttp2/transport/writing.c +12 -9
  78. data/src/core/lib/channel/channel_args.c +26 -12
  79. data/src/core/lib/channel/channel_args.h +1 -1
  80. data/src/core/lib/channel/channel_stack.c +12 -8
  81. data/src/core/lib/channel/channel_stack.h +27 -11
  82. data/src/core/lib/channel/channel_stack_builder.c +2 -2
  83. data/src/core/lib/channel/compress_filter.c +26 -31
  84. data/src/core/lib/channel/compress_filter.h +4 -4
  85. data/src/core/lib/channel/connected_channel.c +7 -5
  86. data/src/core/lib/channel/http_client_filter.c +34 -8
  87. data/src/core/lib/channel/http_client_filter.h +1 -1
  88. data/src/core/lib/channel/http_server_filter.c +21 -12
  89. data/src/core/lib/compression/{compression_algorithm.c → compression.c} +22 -21
  90. data/src/core/lib/http/httpcli.c +81 -59
  91. data/src/core/lib/http/httpcli.h +11 -15
  92. data/src/core/lib/http/httpcli_security_connector.c +5 -3
  93. data/src/core/lib/http/parser.c +127 -118
  94. data/src/core/lib/http/parser.h +11 -6
  95. data/src/core/lib/iomgr/closure.c +20 -16
  96. data/src/core/lib/iomgr/closure.h +19 -15
  97. data/src/core/lib/iomgr/endpoint.h +1 -1
  98. data/src/core/lib/iomgr/endpoint_pair_posix.c +2 -2
  99. data/src/core/lib/iomgr/error.c +535 -0
  100. data/src/core/lib/iomgr/error.h +192 -0
  101. data/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +190 -83
  102. data/src/core/lib/iomgr/ev_poll_posix.c +1267 -0
  103. data/src/{ruby/ext/grpc/rb_signal.h → core/lib/iomgr/ev_poll_posix.h} +7 -5
  104. data/src/core/lib/iomgr/ev_posix.c +104 -14
  105. data/src/core/lib/iomgr/ev_posix.h +17 -7
  106. data/src/core/lib/iomgr/exec_ctx.c +25 -7
  107. data/src/core/lib/iomgr/exec_ctx.h +27 -8
  108. data/src/core/lib/iomgr/executor.c +2 -2
  109. data/src/core/lib/iomgr/executor.h +1 -1
  110. data/src/core/lib/iomgr/iocp_windows.c +2 -41
  111. data/src/core/lib/iomgr/iocp_windows.h +0 -8
  112. data/src/core/lib/iomgr/iomgr.c +5 -4
  113. data/src/core/lib/iomgr/iomgr_posix.c +5 -1
  114. data/src/core/lib/iomgr/iomgr_windows.c +1 -1
  115. data/src/core/lib/{support → iomgr}/load_file.c +15 -17
  116. data/src/core/lib/{support → iomgr}/load_file.h +8 -7
  117. data/src/core/lib/iomgr/polling_entity.c +104 -0
  118. data/src/core/lib/iomgr/polling_entity.h +81 -0
  119. data/src/core/lib/iomgr/pollset.h +6 -5
  120. data/src/core/lib/iomgr/pollset_set_windows.c +4 -1
  121. data/src/core/lib/iomgr/pollset_windows.c +10 -6
  122. data/src/core/lib/iomgr/resolve_address.h +5 -9
  123. data/src/core/lib/iomgr/resolve_address_posix.c +55 -38
  124. data/src/core/lib/iomgr/resolve_address_windows.c +51 -37
  125. data/src/core/lib/iomgr/sockaddr.h +2 -2
  126. data/src/core/lib/iomgr/{sockaddr_win32.h → sockaddr_windows.h} +3 -3
  127. data/src/core/lib/iomgr/socket_utils_common_posix.c +92 -45
  128. data/src/core/lib/iomgr/socket_utils_posix.h +19 -12
  129. data/src/core/lib/iomgr/socket_windows.c +61 -2
  130. data/src/core/lib/iomgr/socket_windows.h +13 -0
  131. data/src/core/lib/iomgr/tcp_client_posix.c +54 -39
  132. data/src/core/lib/iomgr/tcp_client_windows.c +34 -34
  133. data/src/core/lib/iomgr/tcp_posix.c +43 -39
  134. data/src/core/lib/iomgr/tcp_server.h +5 -3
  135. data/src/core/lib/iomgr/tcp_server_posix.c +103 -64
  136. data/src/core/lib/iomgr/tcp_server_windows.c +114 -101
  137. data/src/core/lib/iomgr/tcp_windows.c +45 -50
  138. data/src/core/lib/iomgr/tcp_windows.h +1 -1
  139. data/src/core/lib/iomgr/timer.c +26 -13
  140. data/src/core/lib/iomgr/udp_server.c +28 -4
  141. data/src/core/lib/iomgr/udp_server.h +5 -1
  142. data/src/core/lib/iomgr/unix_sockets_posix.c +8 -7
  143. data/src/core/lib/iomgr/unix_sockets_posix.h +2 -1
  144. data/src/core/lib/iomgr/unix_sockets_posix_noop.c +4 -2
  145. data/src/core/lib/iomgr/wakeup_fd_eventfd.c +15 -5
  146. data/src/core/lib/iomgr/wakeup_fd_pipe.c +13 -9
  147. data/src/core/lib/iomgr/wakeup_fd_posix.c +6 -6
  148. data/src/core/lib/iomgr/wakeup_fd_posix.h +9 -6
  149. data/src/core/lib/iomgr/workqueue.h +5 -4
  150. data/src/core/lib/iomgr/workqueue_posix.c +40 -26
  151. data/src/core/lib/iomgr/workqueue_windows.c +2 -2
  152. data/src/core/lib/profiling/basic_timers.c +2 -2
  153. data/src/core/lib/security/{security_context.c → context/security_context.c} +1 -1
  154. data/src/core/lib/security/{security_context.h → context/security_context.h} +4 -4
  155. data/src/core/lib/security/credentials/composite/composite_credentials.c +263 -0
  156. data/src/core/lib/security/credentials/composite/composite_credentials.h +72 -0
  157. data/src/core/lib/security/credentials/credentials.c +233 -0
  158. data/src/core/lib/security/{credentials.h → credentials/credentials.h} +19 -157
  159. data/src/core/lib/security/{credentials_metadata.c → credentials/credentials_metadata.c} +1 -1
  160. data/src/core/lib/security/credentials/fake/fake_credentials.c +139 -0
  161. data/src/core/lib/security/credentials/fake/fake_credentials.h +56 -0
  162. data/src/core/lib/security/{credentials_posix.c → credentials/google_default/credentials_posix.c} +1 -1
  163. data/src/core/lib/security/{credentials_win32.c → credentials/google_default/credentials_windows.c} +3 -3
  164. data/src/core/lib/security/{google_default_credentials.c → credentials/google_default/google_default_credentials.c} +93 -35
  165. data/src/core/lib/security/credentials/google_default/google_default_credentials.h +46 -0
  166. data/src/core/lib/security/credentials/iam/iam_credentials.c +85 -0
  167. data/src/core/lib/security/credentials/iam/iam_credentials.h +44 -0
  168. data/src/core/lib/security/{json_token.c → credentials/jwt/json_token.c} +10 -101
  169. data/src/core/lib/security/{json_token.h → credentials/jwt/json_token.h} +3 -33
  170. data/src/core/lib/security/credentials/jwt/jwt_credentials.c +160 -0
  171. data/src/core/lib/security/credentials/jwt/jwt_credentials.h +62 -0
  172. data/src/core/lib/security/{jwt_verifier.c → credentials/jwt/jwt_verifier.c} +35 -15
  173. data/src/core/lib/security/{jwt_verifier.h → credentials/jwt/jwt_verifier.h} +3 -3
  174. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +433 -0
  175. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +109 -0
  176. data/src/core/lib/security/credentials/plugin/plugin_credentials.c +129 -0
  177. data/src/core/lib/security/credentials/plugin/plugin_credentials.h +45 -0
  178. data/src/core/lib/security/credentials/ssl/ssl_credentials.c +240 -0
  179. data/src/core/lib/security/credentials/ssl/ssl_credentials.h +48 -0
  180. data/src/core/lib/security/{auth_filters.h → transport/auth_filters.h} +3 -3
  181. data/src/core/lib/security/{client_auth_filter.c → transport/client_auth_filter.c} +27 -20
  182. data/src/core/lib/security/{handshake.c → transport/handshake.c} +77 -45
  183. data/src/core/lib/security/{handshake.h → transport/handshake.h} +9 -11
  184. data/src/core/lib/security/{secure_endpoint.c → transport/secure_endpoint.c} +19 -12
  185. data/src/core/lib/security/{secure_endpoint.h → transport/secure_endpoint.h} +3 -3
  186. data/src/core/lib/security/{security_connector.c → transport/security_connector.c} +26 -17
  187. data/src/core/lib/security/{security_connector.h → transport/security_connector.h} +8 -8
  188. data/src/core/lib/security/{server_auth_filter.c → transport/server_auth_filter.c} +24 -16
  189. data/src/core/lib/security/transport/tsi_error.c +40 -0
  190. data/src/core/lib/security/transport/tsi_error.h +42 -0
  191. data/src/core/lib/security/{b64.c → util/b64.c} +1 -1
  192. data/src/core/lib/security/{b64.h → util/b64.h} +3 -3
  193. data/src/core/lib/security/util/json_util.c +61 -0
  194. data/src/core/lib/security/util/json_util.h +55 -0
  195. data/src/core/lib/support/avl.c +11 -0
  196. data/src/core/lib/support/cpu_windows.c +2 -2
  197. data/src/core/lib/support/{env_win32.c → env_windows.c} +3 -3
  198. data/src/core/lib/support/log.c +3 -1
  199. data/src/core/lib/support/log_linux.c +2 -2
  200. data/src/core/lib/support/{log_win32.c → log_windows.c} +4 -4
  201. data/src/core/lib/support/murmur_hash.c +3 -5
  202. data/src/core/lib/support/string.c +10 -0
  203. data/src/core/lib/support/string.h +4 -0
  204. data/src/core/lib/support/{string_util_win32.c → string_util_windows.c} +3 -3
  205. data/src/core/lib/support/{string_win32.c → string_windows.c} +2 -2
  206. data/src/core/lib/support/{string_win32.h → string_windows.h} +5 -5
  207. data/src/core/lib/support/subprocess_windows.c +1 -1
  208. data/src/core/lib/support/{sync_win32.c → sync_windows.c} +2 -2
  209. data/src/core/lib/support/{thd_win32.c → thd_windows.c} +2 -2
  210. data/src/core/lib/support/{time_win32.c → time_windows.c} +2 -2
  211. data/src/core/lib/support/tmpfile_msys.c +1 -1
  212. data/src/core/lib/support/{tmpfile_win32.c → tmpfile_windows.c} +3 -3
  213. data/src/core/lib/surface/alarm.c +2 -2
  214. data/src/core/lib/surface/byte_buffer_reader.c +13 -6
  215. data/src/core/lib/surface/call.c +323 -123
  216. data/src/core/lib/surface/call.h +2 -0
  217. data/src/core/lib/surface/call_log_batch.c +1 -1
  218. data/src/core/lib/surface/channel.c +64 -15
  219. data/src/core/lib/surface/channel.h +9 -0
  220. data/src/core/lib/surface/channel_ping.c +3 -3
  221. data/src/core/lib/surface/completion_queue.c +75 -19
  222. data/src/core/lib/surface/completion_queue.h +7 -2
  223. data/src/core/lib/surface/init.c +2 -1
  224. data/src/core/lib/surface/init_secure.c +4 -4
  225. data/src/core/lib/surface/lame_client.c +12 -8
  226. data/src/core/lib/surface/server.c +213 -120
  227. data/src/core/lib/surface/server.h +1 -0
  228. data/src/core/lib/surface/version.c +1 -1
  229. data/src/core/lib/transport/connectivity_state.c +40 -18
  230. data/src/core/lib/transport/connectivity_state.h +4 -1
  231. data/src/core/lib/transport/metadata.c +23 -23
  232. data/src/core/lib/transport/metadata.h +4 -0
  233. data/src/core/lib/transport/metadata_batch.c +9 -0
  234. data/src/core/lib/transport/metadata_batch.h +3 -0
  235. data/src/core/lib/transport/static_metadata.c +6 -5
  236. data/src/core/lib/transport/static_metadata.h +64 -60
  237. data/src/core/lib/transport/transport.c +24 -12
  238. data/src/core/lib/transport/transport.h +6 -5
  239. data/src/core/lib/transport/transport_impl.h +4 -0
  240. data/src/core/lib/transport/transport_op_string.c +2 -2
  241. data/src/core/plugin_registry/grpc_plugin_registry.c +4 -0
  242. data/src/ruby/bin/math_services.rb +41 -2
  243. data/src/ruby/ext/grpc/rb_call.c +42 -40
  244. data/src/ruby/ext/grpc/rb_channel.c +1 -1
  245. data/src/ruby/ext/grpc/rb_completion_queue.c +59 -6
  246. data/src/ruby/ext/grpc/rb_completion_queue.h +1 -1
  247. data/src/ruby/ext/grpc/rb_grpc.c +1 -3
  248. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +12 -2
  249. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +21 -5
  250. data/src/ruby/ext/grpc/rb_loader.c +1 -1
  251. data/src/ruby/ext/grpc/rb_server.c +5 -3
  252. data/src/ruby/lib/grpc.rb +0 -3
  253. data/src/ruby/lib/grpc/errors.rb +3 -2
  254. data/src/ruby/lib/grpc/generic/active_call.rb +32 -42
  255. data/src/ruby/lib/grpc/generic/bidi_call.rb +20 -0
  256. data/src/ruby/lib/grpc/generic/client_stub.rb +31 -54
  257. data/src/ruby/lib/grpc/generic/rpc_desc.rb +4 -4
  258. data/src/ruby/lib/grpc/generic/rpc_server.rb +12 -23
  259. data/src/ruby/lib/grpc/generic/service.rb +8 -8
  260. data/src/ruby/lib/grpc/version.rb +1 -1
  261. data/src/ruby/pb/grpc/health/v1/health_services.rb +30 -2
  262. data/src/ruby/pb/grpc/testing/duplicate/echo_duplicate_services.rb +34 -4
  263. data/src/ruby/pb/grpc/testing/metrics_services.rb +39 -2
  264. data/src/ruby/pb/src/proto/grpc/testing/empty.rb +15 -0
  265. data/src/ruby/pb/src/proto/grpc/testing/messages.rb +84 -0
  266. data/src/ruby/pb/src/proto/grpc/testing/test.rb +14 -0
  267. data/src/ruby/pb/src/proto/grpc/testing/test_services.rb +110 -0
  268. data/src/ruby/pb/test/client.rb +5 -2
  269. data/src/ruby/spec/generic/active_call_spec.rb +3 -2
  270. data/src/ruby/spec/generic/client_stub_spec.rb +27 -24
  271. data/src/ruby/spec/generic/rpc_desc_spec.rb +11 -11
  272. data/src/ruby/spec/generic/rpc_server_spec.rb +42 -61
  273. data/src/ruby/spec/pb/health/checker_spec.rb +3 -5
  274. metadata +86 -48
  275. data/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h +0 -182
  276. data/src/core/lib/security/credentials.c +0 -1296
  277. data/src/ruby/lib/grpc/signals.rb +0 -69
@@ -53,6 +53,7 @@ void grpc_server_add_listener(
53
53
  server */
54
54
  void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *server,
55
55
  grpc_transport *transport,
56
+ grpc_pollset *accepting_pollset,
56
57
  const grpc_channel_args *args);
57
58
 
58
59
  const grpc_channel_args *grpc_server_get_channel_args(grpc_server *server);
@@ -36,4 +36,4 @@
36
36
 
37
37
  #include <grpc/grpc.h>
38
38
 
39
- const char *grpc_version_string(void) { return "0.14.1"; }
39
+ const char *grpc_version_string(void) { return "0.15.0"; }
@@ -51,8 +51,8 @@ const char *grpc_connectivity_state_name(grpc_connectivity_state state) {
51
51
  return "READY";
52
52
  case GRPC_CHANNEL_TRANSIENT_FAILURE:
53
53
  return "TRANSIENT_FAILURE";
54
- case GRPC_CHANNEL_FATAL_FAILURE:
55
- return "FATAL_FAILURE";
54
+ case GRPC_CHANNEL_SHUTDOWN:
55
+ return "SHUTDOWN";
56
56
  }
57
57
  GPR_UNREACHABLE_CODE(return "UNKNOWN");
58
58
  }
@@ -61,35 +61,40 @@ void grpc_connectivity_state_init(grpc_connectivity_state_tracker *tracker,
61
61
  grpc_connectivity_state init_state,
62
62
  const char *name) {
63
63
  tracker->current_state = init_state;
64
+ tracker->current_error = GRPC_ERROR_NONE;
64
65
  tracker->watchers = NULL;
65
66
  tracker->name = gpr_strdup(name);
66
67
  }
67
68
 
68
69
  void grpc_connectivity_state_destroy(grpc_exec_ctx *exec_ctx,
69
70
  grpc_connectivity_state_tracker *tracker) {
70
- int success;
71
+ grpc_error *error;
71
72
  grpc_connectivity_state_watcher *w;
72
73
  while ((w = tracker->watchers)) {
73
74
  tracker->watchers = w->next;
74
75
 
75
- if (GRPC_CHANNEL_FATAL_FAILURE != *w->current) {
76
- *w->current = GRPC_CHANNEL_FATAL_FAILURE;
77
- success = 1;
76
+ if (GRPC_CHANNEL_SHUTDOWN != *w->current) {
77
+ *w->current = GRPC_CHANNEL_SHUTDOWN;
78
+ error = GRPC_ERROR_NONE;
78
79
  } else {
79
- success = 0;
80
+ error = GRPC_ERROR_CREATE("Shutdown connectivity owner");
80
81
  }
81
- grpc_exec_ctx_enqueue(exec_ctx, w->notify, success, NULL);
82
+ grpc_exec_ctx_sched(exec_ctx, w->notify, error, NULL);
82
83
  gpr_free(w);
83
84
  }
85
+ GRPC_ERROR_UNREF(tracker->current_error);
84
86
  gpr_free(tracker->name);
85
87
  }
86
88
 
87
89
  grpc_connectivity_state grpc_connectivity_state_check(
88
- grpc_connectivity_state_tracker *tracker) {
90
+ grpc_connectivity_state_tracker *tracker, grpc_error **error) {
89
91
  if (grpc_connectivity_state_trace) {
90
92
  gpr_log(GPR_DEBUG, "CONWATCH: %p %s: get %s", tracker, tracker->name,
91
93
  grpc_connectivity_state_name(tracker->current_state));
92
94
  }
95
+ if (error != NULL) {
96
+ *error = GRPC_ERROR_REF(tracker->current_error);
97
+ }
93
98
  return tracker->current_state;
94
99
  }
95
100
 
@@ -109,7 +114,7 @@ int grpc_connectivity_state_notify_on_state_change(
109
114
  if (current == NULL) {
110
115
  grpc_connectivity_state_watcher *w = tracker->watchers;
111
116
  if (w != NULL && w->notify == notify) {
112
- grpc_exec_ctx_enqueue(exec_ctx, notify, false, NULL);
117
+ grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_CANCELLED, NULL);
113
118
  tracker->watchers = w->next;
114
119
  gpr_free(w);
115
120
  return 0;
@@ -117,7 +122,7 @@ int grpc_connectivity_state_notify_on_state_change(
117
122
  while (w != NULL) {
118
123
  grpc_connectivity_state_watcher *rm_candidate = w->next;
119
124
  if (rm_candidate != NULL && rm_candidate->notify == notify) {
120
- grpc_exec_ctx_enqueue(exec_ctx, notify, false, NULL);
125
+ grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_CANCELLED, NULL);
121
126
  w->next = w->next->next;
122
127
  gpr_free(rm_candidate);
123
128
  return 0;
@@ -128,7 +133,8 @@ int grpc_connectivity_state_notify_on_state_change(
128
133
  } else {
129
134
  if (tracker->current_state != *current) {
130
135
  *current = tracker->current_state;
131
- grpc_exec_ctx_enqueue(exec_ctx, notify, true, NULL);
136
+ grpc_exec_ctx_sched(exec_ctx, notify,
137
+ GRPC_ERROR_REF(tracker->current_error), NULL);
132
138
  } else {
133
139
  grpc_connectivity_state_watcher *w = gpr_malloc(sizeof(*w));
134
140
  w->current = current;
@@ -143,22 +149,38 @@ int grpc_connectivity_state_notify_on_state_change(
143
149
  void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx,
144
150
  grpc_connectivity_state_tracker *tracker,
145
151
  grpc_connectivity_state state,
146
- const char *reason) {
152
+ grpc_error *error, const char *reason) {
147
153
  grpc_connectivity_state_watcher *w;
148
154
  if (grpc_connectivity_state_trace) {
149
- gpr_log(GPR_DEBUG, "SET: %p %s: %s --> %s [%s]", tracker, tracker->name,
150
- grpc_connectivity_state_name(tracker->current_state),
151
- grpc_connectivity_state_name(state), reason);
155
+ const char *error_string = grpc_error_string(error);
156
+ gpr_log(GPR_DEBUG, "SET: %p %s: %s --> %s [%s] error=%p %s", tracker,
157
+ tracker->name, grpc_connectivity_state_name(tracker->current_state),
158
+ grpc_connectivity_state_name(state), reason, error, error_string);
159
+ grpc_error_free_string(error_string);
160
+ }
161
+ switch (state) {
162
+ case GRPC_CHANNEL_CONNECTING:
163
+ case GRPC_CHANNEL_IDLE:
164
+ case GRPC_CHANNEL_READY:
165
+ GPR_ASSERT(error == GRPC_ERROR_NONE);
166
+ break;
167
+ case GRPC_CHANNEL_SHUTDOWN:
168
+ case GRPC_CHANNEL_TRANSIENT_FAILURE:
169
+ GPR_ASSERT(error != GRPC_ERROR_NONE);
170
+ break;
152
171
  }
172
+ GRPC_ERROR_UNREF(tracker->current_error);
173
+ tracker->current_error = error;
153
174
  if (tracker->current_state == state) {
154
175
  return;
155
176
  }
156
- GPR_ASSERT(tracker->current_state != GRPC_CHANNEL_FATAL_FAILURE);
177
+ GPR_ASSERT(tracker->current_state != GRPC_CHANNEL_SHUTDOWN);
157
178
  tracker->current_state = state;
158
179
  while ((w = tracker->watchers) != NULL) {
159
180
  *w->current = tracker->current_state;
160
181
  tracker->watchers = w->next;
161
- grpc_exec_ctx_enqueue(exec_ctx, w->notify, true, NULL);
182
+ grpc_exec_ctx_sched(exec_ctx, w->notify,
183
+ GRPC_ERROR_REF(tracker->current_error), NULL);
162
184
  gpr_free(w);
163
185
  }
164
186
  }
@@ -49,6 +49,8 @@ typedef struct grpc_connectivity_state_watcher {
49
49
  typedef struct {
50
50
  /** current connectivity state */
51
51
  grpc_connectivity_state current_state;
52
+ /** error associated with state */
53
+ grpc_error *current_error;
52
54
  /** all our watchers */
53
55
  grpc_connectivity_state_watcher *watchers;
54
56
  /** a name to help debugging */
@@ -70,10 +72,11 @@ void grpc_connectivity_state_destroy(grpc_exec_ctx *exec_ctx,
70
72
  void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx,
71
73
  grpc_connectivity_state_tracker *tracker,
72
74
  grpc_connectivity_state state,
75
+ grpc_error *associated_error,
73
76
  const char *reason);
74
77
 
75
78
  grpc_connectivity_state grpc_connectivity_state_check(
76
- grpc_connectivity_state_tracker *tracker);
79
+ grpc_connectivity_state_tracker *tracker, grpc_error **current_error);
77
80
 
78
81
  /** Return 1 if the channel should start connecting, 0 otherwise.
79
82
  If current==NULL cancel notify if it is already queued (success==0 in that
@@ -129,7 +129,10 @@ typedef struct mdtab_shard {
129
129
  internal_metadata **elems;
130
130
  size_t count;
131
131
  size_t capacity;
132
- size_t free;
132
+ /** Estimate of the number of unreferenced mdelems in the hash table.
133
+ This will eventually converge to the exact number, but it's instantaneous
134
+ accuracy is not guaranteed */
135
+ gpr_atm free_estimate;
133
136
  } mdtab_shard;
134
137
 
135
138
  #define LOG2_STRTAB_SHARD_COUNT 5
@@ -217,7 +220,7 @@ void grpc_mdctx_global_init(void) {
217
220
  mdtab_shard *shard = &g_mdtab_shard[i];
218
221
  gpr_mu_init(&shard->mu);
219
222
  shard->count = 0;
220
- shard->free = 0;
223
+ gpr_atm_no_barrier_store(&shard->free_estimate, 0);
221
224
  shard->capacity = INITIAL_MDTAB_CAPACITY;
222
225
  shard->elems = gpr_malloc(sizeof(*shard->elems) * shard->capacity);
223
226
  memset(shard->elems, 0, sizeof(*shard->elems) * shard->capacity);
@@ -232,7 +235,7 @@ void grpc_mdctx_global_shutdown(void) {
232
235
  gc_mdtab(shard);
233
236
  /* TODO(ctiller): GPR_ASSERT(shard->count == 0); */
234
237
  if (shard->count != 0) {
235
- gpr_log(GPR_DEBUG, "WARNING: %d metadata elements were leaked",
238
+ gpr_log(GPR_DEBUG, "WARNING: %" PRIuPTR " metadata elements were leaked",
236
239
  shard->count);
237
240
  if (grpc_iomgr_abort_on_leaks()) {
238
241
  abort();
@@ -245,7 +248,7 @@ void grpc_mdctx_global_shutdown(void) {
245
248
  gpr_mu_destroy(&shard->mu);
246
249
  /* TODO(ctiller): GPR_ASSERT(shard->count == 0); */
247
250
  if (shard->count != 0) {
248
- gpr_log(GPR_DEBUG, "WARNING: %d metadata strings were leaked",
251
+ gpr_log(GPR_DEBUG, "WARNING: %" PRIuPTR " metadata strings were leaked",
249
252
  shard->count);
250
253
  for (size_t j = 0; j < shard->capacity; j++) {
251
254
  for (internal_string *s = shard->strs[j]; s; s = s->bucket_next) {
@@ -281,10 +284,8 @@ static void ref_md_locked(mdtab_shard *shard,
281
284
  grpc_mdstr_as_c_string((grpc_mdstr *)md->key),
282
285
  grpc_mdstr_as_c_string((grpc_mdstr *)md->value));
283
286
  #endif
284
- if (0 == gpr_atm_no_barrier_fetch_add(&md->refcnt, 2)) {
285
- shard->free--;
286
- } else {
287
- GPR_ASSERT(1 != gpr_atm_no_barrier_fetch_add(&md->refcnt, -1));
287
+ if (0 == gpr_atm_no_barrier_fetch_add(&md->refcnt, 1)) {
288
+ gpr_atm_no_barrier_fetch_add(&shard->free_estimate, -1);
288
289
  }
289
290
  }
290
291
 
@@ -373,7 +374,8 @@ grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *buf, size_t length) {
373
374
  ss = g_static_strtab[idx];
374
375
  if (ss == NULL) break;
375
376
  if (ss->hash == hash && GPR_SLICE_LENGTH(ss->slice) == length &&
376
- 0 == memcmp(buf, GPR_SLICE_START_PTR(ss->slice), length)) {
377
+ (length == 0 ||
378
+ 0 == memcmp(buf, GPR_SLICE_START_PTR(ss->slice), length))) {
377
379
  GPR_TIMER_END("grpc_mdstr_from_buffer", 0);
378
380
  return ss;
379
381
  }
@@ -446,6 +448,7 @@ static void gc_mdtab(mdtab_shard *shard) {
446
448
  size_t i;
447
449
  internal_metadata **prev_next;
448
450
  internal_metadata *md, *next;
451
+ gpr_atm num_freed = 0;
449
452
 
450
453
  GPR_TIMER_BEGIN("gc_mdtab", 0);
451
454
  for (i = 0; i < shard->capacity; i++) {
@@ -462,13 +465,14 @@ static void gc_mdtab(mdtab_shard *shard) {
462
465
  }
463
466
  gpr_free(md);
464
467
  *prev_next = next;
465
- shard->free--;
468
+ num_freed++;
466
469
  shard->count--;
467
470
  } else {
468
471
  prev_next = &md->bucket_next;
469
472
  }
470
473
  }
471
474
  }
475
+ gpr_atm_no_barrier_fetch_add(&shard->free_estimate, -num_freed);
472
476
  GPR_TIMER_END("gc_mdtab", 0);
473
477
  }
474
478
 
@@ -503,7 +507,8 @@ static void grow_mdtab(mdtab_shard *shard) {
503
507
  }
504
508
 
505
509
  static void rehash_mdtab(mdtab_shard *shard) {
506
- if (shard->free > shard->capacity / 4) {
510
+ if (gpr_atm_no_barrier_load(&shard->free_estimate) >
511
+ (gpr_atm)(shard->capacity / 4)) {
507
512
  gc_mdtab(shard);
508
513
  } else {
509
514
  grow_mdtab(shard);
@@ -552,7 +557,7 @@ grpc_mdelem *grpc_mdelem_from_metadata_strings(grpc_mdstr *mkey,
552
557
 
553
558
  /* not found: create a new pair */
554
559
  md = gpr_malloc(sizeof(internal_metadata));
555
- gpr_atm_rel_store(&md->refcnt, 2);
560
+ gpr_atm_rel_store(&md->refcnt, 1);
556
561
  md->key = key;
557
562
  md->value = value;
558
563
  md->user_data = 0;
@@ -644,7 +649,7 @@ grpc_mdelem *grpc_mdelem_ref(grpc_mdelem *gmd DEBUG_ARGS) {
644
649
  this function - meaning that no adjustment to mdtab_free is necessary,
645
650
  simplifying the logic here to be just an atomic increment */
646
651
  /* use C assert to have this removed in opt builds */
647
- assert(gpr_atm_no_barrier_load(&md->refcnt) >= 2);
652
+ assert(gpr_atm_no_barrier_load(&md->refcnt) >= 1);
648
653
  gpr_atm_no_barrier_fetch_add(&md->refcnt, 1);
649
654
  return gmd;
650
655
  }
@@ -661,18 +666,13 @@ void grpc_mdelem_unref(grpc_mdelem *gmd DEBUG_ARGS) {
661
666
  grpc_mdstr_as_c_string((grpc_mdstr *)md->key),
662
667
  grpc_mdstr_as_c_string((grpc_mdstr *)md->value));
663
668
  #endif
664
- if (2 == gpr_atm_full_fetch_add(&md->refcnt, -1)) {
665
- uint32_t hash = GRPC_MDSTR_KV_HASH(md->key->hash, md->value->hash);
669
+ uint32_t hash = GRPC_MDSTR_KV_HASH(md->key->hash, md->value->hash);
670
+ if (1 == gpr_atm_full_fetch_add(&md->refcnt, -1)) {
671
+ /* once the refcount hits zero, some other thread can come along and
672
+ free md at any time: it's unsafe from this point on to access it */
666
673
  mdtab_shard *shard =
667
674
  &g_mdtab_shard[SHARD_IDX(hash, LOG2_MDTAB_SHARD_COUNT)];
668
- GPR_TIMER_BEGIN("grpc_mdelem_unref.to_zero", 0);
669
- gpr_mu_lock(&shard->mu);
670
- if (1 == gpr_atm_no_barrier_load(&md->refcnt)) {
671
- shard->free++;
672
- gpr_atm_no_barrier_store(&md->refcnt, 0);
673
- }
674
- gpr_mu_unlock(&shard->mu);
675
- GPR_TIMER_END("grpc_mdelem_unref.to_zero", 0);
675
+ gpr_atm_no_barrier_fetch_add(&shard->free_estimate, 1);
676
676
  }
677
677
  }
678
678
 
@@ -147,6 +147,10 @@ const char *grpc_mdstr_as_c_string(grpc_mdstr *s);
147
147
 
148
148
  #define GRPC_MDSTR_LENGTH(s) (GPR_SLICE_LENGTH(s->slice))
149
149
 
150
+ /* We add 32 bytes of padding as per RFC-7540 section 6.5.2. */
151
+ #define GRPC_MDELEM_LENGTH(e) \
152
+ (GRPC_MDSTR_LENGTH((e)->key) + GRPC_MDSTR_LENGTH((e)->value) + 32)
153
+
150
154
  int grpc_mdstr_is_legal_header(grpc_mdstr *s);
151
155
  int grpc_mdstr_is_legal_nonbin_header(grpc_mdstr *s);
152
156
  int grpc_mdstr_is_bin_suffixed(grpc_mdstr *s);
@@ -192,3 +192,12 @@ int grpc_metadata_batch_is_empty(grpc_metadata_batch *batch) {
192
192
  gpr_time_cmp(gpr_inf_future(batch->deadline.clock_type),
193
193
  batch->deadline) == 0;
194
194
  }
195
+
196
+ size_t grpc_metadata_batch_size(grpc_metadata_batch *batch) {
197
+ size_t size = 0;
198
+ for (grpc_linked_mdelem *elem = batch->list.head; elem != NULL;
199
+ elem = elem->next) {
200
+ size += GRPC_MDELEM_LENGTH(elem->md);
201
+ }
202
+ return size;
203
+ }
@@ -66,6 +66,9 @@ void grpc_metadata_batch_destroy(grpc_metadata_batch *batch);
66
66
  void grpc_metadata_batch_clear(grpc_metadata_batch *batch);
67
67
  int grpc_metadata_batch_is_empty(grpc_metadata_batch *batch);
68
68
 
69
+ /* Returns the transport size of the batch. */
70
+ size_t grpc_metadata_batch_size(grpc_metadata_batch *batch);
71
+
69
72
  /** Moves the metadata information from \a src to \a dst. Upon return, \a src is
70
73
  * zeroed. */
71
74
  void grpc_metadata_batch_move(grpc_metadata_batch *dst,
@@ -48,7 +48,7 @@ uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = {
48
48
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
49
49
  0, 0, 0, 0, 0, 0, 4, 8, 6, 2, 4, 8, 6, 0, 0, 0, 0, 0, 0, 0,
50
50
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
51
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
51
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
52
52
 
53
53
  const uint8_t grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2] =
54
54
  {11, 35, 10, 35, 12, 35, 12, 49, 13, 35, 14, 35, 15, 35, 16, 35, 17, 35,
@@ -56,10 +56,10 @@ const uint8_t grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2] =
56
56
  30, 18, 30, 35, 31, 35, 32, 35, 36, 35, 37, 35, 38, 35, 39, 35, 42, 33,
57
57
  42, 34, 42, 48, 42, 53, 42, 54, 42, 55, 42, 56, 43, 33, 43, 48, 43, 53,
58
58
  46, 0, 46, 1, 46, 2, 50, 35, 57, 35, 58, 35, 59, 35, 60, 35, 61, 35,
59
- 62, 35, 63, 35, 64, 35, 65, 35, 66, 40, 66, 68, 66, 71, 67, 79, 67, 80,
60
- 69, 35, 70, 35, 72, 35, 73, 35, 74, 35, 75, 35, 76, 41, 76, 51, 76, 52,
61
- 77, 35, 78, 35, 81, 3, 81, 4, 81, 5, 81, 6, 81, 7, 81, 8, 81, 9,
62
- 82, 35, 83, 84, 85, 35, 86, 35, 87, 35, 88, 35, 89, 35};
59
+ 62, 35, 63, 35, 64, 35, 65, 35, 66, 35, 67, 40, 67, 69, 67, 72, 68, 80,
60
+ 68, 81, 70, 35, 71, 35, 73, 35, 74, 35, 75, 35, 76, 35, 77, 41, 77, 51,
61
+ 77, 52, 78, 35, 79, 35, 82, 3, 82, 4, 82, 5, 82, 6, 82, 7, 82, 8,
62
+ 82, 9, 83, 35, 84, 85, 86, 35, 87, 35, 88, 35, 89, 35, 90, 35};
63
63
 
64
64
  const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {
65
65
  "0",
@@ -126,6 +126,7 @@ const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {
126
126
  "if-unmodified-since",
127
127
  "last-modified",
128
128
  "link",
129
+ "load-reporting",
129
130
  "location",
130
131
  "max-forwards",
131
132
  ":method",
@@ -44,7 +44,7 @@
44
44
 
45
45
  #include "src/core/lib/transport/metadata.h"
46
46
 
47
- #define GRPC_STATIC_MDSTR_COUNT 90
47
+ #define GRPC_STATIC_MDSTR_COUNT 91
48
48
  extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
49
49
  /* "0" */
50
50
  #define GRPC_MDSTR_0 (&grpc_static_mdstr_table[0])
@@ -175,60 +175,62 @@ extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
175
175
  #define GRPC_MDSTR_LAST_MODIFIED (&grpc_static_mdstr_table[62])
176
176
  /* "link" */
177
177
  #define GRPC_MDSTR_LINK (&grpc_static_mdstr_table[63])
178
+ /* "load-reporting" */
179
+ #define GRPC_MDSTR_LOAD_REPORTING (&grpc_static_mdstr_table[64])
178
180
  /* "location" */
179
- #define GRPC_MDSTR_LOCATION (&grpc_static_mdstr_table[64])
181
+ #define GRPC_MDSTR_LOCATION (&grpc_static_mdstr_table[65])
180
182
  /* "max-forwards" */
181
- #define GRPC_MDSTR_MAX_FORWARDS (&grpc_static_mdstr_table[65])
183
+ #define GRPC_MDSTR_MAX_FORWARDS (&grpc_static_mdstr_table[66])
182
184
  /* ":method" */
183
- #define GRPC_MDSTR_METHOD (&grpc_static_mdstr_table[66])
185
+ #define GRPC_MDSTR_METHOD (&grpc_static_mdstr_table[67])
184
186
  /* ":path" */
185
- #define GRPC_MDSTR_PATH (&grpc_static_mdstr_table[67])
187
+ #define GRPC_MDSTR_PATH (&grpc_static_mdstr_table[68])
186
188
  /* "POST" */
187
- #define GRPC_MDSTR_POST (&grpc_static_mdstr_table[68])
189
+ #define GRPC_MDSTR_POST (&grpc_static_mdstr_table[69])
188
190
  /* "proxy-authenticate" */
189
- #define GRPC_MDSTR_PROXY_AUTHENTICATE (&grpc_static_mdstr_table[69])
191
+ #define GRPC_MDSTR_PROXY_AUTHENTICATE (&grpc_static_mdstr_table[70])
190
192
  /* "proxy-authorization" */
191
- #define GRPC_MDSTR_PROXY_AUTHORIZATION (&grpc_static_mdstr_table[70])
193
+ #define GRPC_MDSTR_PROXY_AUTHORIZATION (&grpc_static_mdstr_table[71])
192
194
  /* "PUT" */
193
- #define GRPC_MDSTR_PUT (&grpc_static_mdstr_table[71])
195
+ #define GRPC_MDSTR_PUT (&grpc_static_mdstr_table[72])
194
196
  /* "range" */
195
- #define GRPC_MDSTR_RANGE (&grpc_static_mdstr_table[72])
197
+ #define GRPC_MDSTR_RANGE (&grpc_static_mdstr_table[73])
196
198
  /* "referer" */
197
- #define GRPC_MDSTR_REFERER (&grpc_static_mdstr_table[73])
199
+ #define GRPC_MDSTR_REFERER (&grpc_static_mdstr_table[74])
198
200
  /* "refresh" */
199
- #define GRPC_MDSTR_REFRESH (&grpc_static_mdstr_table[74])
201
+ #define GRPC_MDSTR_REFRESH (&grpc_static_mdstr_table[75])
200
202
  /* "retry-after" */
201
- #define GRPC_MDSTR_RETRY_AFTER (&grpc_static_mdstr_table[75])
203
+ #define GRPC_MDSTR_RETRY_AFTER (&grpc_static_mdstr_table[76])
202
204
  /* ":scheme" */
203
- #define GRPC_MDSTR_SCHEME (&grpc_static_mdstr_table[76])
205
+ #define GRPC_MDSTR_SCHEME (&grpc_static_mdstr_table[77])
204
206
  /* "server" */
205
- #define GRPC_MDSTR_SERVER (&grpc_static_mdstr_table[77])
207
+ #define GRPC_MDSTR_SERVER (&grpc_static_mdstr_table[78])
206
208
  /* "set-cookie" */
207
- #define GRPC_MDSTR_SET_COOKIE (&grpc_static_mdstr_table[78])
209
+ #define GRPC_MDSTR_SET_COOKIE (&grpc_static_mdstr_table[79])
208
210
  /* "/" */
209
- #define GRPC_MDSTR_SLASH (&grpc_static_mdstr_table[79])
211
+ #define GRPC_MDSTR_SLASH (&grpc_static_mdstr_table[80])
210
212
  /* "/index.html" */
211
- #define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (&grpc_static_mdstr_table[80])
213
+ #define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (&grpc_static_mdstr_table[81])
212
214
  /* ":status" */
213
- #define GRPC_MDSTR_STATUS (&grpc_static_mdstr_table[81])
215
+ #define GRPC_MDSTR_STATUS (&grpc_static_mdstr_table[82])
214
216
  /* "strict-transport-security" */
215
- #define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (&grpc_static_mdstr_table[82])
217
+ #define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (&grpc_static_mdstr_table[83])
216
218
  /* "te" */
217
- #define GRPC_MDSTR_TE (&grpc_static_mdstr_table[83])
219
+ #define GRPC_MDSTR_TE (&grpc_static_mdstr_table[84])
218
220
  /* "trailers" */
219
- #define GRPC_MDSTR_TRAILERS (&grpc_static_mdstr_table[84])
221
+ #define GRPC_MDSTR_TRAILERS (&grpc_static_mdstr_table[85])
220
222
  /* "transfer-encoding" */
221
- #define GRPC_MDSTR_TRANSFER_ENCODING (&grpc_static_mdstr_table[85])
223
+ #define GRPC_MDSTR_TRANSFER_ENCODING (&grpc_static_mdstr_table[86])
222
224
  /* "user-agent" */
223
- #define GRPC_MDSTR_USER_AGENT (&grpc_static_mdstr_table[86])
225
+ #define GRPC_MDSTR_USER_AGENT (&grpc_static_mdstr_table[87])
224
226
  /* "vary" */
225
- #define GRPC_MDSTR_VARY (&grpc_static_mdstr_table[87])
227
+ #define GRPC_MDSTR_VARY (&grpc_static_mdstr_table[88])
226
228
  /* "via" */
227
- #define GRPC_MDSTR_VIA (&grpc_static_mdstr_table[88])
229
+ #define GRPC_MDSTR_VIA (&grpc_static_mdstr_table[89])
228
230
  /* "www-authenticate" */
229
- #define GRPC_MDSTR_WWW_AUTHENTICATE (&grpc_static_mdstr_table[89])
231
+ #define GRPC_MDSTR_WWW_AUTHENTICATE (&grpc_static_mdstr_table[90])
230
232
 
231
- #define GRPC_STATIC_MDELEM_COUNT 79
233
+ #define GRPC_STATIC_MDELEM_COUNT 80
232
234
  extern grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];
233
235
  extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];
234
236
  /* "accept-charset": "" */
@@ -333,71 +335,73 @@ extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];
333
335
  #define GRPC_MDELEM_LAST_MODIFIED_EMPTY (&grpc_static_mdelem_table[45])
334
336
  /* "link": "" */
335
337
  #define GRPC_MDELEM_LINK_EMPTY (&grpc_static_mdelem_table[46])
338
+ /* "load-reporting": "" */
339
+ #define GRPC_MDELEM_LOAD_REPORTING_EMPTY (&grpc_static_mdelem_table[47])
336
340
  /* "location": "" */
337
- #define GRPC_MDELEM_LOCATION_EMPTY (&grpc_static_mdelem_table[47])
341
+ #define GRPC_MDELEM_LOCATION_EMPTY (&grpc_static_mdelem_table[48])
338
342
  /* "max-forwards": "" */
339
- #define GRPC_MDELEM_MAX_FORWARDS_EMPTY (&grpc_static_mdelem_table[48])
343
+ #define GRPC_MDELEM_MAX_FORWARDS_EMPTY (&grpc_static_mdelem_table[49])
340
344
  /* ":method": "GET" */
341
- #define GRPC_MDELEM_METHOD_GET (&grpc_static_mdelem_table[49])
345
+ #define GRPC_MDELEM_METHOD_GET (&grpc_static_mdelem_table[50])
342
346
  /* ":method": "POST" */
343
- #define GRPC_MDELEM_METHOD_POST (&grpc_static_mdelem_table[50])
347
+ #define GRPC_MDELEM_METHOD_POST (&grpc_static_mdelem_table[51])
344
348
  /* ":method": "PUT" */
345
- #define GRPC_MDELEM_METHOD_PUT (&grpc_static_mdelem_table[51])
349
+ #define GRPC_MDELEM_METHOD_PUT (&grpc_static_mdelem_table[52])
346
350
  /* ":path": "/" */
347
- #define GRPC_MDELEM_PATH_SLASH (&grpc_static_mdelem_table[52])
351
+ #define GRPC_MDELEM_PATH_SLASH (&grpc_static_mdelem_table[53])
348
352
  /* ":path": "/index.html" */
349
- #define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML (&grpc_static_mdelem_table[53])
353
+ #define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML (&grpc_static_mdelem_table[54])
350
354
  /* "proxy-authenticate": "" */
351
- #define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[54])
355
+ #define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[55])
352
356
  /* "proxy-authorization": "" */
353
- #define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY (&grpc_static_mdelem_table[55])
357
+ #define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY (&grpc_static_mdelem_table[56])
354
358
  /* "range": "" */
355
- #define GRPC_MDELEM_RANGE_EMPTY (&grpc_static_mdelem_table[56])
359
+ #define GRPC_MDELEM_RANGE_EMPTY (&grpc_static_mdelem_table[57])
356
360
  /* "referer": "" */
357
- #define GRPC_MDELEM_REFERER_EMPTY (&grpc_static_mdelem_table[57])
361
+ #define GRPC_MDELEM_REFERER_EMPTY (&grpc_static_mdelem_table[58])
358
362
  /* "refresh": "" */
359
- #define GRPC_MDELEM_REFRESH_EMPTY (&grpc_static_mdelem_table[58])
363
+ #define GRPC_MDELEM_REFRESH_EMPTY (&grpc_static_mdelem_table[59])
360
364
  /* "retry-after": "" */
361
- #define GRPC_MDELEM_RETRY_AFTER_EMPTY (&grpc_static_mdelem_table[59])
365
+ #define GRPC_MDELEM_RETRY_AFTER_EMPTY (&grpc_static_mdelem_table[60])
362
366
  /* ":scheme": "grpc" */
363
- #define GRPC_MDELEM_SCHEME_GRPC (&grpc_static_mdelem_table[60])
367
+ #define GRPC_MDELEM_SCHEME_GRPC (&grpc_static_mdelem_table[61])
364
368
  /* ":scheme": "http" */
365
- #define GRPC_MDELEM_SCHEME_HTTP (&grpc_static_mdelem_table[61])
369
+ #define GRPC_MDELEM_SCHEME_HTTP (&grpc_static_mdelem_table[62])
366
370
  /* ":scheme": "https" */
367
- #define GRPC_MDELEM_SCHEME_HTTPS (&grpc_static_mdelem_table[62])
371
+ #define GRPC_MDELEM_SCHEME_HTTPS (&grpc_static_mdelem_table[63])
368
372
  /* "server": "" */
369
- #define GRPC_MDELEM_SERVER_EMPTY (&grpc_static_mdelem_table[63])
373
+ #define GRPC_MDELEM_SERVER_EMPTY (&grpc_static_mdelem_table[64])
370
374
  /* "set-cookie": "" */
371
- #define GRPC_MDELEM_SET_COOKIE_EMPTY (&grpc_static_mdelem_table[64])
375
+ #define GRPC_MDELEM_SET_COOKIE_EMPTY (&grpc_static_mdelem_table[65])
372
376
  /* ":status": "200" */
373
- #define GRPC_MDELEM_STATUS_200 (&grpc_static_mdelem_table[65])
377
+ #define GRPC_MDELEM_STATUS_200 (&grpc_static_mdelem_table[66])
374
378
  /* ":status": "204" */
375
- #define GRPC_MDELEM_STATUS_204 (&grpc_static_mdelem_table[66])
379
+ #define GRPC_MDELEM_STATUS_204 (&grpc_static_mdelem_table[67])
376
380
  /* ":status": "206" */
377
- #define GRPC_MDELEM_STATUS_206 (&grpc_static_mdelem_table[67])
381
+ #define GRPC_MDELEM_STATUS_206 (&grpc_static_mdelem_table[68])
378
382
  /* ":status": "304" */
379
- #define GRPC_MDELEM_STATUS_304 (&grpc_static_mdelem_table[68])
383
+ #define GRPC_MDELEM_STATUS_304 (&grpc_static_mdelem_table[69])
380
384
  /* ":status": "400" */
381
- #define GRPC_MDELEM_STATUS_400 (&grpc_static_mdelem_table[69])
385
+ #define GRPC_MDELEM_STATUS_400 (&grpc_static_mdelem_table[70])
382
386
  /* ":status": "404" */
383
- #define GRPC_MDELEM_STATUS_404 (&grpc_static_mdelem_table[70])
387
+ #define GRPC_MDELEM_STATUS_404 (&grpc_static_mdelem_table[71])
384
388
  /* ":status": "500" */
385
- #define GRPC_MDELEM_STATUS_500 (&grpc_static_mdelem_table[71])
389
+ #define GRPC_MDELEM_STATUS_500 (&grpc_static_mdelem_table[72])
386
390
  /* "strict-transport-security": "" */
387
391
  #define GRPC_MDELEM_STRICT_TRANSPORT_SECURITY_EMPTY \
388
- (&grpc_static_mdelem_table[72])
392
+ (&grpc_static_mdelem_table[73])
389
393
  /* "te": "trailers" */
390
- #define GRPC_MDELEM_TE_TRAILERS (&grpc_static_mdelem_table[73])
394
+ #define GRPC_MDELEM_TE_TRAILERS (&grpc_static_mdelem_table[74])
391
395
  /* "transfer-encoding": "" */
392
- #define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY (&grpc_static_mdelem_table[74])
396
+ #define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY (&grpc_static_mdelem_table[75])
393
397
  /* "user-agent": "" */
394
- #define GRPC_MDELEM_USER_AGENT_EMPTY (&grpc_static_mdelem_table[75])
398
+ #define GRPC_MDELEM_USER_AGENT_EMPTY (&grpc_static_mdelem_table[76])
395
399
  /* "vary": "" */
396
- #define GRPC_MDELEM_VARY_EMPTY (&grpc_static_mdelem_table[76])
400
+ #define GRPC_MDELEM_VARY_EMPTY (&grpc_static_mdelem_table[77])
397
401
  /* "via": "" */
398
- #define GRPC_MDELEM_VIA_EMPTY (&grpc_static_mdelem_table[77])
402
+ #define GRPC_MDELEM_VIA_EMPTY (&grpc_static_mdelem_table[78])
399
403
  /* "www-authenticate": "" */
400
- #define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[78])
404
+ #define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[79])
401
405
 
402
406
  extern const uint8_t
403
407
  grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2];