constants

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultName   = "crc"
	DefaultCPUs   = 4
	DefaultMemory = 9216

	DefaultSSHUser = "core"

	CrcEnvPrefix = "CRC"

	DefaultWebConsoleURL = "https://console-openshift-console.apps-crc.testing"
	DefaultAPIURL        = "https://api.crc.testing:6443"
	DefaultLogLevel      = "info"
	ConfigFile           = "crc.json"
	LogFile              = "crc.log"
	DaemonLogFile        = "crcd.log"
	CrcLandingPageURL    = "https://cloud.redhat.com/openshift/install/crc/installer-provisioned" // #nosec G101

	DefaultOcURLBase          = "https://mirror.openshift.com/pub/openshift-v4/clients/ocp"
	DefaultPodmanURLBase      = "https://storage.googleapis.com/libpod-master-releases"
	DefaultGoodhostsCliBase   = "https://github.com/code-ready/goodhosts-cli/releases/download/v1.0.0"
	CRCMacTrayDownloadURL     = "https://github.com/code-ready/tray-macos/releases/download/v%s/crc-tray-macos.tar.gz"
	CRCWindowsTrayDownloadURL = "https://github.com/code-ready/tray-windows/releases/download/v%s/crc-tray-windows.zip"
	DefaultContext            = "admin"
)
View Source
const (
	OcBinaryName        = "oc"
	PodmanBinaryName    = "podman"
	GoodhostsBinaryName = "goodhosts"
)

Variables

View Source
var (
	CrcBaseDir         = filepath.Join(GetHomeDir(), ".crc")
	CrcBinDir          = filepath.Join(CrcBaseDir, "bin")
	CrcOcBinDir        = filepath.Join(CrcBinDir, "oc")
	ConfigPath         = filepath.Join(CrcBaseDir, ConfigFile)
	LogFilePath        = filepath.Join(CrcBaseDir, LogFile)
	DaemonLogFilePath  = filepath.Join(CrcBaseDir, DaemonLogFile)
	MachineBaseDir     = CrcBaseDir
	MachineCertsDir    = filepath.Join(MachineBaseDir, "certs")
	MachineCacheDir    = filepath.Join(MachineBaseDir, "cache")
	MachineInstanceDir = filepath.Join(MachineBaseDir, "machines")
	DefaultBundlePath  = filepath.Join(MachineCacheDir, GetDefaultBundle())
	DaemonSocketPath   = filepath.Join(CrcBaseDir, "crc.sock")
)

Functions

func BundleEmbedded

func BundleEmbedded() bool

IsBundleEmbedded returns true if the binary was compiled to contain the bundle

func EnsureBaseDirExists

func EnsureBaseDirExists() error

EnsureBaseDirExists create the ~/.crc dir if its not there

func GetCRCMacTrayDownloadURL added in v1.15.0

func GetCRCMacTrayDownloadURL() string

TODO: follow the same pattern as oc and podman above

func GetCRCWindowsTrayDownloadURL added in v1.11.0

func GetCRCWindowsTrayDownloadURL() string

func GetDefaultBundle

func GetDefaultBundle() string

func GetDefaultBundleForOs

func GetDefaultBundleForOs(os string) string

func GetGoodhostsURL added in v1.14.0

func GetGoodhostsURL() string

func GetGoodhostsURLForOs added in v1.14.0

func GetGoodhostsURLForOs(os string) string

func GetHomeDir

func GetHomeDir() string

GetHomeDir returns the home directory for the current user

func GetOcURL added in v1.14.0

func GetOcURL() string

func GetOcURLForOs added in v1.14.0

func GetOcURLForOs(os string) string

func GetPodmanURL added in v1.14.0

func GetPodmanURL() string

func GetPodmanURLForOs added in v1.14.0

func GetPodmanURLForOs(os string) string

func GetPrivateKeyPath

func GetPrivateKeyPath() string

func GetPublicKeyPath

func GetPublicKeyPath() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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