Module: Ciclope
- Defined in:
- lib/ciclope.rb,
lib/ciclope/host.rb,
lib/ciclope/ring.rb,
lib/ciclope/version.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.0.5"
Class Attribute Summary collapse
-
.auto_sort_connections ⇒ Object
Returns the value of attribute auto_sort_connections.
-
.connections ⇒ Object
Returns the value of attribute connections.
Class Method Summary collapse
- .auto_sort? ⇒ Boolean
- .replication_seconds_behind_master ⇒ Object
- .replication_status ⇒ Object
- .ring ⇒ Object
Class Attribute Details
.auto_sort_connections ⇒ Object
Returns the value of attribute auto_sort_connections.
8 9 10 |
# File 'lib/ciclope.rb', line 8 def auto_sort_connections @auto_sort_connections end |
.connections ⇒ Object
Returns the value of attribute connections.
8 9 10 |
# File 'lib/ciclope.rb', line 8 def connections @connections end |
Class Method Details
.auto_sort? ⇒ Boolean
12 13 14 |
# File 'lib/ciclope.rb', line 12 def self.auto_sort? auto_sort_connections end |
.replication_seconds_behind_master ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/ciclope.rb', line 24 def self.replication_seconds_behind_master out = ring.hosts.map do |host| host.name + " ––– #{host.seconds_behind_master} seconds –––> " end out << ring.hosts.first.name out.join end |
.replication_status ⇒ Object
20 21 22 |
# File 'lib/ciclope.rb', line 20 def self.replication_status ring.hosts.map &:status end |