Class: CheckCallAfterFinishedService
- Inherits:
-
Object
- Object
- CheckCallAfterFinishedService
- Includes:
- GRPC::GenericService
- Defined in:
- src/ruby/spec/generic/rpc_server_spec.rb
Overview
a test service that hangs onto call objects and uses them after the server-side call has been finished
Instance Attribute Summary collapse
-
#server_side_call ⇒ Object
readonly
Returns the value of attribute server_side_call.
Instance Method Summary collapse
- #a_bidi_rpc(requests, call) ⇒ Object
- #a_client_streaming_rpc(call) ⇒ Object
- #a_server_streaming_rpc(_, call) ⇒ Object
- #an_rpc(req, call) ⇒ Object
Methods included from GRPC::GenericService
Instance Attribute Details
#server_side_call ⇒ Object (readonly)
Returns the value of attribute server_side_call.
149 150 151 |
# File 'src/ruby/spec/generic/rpc_server_spec.rb', line 149 def server_side_call @server_side_call end |
Instance Method Details
#a_bidi_rpc(requests, call) ⇒ Object
171 172 173 174 175 176 |
# File 'src/ruby/spec/generic/rpc_server_spec.rb', line 171 def a_bidi_rpc(requests, call) fail 'shouldnt reuse service' unless @server_side_call.nil? @server_side_call = call requests.each { |r| p r } [EchoMsg.new, EchoMsg.new] end |
#a_client_streaming_rpc(call) ⇒ Object
157 158 159 160 161 162 163 |
# File 'src/ruby/spec/generic/rpc_server_spec.rb', line 157 def a_client_streaming_rpc(call) fail 'shouldnt reuse service' unless @server_side_call.nil? @server_side_call = call # iterate through requests so call can complete call.each_remote_read.each { |r| p r } EchoMsg.new end |
#a_server_streaming_rpc(_, call) ⇒ Object
165 166 167 168 169 |
# File 'src/ruby/spec/generic/rpc_server_spec.rb', line 165 def a_server_streaming_rpc(_, call) fail 'shouldnt reuse service' unless @server_side_call.nil? @server_side_call = call [EchoMsg.new, EchoMsg.new] end |
#an_rpc(req, call) ⇒ Object
151 152 153 154 155 |
# File 'src/ruby/spec/generic/rpc_server_spec.rb', line 151 def an_rpc(req, call) fail 'shouldnt reuse service' unless @server_side_call.nil? @server_side_call = call req end |