util

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpProxy  = "http-proxy"
	HttpsProxy = "https-proxy"
	AddOnEnv   = "addon-env"
)

Variables

View Source
var (
	BooleanFormatError  = errors.New("Invalid format for boolean value.")
	BooleanNoValueError = errors.New("No value given.")
)
View Source
var AddOnEnvFlag = &flag.Flag{
	Name:      AddOnEnv,
	Shorthand: "a",
	Usage:     "Specify key-value pairs to be added to the add-on interpolation context.",
	Value:     NewStringSliceValue([]string{}, &[]string{}),
}
View Source
var (
	DefaultAssets = []string{"anyuid", "admin-user", "xpaas"}
)
View Source
var HttpProxyFlag = &flag.Flag{
	Name:      HttpProxy,
	Shorthand: "",
	Usage:     "HTTP proxy in the format http://<username>:<password>@<proxy_host>:<proxy_port>. Overrides potential HTTP_PROXY setting in the environment.",
	Value:     NewStringValue("", new(string)),
	DefValue:  "",
}
View Source
var HttpsProxyFlag = &flag.Flag{
	Name:      HttpsProxy,
	Shorthand: "",
	Usage:     "HTTPS proxy in the format https://<username>:<password>@<proxy_host>:<proxy_port>. Overrides potential HTTPS_PROXY setting in the environment.",
	Value:     NewStringValue("", new(string)),
	DefValue:  "",
}

Functions

func ExitIfNotRunning

func ExitIfNotRunning(driver drivers.Driver, machineName string)

func ExitIfUndefined

func ExitIfUndefined(client *libmachine.Client, machineName string)

func GetBoolEnv added in v1.4.0

func GetBoolEnv(varName string) (bool, error)

GetBoolEnv returns truthy or falsy value of given environmental variable. It returns an error on failure with a default of false.

func IsHostRunning

func IsHostRunning(driver drivers.Driver) bool

func IsHostStopped added in v1.2.0

func IsHostStopped(driver drivers.Driver) bool

func NewStringSliceValue added in v1.4.0

func NewStringSliceValue(val []string, p *[]string) *stringSliceValue

func NewStringValue added in v1.4.0

func NewStringValue(val string, p *string) *stringValue

func UnpackAddons added in v1.2.0

func UnpackAddons(addonsDir string) error

UnpackAddons will unpack the default addons into addons default dir

func VMExists

func VMExists(client *libmachine.Client, machineName string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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