constants

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LowDiskLimit sets the warning level of low disk (in bytes)
	LowDiskLimit uint64 = 50 * 1024 * 1024 * 1024 // 50 Gb

	// AbittiVagrantURL is the URL for the Abittti Vagrantfile
	AbittiVagrantURL = "http://static.abitti.fi/usbimg/qa/vagrant/Vagrantfile"

	// URLTest is a testing URL for network connectivity (network.CheckIfNetworkAvailable).
	// Point this to something ultra-stable
	URLTest = "http://static.abitti.fi/usbimg/qa/latest.txt"

	// URLTestTimeout is the timeout in seconds for the test above
	URLTestTimeout = 4

	// VagrantBoxAvailVersionDetailsCacheTimeout is a timeout for vagrant box version
	// cache. See naksu/boxversion GetVagrantBoxAvailVersionDetails() for more
	// In seconds (5 minutes)
	VagrantBoxAvailVersionDetailsCacheTimeout int64 = 5 * 60

	// VBoxManageCacheTimeout is a timeout for executing VBoxManage showvminfo
	// See naksu/box getVMInfoRegexp()
	VBoxManageCacheTimeout int64 = 15

	// LogCopyRequestFilename is for requesting logs from ktp
	LogCopyRequestFilename = "_log_copy_requested"
	// LogCopyDoneFilename is for detecting when log request is done
	LogCopyDoneFilename = "_log_copy_done"
	// LogCopyStatusFilename is for progress info on log copying
	LogCopyStatusFilename = "_log_copy_status"

	// LogRequestTimeout is the timeout for log request from ktp
	LogRequestTimeout = 1 * time.Minute
)

Variables

View Source
var AvailableLangs = []AvailableSelection{
	AvailableSelection{
		ConfigValue: "fi",
		Legend:      "Suomeksi",
	},
	AvailableSelection{
		ConfigValue: "sv",
		Legend:      "På svenska",
	},
	AvailableSelection{
		ConfigValue: "en",
		Legend:      "In English",
	},
}

AvailableLangs is an array of possible language selection values. The first value is the default.

View Source
var AvailableNics = []AvailableSelection{
	AvailableSelection{
		ConfigValue: "virtio",
		Legend:      "virtio",
	},
	AvailableSelection{
		ConfigValue: "Am79C970A",
		Legend:      "Am79C970A",
	},
	AvailableSelection{
		ConfigValue: "Am79C973",
		Legend:      "Am79C973",
	},
	AvailableSelection{
		ConfigValue: "82540EM",
		Legend:      "82540EM",
	},
	AvailableSelection{
		ConfigValue: "82543GC",
		Legend:      "82543GC",
	},
	AvailableSelection{
		ConfigValue: "82545EM",
		Legend:      "82545EM",
	},
}

AvailableNics is an array of possible NIC selection values. The first value is the default.

View Source
var DefaultExtNicArray = []AvailableSelection{
	AvailableSelection{
		ConfigValue: "",
		Legend:      "Select in terminal",
	},
}

DefaultExtNicArray is an array holding the default EXTNIC value

Functions

func GetAvailableSelectionID added in v1.9.0

func GetAvailableSelectionID(configValue string, choices []AvailableSelection, valueIfNotFound int) int

GetAvailableSelectionID returns array id for a given ConfigValue in the given set of choices. Returns -1 if the configValue was not found.

Types

type AvailableSelection added in v1.9.0

type AvailableSelection struct {
	ConfigValue string
	Legend      string
}

AvailableSelection is a struct for a UI/configuration option

Jump to

Keyboard shortcuts

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