Sha256: 2740b016175a0b3b104c703788c2fcd21984c022c90bae751f36fb62e44fa829
Contents?: true
Size: 710 Bytes
Versions: 1
Compression:
Stored size: 710 Bytes
Contents
require 'redis' require 'errors/errors' require 'modules/performance_stats' require 'forwardable' module RedisMonitor class Backend extend SingleForwardable def_delegators :redis, :get, :set, :del, :info, :keys, :dbsize, :monitor def self.config(arguments) @@host = arguments[:redis_host] @@port = arguments[:redis_port] end def self.host @@host end def self.port @@port end def self.redis @@redis ||= Redis.new(:host => host, :port => port) end def self.performance_stats PerformanceStats.new(self).results end def self.search(key) keys(key).map{|found| {key: found, value: get(found)} } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
redis_monitor-0.0.5 | lib/modules/backend.rb |