Class: RedisWebManager::Info
- Inherits:
-
Base
- Object
- Base
- RedisWebManager::Info
show all
- Defined in:
- lib/redis_web_manager/info.rb
Instance Attribute Summary
Attributes inherited from Base
#instance
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#clients ⇒ Object
61
62
63
|
# File 'lib/redis_web_manager/info.rb', line 61
def clients
@clients ||= redis.client(:list)
end
|
#configuration ⇒ Object
57
58
59
|
# File 'lib/redis_web_manager/info.rb', line 57
def configuration
@configuration ||= redis.config(:get, '*')
end
|
#dbsize ⇒ Object
53
54
55
|
# File 'lib/redis_web_manager/info.rb', line 53
def dbsize
@dbsize ||= redis.dbsize
end
|
#expiry(key) ⇒ Object
21
22
23
|
# File 'lib/redis_web_manager/info.rb', line 21
def expiry(key)
redis.ttl(key)
end
|
#get(key) ⇒ Object
29
30
31
|
# File 'lib/redis_web_manager/info.rb', line 29
def get(key)
redis.get(key)
end
|
#hgetall(key) ⇒ Object
49
50
51
|
# File 'lib/redis_web_manager/info.rb', line 49
def hgetall(key)
redis.hgetall(key)
end
|
#llen(key) ⇒ Object
33
34
35
|
# File 'lib/redis_web_manager/info.rb', line 33
def llen(key)
redis.llen(key)
end
|
#lrange(key, start, stop) ⇒ Object
37
38
39
|
# File 'lib/redis_web_manager/info.rb', line 37
def lrange(key, start, stop)
redis.lrange(key, start, stop)
end
|
#memory_usage(key) ⇒ Object
25
26
27
|
# File 'lib/redis_web_manager/info.rb', line 25
def memory_usage(key)
redis.memory(:usage, key)
end
|
#search(query) ⇒ Object
13
14
15
|
# File 'lib/redis_web_manager/info.rb', line 13
def search(query)
redis.scan_each(match: "*#{query}*").to_a
end
|
#smembers(key) ⇒ Object
41
42
43
|
# File 'lib/redis_web_manager/info.rb', line 41
def smembers(key)
redis.smembers(key)
end
|
#stats ⇒ Object
9
10
11
|
# File 'lib/redis_web_manager/info.rb', line 9
def stats
@stats ||= redis.info
end
|
#status ⇒ Object
5
6
7
|
# File 'lib/redis_web_manager/info.rb', line 5
def status
@status ||= redis.ping == 'PONG'
end
|
#type(key) ⇒ Object
17
18
19
|
# File 'lib/redis_web_manager/info.rb', line 17
def type(key)
redis.type(key)
end
|
#zrange(key, start, stop, options = {}) ⇒ Object
45
46
47
|
# File 'lib/redis_web_manager/info.rb', line 45
def zrange(key, start, stop, options = {})
redis.zrange(key, start, stop, options)
end
|