Class: Redis::Bin::RubyRedisServer
- Inherits:
-
EventMachine::Connection
- Object
- EventMachine::Connection
- Redis::Bin::RubyRedisServer
- Includes:
- Connection, Protocol, Sender, Strict
- Defined in:
- lib/redis/bin.rb
Instance Method Summary collapse
- #authorized(password) ⇒ Object
-
#initialize(logger, databases, config = {}) ⇒ RubyRedisServer
constructor
A new instance of RubyRedisServer.
- #post_init ⇒ Object
Methods included from Sender
Methods included from Protocol
#receive_data, #redis_DISCARD, #redis_EXEC, #redis_MULTI, #redis_UNWATCH, #redis_WATCH, #unbind
Methods included from Connection
#redis_AUTH, #redis_ECHO, #redis_PING, #redis_QUIT, #redis_SELECT
Methods included from Strict
Methods included from NotStrict
#redis_f, #redis_i, #redis_pos_i, #redis_t
Constructor Details
#initialize(logger, databases, config = {}) ⇒ RubyRedisServer
Returns a new instance of RubyRedisServer.
16 17 18 19 20 21 22 |
# File 'lib/redis/bin.rb', line 16 def initialize logger, databases, config={} @logger = logger @databases = databases @database = databases[0] @config = config super end |
Instance Method Details
#authorized(password) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/redis/bin.rb', line 29 def password return true if @authorized return false unless @config[:requirepass] == password extend Server extend Keys extend Strings extend Lists extend Sets extend ZSets extend Hashes extend PubSub @authorized = true end |
#post_init ⇒ Object
24 25 26 27 |
# File 'lib/redis/bin.rb', line 24 def post_init nil set_comm_inactivity_timeout @config[:timeout] end |