grpc 1.13.0 → 1.14.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 (213) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +403 -153
  3. data/include/grpc/grpc.h +0 -8
  4. data/include/grpc/grpc_security.h +59 -2
  5. data/include/grpc/impl/codegen/grpc_types.h +8 -2
  6. data/include/grpc/impl/codegen/log.h +112 -0
  7. data/include/grpc/module.modulemap +2 -0
  8. data/include/grpc/support/log.h +2 -88
  9. data/include/grpc/support/string_util.h +2 -0
  10. data/src/boringssl/err_data.c +597 -593
  11. data/src/core/ext/filters/client_channel/client_channel.cc +715 -770
  12. data/src/core/ext/filters/client_channel/client_channel.h +5 -0
  13. data/src/core/ext/filters/client_channel/client_channel_channelz.cc +111 -0
  14. data/src/core/ext/filters/client_channel/client_channel_channelz.h +69 -0
  15. data/src/core/ext/filters/client_channel/client_channel_plugin.cc +9 -0
  16. data/src/core/ext/filters/client_channel/http_proxy.cc +22 -5
  17. data/src/core/ext/filters/client_channel/lb_policy.h +15 -0
  18. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +3 -0
  19. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +3 -3
  20. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +3 -1
  21. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c +19 -0
  22. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h +54 -0
  23. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c +19 -0
  24. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h +54 -0
  25. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c +4 -17
  26. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +37 -63
  27. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +79 -0
  28. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +5 -2
  29. data/src/core/ext/filters/client_channel/lb_policy_factory.cc +8 -0
  30. data/src/core/ext/filters/client_channel/lb_policy_factory.h +4 -0
  31. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +2 -2
  32. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +317 -0
  33. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +48 -9
  34. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +40 -293
  35. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +106 -84
  36. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +6 -2
  37. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +6 -5
  38. data/src/core/ext/filters/client_channel/subchannel.cc +36 -6
  39. data/src/core/ext/filters/client_channel/subchannel.h +4 -0
  40. data/src/core/ext/filters/deadline/deadline_filter.cc +18 -15
  41. data/src/core/ext/filters/deadline/deadline_filter.h +5 -5
  42. data/src/core/ext/filters/http/client/http_client_filter.cc +10 -9
  43. data/src/core/ext/filters/http/server/http_server_filter.h +1 -1
  44. data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +1 -1
  45. data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +3 -2
  46. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +33 -22
  47. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +1 -1
  48. data/src/core/ext/transport/chttp2/transport/internal.h +10 -3
  49. data/src/core/ext/transport/chttp2/transport/stream_lists.cc +17 -0
  50. data/src/core/ext/transport/chttp2/transport/writing.cc +21 -16
  51. data/src/core/ext/transport/inproc/inproc_transport.cc +46 -6
  52. data/src/core/lib/channel/channel_stack.cc +22 -24
  53. data/src/core/lib/channel/channel_trace.cc +28 -63
  54. data/src/core/lib/channel/channel_trace.h +13 -17
  55. data/src/core/lib/channel/channelz.cc +143 -0
  56. data/src/core/lib/channel/channelz.h +124 -0
  57. data/src/core/lib/channel/channelz_registry.cc +7 -24
  58. data/src/core/lib/channel/channelz_registry.h +12 -8
  59. data/src/core/lib/channel/connected_channel.cc +8 -1
  60. data/src/core/{ext/filters/load_reporting/server_load_reporting_filter.h → lib/gpr/alloc.h} +7 -9
  61. data/src/core/lib/gpr/arena.cc +8 -8
  62. data/src/core/lib/gpr/string.cc +28 -0
  63. data/src/core/lib/gpr/string.h +10 -0
  64. data/src/core/lib/gprpp/abstract.h +5 -2
  65. data/src/core/lib/gprpp/inlined_vector.h +57 -3
  66. data/src/core/lib/gprpp/memory.h +2 -2
  67. data/src/core/lib/gprpp/ref_counted_ptr.h +5 -0
  68. data/src/core/lib/gprpp/thd_posix.cc +1 -1
  69. data/src/core/lib/iomgr/call_combiner.h +80 -0
  70. data/src/core/lib/iomgr/closure.h +3 -2
  71. data/src/core/lib/iomgr/endpoint_pair_posix.cc +2 -2
  72. data/src/core/lib/iomgr/error.cc +12 -0
  73. data/src/core/lib/iomgr/error.h +5 -0
  74. data/src/core/lib/iomgr/ev_epoll1_linux.cc +36 -9
  75. data/src/core/lib/iomgr/ev_epollex_linux.cc +172 -46
  76. data/src/core/lib/iomgr/ev_epollsig_linux.cc +47 -21
  77. data/src/core/lib/iomgr/ev_poll_posix.cc +10 -4
  78. data/src/core/lib/iomgr/ev_posix.cc +17 -9
  79. data/src/core/lib/iomgr/ev_posix.h +20 -4
  80. data/src/core/lib/iomgr/executor.cc +196 -140
  81. data/src/core/lib/iomgr/executor.h +47 -14
  82. data/src/core/lib/iomgr/iomgr.cc +2 -0
  83. data/src/core/lib/iomgr/iomgr.h +5 -0
  84. data/src/core/lib/iomgr/is_epollexclusive_available.cc +1 -0
  85. data/src/core/lib/iomgr/socket_utils.h +9 -0
  86. data/src/core/lib/iomgr/socket_utils_common_posix.cc +4 -0
  87. data/src/core/lib/iomgr/socket_utils_uv.cc +4 -0
  88. data/src/core/lib/iomgr/socket_utils_windows.cc +4 -0
  89. data/src/core/lib/iomgr/tcp_client_posix.cc +3 -5
  90. data/src/core/lib/iomgr/tcp_posix.cc +6 -1
  91. data/src/core/lib/iomgr/tcp_server_posix.cc +3 -3
  92. data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +1 -1
  93. data/src/core/lib/iomgr/timer_manager.cc +0 -1
  94. data/src/core/lib/iomgr/udp_server.cc +2 -3
  95. data/src/core/lib/json/json.cc +10 -0
  96. data/src/core/lib/json/json.h +5 -0
  97. data/src/core/lib/security/context/security_context.cc +8 -8
  98. data/src/core/lib/security/context/security_context.h +6 -2
  99. data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +2 -1
  100. data/src/core/lib/security/credentials/local/local_credentials.cc +77 -0
  101. data/src/core/lib/security/credentials/local/local_credentials.h +40 -0
  102. data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +17 -3
  103. data/src/core/lib/security/security_connector/local_security_connector.cc +245 -0
  104. data/src/core/lib/security/security_connector/local_security_connector.h +58 -0
  105. data/src/core/lib/security/security_connector/security_connector.cc +30 -5
  106. data/src/core/lib/security/security_connector/security_connector.h +1 -0
  107. data/src/core/lib/security/transport/client_auth_filter.cc +5 -1
  108. data/src/core/lib/security/transport/server_auth_filter.cc +4 -5
  109. data/src/core/lib/surface/call.cc +75 -32
  110. data/src/core/lib/surface/call.h +2 -0
  111. data/src/core/lib/surface/channel.cc +32 -13
  112. data/src/core/lib/surface/channel.h +4 -0
  113. data/src/core/lib/surface/version.cc +1 -1
  114. data/src/core/lib/transport/transport.cc +20 -9
  115. data/src/core/lib/transport/transport.h +12 -10
  116. data/src/core/lib/transport/transport_op_string.cc +0 -7
  117. data/src/core/plugin_registry/grpc_plugin_registry.cc +0 -4
  118. data/src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.h +2 -2
  119. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +2 -1
  120. data/src/core/tsi/alts/handshaker/altscontext.pb.c +0 -1
  121. data/src/core/tsi/alts/handshaker/altscontext.pb.h +1 -2
  122. data/src/core/tsi/alts/handshaker/handshaker.pb.c +0 -1
  123. data/src/core/tsi/alts/handshaker/handshaker.pb.h +1 -2
  124. data/src/core/tsi/alts/handshaker/transport_security_common.pb.c +0 -1
  125. data/src/core/tsi/alts/handshaker/transport_security_common.pb.h +1 -1
  126. data/src/core/tsi/alts/handshaker/transport_security_common_api.h +2 -2
  127. data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc +47 -1
  128. data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h +3 -1
  129. data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +12 -11
  130. data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h +7 -2
  131. data/src/core/tsi/local_transport_security.cc +209 -0
  132. data/src/core/tsi/local_transport_security.h +51 -0
  133. data/src/core/tsi/ssl_transport_security.cc +2 -3
  134. data/src/{core/ext → cpp/ext/filters}/census/grpc_context.cc +0 -0
  135. data/src/ruby/ext/grpc/rb_channel_credentials.c +3 -3
  136. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +18 -18
  137. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +29 -29
  138. data/src/ruby/lib/grpc/generic/active_call.rb +19 -23
  139. data/src/ruby/lib/grpc/version.rb +1 -1
  140. data/src/ruby/spec/call_credentials_spec.rb +1 -1
  141. data/src/ruby/spec/call_spec.rb +1 -1
  142. data/src/ruby/spec/channel_credentials_spec.rb +1 -1
  143. data/src/ruby/spec/channel_spec.rb +1 -1
  144. data/src/ruby/spec/client_auth_spec.rb +1 -12
  145. data/src/ruby/spec/client_server_spec.rb +1 -1
  146. data/src/ruby/spec/compression_options_spec.rb +1 -1
  147. data/src/ruby/spec/error_sanity_spec.rb +1 -1
  148. data/src/ruby/spec/generic/client_stub_spec.rb +13 -1
  149. data/src/ruby/spec/generic/rpc_desc_spec.rb +1 -1
  150. data/src/ruby/spec/generic/rpc_server_pool_spec.rb +1 -1
  151. data/src/ruby/spec/generic/service_spec.rb +1 -1
  152. data/src/ruby/spec/google_rpc_status_utils_spec.rb +1 -12
  153. data/src/ruby/spec/pb/duplicate/codegen_spec.rb +1 -0
  154. data/src/ruby/spec/pb/health/checker_spec.rb +1 -1
  155. data/src/ruby/spec/server_credentials_spec.rb +1 -1
  156. data/src/ruby/spec/server_spec.rb +1 -1
  157. data/src/ruby/spec/spec_helper.rb +1 -0
  158. data/src/ruby/spec/support/services.rb +1 -1
  159. data/src/ruby/spec/time_consts_spec.rb +1 -1
  160. data/third_party/boringssl/crypto/asn1/tasn_dec.c +40 -19
  161. data/third_party/boringssl/crypto/bytestring/cbs.c +1 -0
  162. data/third_party/boringssl/crypto/cipher_extra/e_aesccm.c +47 -15
  163. data/third_party/boringssl/crypto/ec_extra/ec_asn1.c +9 -10
  164. data/third_party/boringssl/crypto/ecdh/ecdh.c +4 -3
  165. data/third_party/boringssl/crypto/fipsmodule/bn/add.c +30 -54
  166. data/third_party/boringssl/crypto/fipsmodule/bn/bn.c +7 -1
  167. data/third_party/boringssl/crypto/fipsmodule/bn/cmp.c +8 -8
  168. data/third_party/boringssl/crypto/fipsmodule/bn/div.c +97 -11
  169. data/third_party/boringssl/crypto/fipsmodule/bn/gcd.c +274 -218
  170. data/third_party/boringssl/crypto/fipsmodule/bn/internal.h +111 -34
  171. data/third_party/boringssl/crypto/fipsmodule/bn/montgomery.c +2 -2
  172. data/third_party/boringssl/crypto/fipsmodule/bn/montgomery_inv.c +1 -1
  173. data/third_party/boringssl/crypto/fipsmodule/bn/mul.c +24 -6
  174. data/third_party/boringssl/crypto/fipsmodule/bn/prime.c +324 -63
  175. data/third_party/boringssl/crypto/fipsmodule/bn/random.c +74 -21
  176. data/third_party/boringssl/crypto/fipsmodule/bn/shift.c +128 -86
  177. data/third_party/boringssl/crypto/fipsmodule/bn/sqrt.c +1 -1
  178. data/third_party/boringssl/crypto/fipsmodule/ec/ec_key.c +67 -112
  179. data/third_party/boringssl/crypto/fipsmodule/ec/internal.h +8 -1
  180. data/third_party/boringssl/crypto/fipsmodule/ec/oct.c +5 -5
  181. data/third_party/boringssl/crypto/fipsmodule/ec/p224-64.c +9 -17
  182. data/third_party/boringssl/crypto/fipsmodule/ec/p256-x86_64-table.h +5378 -5418
  183. data/third_party/boringssl/crypto/fipsmodule/ec/simple.c +32 -32
  184. data/third_party/boringssl/crypto/fipsmodule/ecdsa/ecdsa.c +5 -11
  185. data/third_party/boringssl/crypto/fipsmodule/rsa/blinding.c +16 -40
  186. data/third_party/boringssl/crypto/fipsmodule/rsa/internal.h +1 -6
  187. data/third_party/boringssl/crypto/fipsmodule/rsa/rsa.c +41 -29
  188. data/third_party/boringssl/crypto/fipsmodule/rsa/rsa_impl.c +63 -49
  189. data/third_party/boringssl/crypto/x509/vpm_int.h +1 -0
  190. data/third_party/boringssl/crypto/x509/x509_vfy.c +4 -0
  191. data/third_party/boringssl/crypto/x509/x509_vpm.c +44 -22
  192. data/third_party/boringssl/include/openssl/aead.h +8 -2
  193. data/third_party/boringssl/include/openssl/asn1.h +1 -0
  194. data/third_party/boringssl/include/openssl/base.h +4 -0
  195. data/third_party/boringssl/include/openssl/bn.h +13 -3
  196. data/third_party/boringssl/include/openssl/bytestring.h +4 -4
  197. data/third_party/boringssl/include/openssl/ec.h +10 -4
  198. data/third_party/boringssl/include/openssl/ec_key.h +0 -3
  199. data/third_party/boringssl/include/openssl/rsa.h +1 -0
  200. data/third_party/boringssl/include/openssl/ssl.h +8 -3
  201. data/third_party/boringssl/include/openssl/ssl3.h +0 -1
  202. data/third_party/boringssl/include/openssl/x509.h +1 -0
  203. data/third_party/boringssl/include/openssl/x509v3.h +1 -0
  204. data/third_party/boringssl/ssl/handshake_client.cc +36 -64
  205. data/third_party/boringssl/ssl/ssl_cipher.cc +4 -0
  206. data/third_party/boringssl/ssl/ssl_lib.cc +1 -1
  207. metadata +45 -38
  208. data/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc +0 -222
  209. data/src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc +0 -71
  210. data/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h +0 -61
  211. data/src/ruby/spec/pb/package_with_underscore/checker_spec.rb +0 -51
  212. data/src/ruby/spec/pb/package_with_underscore/data.proto +0 -23
  213. data/src/ruby/spec/pb/package_with_underscore/service.proto +0 -23
@@ -1774,4 +1774,8 @@ int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm) { return 1; }
1774
1774
 
1775
1775
  const char *SSL_COMP_get_name(const COMP_METHOD *comp) { return NULL; }
1776
1776
 
1777
+ const char *SSL_COMP_get0_name(const SSL_COMP *comp) { return comp->name; }
1778
+
1779
+ int SSL_COMP_get_id(const SSL_COMP *comp) { return comp->id; }
1780
+
1777
1781
  void SSL_COMP_free_compression_methods(void) {}
@@ -2441,7 +2441,7 @@ int SSL_set_dummy_pq_padding_size(SSL *ssl, size_t num_bytes) {
2441
2441
  }
2442
2442
 
2443
2443
  int SSL_dummy_pq_padding_used(SSL *ssl) {
2444
- if (ssl->server || !ssl->s3->initial_handshake_complete) {
2444
+ if (ssl->server) {
2445
2445
  return 0;
2446
2446
  }
2447
2447
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - gRPC Authors
8
8
  autorequire:
9
9
  bindir: src/ruby/bin
10
10
  cert_chain: []
11
- date: 2018-06-28 00:00:00.000000000 Z
11
+ date: 2018-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -230,6 +230,7 @@ files:
230
230
  - include/grpc/impl/codegen/gpr_slice.h
231
231
  - include/grpc/impl/codegen/gpr_types.h
232
232
  - include/grpc/impl/codegen/grpc_types.h
233
+ - include/grpc/impl/codegen/log.h
233
234
  - include/grpc/impl/codegen/port_platform.h
234
235
  - include/grpc/impl/codegen/propagation_bits.h
235
236
  - include/grpc/impl/codegen/slice.h
@@ -263,12 +264,13 @@ files:
263
264
  - include/grpc/support/time.h
264
265
  - include/grpc/support/workaround_list.h
265
266
  - src/boringssl/err_data.c
266
- - src/core/ext/census/grpc_context.cc
267
267
  - src/core/ext/filters/client_channel/backup_poller.cc
268
268
  - src/core/ext/filters/client_channel/backup_poller.h
269
269
  - src/core/ext/filters/client_channel/channel_connectivity.cc
270
270
  - src/core/ext/filters/client_channel/client_channel.cc
271
271
  - src/core/ext/filters/client_channel/client_channel.h
272
+ - src/core/ext/filters/client_channel/client_channel_channelz.cc
273
+ - src/core/ext/filters/client_channel/client_channel_channelz.h
272
274
  - src/core/ext/filters/client_channel/client_channel_factory.cc
273
275
  - src/core/ext/filters/client_channel/client_channel_factory.h
274
276
  - src/core/ext/filters/client_channel/client_channel_plugin.cc
@@ -290,6 +292,10 @@ files:
290
292
  - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h
291
293
  - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
292
294
  - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h
295
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c
296
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h
297
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c
298
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h
293
299
  - src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
294
300
  - src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h
295
301
  - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
@@ -310,6 +316,7 @@ files:
310
316
  - src/core/ext/filters/client_channel/resolver.cc
311
317
  - src/core/ext/filters/client_channel/resolver.h
312
318
  - src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
319
+ - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc
313
320
  - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h
314
321
  - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
315
322
  - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
@@ -341,10 +348,6 @@ files:
341
348
  - src/core/ext/filters/http/message_compress/message_compress_filter.h
342
349
  - src/core/ext/filters/http/server/http_server_filter.cc
343
350
  - src/core/ext/filters/http/server/http_server_filter.h
344
- - src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
345
- - src/core/ext/filters/load_reporting/server_load_reporting_filter.h
346
- - src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc
347
- - src/core/ext/filters/load_reporting/server_load_reporting_plugin.h
348
351
  - src/core/ext/filters/max_age/max_age_filter.cc
349
352
  - src/core/ext/filters/max_age/max_age_filter.h
350
353
  - src/core/ext/filters/message_size/message_size_filter.cc
@@ -424,6 +427,8 @@ files:
424
427
  - src/core/lib/channel/channel_stack_builder.h
425
428
  - src/core/lib/channel/channel_trace.cc
426
429
  - src/core/lib/channel/channel_trace.h
430
+ - src/core/lib/channel/channelz.cc
431
+ - src/core/lib/channel/channelz.h
427
432
  - src/core/lib/channel/channelz_registry.cc
428
433
  - src/core/lib/channel/channelz_registry.h
429
434
  - src/core/lib/channel/connected_channel.cc
@@ -456,6 +461,7 @@ files:
456
461
  - src/core/lib/debug/trace.cc
457
462
  - src/core/lib/debug/trace.h
458
463
  - src/core/lib/gpr/alloc.cc
464
+ - src/core/lib/gpr/alloc.h
459
465
  - src/core/lib/gpr/arena.cc
460
466
  - src/core/lib/gpr/arena.h
461
467
  - src/core/lib/gpr/atm.cc
@@ -717,6 +723,8 @@ files:
717
723
  - src/core/lib/security/credentials/jwt/jwt_credentials.h
718
724
  - src/core/lib/security/credentials/jwt/jwt_verifier.cc
719
725
  - src/core/lib/security/credentials/jwt/jwt_verifier.h
726
+ - src/core/lib/security/credentials/local/local_credentials.cc
727
+ - src/core/lib/security/credentials/local/local_credentials.h
720
728
  - src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
721
729
  - src/core/lib/security/credentials/oauth2/oauth2_credentials.h
722
730
  - src/core/lib/security/credentials/plugin/plugin_credentials.cc
@@ -725,6 +733,8 @@ files:
725
733
  - src/core/lib/security/credentials/ssl/ssl_credentials.h
726
734
  - src/core/lib/security/security_connector/alts_security_connector.cc
727
735
  - src/core/lib/security/security_connector/alts_security_connector.h
736
+ - src/core/lib/security/security_connector/local_security_connector.cc
737
+ - src/core/lib/security/security_connector/local_security_connector.h
728
738
  - src/core/lib/security/security_connector/security_connector.cc
729
739
  - src/core/lib/security/security_connector/security_connector.h
730
740
  - src/core/lib/security/transport/auth_filters.h
@@ -866,6 +876,8 @@ files:
866
876
  - src/core/tsi/alts_transport_security.h
867
877
  - src/core/tsi/fake_transport_security.cc
868
878
  - src/core/tsi/fake_transport_security.h
879
+ - src/core/tsi/local_transport_security.cc
880
+ - src/core/tsi/local_transport_security.h
869
881
  - src/core/tsi/ssl/session_cache/ssl_session.h
870
882
  - src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc
871
883
  - src/core/tsi/ssl/session_cache/ssl_session_cache.cc
@@ -879,6 +891,7 @@ files:
879
891
  - src/core/tsi/transport_security_grpc.cc
880
892
  - src/core/tsi/transport_security_grpc.h
881
893
  - src/core/tsi/transport_security_interface.h
894
+ - src/cpp/ext/filters/census/grpc_context.cc
882
895
  - src/ruby/bin/math_client.rb
883
896
  - src/ruby/bin/math_pb.rb
884
897
  - src/ruby/bin/math_server.rb
@@ -963,9 +976,6 @@ files:
963
976
  - src/ruby/spec/google_rpc_status_utils_spec.rb
964
977
  - src/ruby/spec/pb/duplicate/codegen_spec.rb
965
978
  - src/ruby/spec/pb/health/checker_spec.rb
966
- - src/ruby/spec/pb/package_with_underscore/checker_spec.rb
967
- - src/ruby/spec/pb/package_with_underscore/data.proto
968
- - src/ruby/spec/pb/package_with_underscore/service.proto
969
979
  - src/ruby/spec/server_credentials_spec.rb
970
980
  - src/ruby/spec/server_spec.rb
971
981
  - src/ruby/spec/spec_helper.rb
@@ -1547,39 +1557,36 @@ signing_key:
1547
1557
  specification_version: 4
1548
1558
  summary: GRPC system in Ruby
1549
1559
  test_files:
1550
- - src/ruby/spec/server_spec.rb
1551
- - src/ruby/spec/pb/package_with_underscore/service.proto
1552
- - src/ruby/spec/pb/package_with_underscore/data.proto
1553
- - src/ruby/spec/pb/package_with_underscore/checker_spec.rb
1554
- - src/ruby/spec/pb/duplicate/codegen_spec.rb
1555
- - src/ruby/spec/pb/health/checker_spec.rb
1556
- - src/ruby/spec/compression_options_spec.rb
1557
- - src/ruby/spec/testdata/ca.pem
1558
- - src/ruby/spec/testdata/client.pem
1559
- - src/ruby/spec/testdata/server1.key
1560
- - src/ruby/spec/testdata/README
1561
- - src/ruby/spec/testdata/server1.pem
1562
- - src/ruby/spec/testdata/client.key
1563
- - src/ruby/spec/server_credentials_spec.rb
1560
+ - src/ruby/spec/channel_credentials_spec.rb
1561
+ - src/ruby/spec/error_sanity_spec.rb
1564
1562
  - src/ruby/spec/client_auth_spec.rb
1565
- - src/ruby/spec/time_consts_spec.rb
1566
- - src/ruby/spec/client_server_spec.rb
1567
1563
  - src/ruby/spec/channel_spec.rb
1568
- - src/ruby/spec/generic/rpc_server_spec.rb
1569
- - src/ruby/spec/generic/client_stub_spec.rb
1564
+ - src/ruby/spec/pb/health/checker_spec.rb
1565
+ - src/ruby/spec/pb/duplicate/codegen_spec.rb
1566
+ - src/ruby/spec/generic/rpc_server_pool_spec.rb
1570
1567
  - src/ruby/spec/generic/rpc_desc_spec.rb
1571
1568
  - src/ruby/spec/generic/service_spec.rb
1572
- - src/ruby/spec/generic/interceptor_registry_spec.rb
1573
- - src/ruby/spec/generic/rpc_server_pool_spec.rb
1574
- - src/ruby/spec/generic/client_interceptors_spec.rb
1575
- - src/ruby/spec/generic/server_interceptors_spec.rb
1576
1569
  - src/ruby/spec/generic/active_call_spec.rb
1577
- - src/ruby/spec/support/services.rb
1578
- - src/ruby/spec/support/helpers.rb
1579
- - src/ruby/spec/channel_credentials_spec.rb
1570
+ - src/ruby/spec/generic/rpc_server_spec.rb
1571
+ - src/ruby/spec/generic/server_interceptors_spec.rb
1572
+ - src/ruby/spec/generic/client_interceptors_spec.rb
1573
+ - src/ruby/spec/generic/client_stub_spec.rb
1574
+ - src/ruby/spec/generic/interceptor_registry_spec.rb
1575
+ - src/ruby/spec/time_consts_spec.rb
1576
+ - src/ruby/spec/client_server_spec.rb
1577
+ - src/ruby/spec/google_rpc_status_utils_spec.rb
1580
1578
  - src/ruby/spec/spec_helper.rb
1579
+ - src/ruby/spec/compression_options_spec.rb
1580
+ - src/ruby/spec/support/helpers.rb
1581
+ - src/ruby/spec/support/services.rb
1582
+ - src/ruby/spec/server_spec.rb
1583
+ - src/ruby/spec/server_credentials_spec.rb
1584
+ - src/ruby/spec/call_spec.rb
1581
1585
  - src/ruby/spec/channel_connection_spec.rb
1582
1586
  - src/ruby/spec/call_credentials_spec.rb
1583
- - src/ruby/spec/call_spec.rb
1584
- - src/ruby/spec/error_sanity_spec.rb
1585
- - src/ruby/spec/google_rpc_status_utils_spec.rb
1587
+ - src/ruby/spec/testdata/ca.pem
1588
+ - src/ruby/spec/testdata/server1.key
1589
+ - src/ruby/spec/testdata/README
1590
+ - src/ruby/spec/testdata/server1.pem
1591
+ - src/ruby/spec/testdata/client.pem
1592
+ - src/ruby/spec/testdata/client.key
@@ -1,222 +0,0 @@
1
- /*
2
- *
3
- * Copyright 2016 gRPC authors.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- *
17
- */
18
-
19
- #include <grpc/support/port_platform.h>
20
-
21
- #include <string.h>
22
-
23
- #include <grpc/load_reporting.h>
24
- #include <grpc/support/alloc.h>
25
- #include <grpc/support/log.h>
26
- #include <grpc/support/string_util.h>
27
- #include <grpc/support/sync.h>
28
-
29
- #include "src/core/ext/filters/load_reporting/server_load_reporting_filter.h"
30
- #include "src/core/ext/filters/load_reporting/server_load_reporting_plugin.h"
31
- #include "src/core/lib/channel/channel_args.h"
32
- #include "src/core/lib/profiling/timers.h"
33
- #include "src/core/lib/slice/slice_internal.h"
34
- #include "src/core/lib/transport/static_metadata.h"
35
-
36
- namespace {
37
- struct call_data {
38
- intptr_t id; /**< an id unique to the call */
39
- bool have_trailing_md_string;
40
- grpc_slice trailing_md_string;
41
- bool have_initial_md_string;
42
- grpc_slice initial_md_string;
43
- bool have_service_method;
44
- grpc_slice service_method;
45
-
46
- /* stores the recv_initial_metadata op's ready closure, which we wrap with our
47
- * own (on_initial_md_ready) in order to capture the incoming initial metadata
48
- * */
49
- grpc_closure* ops_recv_initial_metadata_ready;
50
-
51
- /* to get notified of the availability of the incoming initial metadata. */
52
- grpc_closure on_initial_md_ready;
53
- grpc_metadata_batch* recv_initial_metadata;
54
- };
55
-
56
- struct channel_data {
57
- intptr_t id; /**< an id unique to the channel */
58
- };
59
- } // namespace
60
-
61
- static void on_initial_md_ready(void* user_data, grpc_error* err) {
62
- grpc_call_element* elem = static_cast<grpc_call_element*>(user_data);
63
- call_data* calld = static_cast<call_data*>(elem->call_data);
64
-
65
- if (err == GRPC_ERROR_NONE) {
66
- if (calld->recv_initial_metadata->idx.named.path != nullptr) {
67
- calld->service_method = grpc_slice_ref_internal(
68
- GRPC_MDVALUE(calld->recv_initial_metadata->idx.named.path->md));
69
- calld->have_service_method = true;
70
- } else {
71
- err = grpc_error_add_child(
72
- err, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Missing :path header"));
73
- }
74
- if (calld->recv_initial_metadata->idx.named.lb_token != nullptr) {
75
- calld->initial_md_string = grpc_slice_ref_internal(
76
- GRPC_MDVALUE(calld->recv_initial_metadata->idx.named.lb_token->md));
77
- calld->have_initial_md_string = true;
78
- grpc_metadata_batch_remove(
79
- calld->recv_initial_metadata,
80
- calld->recv_initial_metadata->idx.named.lb_token);
81
- }
82
- } else {
83
- GRPC_ERROR_REF(err);
84
- }
85
- calld->ops_recv_initial_metadata_ready->cb(
86
- calld->ops_recv_initial_metadata_ready->cb_arg, err);
87
- GRPC_ERROR_UNREF(err);
88
- }
89
-
90
- /* Constructor for call_data */
91
- static grpc_error* init_call_elem(grpc_call_element* elem,
92
- const grpc_call_element_args* args) {
93
- call_data* calld = static_cast<call_data*>(elem->call_data);
94
- calld->id = (intptr_t)args->call_stack;
95
- GRPC_CLOSURE_INIT(&calld->on_initial_md_ready, on_initial_md_ready, elem,
96
- grpc_schedule_on_exec_ctx);
97
-
98
- /* TODO(dgq): do something with the data
99
- channel_data *chand = elem->channel_data;
100
- grpc_load_reporting_call_data lr_call_data = {GRPC_LR_POINT_CALL_CREATION,
101
- (intptr_t)chand->id,
102
- (intptr_t)calld->id,
103
- NULL,
104
- NULL,
105
- NULL,
106
- NULL};
107
- */
108
-
109
- return GRPC_ERROR_NONE;
110
- }
111
-
112
- /* Destructor for call_data */
113
- static void destroy_call_elem(grpc_call_element* elem,
114
- const grpc_call_final_info* final_info,
115
- grpc_closure* ignored) {
116
- call_data* calld = static_cast<call_data*>(elem->call_data);
117
-
118
- /* TODO(dgq): do something with the data
119
- channel_data *chand = elem->channel_data;
120
- grpc_load_reporting_call_data lr_call_data = {GRPC_LR_POINT_CALL_DESTRUCTION,
121
- (intptr_t)chand->id,
122
- (intptr_t)calld->id,
123
- final_info,
124
- calld->initial_md_string,
125
- calld->trailing_md_string,
126
- calld->service_method};
127
- */
128
-
129
- if (calld->have_initial_md_string) {
130
- grpc_slice_unref_internal(calld->initial_md_string);
131
- }
132
- if (calld->have_trailing_md_string) {
133
- grpc_slice_unref_internal(calld->trailing_md_string);
134
- }
135
- if (calld->have_service_method) {
136
- grpc_slice_unref_internal(calld->service_method);
137
- }
138
- }
139
-
140
- /* Constructor for channel_data */
141
- static grpc_error* init_channel_elem(grpc_channel_element* elem,
142
- grpc_channel_element_args* args) {
143
- GPR_ASSERT(!args->is_last);
144
-
145
- channel_data* chand = static_cast<channel_data*>(elem->channel_data);
146
- chand->id = (intptr_t)args->channel_stack;
147
-
148
- /* TODO(dgq): do something with the data
149
- grpc_load_reporting_call_data lr_call_data = {GRPC_LR_POINT_CHANNEL_CREATION,
150
- (intptr_t)chand,
151
- 0,
152
- NULL,
153
- NULL,
154
- NULL,
155
- NULL};
156
- */
157
-
158
- return GRPC_ERROR_NONE;
159
- }
160
-
161
- /* Destructor for channel data */
162
- static void destroy_channel_elem(grpc_channel_element* elem) {
163
- /* TODO(dgq): do something with the data
164
- channel_data *chand = elem->channel_data;
165
- grpc_load_reporting_call_data lr_call_data = {
166
- GRPC_LR_POINT_CHANNEL_DESTRUCTION,
167
- (intptr_t)chand->id,
168
- 0,
169
- NULL,
170
- NULL,
171
- NULL,
172
- NULL};
173
- */
174
- }
175
-
176
- static grpc_filtered_mdelem lr_trailing_md_filter(void* user_data,
177
- grpc_mdelem md) {
178
- grpc_call_element* elem = static_cast<grpc_call_element*>(user_data);
179
- call_data* calld = static_cast<call_data*>(elem->call_data);
180
- if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_LB_COST_BIN)) {
181
- calld->trailing_md_string = GRPC_MDVALUE(md);
182
- return GRPC_FILTERED_REMOVE();
183
- }
184
- return GRPC_FILTERED_MDELEM(md);
185
- }
186
-
187
- static void lr_start_transport_stream_op_batch(
188
- grpc_call_element* elem, grpc_transport_stream_op_batch* op) {
189
- GPR_TIMER_SCOPE("lr_start_transport_stream_op_batch", 0);
190
- call_data* calld = static_cast<call_data*>(elem->call_data);
191
-
192
- if (op->recv_initial_metadata) {
193
- /* substitute our callback for the higher callback */
194
- calld->recv_initial_metadata =
195
- op->payload->recv_initial_metadata.recv_initial_metadata;
196
- calld->ops_recv_initial_metadata_ready =
197
- op->payload->recv_initial_metadata.recv_initial_metadata_ready;
198
- op->payload->recv_initial_metadata.recv_initial_metadata_ready =
199
- &calld->on_initial_md_ready;
200
- } else if (op->send_trailing_metadata) {
201
- GRPC_LOG_IF_ERROR(
202
- "grpc_metadata_batch_filter",
203
- grpc_metadata_batch_filter(
204
- op->payload->send_trailing_metadata.send_trailing_metadata,
205
- lr_trailing_md_filter, elem,
206
- "LR trailing metadata filtering error"));
207
- }
208
- grpc_call_next_op(elem, op);
209
- }
210
-
211
- const grpc_channel_filter grpc_server_load_reporting_filter = {
212
- lr_start_transport_stream_op_batch,
213
- grpc_channel_next_op,
214
- sizeof(call_data),
215
- init_call_elem,
216
- grpc_call_stack_ignore_set_pollset_or_pollset_set,
217
- destroy_call_elem,
218
- sizeof(channel_data),
219
- init_channel_elem,
220
- destroy_channel_elem,
221
- grpc_channel_next_get_info,
222
- "load_reporting"};
@@ -1,71 +0,0 @@
1
- /*
2
- *
3
- * Copyright 2016 gRPC authors.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- *
17
- */
18
-
19
- #include <grpc/support/port_platform.h>
20
-
21
- #include <limits.h>
22
- #include <string.h>
23
-
24
- #include <grpc/load_reporting.h>
25
- #include <grpc/support/alloc.h>
26
- #include <grpc/support/sync.h>
27
-
28
- #include "src/core/ext/filters/load_reporting/server_load_reporting_filter.h"
29
- #include "src/core/ext/filters/load_reporting/server_load_reporting_plugin.h"
30
- #include "src/core/lib/channel/channel_stack_builder.h"
31
- #include "src/core/lib/slice/slice_internal.h"
32
- #include "src/core/lib/surface/call.h"
33
- #include "src/core/lib/surface/channel_init.h"
34
-
35
- static bool is_load_reporting_enabled(const grpc_channel_args* a) {
36
- return grpc_channel_arg_get_bool(
37
- grpc_channel_args_find(a, GRPC_ARG_ENABLE_LOAD_REPORTING), false);
38
- }
39
-
40
- static bool maybe_add_server_load_reporting_filter(
41
- grpc_channel_stack_builder* builder, void* arg) {
42
- const grpc_channel_args* args =
43
- grpc_channel_stack_builder_get_channel_arguments(builder);
44
- const grpc_channel_filter* filter =
45
- static_cast<const grpc_channel_filter*>(arg);
46
- grpc_channel_stack_builder_iterator* it =
47
- grpc_channel_stack_builder_iterator_find(builder, filter->name);
48
- const bool already_has_load_reporting_filter =
49
- !grpc_channel_stack_builder_iterator_is_end(it);
50
- grpc_channel_stack_builder_iterator_destroy(it);
51
- if (is_load_reporting_enabled(args) && !already_has_load_reporting_filter) {
52
- return grpc_channel_stack_builder_prepend_filter(builder, filter, nullptr,
53
- nullptr);
54
- }
55
- return true;
56
- }
57
-
58
- grpc_arg grpc_load_reporting_enable_arg() {
59
- return grpc_channel_arg_integer_create((char*)GRPC_ARG_ENABLE_LOAD_REPORTING,
60
- 1);
61
- }
62
-
63
- /* Plugin registration */
64
-
65
- void grpc_server_load_reporting_plugin_init(void) {
66
- grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX,
67
- maybe_add_server_load_reporting_filter,
68
- (void*)&grpc_server_load_reporting_filter);
69
- }
70
-
71
- void grpc_server_load_reporting_plugin_shutdown() {}