Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNodeIP ¶
func GetNodeIP() string
GetNodeIP fetches node ip via command hostname. If it fails to get this, return empty string directly.
func GetOSName ¶
GetOSName gets data in /etc/os-release and gets OS name. For example, in a Ubuntu host, fetched data are like: root@i-8brpbc9t:~# cat /etc/os-release NAME="Ubuntu" VERSION="16.04.2 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.2 LTS" VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial
func GetSerialNumber ¶
func GetSerialNumber() string
GetSerialNumber gets serial number or a machine.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.