Class: Hoss::Metadata::SystemInfo Private

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#architectureObject (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

#containerObject (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

#hostnameObject (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

#kubernetesObject (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

#platformObject (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