Class: Cloudscale::Monitor::Registry
- Inherits:
-
Object
- Object
- Cloudscale::Monitor::Registry
- Includes:
- Singleton
- Defined in:
- lib/cloudscale/registry.rb
Instance Attribute Summary collapse
-
#metrics ⇒ Object
Returns the value of attribute metrics.
-
#stored_agent ⇒ Object
Returns the value of attribute stored_agent.
Instance Method Summary collapse
- #agent_instance_id ⇒ Object
-
#initialize ⇒ Registry
constructor
A new instance of Registry.
- #stored_agent_instance ⇒ Object
Constructor Details
Instance Attribute Details
#metrics ⇒ Object
Returns the value of attribute metrics.
16 17 18 |
# File 'lib/cloudscale/registry.rb', line 16 def metrics @metrics end |
#stored_agent ⇒ Object
Returns the value of attribute stored_agent.
16 17 18 |
# File 'lib/cloudscale/registry.rb', line 16 def stored_agent @stored_agent end |
Instance Method Details
#agent_instance_id ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/cloudscale/registry.rb', line 23 def agent_instance_id agent_config = Constants::AgentInstance.load if agent_config != nil then instance_id = agent_config["agentInstanceId"] end if (instance_id == nil) return SecureRandom.hex else return instance_id end end |
#stored_agent_instance ⇒ Object
35 36 37 |
# File 'lib/cloudscale/registry.rb', line 35 def stored_agent_instance Constants::AgentInstance.load end |