Class: RedisClient::Cluster::Node::Info
- Inherits:
-
Struct
- Object
- Struct
- RedisClient::Cluster::Node::Info
- Defined in:
- lib/redis_client/cluster/node.rb
Instance Attribute Summary collapse
-
#config_epoch ⇒ Object
Returns the value of attribute config_epoch.
-
#id ⇒ Object
Returns the value of attribute id.
-
#link_state ⇒ Object
Returns the value of attribute link_state.
-
#node_key ⇒ Object
Returns the value of attribute node_key.
-
#ping_sent ⇒ Object
Returns the value of attribute ping_sent.
-
#pong_recv ⇒ Object
Returns the value of attribute pong_recv.
-
#primary_id ⇒ Object
Returns the value of attribute primary_id.
-
#role ⇒ Object
Returns the value of attribute role.
-
#slots ⇒ Object
Returns the value of attribute slots.
Instance Method Summary collapse
Instance Attribute Details
#config_epoch ⇒ Object
Returns the value of attribute config_epoch
29 30 31 |
# File 'lib/redis_client/cluster/node.rb', line 29 def config_epoch @config_epoch end |
#id ⇒ Object
Returns the value of attribute id
29 30 31 |
# File 'lib/redis_client/cluster/node.rb', line 29 def id @id end |
#link_state ⇒ Object
Returns the value of attribute link_state
29 30 31 |
# File 'lib/redis_client/cluster/node.rb', line 29 def link_state @link_state end |
#node_key ⇒ Object
Returns the value of attribute node_key
29 30 31 |
# File 'lib/redis_client/cluster/node.rb', line 29 def node_key @node_key end |
#ping_sent ⇒ Object
Returns the value of attribute ping_sent
29 30 31 |
# File 'lib/redis_client/cluster/node.rb', line 29 def ping_sent @ping_sent end |
#pong_recv ⇒ Object
Returns the value of attribute pong_recv
29 30 31 |
# File 'lib/redis_client/cluster/node.rb', line 29 def pong_recv @pong_recv end |
#primary_id ⇒ Object
Returns the value of attribute primary_id
29 30 31 |
# File 'lib/redis_client/cluster/node.rb', line 29 def primary_id @primary_id end |
#role ⇒ Object
Returns the value of attribute role
29 30 31 |
# File 'lib/redis_client/cluster/node.rb', line 29 def role @role end |
#slots ⇒ Object
Returns the value of attribute slots
29 30 31 |
# File 'lib/redis_client/cluster/node.rb', line 29 def slots @slots end |
Instance Method Details
#primary? ⇒ Boolean
35 36 37 |
# File 'lib/redis_client/cluster/node.rb', line 35 def primary? role == 'master' end |
#replica? ⇒ Boolean
39 40 41 |
# File 'lib/redis_client/cluster/node.rb', line 39 def replica? role == 'slave' end |