Class: EchoService
- Inherits:
-
Object
- Object
- EchoService
- Includes:
- GRPC::GenericService
- Defined in:
- src/ruby/spec/channel_connection_spec.rb,
src/ruby/spec/generic/rpc_server_spec.rb
Overview
A test service with an echo implementation.
Instance Attribute Summary collapse
-
#received_md ⇒ Object
readonly
Returns the value of attribute received_md.
Instance Method Summary collapse
- #an_rpc(req, call) ⇒ Object
-
#initialize(**kw) ⇒ EchoService
constructor
A new instance of EchoService.
Methods included from GRPC::GenericService
Constructor Details
#initialize(**kw) ⇒ EchoService
Returns a new instance of EchoService.
49 50 51 52 |
# File 'src/ruby/spec/channel_connection_spec.rb', line 49 def initialize(**kw) = kw @received_md = [] end |
Instance Attribute Details
#received_md ⇒ Object (readonly)
Returns the value of attribute received_md.
47 48 49 |
# File 'src/ruby/spec/channel_connection_spec.rb', line 47 def received_md @received_md end |
Instance Method Details
#an_rpc(req, call) ⇒ Object
54 55 56 57 58 59 |
# File 'src/ruby/spec/channel_connection_spec.rb', line 54 def an_rpc(req, call) GRPC.logger.info('echo service received a request') call..update() @received_md << call. unless call..nil? req end |