Module: RedisWebManager::ClientsHelper

Defined in:
app/helpers/redis_web_manager/clients_helper.rb

Instance Method Summary collapse

Instance Method Details

#age(value) ⇒ Object



5
6
7
# File 'app/helpers/redis_web_manager/clients_helper.rb', line 5

def age(value)
  time_ago_in_words(Time.now - value.seconds).humanize
end

#events(value) ⇒ Object



28
29
30
31
32
33
# File 'app/helpers/redis_web_manager/clients_helper.rb', line 28

def events(value)
  {
    r: 'The client socket is readable',
    w: 'The client socket is writable'
  }[value.to_sym]
end

#flags(value) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/helpers/redis_web_manager/clients_helper.rb', line 9

def flags(value)
  {
    A: 'Connection to be closed ASAP',
    b: 'The client is waiting in a blocking operation',
    c: 'Connection to be closed after writing entire reply',
    d: 'A watched keys has been modified - EXEC will fail',
    i: 'The client is waiting for a VM I/O (deprecated)',
    M: 'The client is a master',
    N: 'No specific flag set',
    O: 'The client is a client in MONITOR mode',
    P: 'The client is a Pub/Sub subscriber',
    r: 'The client is in readonly mode against a cluster node',
    S: 'The client is a replica node connection to this instance',
    u: 'The client is unblocked',
    U: 'The client is connected via a Unix domain socket',
    X: 'The client is in a MULTI/EXEC context'
  }[value.to_sym]
end