Module: RedisRpc

Defined in:
lib/redis_rpc.rb,
lib/redis_rpc/error.rb,
lib/redis_rpc/logic.rb,
lib/redis_rpc/client.rb,
lib/redis_rpc/parser.rb,
lib/redis_rpc/server.rb,
lib/redis_rpc/version.rb,
lib/redis_rpc/callback.rb,
lib/redis_rpc/response.rb

Defined Under Namespace

Classes: Base64Aes, Callback, Client, ClientResponse, FunctionCallbackError, Logic, Parser, Response, Server, SyncHandler

Constant Summary collapse

EXCEPTION_CHANNEL =
:redis_rpc_exception
VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.client(*args) ⇒ Object

Create a new client instance

Parameters:

  • :url (String)

    (value of the environment variable REDIS_URL) a Redis URL, for a TCP connection: ‘redis://:[password]@[hostname]:[port]/[db]` (password, port and database are optional), for a unix socket connection: `unix://[path to Redis socket]`. This overrides all other options.

  • :sub_channel (String)

    a channel to listen.

  • :pub_channel (String)

    a channel to publish.

  • options (Hash)

    a customizable set of options



38
39
40
# File 'lib/redis_rpc.rb', line 38

def client(*args)
  RedisRpc::Client.new *args
end

.server(*args) ⇒ Object

Create a new server instance

Parameters:

  • :url (String)

    (value of the environment variable REDIS_URL) a Redis URL, for a TCP connection: ‘redis://:[password]@[hostname]:[port]/[db]` (password, port and database are optional), for a unix socket connection: `unix://[path to Redis socket]`. This overrides all other options.

  • :sub_channel (String)

    a channel to listen.

  • :pub_channel (String)

    a channel to publish.

  • :front_object (Object)

    The object that handles requests on the server.

  • options (Hash)

    a customizable set of options



25
26
27
# File 'lib/redis_rpc.rb', line 25

def server(*args)
  RedisRpc::Server.new *args
end