class RPCBench::GRPC::Server

Public Class Methods

handler() click to toggle source
# File lib/rpc_bench/driver_grpc.rb, line 76
def self.handler
  @@handler
end
new(opts) click to toggle source
# File lib/rpc_bench/driver_grpc.rb, line 72
def initialize opts
  @opts = opts
end

Public Instance Methods

run() click to toggle source
# File lib/rpc_bench/driver_grpc.rb, line 80
def run
  @@handler = @handler

  s = ::GRPC::RpcServer.new
  s.add_http2_port("#{@opts[:host]}:#{@opts[:port]}", :this_port_is_insecure)
  s.handle(MyCalc)
  s.run_till_terminated
end