Class: Atatus::Metadata::SystemInfo Private
- Inherits:
 - 
      Object
      
        
- Object
 - Atatus::Metadata::SystemInfo
 
 
- Defined in:
 - lib/atatus/metadata/system_info.rb,
lib/atatus/metadata/system_info/hw_info.rb,
lib/atatus/metadata/system_info/os_info.rb,
lib/atatus/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, HWInfo, OSInfo
Instance Attribute Summary collapse
- #architecture ⇒ Object readonly private
 - #configured_hostname ⇒ Object readonly private
 - #container ⇒ Object readonly private
 - #detected_hostname ⇒ Object readonly private
 - #hostname ⇒ Object readonly private
 - #hwinfo ⇒ Object readonly private
 - #kubernetes ⇒ Object readonly private
 - #osinfo ⇒ Object readonly private
 - #platform ⇒ Object readonly private
 
Instance Method Summary collapse
- #gem_platform ⇒ Object private
 - 
  
    
      #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 35 36 37 38 39  | 
    
      # File 'lib/atatus/metadata/system_info.rb', line 24 def initialize(config) @config = config @configured_hostname = @config.hostname @detected_hostname = detect_hostname @hostname = @configured_hostname || @detected_hostname @architecture = gem_platform.cpu @platform = gem_platform.os container_info = ContainerInfo.read!(@detected_hostname) @container = container_info.container @kubernetes = container_info.kubernetes @hwinfo = HWInfo.read! @osinfo = OSInfo.read! 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.
      41 42 43  | 
    
      # File 'lib/atatus/metadata/system_info.rb', line 41 def architecture @architecture end  | 
  
#configured_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.
      41 42 43  | 
    
      # File 'lib/atatus/metadata/system_info.rb', line 41 def configured_hostname @configured_hostname 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.
      41 42 43  | 
    
      # File 'lib/atatus/metadata/system_info.rb', line 41 def container @container end  | 
  
#detected_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.
      41 42 43  | 
    
      # File 'lib/atatus/metadata/system_info.rb', line 41 def detected_hostname @detected_hostname 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.
      41 42 43  | 
    
      # File 'lib/atatus/metadata/system_info.rb', line 41 def hostname @hostname end  | 
  
#hwinfo ⇒ 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.
      41 42 43  | 
    
      # File 'lib/atatus/metadata/system_info.rb', line 41 def hwinfo @hwinfo 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.
      41 42 43  | 
    
      # File 'lib/atatus/metadata/system_info.rb', line 41 def kubernetes @kubernetes end  | 
  
#osinfo ⇒ 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.
      41 42 43  | 
    
      # File 'lib/atatus/metadata/system_info.rb', line 41 def osinfo @osinfo 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.
      41 42 43  | 
    
      # File 'lib/atatus/metadata/system_info.rb', line 41 def platform @platform end  | 
  
Instance Method Details
#gem_platform ⇒ Object
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.
      53 54 55  | 
    
      # File 'lib/atatus/metadata/system_info.rb', line 53 def gem_platform @gem_platform ||= Gem::Platform.local end  |