Class: Hoss::Metadata::SystemInfo Private
- Inherits:
-
Object
- Object
- Hoss::Metadata::SystemInfo
- Defined in:
- lib/hoss/metadata/system_info.rb,
lib/hoss/metadata/system_info/container_info.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: ContainerInfo
Instance Attribute Summary collapse
- #architecture ⇒ Object readonly private
- #container ⇒ Object readonly private
- #hostname ⇒ Object readonly private
- #kubernetes ⇒ Object readonly private
- #platform ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(config) ⇒ SystemInfo
constructor
private
A new instance of SystemInfo.
Constructor Details
#initialize(config) ⇒ SystemInfo
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SystemInfo.
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/hoss/metadata/system_info.rb', line 24 def initialize(config) @config = config @hostname = @config.hostname || `hostname`.chomp @architecture = gem_platform.cpu @platform = gem_platform.os container_info = ContainerInfo.read! @container = container_info.container @kubernetes = container_info.kubernetes end |
Instance Attribute Details
#architecture ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/hoss/metadata/system_info.rb', line 36 def architecture @architecture end |
#container ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/hoss/metadata/system_info.rb', line 36 def container @container end |
#hostname ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/hoss/metadata/system_info.rb', line 36 def hostname @hostname end |
#kubernetes ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/hoss/metadata/system_info.rb', line 36 def kubernetes @kubernetes end |
#platform ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/hoss/metadata/system_info.rb', line 36 def platform @platform end |