Documentation ¶
Overview ¶
Package common contains interrogation-related code common to multiple platforms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CPUs ¶
CPUs is the brains behind various platform-specific CPUs() functions, broken off for testing. It takes the vendor name (e.g. "GenuineIntel", "AuthenticAMD") and a "brand string", which is a model signifier whose format is vendor-specific (e.g. "Intel(R) Xeon(R) CPU @ 2.00GHz", "AMD EPYC 7B12"), and returns a Swarming-style description of the host's CPU, in various precisions, e.g. ["x86", "x86-64", "x86-64-i5-5350U"]. The first (ISA) and second (bit width) will always be returned (if returned error is nil). The third (model number) will be added if we succeed in extracting it.
Swarming counterpart: https://chromium.googlesource.com/infra/luci/luci-py/+/c3bea95091caef1800d102bae28dfc715a4043bc/appengine/swarming/swarming_bot/api/os_utilities.py#323
func GCEMachineType ¶
GCEMachineType returns the machine type reported by the metadata server. Returns the empty string if not running on GCE.
func IsDockerInstalled ¶
IsDockerInstalled returns true if Docker is installed.
func VersionsOfAllPrecisions ¶
VersionsOfAllPrecisions splits a version like 1.2.3 into an array of versions of all precisions and prepends a constant prefix, resulting in a string slice like {"Mac", "Mac-1", "Mac-1.2", "Mac-1.2.3"}. If version is empty, return only the prefix, like {"Mac"}.
Types ¶
This section is empty.