system

package
v0.0.0-...-d72ab3e Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommitSHA string

CommitSHA is the commit SHA against which this application was built.

Functions

func ActiveNetworkInterface

func ActiveNetworkInterface() *net.Interface

ActiveNetworkInterface returns an active network interface. Wi-Fi interfaces are preferred over ethernet interfaces.

func CheckUpdate

func CheckUpdate(mutexes *Mutexes, machine *labcloud.Machine, node *labcloud.Node)

CheckUpdate will check the latest commit against the current commit. It will run the Update function if the commits are different.

func HandleSignals

func HandleSignals(mutexes *Mutexes)

HandleSignals handles process interrupt signals.

func NormalizeMAC

func NormalizeMAC(rawMAC *net.HardwareAddr) string

NormalizeMAC returns are normalized MAC address. That is, the MAC address will not contain any colons and it will be capitalized.

func Serial

func Serial() string

Serial is a mock for reading the systems serial number. It will return the serial number specified in the MOCK_SERIAL environment variable in the ".env" file.

Types

type Mutexes

type Mutexes struct {
	Update     sync.Mutex
	Node       sync.Mutex
	Session    sync.Mutex
	Machine    sync.Mutex
	User       sync.Mutex
	Permission sync.Mutex
}

Mutexes controls access to shared state within the application.

Jump to

Keyboard shortcuts

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