Class: RedisProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/redis-proxy.rb

Class Method Summary collapse

Class Method Details

.start(redis_config, host = "0.0.0.0", port = 6379, options = {}) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/redis-proxy.rb', line 7

def self.start(redis_config, host = "0.0.0.0", port = 6379, options = {})
  EventMachine.epoll
  EventMachine.run do
    puts "Starting up redis proxy server"
    EventMachine.start_server host, port, RedisProxyServer, redis_config
  end
end

.stopObject



15
16
17
18
# File 'lib/redis-proxy.rb', line 15

def self.stop
  puts "Terminating redis proxy server"
  EventMachine.stop
end