Class: Monittr::Cluster

Inherits:
Object
  • Object
show all
Defined in:
lib/monittr.rb

Overview

Represents a cluster of monitored instances. Pass and array of URLs to the constructor.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(urls = []) ⇒ Cluster

Returns a new instance of Cluster.



14
15
16
# File 'lib/monittr.rb', line 14

def initialize(urls=[])
  @servers = urls.map { |url| Server.fetch(url) }
end

Instance Attribute Details

#serversObject (readonly)

Returns the value of attribute servers.



12
13
14
# File 'lib/monittr.rb', line 12

def servers
  @servers
end