Module: Isono::Runner::RpcServer

Defined in:
lib/isono/runner/rpc_server.rb

Overview

Run a new agent which provides RPC endpoint and delayed job.

class RpcEndpoint1 def func1 end end

class RpcEndpoint2 def func2 end end

Isono::Runner::RpcServer.start do endpoint('xxxx1', RpcEndpoint1.new) endpoint('xxxx2', RpcEndpoint2.new) end

mc = MessagingClient.new xxxx1 = mc.rpc('xxxx1') xxxx1.func1

xxxx2 = mc.rpc('xxxx2') xxxx2.func2

Defined Under Namespace

Classes: EndpointBuilder, Server

Constant Summary collapse

DEFAULT_MANIFEST =
Manifest.new(Dir.pwd) do
  load_module NodeModules::EventChannel
  load_module NodeModules::DirectChannel
  load_module NodeModules::RpcChannel
  load_module NodeModules::JobWorker
  load_module NodeModules::JobChannel
end

Class Method Summary collapse

Class Method Details

.start(manifest = nil, opts = {}, &blk) ⇒ Object



168
169
170
171
# File 'lib/isono/runner/rpc_server.rb', line 168

def start(manifest=nil, opts={}, &blk)
  rpcsvr = Server.new(blk)
  rpcsvr.run(manifest)
end