grpc 1.42.0.pre1-arm64-darwin

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 (128) hide show
  1. checksums.yaml +7 -0
  2. data/etc/roots.pem +4337 -0
  3. data/grpc_c.32.ruby +0 -0
  4. data/grpc_c.64.ruby +0 -0
  5. data/src/ruby/bin/math_client.rb +140 -0
  6. data/src/ruby/bin/math_pb.rb +34 -0
  7. data/src/ruby/bin/math_server.rb +191 -0
  8. data/src/ruby/bin/math_services_pb.rb +51 -0
  9. data/src/ruby/bin/noproto_client.rb +93 -0
  10. data/src/ruby/bin/noproto_server.rb +97 -0
  11. data/src/ruby/ext/grpc/ext-export.clang +1 -0
  12. data/src/ruby/ext/grpc/ext-export.gcc +6 -0
  13. data/src/ruby/ext/grpc/extconf.rb +123 -0
  14. data/src/ruby/ext/grpc/rb_byte_buffer.c +65 -0
  15. data/src/ruby/ext/grpc/rb_byte_buffer.h +35 -0
  16. data/src/ruby/ext/grpc/rb_call.c +1051 -0
  17. data/src/ruby/ext/grpc/rb_call.h +57 -0
  18. data/src/ruby/ext/grpc/rb_call_credentials.c +341 -0
  19. data/src/ruby/ext/grpc/rb_call_credentials.h +31 -0
  20. data/src/ruby/ext/grpc/rb_channel.c +846 -0
  21. data/src/ruby/ext/grpc/rb_channel.h +34 -0
  22. data/src/ruby/ext/grpc/rb_channel_args.c +155 -0
  23. data/src/ruby/ext/grpc/rb_channel_args.h +38 -0
  24. data/src/ruby/ext/grpc/rb_channel_credentials.c +286 -0
  25. data/src/ruby/ext/grpc/rb_channel_credentials.h +37 -0
  26. data/src/ruby/ext/grpc/rb_completion_queue.c +101 -0
  27. data/src/ruby/ext/grpc/rb_completion_queue.h +36 -0
  28. data/src/ruby/ext/grpc/rb_compression_options.c +471 -0
  29. data/src/ruby/ext/grpc/rb_compression_options.h +29 -0
  30. data/src/ruby/ext/grpc/rb_enable_cpp.cc +22 -0
  31. data/src/ruby/ext/grpc/rb_event_thread.c +145 -0
  32. data/src/ruby/ext/grpc/rb_event_thread.h +21 -0
  33. data/src/ruby/ext/grpc/rb_grpc.c +333 -0
  34. data/src/ruby/ext/grpc/rb_grpc.h +77 -0
  35. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +605 -0
  36. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +913 -0
  37. data/src/ruby/ext/grpc/rb_loader.c +57 -0
  38. data/src/ruby/ext/grpc/rb_loader.h +25 -0
  39. data/src/ruby/ext/grpc/rb_server.c +385 -0
  40. data/src/ruby/ext/grpc/rb_server.h +32 -0
  41. data/src/ruby/ext/grpc/rb_server_credentials.c +259 -0
  42. data/src/ruby/ext/grpc/rb_server_credentials.h +37 -0
  43. data/src/ruby/ext/grpc/rb_xds_channel_credentials.c +218 -0
  44. data/src/ruby/ext/grpc/rb_xds_channel_credentials.h +37 -0
  45. data/src/ruby/ext/grpc/rb_xds_server_credentials.c +170 -0
  46. data/src/ruby/ext/grpc/rb_xds_server_credentials.h +37 -0
  47. data/src/ruby/lib/grpc/2.4/grpc_c.bundle +0 -0
  48. data/src/ruby/lib/grpc/2.5/grpc_c.bundle +0 -0
  49. data/src/ruby/lib/grpc/2.6/grpc_c.bundle +0 -0
  50. data/src/ruby/lib/grpc/2.7/grpc_c.bundle +0 -0
  51. data/src/ruby/lib/grpc/3.0/grpc_c.bundle +0 -0
  52. data/src/ruby/lib/grpc/core/status_codes.rb +135 -0
  53. data/src/ruby/lib/grpc/core/time_consts.rb +56 -0
  54. data/src/ruby/lib/grpc/errors.rb +277 -0
  55. data/src/ruby/lib/grpc/generic/active_call.rb +669 -0
  56. data/src/ruby/lib/grpc/generic/bidi_call.rb +233 -0
  57. data/src/ruby/lib/grpc/generic/client_stub.rb +503 -0
  58. data/src/ruby/lib/grpc/generic/interceptor_registry.rb +53 -0
  59. data/src/ruby/lib/grpc/generic/interceptors.rb +186 -0
  60. data/src/ruby/lib/grpc/generic/rpc_desc.rb +204 -0
  61. data/src/ruby/lib/grpc/generic/rpc_server.rb +551 -0
  62. data/src/ruby/lib/grpc/generic/service.rb +211 -0
  63. data/src/ruby/lib/grpc/google_rpc_status_utils.rb +40 -0
  64. data/src/ruby/lib/grpc/grpc.rb +24 -0
  65. data/src/ruby/lib/grpc/logconfig.rb +44 -0
  66. data/src/ruby/lib/grpc/notifier.rb +45 -0
  67. data/src/ruby/lib/grpc/structs.rb +15 -0
  68. data/src/ruby/lib/grpc/version.rb +18 -0
  69. data/src/ruby/lib/grpc.rb +37 -0
  70. data/src/ruby/pb/README.md +42 -0
  71. data/src/ruby/pb/generate_proto_ruby.sh +51 -0
  72. data/src/ruby/pb/grpc/health/checker.rb +75 -0
  73. data/src/ruby/pb/grpc/health/v1/health_pb.rb +31 -0
  74. data/src/ruby/pb/grpc/health/v1/health_services_pb.rb +62 -0
  75. data/src/ruby/pb/grpc/testing/duplicate/echo_duplicate_services_pb.rb +44 -0
  76. data/src/ruby/pb/grpc/testing/metrics_pb.rb +28 -0
  77. data/src/ruby/pb/grpc/testing/metrics_services_pb.rb +49 -0
  78. data/src/ruby/pb/src/proto/grpc/testing/empty_pb.rb +17 -0
  79. data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +145 -0
  80. data/src/ruby/pb/src/proto/grpc/testing/test_pb.rb +16 -0
  81. data/src/ruby/pb/src/proto/grpc/testing/test_services_pb.rb +152 -0
  82. data/src/ruby/pb/test/client.rb +769 -0
  83. data/src/ruby/pb/test/server.rb +252 -0
  84. data/src/ruby/pb/test/xds_client.rb +415 -0
  85. data/src/ruby/spec/call_credentials_spec.rb +42 -0
  86. data/src/ruby/spec/call_spec.rb +180 -0
  87. data/src/ruby/spec/channel_connection_spec.rb +126 -0
  88. data/src/ruby/spec/channel_credentials_spec.rb +124 -0
  89. data/src/ruby/spec/channel_spec.rb +245 -0
  90. data/src/ruby/spec/client_auth_spec.rb +152 -0
  91. data/src/ruby/spec/client_server_spec.rb +664 -0
  92. data/src/ruby/spec/compression_options_spec.rb +149 -0
  93. data/src/ruby/spec/debug_message_spec.rb +134 -0
  94. data/src/ruby/spec/error_sanity_spec.rb +49 -0
  95. data/src/ruby/spec/errors_spec.rb +142 -0
  96. data/src/ruby/spec/generic/active_call_spec.rb +683 -0
  97. data/src/ruby/spec/generic/client_interceptors_spec.rb +153 -0
  98. data/src/ruby/spec/generic/client_stub_spec.rb +1083 -0
  99. data/src/ruby/spec/generic/interceptor_registry_spec.rb +65 -0
  100. data/src/ruby/spec/generic/rpc_desc_spec.rb +374 -0
  101. data/src/ruby/spec/generic/rpc_server_pool_spec.rb +127 -0
  102. data/src/ruby/spec/generic/rpc_server_spec.rb +748 -0
  103. data/src/ruby/spec/generic/server_interceptors_spec.rb +218 -0
  104. data/src/ruby/spec/generic/service_spec.rb +263 -0
  105. data/src/ruby/spec/google_rpc_status_utils_spec.rb +282 -0
  106. data/src/ruby/spec/pb/codegen/grpc/testing/package_options.proto +28 -0
  107. data/src/ruby/spec/pb/codegen/grpc/testing/package_options_import.proto +22 -0
  108. data/src/ruby/spec/pb/codegen/grpc/testing/package_options_import2.proto +23 -0
  109. data/src/ruby/spec/pb/codegen/grpc/testing/package_options_ruby_style.proto +41 -0
  110. data/src/ruby/spec/pb/codegen/grpc/testing/same_package_service_name.proto +27 -0
  111. data/src/ruby/spec/pb/codegen/grpc/testing/same_ruby_package_service_name.proto +29 -0
  112. data/src/ruby/spec/pb/codegen/package_option_spec.rb +98 -0
  113. data/src/ruby/spec/pb/duplicate/codegen_spec.rb +57 -0
  114. data/src/ruby/spec/pb/health/checker_spec.rb +236 -0
  115. data/src/ruby/spec/server_credentials_spec.rb +104 -0
  116. data/src/ruby/spec/server_spec.rb +231 -0
  117. data/src/ruby/spec/spec_helper.rb +61 -0
  118. data/src/ruby/spec/support/helpers.rb +107 -0
  119. data/src/ruby/spec/support/services.rb +160 -0
  120. data/src/ruby/spec/testdata/README +1 -0
  121. data/src/ruby/spec/testdata/ca.pem +20 -0
  122. data/src/ruby/spec/testdata/client.key +28 -0
  123. data/src/ruby/spec/testdata/client.pem +20 -0
  124. data/src/ruby/spec/testdata/server1.key +28 -0
  125. data/src/ruby/spec/testdata/server1.pem +22 -0
  126. data/src/ruby/spec/time_consts_spec.rb +74 -0
  127. data/src/ruby/spec/user_agent_spec.rb +74 -0
  128. metadata +404 -0
@@ -0,0 +1,62 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: grpc/health/v1/health.proto for package 'grpc.health.v1'
3
+ # Original file comments:
4
+ # Copyright 2015 The gRPC Authors
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ # The canonical version of this proto can be found at
19
+ # https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto
20
+ #
21
+
22
+ require 'grpc'
23
+ require 'grpc/health/v1/health_pb'
24
+
25
+ module Grpc
26
+ module Health
27
+ module V1
28
+ module Health
29
+ class Service
30
+
31
+ include ::GRPC::GenericService
32
+
33
+ self.marshal_class_method = :encode
34
+ self.unmarshal_class_method = :decode
35
+ self.service_name = 'grpc.health.v1.Health'
36
+
37
+ # If the requested service is unknown, the call will fail with status
38
+ # NOT_FOUND.
39
+ rpc :Check, ::Grpc::Health::V1::HealthCheckRequest, ::Grpc::Health::V1::HealthCheckResponse
40
+ # Performs a watch for the serving status of the requested service.
41
+ # The server will immediately send back a message indicating the current
42
+ # serving status. It will then subsequently send a new message whenever
43
+ # the service's serving status changes.
44
+ #
45
+ # If the requested service is unknown when the call is received, the
46
+ # server will send a message setting the serving status to
47
+ # SERVICE_UNKNOWN but will *not* terminate the call. If at some
48
+ # future point, the serving status of the service becomes known, the
49
+ # server will send a new message with the service's serving status.
50
+ #
51
+ # If the call terminates with status UNIMPLEMENTED, then clients
52
+ # should assume this method is not supported and should not retry the
53
+ # call. If the call terminates with any other status (including OK),
54
+ # clients should retry the call with appropriate exponential backoff.
55
+ rpc :Watch, ::Grpc::Health::V1::HealthCheckRequest, stream(::Grpc::Health::V1::HealthCheckResponse)
56
+ end
57
+
58
+ Stub = Service.rpc_stub_class
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,44 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: src/proto/grpc/testing/duplicate/echo_duplicate.proto for package 'grpc.testing.duplicate'
3
+ # Original file comments:
4
+ # Copyright 2015 gRPC authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ # This is a partial copy of echo.proto with a different package name.
19
+ #
20
+
21
+ require 'grpc'
22
+ require 'src/proto/grpc/testing/duplicate/echo_duplicate_pb'
23
+
24
+ module Grpc
25
+ module Testing
26
+ module Duplicate
27
+ module EchoTestService
28
+ class Service
29
+
30
+ include GRPC::GenericService
31
+
32
+ self.marshal_class_method = :encode
33
+ self.unmarshal_class_method = :decode
34
+ self.service_name = 'grpc.testing.duplicate.EchoTestService'
35
+
36
+ rpc :Echo, Grpc::Testing::EchoRequest, Grpc::Testing::EchoResponse
37
+ rpc :ResponseStream, Grpc::Testing::EchoRequest, stream(Grpc::Testing::EchoResponse)
38
+ end
39
+
40
+ Stub = Service.rpc_stub_class
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,28 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: src/proto/grpc/testing/metrics.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "grpc.testing.GaugeResponse" do
8
+ optional :name, :string, 1
9
+ oneof :value do
10
+ optional :long_value, :int64, 2
11
+ optional :double_value, :double, 3
12
+ optional :string_value, :string, 4
13
+ end
14
+ end
15
+ add_message "grpc.testing.GaugeRequest" do
16
+ optional :name, :string, 1
17
+ end
18
+ add_message "grpc.testing.EmptyMessage" do
19
+ end
20
+ end
21
+
22
+ module Grpc
23
+ module Testing
24
+ GaugeResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.GaugeResponse").msgclass
25
+ GaugeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.GaugeRequest").msgclass
26
+ EmptyMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.EmptyMessage").msgclass
27
+ end
28
+ end
@@ -0,0 +1,49 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: src/proto/grpc/testing/metrics.proto for package 'grpc.testing'
3
+ # Original file comments:
4
+ # Copyright 2015-2016 gRPC authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ # Contains the definitions for a metrics service and the type of metrics
19
+ # exposed by the service.
20
+ #
21
+ # Currently, 'Gauge' (i.e a metric that represents the measured value of
22
+ # something at an instant of time) is the only metric type supported by the
23
+ # service.
24
+
25
+ require 'grpc'
26
+ require 'src/proto/grpc/testing/metrics_pb'
27
+
28
+ module Grpc
29
+ module Testing
30
+ module MetricsService
31
+ class Service
32
+
33
+ include GRPC::GenericService
34
+
35
+ self.marshal_class_method = :encode
36
+ self.unmarshal_class_method = :decode
37
+ self.service_name = 'grpc.testing.MetricsService'
38
+
39
+ # Returns the values of all the gauges that are currently being maintained by
40
+ # the service
41
+ rpc :GetAllGauges, EmptyMessage, stream(GaugeResponse)
42
+ # Returns the value of one gauge
43
+ rpc :GetGauge, GaugeRequest, GaugeResponse
44
+ end
45
+
46
+ Stub = Service.rpc_stub_class
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,17 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: src/proto/grpc/testing/empty.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("src/proto/grpc/testing/empty.proto", :syntax => :proto3) do
8
+ add_message "grpc.testing.Empty" do
9
+ end
10
+ end
11
+ end
12
+
13
+ module Grpc
14
+ module Testing
15
+ Empty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.Empty").msgclass
16
+ end
17
+ end
@@ -0,0 +1,145 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: src/proto/grpc/testing/messages.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("src/proto/grpc/testing/messages.proto", :syntax => :proto3) do
8
+ add_message "grpc.testing.BoolValue" do
9
+ optional :value, :bool, 1
10
+ end
11
+ add_message "grpc.testing.Payload" do
12
+ optional :type, :enum, 1, "grpc.testing.PayloadType"
13
+ optional :body, :bytes, 2
14
+ end
15
+ add_message "grpc.testing.EchoStatus" do
16
+ optional :code, :int32, 1
17
+ optional :message, :string, 2
18
+ end
19
+ add_message "grpc.testing.SimpleRequest" do
20
+ optional :response_type, :enum, 1, "grpc.testing.PayloadType"
21
+ optional :response_size, :int32, 2
22
+ optional :payload, :message, 3, "grpc.testing.Payload"
23
+ optional :fill_username, :bool, 4
24
+ optional :fill_oauth_scope, :bool, 5
25
+ optional :response_compressed, :message, 6, "grpc.testing.BoolValue"
26
+ optional :response_status, :message, 7, "grpc.testing.EchoStatus"
27
+ optional :expect_compressed, :message, 8, "grpc.testing.BoolValue"
28
+ optional :fill_server_id, :bool, 9
29
+ optional :fill_grpclb_route_type, :bool, 10
30
+ end
31
+ add_message "grpc.testing.SimpleResponse" do
32
+ optional :payload, :message, 1, "grpc.testing.Payload"
33
+ optional :username, :string, 2
34
+ optional :oauth_scope, :string, 3
35
+ optional :server_id, :string, 4
36
+ optional :grpclb_route_type, :enum, 5, "grpc.testing.GrpclbRouteType"
37
+ optional :hostname, :string, 6
38
+ end
39
+ add_message "grpc.testing.StreamingInputCallRequest" do
40
+ optional :payload, :message, 1, "grpc.testing.Payload"
41
+ optional :expect_compressed, :message, 2, "grpc.testing.BoolValue"
42
+ end
43
+ add_message "grpc.testing.StreamingInputCallResponse" do
44
+ optional :aggregated_payload_size, :int32, 1
45
+ end
46
+ add_message "grpc.testing.ResponseParameters" do
47
+ optional :size, :int32, 1
48
+ optional :interval_us, :int32, 2
49
+ optional :compressed, :message, 3, "grpc.testing.BoolValue"
50
+ end
51
+ add_message "grpc.testing.StreamingOutputCallRequest" do
52
+ optional :response_type, :enum, 1, "grpc.testing.PayloadType"
53
+ repeated :response_parameters, :message, 2, "grpc.testing.ResponseParameters"
54
+ optional :payload, :message, 3, "grpc.testing.Payload"
55
+ optional :response_status, :message, 7, "grpc.testing.EchoStatus"
56
+ end
57
+ add_message "grpc.testing.StreamingOutputCallResponse" do
58
+ optional :payload, :message, 1, "grpc.testing.Payload"
59
+ end
60
+ add_message "grpc.testing.ReconnectParams" do
61
+ optional :max_reconnect_backoff_ms, :int32, 1
62
+ end
63
+ add_message "grpc.testing.ReconnectInfo" do
64
+ optional :passed, :bool, 1
65
+ repeated :backoff_ms, :int32, 2
66
+ end
67
+ add_message "grpc.testing.LoadBalancerStatsRequest" do
68
+ optional :num_rpcs, :int32, 1
69
+ optional :timeout_sec, :int32, 2
70
+ end
71
+ add_message "grpc.testing.LoadBalancerStatsResponse" do
72
+ map :rpcs_by_peer, :string, :int32, 1
73
+ optional :num_failures, :int32, 2
74
+ map :rpcs_by_method, :string, :message, 3, "grpc.testing.LoadBalancerStatsResponse.RpcsByPeer"
75
+ end
76
+ add_message "grpc.testing.LoadBalancerStatsResponse.RpcsByPeer" do
77
+ map :rpcs_by_peer, :string, :int32, 1
78
+ end
79
+ add_message "grpc.testing.LoadBalancerAccumulatedStatsRequest" do
80
+ end
81
+ add_message "grpc.testing.LoadBalancerAccumulatedStatsResponse" do
82
+ map :num_rpcs_started_by_method, :string, :int32, 1
83
+ map :num_rpcs_succeeded_by_method, :string, :int32, 2
84
+ map :num_rpcs_failed_by_method, :string, :int32, 3
85
+ map :stats_per_method, :string, :message, 4, "grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats"
86
+ end
87
+ add_message "grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats" do
88
+ optional :rpcs_started, :int32, 1
89
+ map :result, :int32, :int32, 2
90
+ end
91
+ add_message "grpc.testing.ClientConfigureRequest" do
92
+ repeated :types, :enum, 1, "grpc.testing.ClientConfigureRequest.RpcType"
93
+ repeated :metadata, :message, 2, "grpc.testing.ClientConfigureRequest.Metadata"
94
+ optional :timeout_sec, :int32, 3
95
+ end
96
+ add_message "grpc.testing.ClientConfigureRequest.Metadata" do
97
+ optional :type, :enum, 1, "grpc.testing.ClientConfigureRequest.RpcType"
98
+ optional :key, :string, 2
99
+ optional :value, :string, 3
100
+ end
101
+ add_enum "grpc.testing.ClientConfigureRequest.RpcType" do
102
+ value :EMPTY_CALL, 0
103
+ value :UNARY_CALL, 1
104
+ end
105
+ add_message "grpc.testing.ClientConfigureResponse" do
106
+ end
107
+ add_enum "grpc.testing.PayloadType" do
108
+ value :COMPRESSABLE, 0
109
+ end
110
+ add_enum "grpc.testing.GrpclbRouteType" do
111
+ value :GRPCLB_ROUTE_TYPE_UNKNOWN, 0
112
+ value :GRPCLB_ROUTE_TYPE_FALLBACK, 1
113
+ value :GRPCLB_ROUTE_TYPE_BACKEND, 2
114
+ end
115
+ end
116
+ end
117
+
118
+ module Grpc
119
+ module Testing
120
+ BoolValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.BoolValue").msgclass
121
+ Payload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.Payload").msgclass
122
+ EchoStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.EchoStatus").msgclass
123
+ SimpleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.SimpleRequest").msgclass
124
+ SimpleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.SimpleResponse").msgclass
125
+ StreamingInputCallRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.StreamingInputCallRequest").msgclass
126
+ StreamingInputCallResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.StreamingInputCallResponse").msgclass
127
+ ResponseParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ResponseParameters").msgclass
128
+ StreamingOutputCallRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.StreamingOutputCallRequest").msgclass
129
+ StreamingOutputCallResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.StreamingOutputCallResponse").msgclass
130
+ ReconnectParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ReconnectParams").msgclass
131
+ ReconnectInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ReconnectInfo").msgclass
132
+ LoadBalancerStatsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.LoadBalancerStatsRequest").msgclass
133
+ LoadBalancerStatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.LoadBalancerStatsResponse").msgclass
134
+ LoadBalancerStatsResponse::RpcsByPeer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.LoadBalancerStatsResponse.RpcsByPeer").msgclass
135
+ LoadBalancerAccumulatedStatsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.LoadBalancerAccumulatedStatsRequest").msgclass
136
+ LoadBalancerAccumulatedStatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.LoadBalancerAccumulatedStatsResponse").msgclass
137
+ LoadBalancerAccumulatedStatsResponse::MethodStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats").msgclass
138
+ ClientConfigureRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClientConfigureRequest").msgclass
139
+ ClientConfigureRequest::Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClientConfigureRequest.Metadata").msgclass
140
+ ClientConfigureRequest::RpcType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClientConfigureRequest.RpcType").enummodule
141
+ ClientConfigureResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClientConfigureResponse").msgclass
142
+ PayloadType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.PayloadType").enummodule
143
+ GrpclbRouteType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.GrpclbRouteType").enummodule
144
+ end
145
+ end
@@ -0,0 +1,16 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: src/proto/grpc/testing/test.proto
3
+
4
+ require 'src/proto/grpc/testing/empty_pb'
5
+ require 'src/proto/grpc/testing/messages_pb'
6
+ require 'google/protobuf'
7
+
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("src/proto/grpc/testing/test.proto", :syntax => :proto3) do
10
+ end
11
+ end
12
+
13
+ module Grpc
14
+ module Testing
15
+ end
16
+ end
@@ -0,0 +1,152 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: src/proto/grpc/testing/test.proto for package 'grpc.testing'
3
+ # Original file comments:
4
+ # Copyright 2015-2016 gRPC authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ # An integration test service that covers all the method signature permutations
19
+ # of unary/streaming requests/responses.
20
+ #
21
+
22
+ require 'grpc'
23
+ require 'src/proto/grpc/testing/test_pb'
24
+
25
+ module Grpc
26
+ module Testing
27
+ module TestService
28
+ # A simple service to test the various types of RPCs and experiment with
29
+ # performance with various types of payload.
30
+ class Service
31
+
32
+ include ::GRPC::GenericService
33
+
34
+ self.marshal_class_method = :encode
35
+ self.unmarshal_class_method = :decode
36
+ self.service_name = 'grpc.testing.TestService'
37
+
38
+ # One empty request followed by one empty response.
39
+ rpc :EmptyCall, ::Grpc::Testing::Empty, ::Grpc::Testing::Empty
40
+ # One request followed by one response.
41
+ rpc :UnaryCall, ::Grpc::Testing::SimpleRequest, ::Grpc::Testing::SimpleResponse
42
+ # One request followed by one response. Response has cache control
43
+ # headers set such that a caching HTTP proxy (such as GFE) can
44
+ # satisfy subsequent requests.
45
+ rpc :CacheableUnaryCall, ::Grpc::Testing::SimpleRequest, ::Grpc::Testing::SimpleResponse
46
+ # One request followed by a sequence of responses (streamed download).
47
+ # The server returns the payload with client desired type and sizes.
48
+ rpc :StreamingOutputCall, ::Grpc::Testing::StreamingOutputCallRequest, stream(::Grpc::Testing::StreamingOutputCallResponse)
49
+ # A sequence of requests followed by one response (streamed upload).
50
+ # The server returns the aggregated size of client payload as the result.
51
+ rpc :StreamingInputCall, stream(::Grpc::Testing::StreamingInputCallRequest), ::Grpc::Testing::StreamingInputCallResponse
52
+ # A sequence of requests with each request served by the server immediately.
53
+ # As one request could lead to multiple responses, this interface
54
+ # demonstrates the idea of full duplexing.
55
+ rpc :FullDuplexCall, stream(::Grpc::Testing::StreamingOutputCallRequest), stream(::Grpc::Testing::StreamingOutputCallResponse)
56
+ # A sequence of requests followed by a sequence of responses.
57
+ # The server buffers all the client requests and then serves them in order. A
58
+ # stream of responses are returned to the client when the server starts with
59
+ # first request.
60
+ rpc :HalfDuplexCall, stream(::Grpc::Testing::StreamingOutputCallRequest), stream(::Grpc::Testing::StreamingOutputCallResponse)
61
+ # The test server will not implement this method. It will be used
62
+ # to test the behavior when clients call unimplemented methods.
63
+ rpc :UnimplementedCall, ::Grpc::Testing::Empty, ::Grpc::Testing::Empty
64
+ end
65
+
66
+ Stub = Service.rpc_stub_class
67
+ end
68
+ module UnimplementedService
69
+ # A simple service NOT implemented at servers so clients can test for
70
+ # that case.
71
+ class Service
72
+
73
+ include ::GRPC::GenericService
74
+
75
+ self.marshal_class_method = :encode
76
+ self.unmarshal_class_method = :decode
77
+ self.service_name = 'grpc.testing.UnimplementedService'
78
+
79
+ # A call that no server should implement
80
+ rpc :UnimplementedCall, ::Grpc::Testing::Empty, ::Grpc::Testing::Empty
81
+ end
82
+
83
+ Stub = Service.rpc_stub_class
84
+ end
85
+ module ReconnectService
86
+ # A service used to control reconnect server.
87
+ class Service
88
+
89
+ include ::GRPC::GenericService
90
+
91
+ self.marshal_class_method = :encode
92
+ self.unmarshal_class_method = :decode
93
+ self.service_name = 'grpc.testing.ReconnectService'
94
+
95
+ rpc :Start, ::Grpc::Testing::ReconnectParams, ::Grpc::Testing::Empty
96
+ rpc :Stop, ::Grpc::Testing::Empty, ::Grpc::Testing::ReconnectInfo
97
+ end
98
+
99
+ Stub = Service.rpc_stub_class
100
+ end
101
+ module LoadBalancerStatsService
102
+ # A service used to obtain stats for verifying LB behavior.
103
+ class Service
104
+
105
+ include ::GRPC::GenericService
106
+
107
+ self.marshal_class_method = :encode
108
+ self.unmarshal_class_method = :decode
109
+ self.service_name = 'grpc.testing.LoadBalancerStatsService'
110
+
111
+ # Gets the backend distribution for RPCs sent by a test client.
112
+ rpc :GetClientStats, ::Grpc::Testing::LoadBalancerStatsRequest, ::Grpc::Testing::LoadBalancerStatsResponse
113
+ # Gets the accumulated stats for RPCs sent by a test client.
114
+ rpc :GetClientAccumulatedStats, ::Grpc::Testing::LoadBalancerAccumulatedStatsRequest, ::Grpc::Testing::LoadBalancerAccumulatedStatsResponse
115
+ end
116
+
117
+ Stub = Service.rpc_stub_class
118
+ end
119
+ module XdsUpdateHealthService
120
+ # A service to remotely control health status of an xDS test server.
121
+ class Service
122
+
123
+ include ::GRPC::GenericService
124
+
125
+ self.marshal_class_method = :encode
126
+ self.unmarshal_class_method = :decode
127
+ self.service_name = 'grpc.testing.XdsUpdateHealthService'
128
+
129
+ rpc :SetServing, ::Grpc::Testing::Empty, ::Grpc::Testing::Empty
130
+ rpc :SetNotServing, ::Grpc::Testing::Empty, ::Grpc::Testing::Empty
131
+ end
132
+
133
+ Stub = Service.rpc_stub_class
134
+ end
135
+ module XdsUpdateClientConfigureService
136
+ # A service to dynamically update the configuration of an xDS test client.
137
+ class Service
138
+
139
+ include ::GRPC::GenericService
140
+
141
+ self.marshal_class_method = :encode
142
+ self.unmarshal_class_method = :decode
143
+ self.service_name = 'grpc.testing.XdsUpdateClientConfigureService'
144
+
145
+ # Update the tes client's configuration.
146
+ rpc :Configure, ::Grpc::Testing::ClientConfigureRequest, ::Grpc::Testing::ClientConfigureResponse
147
+ end
148
+
149
+ Stub = Service.rpc_stub_class
150
+ end
151
+ end
152
+ end