Method: GRPC::RpcServer#implemented?
- Defined in:
- src/ruby/lib/grpc/generic/rpc_server.rb
#implemented?(an_rpc) ⇒ Boolean
Sends UNIMPLEMENTED if the method is not implemented by this server
433 434 435 436 437 438 439 440 441 442 443 444 445 |
# File 'src/ruby/lib/grpc/generic/rpc_server.rb', line 433 def implemented?(an_rpc) mth = an_rpc.method.to_sym return an_rpc if rpc_descs.key?(mth) GRPC.logger.warn("UNIMPLEMENTED: #{an_rpc}") noop = proc { |x| x } # Create a new active call that knows that # metadata hasn't been sent yet c = ActiveCall.new(an_rpc.call, noop, noop, an_rpc.deadline, metadata_received: true, started: false) c.send_status(GRPC::Core::StatusCodes::UNIMPLEMENTED, '') nil end |