Class: ProcessorInstanceInfo
- Inherits:
-
Object
- Object
- ProcessorInstanceInfo
- Defined in:
- lib/processor/processor_instance_info.rb
Class Method Summary collapse
- .host_name ⇒ Object
- .server_host_name ⇒ Object
- .server_pool_bucket ⇒ Object
- .storage_bucket ⇒ Object
Class Method Details
.host_name ⇒ Object
4 5 6 7 |
# File 'lib/processor/processor_instance_info.rb', line 4 def self.host_name @@host_name ||= open('http://169.254.169.254/latest/meta-data/public-hostname').read @@host_name end |
.server_host_name ⇒ Object
14 15 16 17 |
# File 'lib/processor/processor_instance_info.rb', line 14 def self.server_host_name @@server_host_name ||= open('http://169.254.169.254/latest/user-data').read.split('|')[1] @@server_host_name end |
.server_pool_bucket ⇒ Object
9 10 11 12 |
# File 'lib/processor/processor_instance_info.rb', line 9 def self.server_pool_bucket @@server_pool_bucket ||= open('http://169.254.169.254/latest/user-data').read.split('|')[0] @@server_pool_bucket end |
.storage_bucket ⇒ Object
19 20 21 22 |
# File 'lib/processor/processor_instance_info.rb', line 19 def self.storage_bucket @@storage_bucket ||= open('http://169.254.169.254/latest/user-data').read.split('|')[2] @@storage_bucket end |