Class: GrpcKit::Rpcs::Server::ClientStreamer
- Inherits:
-
GrpcKit::Rpcs::ServerRpc
- Object
- GrpcKit::Rpcs::ServerRpc
- GrpcKit::Rpcs::Server::ClientStreamer
- Defined in:
- lib/grpc_kit/rpcs/server_client_streamer.rb
Instance Method Summary collapse
Methods inherited from GrpcKit::Rpcs::ServerRpc
Constructor Details
This class inherits a constructor from GrpcKit::Rpcs::ServerRpc
Instance Method Details
#invoke(stream, metadata: {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/grpc_kit/rpcs/server_client_streamer.rb', line 9 def invoke(stream, metadata: {}) call = GrpcKit::Calls::Server::ClientStreamer.new(metadata: , config: @config, stream: stream) if @config.interceptor @config.interceptor.intercept(call) do |c| resp = @handler.send(@config.ruby_style_method_name, c) c.send_msg(resp, last: true) end else resp = @handler.send(@config.ruby_style_method_name, call) call.send_msg(resp, last: true) end end |