grpc 1.16.0 → 1.17.0.pre1

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 (173) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +299 -133
  3. data/include/grpc/grpc.h +11 -1
  4. data/include/grpc/grpc_posix.h +0 -8
  5. data/include/grpc/impl/codegen/grpc_types.h +3 -0
  6. data/src/core/ext/filters/client_channel/client_channel.cc +336 -345
  7. data/src/core/ext/filters/client_channel/client_channel.h +6 -2
  8. data/src/core/ext/filters/client_channel/client_channel_channelz.cc +3 -1
  9. data/src/core/ext/filters/client_channel/client_channel_channelz.h +0 -7
  10. data/src/core/ext/filters/client_channel/health/health.pb.c +23 -0
  11. data/src/core/ext/filters/client_channel/health/health.pb.h +73 -0
  12. data/src/core/ext/filters/client_channel/health/health_check_client.cc +652 -0
  13. data/src/core/ext/filters/client_channel/health/health_check_client.h +173 -0
  14. data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +2 -1
  15. data/src/core/ext/filters/client_channel/http_proxy.cc +1 -1
  16. data/src/core/ext/filters/client_channel/lb_policy.h +17 -14
  17. data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +15 -11
  18. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +21 -15
  19. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +18 -10
  20. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +12 -9
  21. data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +19 -8
  22. data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +1832 -0
  23. data/src/core/ext/filters/client_channel/lb_policy/xds/xds.h +36 -0
  24. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h +36 -0
  25. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc +107 -0
  26. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc +85 -0
  27. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h +72 -0
  28. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc +307 -0
  29. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h +89 -0
  30. data/src/core/ext/filters/client_channel/lb_policy_factory.h +1 -1
  31. data/src/core/ext/filters/client_channel/lb_policy_registry.cc +5 -0
  32. data/src/core/ext/filters/client_channel/lb_policy_registry.h +4 -0
  33. data/src/core/ext/filters/client_channel/parse_address.h +1 -1
  34. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +19 -22
  35. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +41 -39
  36. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +3 -2
  37. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +4 -1
  38. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +15 -2
  39. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +5 -1
  40. data/src/core/ext/filters/client_channel/resolver_factory.h +1 -1
  41. data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +384 -0
  42. data/src/core/ext/filters/client_channel/resolver_result_parsing.h +146 -0
  43. data/src/core/ext/filters/client_channel/subchannel.cc +361 -103
  44. data/src/core/ext/filters/client_channel/subchannel.h +14 -8
  45. data/src/core/ext/filters/deadline/deadline_filter.cc +19 -23
  46. data/src/core/ext/filters/deadline/deadline_filter.h +9 -13
  47. data/src/core/ext/filters/http/client/http_client_filter.cc +29 -19
  48. data/src/core/ext/filters/http/client_authority_filter.cc +2 -3
  49. data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +28 -16
  50. data/src/core/ext/filters/http/server/http_server_filter.cc +31 -20
  51. data/src/core/ext/filters/message_size/message_size_filter.cc +50 -45
  52. data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +13 -6
  53. data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +1 -1
  54. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +58 -8
  55. data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +1 -1
  56. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +175 -173
  57. data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +2 -1
  58. data/src/core/ext/transport/chttp2/transport/frame_data.cc +4 -10
  59. data/src/core/ext/transport/chttp2/transport/frame_data.h +10 -12
  60. data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +1 -1
  61. data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +28 -25
  62. data/src/core/ext/transport/chttp2/transport/incoming_metadata.cc +0 -12
  63. data/src/core/ext/transport/chttp2/transport/incoming_metadata.h +12 -9
  64. data/src/core/ext/transport/chttp2/transport/internal.h +109 -94
  65. data/src/core/ext/transport/chttp2/transport/parsing.cc +4 -2
  66. data/src/core/ext/transport/inproc/inproc_transport.cc +280 -300
  67. data/src/core/lib/channel/channel_stack.cc +5 -4
  68. data/src/core/lib/channel/channel_stack.h +4 -4
  69. data/src/core/lib/channel/channel_stack_builder.cc +14 -2
  70. data/src/core/lib/channel/channel_stack_builder.h +8 -0
  71. data/src/core/lib/channel/channel_trace.cc +6 -2
  72. data/src/core/lib/channel/channelz.cc +137 -5
  73. data/src/core/lib/channel/channelz.h +32 -6
  74. data/src/core/lib/channel/channelz_registry.cc +134 -28
  75. data/src/core/lib/channel/channelz_registry.h +25 -3
  76. data/src/core/lib/channel/context.h +4 -4
  77. data/src/core/lib/channel/handshaker.cc +7 -6
  78. data/src/core/lib/channel/handshaker.h +7 -8
  79. data/src/core/lib/channel/handshaker_factory.cc +3 -2
  80. data/src/core/lib/channel/handshaker_factory.h +2 -0
  81. data/src/core/lib/channel/handshaker_registry.cc +6 -2
  82. data/src/core/lib/channel/handshaker_registry.h +1 -0
  83. data/src/core/lib/gpr/arena.cc +84 -37
  84. data/src/core/lib/gpr/arena.h +2 -0
  85. data/src/core/lib/gpr/mpscq.h +4 -2
  86. data/src/core/lib/gprpp/inlined_vector.h +8 -0
  87. data/src/core/lib/gprpp/ref_counted.h +105 -18
  88. data/src/core/lib/gprpp/ref_counted_ptr.h +11 -0
  89. data/src/core/lib/http/httpcli_security_connector.cc +7 -4
  90. data/src/core/lib/iomgr/call_combiner.cc +2 -0
  91. data/src/core/lib/iomgr/call_combiner.h +2 -2
  92. data/src/core/lib/iomgr/closure.h +1 -0
  93. data/src/core/lib/iomgr/error.cc +16 -31
  94. data/src/core/lib/iomgr/error.h +29 -4
  95. data/src/core/lib/iomgr/error_internal.h +0 -2
  96. data/src/core/lib/iomgr/ev_epoll1_linux.cc +7 -3
  97. data/src/core/lib/iomgr/ev_posix.cc +0 -2
  98. data/src/core/lib/iomgr/polling_entity.h +4 -4
  99. data/src/core/lib/iomgr/resource_quota.cc +64 -10
  100. data/src/core/lib/iomgr/resource_quota.h +21 -6
  101. data/src/core/lib/iomgr/socket_utils_common_posix.cc +11 -5
  102. data/src/core/lib/iomgr/tcp_client_custom.cc +14 -3
  103. data/src/core/lib/iomgr/tcp_client_posix.cc +2 -0
  104. data/src/core/lib/iomgr/tcp_posix.cc +4 -2
  105. data/src/core/lib/iomgr/timer_manager.cc +1 -1
  106. data/src/core/lib/iomgr/wakeup_fd_eventfd.cc +3 -4
  107. data/src/core/lib/security/context/security_context.cc +20 -13
  108. data/src/core/lib/security/context/security_context.h +27 -19
  109. data/src/core/lib/security/credentials/alts/alts_credentials.cc +1 -1
  110. data/src/core/lib/security/credentials/credentials.h +2 -2
  111. data/src/core/lib/security/credentials/fake/fake_credentials.cc +1 -0
  112. data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +39 -54
  113. data/src/core/lib/security/credentials/google_default/google_default_credentials.h +3 -2
  114. data/src/core/lib/security/credentials/local/local_credentials.cc +1 -1
  115. data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +1 -2
  116. data/src/core/lib/security/credentials/ssl/ssl_credentials.h +2 -0
  117. data/src/core/lib/security/security_connector/{alts_security_connector.cc → alts/alts_security_connector.cc} +10 -9
  118. data/src/core/lib/security/security_connector/{alts_security_connector.h → alts/alts_security_connector.h} +3 -3
  119. data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +310 -0
  120. data/src/core/lib/security/security_connector/fake/fake_security_connector.h +42 -0
  121. data/src/core/lib/security/security_connector/{local_security_connector.cc → local/local_security_connector.cc} +4 -3
  122. data/src/core/lib/security/security_connector/{local_security_connector.h → local/local_security_connector.h} +3 -3
  123. data/src/core/lib/security/security_connector/security_connector.cc +4 -1039
  124. data/src/core/lib/security/security_connector/security_connector.h +6 -114
  125. data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +474 -0
  126. data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +77 -0
  127. data/src/core/lib/security/security_connector/ssl_utils.cc +345 -0
  128. data/src/core/lib/security/security_connector/ssl_utils.h +93 -0
  129. data/src/core/lib/security/transport/client_auth_filter.cc +28 -17
  130. data/src/core/lib/security/transport/secure_endpoint.cc +51 -41
  131. data/src/core/lib/security/transport/security_handshaker.cc +6 -7
  132. data/src/core/lib/security/transport/server_auth_filter.cc +39 -31
  133. data/src/core/lib/surface/call.cc +100 -80
  134. data/src/core/lib/surface/call.h +4 -0
  135. data/src/core/lib/surface/channel.cc +27 -13
  136. data/src/core/lib/surface/channel.h +4 -3
  137. data/src/core/lib/surface/completion_queue.cc +8 -1
  138. data/src/core/lib/surface/init.cc +1 -0
  139. data/src/core/lib/surface/server.cc +111 -46
  140. data/src/core/lib/surface/server.h +16 -2
  141. data/src/core/lib/surface/version.cc +2 -2
  142. data/src/core/lib/transport/error_utils.cc +4 -2
  143. data/src/core/lib/transport/metadata.cc +3 -2
  144. data/src/core/lib/transport/metadata.h +3 -2
  145. data/src/core/lib/transport/metadata_batch.cc +1 -0
  146. data/src/core/lib/transport/metadata_batch.h +4 -2
  147. data/src/core/lib/transport/static_metadata.cc +225 -221
  148. data/src/core/lib/transport/static_metadata.h +74 -71
  149. data/src/core/lib/transport/transport.h +44 -26
  150. data/src/core/{ext/filters/client_channel → lib/uri}/uri_parser.cc +1 -1
  151. data/src/core/{ext/filters/client_channel → lib/uri}/uri_parser.h +3 -3
  152. data/src/core/plugin_registry/grpc_plugin_registry.cc +4 -4
  153. data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +356 -77
  154. data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +46 -36
  155. data/src/core/tsi/alts/handshaker/alts_shared_resource.cc +83 -0
  156. data/src/core/tsi/alts/handshaker/alts_shared_resource.h +73 -0
  157. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +122 -175
  158. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +33 -22
  159. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +38 -10
  160. data/src/core/tsi/transport_security.cc +18 -1
  161. data/src/core/tsi/transport_security.h +2 -1
  162. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +4 -2
  163. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +6 -3
  164. data/src/ruby/lib/grpc/version.rb +1 -1
  165. data/src/ruby/spec/pb/codegen/grpc/testing/package_options.proto +28 -0
  166. data/src/ruby/spec/pb/codegen/package_option_spec.rb +2 -3
  167. metadata +58 -40
  168. data/src/core/ext/filters/client_channel/method_params.cc +0 -178
  169. data/src/core/ext/filters/client_channel/method_params.h +0 -78
  170. data/src/core/tsi/alts/handshaker/alts_tsi_event.cc +0 -75
  171. data/src/core/tsi/alts/handshaker/alts_tsi_event.h +0 -93
  172. data/src/core/tsi/alts_transport_security.cc +0 -65
  173. data/src/core/tsi/alts_transport_security.h +0 -47
@@ -23,8 +23,10 @@
23
23
 
24
24
  #include <grpc/grpc.h>
25
25
 
26
+ #include "src/core/lib/iomgr/pollset_set.h"
26
27
  #include "src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h"
27
- #include "src/core/tsi/alts_transport_security.h"
28
+ #include "src/core/tsi/alts/handshaker/alts_handshaker_client.h"
29
+ #include "src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.h"
28
30
  #include "src/core/tsi/transport_security.h"
29
31
  #include "src/core/tsi/transport_security_interface.h"
30
32
 
@@ -34,10 +36,6 @@
34
36
 
35
37
  const size_t kTsiAltsNumOfPeerProperties = 3;
36
38
 
37
- /**
38
- * Main struct for ALTS TSI handshaker. All APIs in the header are
39
- * thread-comptabile.
40
- */
41
39
  typedef struct alts_tsi_handshaker alts_tsi_handshaker;
42
40
 
43
41
  /**
@@ -51,33 +49,46 @@ typedef struct alts_tsi_handshaker alts_tsi_handshaker;
51
49
  * "host:port".
52
50
  * - is_client: boolean value indicating if the handshaker is used at the client
53
51
  * (is_client = true) or server (is_client = false) side.
52
+ * - interested_parties: set of pollsets interested in this connection.
54
53
  * - self: address of ALTS TSI handshaker instance to be returned from the
55
54
  * method.
56
55
  *
57
- * It returns TSI_OK on success and an error status code on failure.
56
+ * It returns TSI_OK on success and an error status code on failure. Note that
57
+ * if interested_parties is nullptr, a dedicated TSI thread will be created and
58
+ * used.
58
59
  */
59
60
  tsi_result alts_tsi_handshaker_create(
60
61
  const grpc_alts_credentials_options* options, const char* target_name,
61
- const char* handshaker_service_url, bool is_client, tsi_handshaker** self);
62
+ const char* handshaker_service_url, bool is_client,
63
+ grpc_pollset_set* interested_parties, tsi_handshaker** self);
62
64
 
63
65
  /**
64
- * This method handles handshaker response returned from ALTS handshaker
65
- * service.
66
+ * This method creates an ALTS TSI handshaker result instance.
66
67
  *
67
- * - handshaker: ALTS TSI handshaker instance.
68
- * - recv_buffer: buffer holding data received from the handshaker service.
69
- * - status: status of the grpc call made to the handshaker service.
70
- * - details: error details of the grpc call made to the handshaker service.
71
- * - cb: callback function of ALTS TSI event.
72
- * - user_data: argument of callback function.
73
- * - is_ok: a boolean value indicating if the handshaker response is ok to read.
68
+ * - resp: data received from the handshaker service.
69
+ * - is_client: a boolean value indicating if the result belongs to a
70
+ * client or not.
71
+ * - result: address of ALTS TSI handshaker result instance.
72
+ */
73
+ tsi_result alts_tsi_handshaker_result_create(grpc_gcp_handshaker_resp* resp,
74
+ bool is_client,
75
+ tsi_handshaker_result** result);
76
+
77
+ /**
78
+ * This method sets unused bytes of ALTS TSI handshaker result instance.
74
79
  *
80
+ * - result: an ALTS TSI handshaker result instance.
81
+ * - recv_bytes: data received from the handshaker service.
82
+ * - bytes_consumed: size of data consumed by the handshaker service.
83
+ */
84
+ void alts_tsi_handshaker_result_set_unused_bytes(tsi_handshaker_result* result,
85
+ grpc_slice* recv_bytes,
86
+ size_t bytes_consumed);
87
+
88
+ /**
89
+ * This method returns a boolean value indicating if an ALTS TSI handshaker
90
+ * has been shutdown or not.
75
91
  */
76
- void alts_tsi_handshaker_handle_response(alts_tsi_handshaker* handshaker,
77
- grpc_byte_buffer* recv_buffer,
78
- grpc_status_code status,
79
- grpc_slice* details,
80
- tsi_handshaker_on_next_done_cb cb,
81
- void* user_data, bool is_ok);
92
+ bool alts_tsi_handshaker_has_shutdown(alts_tsi_handshaker* handshaker);
82
93
 
83
94
  #endif /* GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_TSI_HANDSHAKER_H */
@@ -27,27 +27,55 @@ namespace grpc_core {
27
27
  namespace internal {
28
28
 
29
29
  /**
30
- * Unsafe, use for testing only. It allows the caller to change the way the
31
- * ALTS TSI handshaker schedules handshaker requests.
32
- */
33
- void alts_tsi_handshaker_set_client_for_testing(alts_tsi_handshaker* handshaker,
34
- alts_handshaker_client* client);
30
+ * Unsafe, use for testing only. */
35
31
 
36
32
  alts_handshaker_client* alts_tsi_handshaker_get_client_for_testing(
37
33
  alts_tsi_handshaker* handshaker);
38
34
 
39
- /* For testing only. */
40
35
  bool alts_tsi_handshaker_get_has_sent_start_message_for_testing(
41
36
  alts_tsi_handshaker* handshaker);
42
37
 
38
+ void alts_tsi_handshaker_set_client_vtable_for_testing(
39
+ alts_tsi_handshaker* handshaker, alts_handshaker_client_vtable* vtable);
40
+
43
41
  bool alts_tsi_handshaker_get_is_client_for_testing(
44
42
  alts_tsi_handshaker* handshaker);
45
43
 
46
- void alts_tsi_handshaker_set_recv_bytes_for_testing(
47
- alts_tsi_handshaker* handshaker, grpc_slice* slice);
44
+ void alts_handshaker_client_set_grpc_caller_for_testing(
45
+ alts_handshaker_client* client, alts_grpc_caller caller);
48
46
 
49
- grpc_slice alts_tsi_handshaker_get_recv_bytes_for_testing(
50
- alts_tsi_handshaker* handshaker);
47
+ grpc_byte_buffer* alts_handshaker_client_get_send_buffer_for_testing(
48
+ alts_handshaker_client* client);
49
+
50
+ grpc_byte_buffer** alts_handshaker_client_get_recv_buffer_addr_for_testing(
51
+ alts_handshaker_client* client);
52
+
53
+ grpc_metadata_array* alts_handshaker_client_get_initial_metadata_for_testing(
54
+ alts_handshaker_client* client);
55
+
56
+ void alts_handshaker_client_set_recv_bytes_for_testing(
57
+ alts_handshaker_client* client, grpc_slice* recv_bytes);
58
+
59
+ void alts_handshaker_client_check_fields_for_testing(
60
+ alts_handshaker_client* client, tsi_handshaker_on_next_done_cb cb,
61
+ void* user_data, bool has_sent_start_message, grpc_slice* recv_bytes);
62
+
63
+ void alts_handshaker_client_set_fields_for_testing(
64
+ alts_handshaker_client* client, alts_tsi_handshaker* handshaker,
65
+ tsi_handshaker_on_next_done_cb cb, void* user_data,
66
+ grpc_byte_buffer* recv_buffer, grpc_status_code status);
67
+
68
+ void alts_handshaker_client_set_vtable_for_testing(
69
+ alts_handshaker_client* client, alts_handshaker_client_vtable* vtable);
70
+
71
+ alts_tsi_handshaker* alts_handshaker_client_get_handshaker_for_testing(
72
+ alts_handshaker_client* client);
73
+
74
+ void alts_handshaker_client_set_cb_for_testing(
75
+ alts_handshaker_client* client, tsi_handshaker_on_next_done_cb cb);
76
+
77
+ grpc_closure* alts_handshaker_client_get_closure_for_testing(
78
+ alts_handshaker_client* client);
51
79
 
52
80
  } // namespace internal
53
81
  } // namespace grpc_core
@@ -213,10 +213,10 @@ tsi_result tsi_handshaker_next(
213
213
 
214
214
  void tsi_handshaker_shutdown(tsi_handshaker* self) {
215
215
  if (self == nullptr || self->vtable == nullptr) return;
216
- self->handshake_shutdown = true;
217
216
  if (self->vtable->shutdown != nullptr) {
218
217
  self->vtable->shutdown(self);
219
218
  }
219
+ self->handshake_shutdown = true;
220
220
  }
221
221
 
222
222
  void tsi_handshaker_destroy(tsi_handshaker* self) {
@@ -338,3 +338,20 @@ tsi_result tsi_construct_peer(size_t property_count, tsi_peer* peer) {
338
338
  }
339
339
  return TSI_OK;
340
340
  }
341
+
342
+ const tsi_peer_property* tsi_peer_get_property_by_name(const tsi_peer* peer,
343
+ const char* name) {
344
+ size_t i;
345
+ if (peer == nullptr) return nullptr;
346
+ for (i = 0; i < peer->property_count; i++) {
347
+ const tsi_peer_property* property = &peer->properties[i];
348
+ if (name == nullptr && property->name == nullptr) {
349
+ return property;
350
+ }
351
+ if (name != nullptr && property->name != nullptr &&
352
+ strcmp(property->name, name) == 0) {
353
+ return property;
354
+ }
355
+ }
356
+ return nullptr;
357
+ }
@@ -122,7 +122,8 @@ tsi_result tsi_construct_allocated_string_peer_property(
122
122
  const char* name, size_t value_length, tsi_peer_property* property);
123
123
  tsi_result tsi_construct_string_peer_property_from_cstring(
124
124
  const char* name, const char* value, tsi_peer_property* property);
125
-
125
+ const tsi_peer_property* tsi_peer_get_property_by_name(const tsi_peer* peer,
126
+ const char* name);
126
127
  /* Utils. */
127
128
  char* tsi_strdup(const char* src); /* Sadly, no strdup in C89. */
128
129
 
@@ -98,12 +98,13 @@ grpc_resource_quota_set_max_threads_type grpc_resource_quota_set_max_threads_imp
98
98
  grpc_resource_quota_arg_vtable_type grpc_resource_quota_arg_vtable_import;
99
99
  grpc_channelz_get_top_channels_type grpc_channelz_get_top_channels_import;
100
100
  grpc_channelz_get_servers_type grpc_channelz_get_servers_import;
101
+ grpc_channelz_get_server_type grpc_channelz_get_server_import;
102
+ grpc_channelz_get_server_sockets_type grpc_channelz_get_server_sockets_import;
101
103
  grpc_channelz_get_channel_type grpc_channelz_get_channel_import;
102
104
  grpc_channelz_get_subchannel_type grpc_channelz_get_subchannel_import;
103
105
  grpc_channelz_get_socket_type grpc_channelz_get_socket_import;
104
106
  grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import;
105
107
  grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import;
106
- grpc_use_signal_type grpc_use_signal_import;
107
108
  grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import;
108
109
  grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import;
109
110
  grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import;
@@ -355,12 +356,13 @@ void grpc_rb_load_imports(HMODULE library) {
355
356
  grpc_resource_quota_arg_vtable_import = (grpc_resource_quota_arg_vtable_type) GetProcAddress(library, "grpc_resource_quota_arg_vtable");
356
357
  grpc_channelz_get_top_channels_import = (grpc_channelz_get_top_channels_type) GetProcAddress(library, "grpc_channelz_get_top_channels");
357
358
  grpc_channelz_get_servers_import = (grpc_channelz_get_servers_type) GetProcAddress(library, "grpc_channelz_get_servers");
359
+ grpc_channelz_get_server_import = (grpc_channelz_get_server_type) GetProcAddress(library, "grpc_channelz_get_server");
360
+ grpc_channelz_get_server_sockets_import = (grpc_channelz_get_server_sockets_type) GetProcAddress(library, "grpc_channelz_get_server_sockets");
358
361
  grpc_channelz_get_channel_import = (grpc_channelz_get_channel_type) GetProcAddress(library, "grpc_channelz_get_channel");
359
362
  grpc_channelz_get_subchannel_import = (grpc_channelz_get_subchannel_type) GetProcAddress(library, "grpc_channelz_get_subchannel");
360
363
  grpc_channelz_get_socket_import = (grpc_channelz_get_socket_type) GetProcAddress(library, "grpc_channelz_get_socket");
361
364
  grpc_insecure_channel_create_from_fd_import = (grpc_insecure_channel_create_from_fd_type) GetProcAddress(library, "grpc_insecure_channel_create_from_fd");
362
365
  grpc_server_add_insecure_channel_from_fd_import = (grpc_server_add_insecure_channel_from_fd_type) GetProcAddress(library, "grpc_server_add_insecure_channel_from_fd");
363
- grpc_use_signal_import = (grpc_use_signal_type) GetProcAddress(library, "grpc_use_signal");
364
366
  grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next");
365
367
  grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator");
366
368
  grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity");
@@ -269,6 +269,12 @@ extern grpc_channelz_get_top_channels_type grpc_channelz_get_top_channels_import
269
269
  typedef char*(*grpc_channelz_get_servers_type)(intptr_t start_server_id);
270
270
  extern grpc_channelz_get_servers_type grpc_channelz_get_servers_import;
271
271
  #define grpc_channelz_get_servers grpc_channelz_get_servers_import
272
+ typedef char*(*grpc_channelz_get_server_type)(intptr_t server_id);
273
+ extern grpc_channelz_get_server_type grpc_channelz_get_server_import;
274
+ #define grpc_channelz_get_server grpc_channelz_get_server_import
275
+ typedef char*(*grpc_channelz_get_server_sockets_type)(intptr_t server_id, intptr_t start_socket_id);
276
+ extern grpc_channelz_get_server_sockets_type grpc_channelz_get_server_sockets_import;
277
+ #define grpc_channelz_get_server_sockets grpc_channelz_get_server_sockets_import
272
278
  typedef char*(*grpc_channelz_get_channel_type)(intptr_t channel_id);
273
279
  extern grpc_channelz_get_channel_type grpc_channelz_get_channel_import;
274
280
  #define grpc_channelz_get_channel grpc_channelz_get_channel_import
@@ -284,9 +290,6 @@ extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_fr
284
290
  typedef void(*grpc_server_add_insecure_channel_from_fd_type)(grpc_server* server, void* reserved, int fd);
285
291
  extern grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import;
286
292
  #define grpc_server_add_insecure_channel_from_fd grpc_server_add_insecure_channel_from_fd_import
287
- typedef void(*grpc_use_signal_type)(int signum);
288
- extern grpc_use_signal_type grpc_use_signal_import;
289
- #define grpc_use_signal grpc_use_signal_import
290
293
  typedef const grpc_auth_property*(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator* it);
291
294
  extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import;
292
295
  #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import
@@ -14,5 +14,5 @@
14
14
 
15
15
  # GRPC contains the General RPC module.
16
16
  module GRPC
17
- VERSION = '1.16.0'
17
+ VERSION = '1.17.0.pre1'
18
18
  end
@@ -0,0 +1,28 @@
1
+ // Copyright 2018 gRPC authors.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package grpc.testing;
18
+
19
+ // For sanity checking package definitions
20
+ option ruby_package = "Grpc.Testing.Package.Options";
21
+
22
+ message TestRequest { }
23
+
24
+ message TestResponse { }
25
+
26
+ service TestService {
27
+ rpc GetTest(TestRequest) returns (TestResponse) { }
28
+ }
@@ -21,9 +21,8 @@ describe 'Code Generation Options' do
21
21
  fail 'CONFIG env variable unexpectedly unset' unless ENV['CONFIG']
22
22
  bins_sub_dir = ENV['CONFIG']
23
23
 
24
- src_dir = File.join(File.dirname(__FILE__), '..', '..', '..', '..')
25
- pb_dir = File.join(src_dir, 'proto')
26
- bins_dir = File.join(src_dir, '..', 'bins', bins_sub_dir)
24
+ pb_dir = File.dirname(__FILE__)
25
+ bins_dir = File.join('..', '..', '..', '..', '..', 'bins', bins_sub_dir)
27
26
 
28
27
  plugin = File.join(bins_dir, 'grpc_ruby_plugin')
29
28
  protoc = File.join(bins_dir, 'protobuf', 'protoc')
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.16.0
4
+ version: 1.17.0.pre1
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-10-23 00:00:00.000000000 Z
11
+ date: 2018-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -277,6 +277,10 @@ files:
277
277
  - src/core/ext/filters/client_channel/client_channel_plugin.cc
278
278
  - src/core/ext/filters/client_channel/connector.cc
279
279
  - src/core/ext/filters/client_channel/connector.h
280
+ - src/core/ext/filters/client_channel/health/health.pb.c
281
+ - src/core/ext/filters/client_channel/health/health.pb.h
282
+ - src/core/ext/filters/client_channel/health/health_check_client.cc
283
+ - src/core/ext/filters/client_channel/health/health_check_client.h
280
284
  - src/core/ext/filters/client_channel/http_connect_handshaker.cc
281
285
  - src/core/ext/filters/client_channel/http_connect_handshaker.h
282
286
  - src/core/ext/filters/client_channel/http_proxy.cc
@@ -302,12 +306,18 @@ files:
302
306
  - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
303
307
  - src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
304
308
  - src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
309
+ - src/core/ext/filters/client_channel/lb_policy/xds/xds.cc
310
+ - src/core/ext/filters/client_channel/lb_policy/xds/xds.h
311
+ - src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h
312
+ - src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc
313
+ - src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc
314
+ - src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h
315
+ - src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc
316
+ - src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h
305
317
  - src/core/ext/filters/client_channel/lb_policy_factory.cc
306
318
  - src/core/ext/filters/client_channel/lb_policy_factory.h
307
319
  - src/core/ext/filters/client_channel/lb_policy_registry.cc
308
320
  - src/core/ext/filters/client_channel/lb_policy_registry.h
309
- - src/core/ext/filters/client_channel/method_params.cc
310
- - src/core/ext/filters/client_channel/method_params.h
311
321
  - src/core/ext/filters/client_channel/parse_address.cc
312
322
  - src/core/ext/filters/client_channel/parse_address.h
313
323
  - src/core/ext/filters/client_channel/proxy_mapper.cc
@@ -333,14 +343,14 @@ files:
333
343
  - src/core/ext/filters/client_channel/resolver_factory.h
334
344
  - src/core/ext/filters/client_channel/resolver_registry.cc
335
345
  - src/core/ext/filters/client_channel/resolver_registry.h
346
+ - src/core/ext/filters/client_channel/resolver_result_parsing.cc
347
+ - src/core/ext/filters/client_channel/resolver_result_parsing.h
336
348
  - src/core/ext/filters/client_channel/retry_throttle.cc
337
349
  - src/core/ext/filters/client_channel/retry_throttle.h
338
350
  - src/core/ext/filters/client_channel/subchannel.cc
339
351
  - src/core/ext/filters/client_channel/subchannel.h
340
352
  - src/core/ext/filters/client_channel/subchannel_index.cc
341
353
  - src/core/ext/filters/client_channel/subchannel_index.h
342
- - src/core/ext/filters/client_channel/uri_parser.cc
343
- - src/core/ext/filters/client_channel/uri_parser.h
344
354
  - src/core/ext/filters/deadline/deadline_filter.cc
345
355
  - src/core/ext/filters/deadline/deadline_filter.h
346
356
  - src/core/ext/filters/http/client/http_client_filter.cc
@@ -738,16 +748,22 @@ files:
738
748
  - src/core/lib/security/credentials/plugin/plugin_credentials.h
739
749
  - src/core/lib/security/credentials/ssl/ssl_credentials.cc
740
750
  - src/core/lib/security/credentials/ssl/ssl_credentials.h
741
- - src/core/lib/security/security_connector/alts_security_connector.cc
742
- - src/core/lib/security/security_connector/alts_security_connector.h
751
+ - src/core/lib/security/security_connector/alts/alts_security_connector.cc
752
+ - src/core/lib/security/security_connector/alts/alts_security_connector.h
753
+ - src/core/lib/security/security_connector/fake/fake_security_connector.cc
754
+ - src/core/lib/security/security_connector/fake/fake_security_connector.h
743
755
  - src/core/lib/security/security_connector/load_system_roots.h
744
756
  - src/core/lib/security/security_connector/load_system_roots_fallback.cc
745
757
  - src/core/lib/security/security_connector/load_system_roots_linux.cc
746
758
  - src/core/lib/security/security_connector/load_system_roots_linux.h
747
- - src/core/lib/security/security_connector/local_security_connector.cc
748
- - src/core/lib/security/security_connector/local_security_connector.h
759
+ - src/core/lib/security/security_connector/local/local_security_connector.cc
760
+ - src/core/lib/security/security_connector/local/local_security_connector.h
749
761
  - src/core/lib/security/security_connector/security_connector.cc
750
762
  - src/core/lib/security/security_connector/security_connector.h
763
+ - src/core/lib/security/security_connector/ssl/ssl_security_connector.cc
764
+ - src/core/lib/security/security_connector/ssl/ssl_security_connector.h
765
+ - src/core/lib/security/security_connector/ssl_utils.cc
766
+ - src/core/lib/security/security_connector/ssl_utils.h
751
767
  - src/core/lib/security/transport/auth_filters.h
752
768
  - src/core/lib/security/transport/client_auth_filter.cc
753
769
  - src/core/lib/security/transport/secure_endpoint.cc
@@ -835,6 +851,8 @@ files:
835
851
  - src/core/lib/transport/transport.h
836
852
  - src/core/lib/transport/transport_impl.h
837
853
  - src/core/lib/transport/transport_op_string.cc
854
+ - src/core/lib/uri/uri_parser.cc
855
+ - src/core/lib/uri/uri_parser.h
838
856
  - src/core/plugin_registry/grpc_plugin_registry.cc
839
857
  - src/core/tsi/alts/crypt/aes_gcm.cc
840
858
  - src/core/tsi/alts/crypt/gsec.cc
@@ -857,8 +875,8 @@ files:
857
875
  - src/core/tsi/alts/handshaker/alts_handshaker_service_api.h
858
876
  - src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.cc
859
877
  - src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.h
860
- - src/core/tsi/alts/handshaker/alts_tsi_event.cc
861
- - src/core/tsi/alts/handshaker/alts_tsi_event.h
878
+ - src/core/tsi/alts/handshaker/alts_shared_resource.cc
879
+ - src/core/tsi/alts/handshaker/alts_shared_resource.h
862
880
  - src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
863
881
  - src/core/tsi/alts/handshaker/alts_tsi_handshaker.h
864
882
  - src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h
@@ -883,8 +901,6 @@ files:
883
901
  - src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h
884
902
  - src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc
885
903
  - src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h
886
- - src/core/tsi/alts_transport_security.cc
887
- - src/core/tsi/alts_transport_security.h
888
904
  - src/core/tsi/fake_transport_security.cc
889
905
  - src/core/tsi/fake_transport_security.h
890
906
  - src/core/tsi/grpc_shadow_boringssl.h
@@ -985,6 +1001,7 @@ files:
985
1001
  - src/ruby/spec/generic/server_interceptors_spec.rb
986
1002
  - src/ruby/spec/generic/service_spec.rb
987
1003
  - src/ruby/spec/google_rpc_status_utils_spec.rb
1004
+ - src/ruby/spec/pb/codegen/grpc/testing/package_options.proto
988
1005
  - src/ruby/spec/pb/codegen/package_option_spec.rb
989
1006
  - src/ruby/spec/pb/duplicate/codegen_spec.rb
990
1007
  - src/ruby/spec/pb/health/checker_spec.rb
@@ -1559,47 +1576,48 @@ required_ruby_version: !ruby/object:Gem::Requirement
1559
1576
  version: 2.0.0
1560
1577
  required_rubygems_version: !ruby/object:Gem::Requirement
1561
1578
  requirements:
1562
- - - ">="
1579
+ - - ">"
1563
1580
  - !ruby/object:Gem::Version
1564
- version: '0'
1581
+ version: 1.3.1
1565
1582
  requirements: []
1566
1583
  rubyforge_project:
1567
- rubygems_version: 2.7.7
1584
+ rubygems_version: 2.7.8
1568
1585
  signing_key:
1569
1586
  specification_version: 4
1570
1587
  summary: GRPC system in Ruby
1571
1588
  test_files:
1572
- - src/ruby/spec/server_credentials_spec.rb
1573
- - src/ruby/spec/client_server_spec.rb
1574
- - src/ruby/spec/channel_spec.rb
1575
- - src/ruby/spec/channel_connection_spec.rb
1576
- - src/ruby/spec/support/services.rb
1577
- - src/ruby/spec/support/helpers.rb
1578
1589
  - src/ruby/spec/spec_helper.rb
1590
+ - src/ruby/spec/error_sanity_spec.rb
1591
+ - src/ruby/spec/channel_connection_spec.rb
1579
1592
  - src/ruby/spec/channel_credentials_spec.rb
1593
+ - src/ruby/spec/client_server_spec.rb
1594
+ - src/ruby/spec/call_credentials_spec.rb
1595
+ - src/ruby/spec/channel_spec.rb
1580
1596
  - src/ruby/spec/pb/duplicate/codegen_spec.rb
1581
1597
  - src/ruby/spec/pb/health/checker_spec.rb
1582
1598
  - src/ruby/spec/pb/codegen/package_option_spec.rb
1583
- - src/ruby/spec/error_sanity_spec.rb
1584
- - src/ruby/spec/google_rpc_status_utils_spec.rb
1585
- - src/ruby/spec/testdata/ca.pem
1586
- - src/ruby/spec/testdata/server1.pem
1587
- - src/ruby/spec/testdata/client.pem
1588
- - src/ruby/spec/testdata/README
1589
- - src/ruby/spec/testdata/server1.key
1590
- - src/ruby/spec/testdata/client.key
1591
- - src/ruby/spec/call_credentials_spec.rb
1592
- - src/ruby/spec/client_auth_spec.rb
1599
+ - src/ruby/spec/pb/codegen/grpc/testing/package_options.proto
1600
+ - src/ruby/spec/generic/client_interceptors_spec.rb
1601
+ - src/ruby/spec/generic/active_call_spec.rb
1602
+ - src/ruby/spec/generic/client_stub_spec.rb
1603
+ - src/ruby/spec/generic/rpc_server_spec.rb
1593
1604
  - src/ruby/spec/generic/rpc_desc_spec.rb
1594
1605
  - src/ruby/spec/generic/interceptor_registry_spec.rb
1595
1606
  - src/ruby/spec/generic/rpc_server_pool_spec.rb
1596
- - src/ruby/spec/generic/active_call_spec.rb
1597
- - src/ruby/spec/generic/service_spec.rb
1598
1607
  - src/ruby/spec/generic/server_interceptors_spec.rb
1599
- - src/ruby/spec/generic/rpc_server_spec.rb
1600
- - src/ruby/spec/generic/client_interceptors_spec.rb
1601
- - src/ruby/spec/generic/client_stub_spec.rb
1608
+ - src/ruby/spec/generic/service_spec.rb
1609
+ - src/ruby/spec/google_rpc_status_utils_spec.rb
1610
+ - src/ruby/spec/compression_options_spec.rb
1611
+ - src/ruby/spec/client_auth_spec.rb
1612
+ - src/ruby/spec/support/services.rb
1613
+ - src/ruby/spec/support/helpers.rb
1614
+ - src/ruby/spec/server_credentials_spec.rb
1615
+ - src/ruby/spec/server_spec.rb
1602
1616
  - src/ruby/spec/time_consts_spec.rb
1603
1617
  - src/ruby/spec/call_spec.rb
1604
- - src/ruby/spec/server_spec.rb
1605
- - src/ruby/spec/compression_options_spec.rb
1618
+ - src/ruby/spec/testdata/server1.key
1619
+ - src/ruby/spec/testdata/server1.pem
1620
+ - src/ruby/spec/testdata/client.pem
1621
+ - src/ruby/spec/testdata/client.key
1622
+ - src/ruby/spec/testdata/ca.pem
1623
+ - src/ruby/spec/testdata/README