standalone

package
v0.0.0-...-aa40c24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

README

Package standalone gets hardware information about Skolo machines that do not delegate test-running
to an attached or SSH-accessed device.

A Raspberry Pi with no device associated is also technically "standalone". This saves some
complexity. Otherwise, we would have needed to introduce a fourth state ("unattached" or similar) in
the iOS/Android/SSH/standalone enumeration for RPis, which would have opened up the possibility of
mis-targeting tasks by mis-clicking in the machineserver GUI.

A lot of code in this package is platform-specific, so there is one file per platform, and Go's
build-constraint magic examines the file names to pick the right one. See
https://pkg.go.dev/cmd/go#hdr-Build_constraints.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CPUs

func CPUs(ctx context.Context) ([]string, error)

CPUs returns a Swarming-style description of the host's CPU, in all available precisions.

Swarming goes to special trouble on Linux to return "32" if running a 32-bit userland on a 64-bit kernel, we do not. None of our jobs care about that distinction, nor, I think, do any of our boxes run like that.

func GCEMachineType

func GCEMachineType() (string, error)

GCEMachineType returns the GCE machine type.

func GPUs

func GPUs(ctx context.Context) ([]string, error)

GPUs returns a Swarming-style description of all the host's GPUs, in all available precisions, drawn from the lspci commandline util. If lspci is absent, returns an error.

func IsDockerInstalled

func IsDockerInstalled(ctx context.Context) bool

IsDockerInstalled returns true if Docker is installed.

func IsGCEMachine

func IsGCEMachine() bool

IsGCEMachine returns true if running on GCE.

func OSVersions

func OSVersions(ctx context.Context) ([]string, error)

Types

This section is empty.

Directories

Path Synopsis
Package common contains interrogation-related code common to multiple platforms.
Package common contains interrogation-related code common to multiple platforms.
Package linux contains Linux-specific pieces of interrogation which are nonetheless testable on arbitrary platforms.
Package linux contains Linux-specific pieces of interrogation which are nonetheless testable on arbitrary platforms.
Package mac contains Mac-specific pieces of interrogation which are nonetheless testable on arbitrary platforms.
Package mac contains Mac-specific pieces of interrogation which are nonetheless testable on arbitrary platforms.
Package windows contains Windows-specific pieces of interrogation which are nonetheless testable on arbitrary platforms.
Package windows contains Windows-specific pieces of interrogation which are nonetheless testable on arbitrary platforms.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL