Documentation ¶
Index ¶
- Constants
- Variables
- func IsPositive(name string, val string) error
- func IsValidCIDR(name string, cidr string) error
- func IsValidDiskSize(name string, disksize string) error
- func IsValidDriver(string, driver string) error
- func IsValidPath(name string, path string) error
- func IsValidProxy(name string, uri string) error
- func IsValidUrl(_ string, isoURL string) error
- func RequiresRestartMsg(name string, value string) error
- func SetBool(m MinishiftConfig, name string, val string) error
- func SetInt(m MinishiftConfig, name string, val string) error
- func SetSlice(m MinishiftConfig, name string, val string) error
- func SetString(m MinishiftConfig, name string, val string) error
- func WriteConfig(m MinishiftConfig) error
- type ConfigViewTemplate
- type MinishiftConfig
- type Setting
Constants ¶
View Source
const (
DefaultConfigViewFormat = "- {{.ConfigKey | printf \"%-21s\"}}: {{.ConfigValue}}"
)
Variables ¶
View Source
var ( // minishift ISOUrl = createFlag("iso-url", SetString, []setFn{IsValidUrl}, []setFn{RequiresRestartMsg}, true) CPUs = createFlag("cpus", SetInt, []setFn{IsPositive}, []setFn{RequiresRestartMsg}, true) Memory = createFlag("memory", SetInt, []setFn{IsPositive}, []setFn{RequiresRestartMsg}, true) DiskSize = createFlag("disk-size", SetString, []setFn{IsValidDiskSize}, []setFn{RequiresRestartMsg}, true) VmDriver = createFlag("vm-driver", SetString, []setFn{IsValidDriver}, []setFn{RequiresRestartMsg}, true) OpenshiftVersion = createFlag("openshift-version", SetString, nil, nil, true) HostOnlyCIDR = createFlag("host-only-cidr", SetString, []setFn{IsValidCIDR}, nil, true) DockerEnv = createFlag("docker-env", SetSlice, nil, nil, true) DockerEngineOpt = createFlag("docker-opt", SetSlice, nil, nil, true) InsecureRegistry = createFlag("insecure-registry", SetSlice, nil, nil, true) RegistryMirror = createFlag("registry-mirror", SetSlice, nil, nil, true) // cluster up SkipRegistryCheck = createFlag("skip-registry-check", SetBool, nil, nil, true) PublicHostname = createFlag("public-hostname", SetString, nil, nil, true) RoutingSuffix = createFlag("routing-suffix", SetString, nil, nil, true) HostConfigDir = createFlag("host-config-dir", SetString, []setFn{IsValidPath}, nil, true) HostVolumeDir = createFlag("host-volumes-dir", SetString, []setFn{IsValidPath}, nil, true) HostDataDir = createFlag("host-data-dir", SetString, []setFn{IsValidPath}, nil, true) HostPvDir = createFlag("host-pv-dir", SetString, []setFn{IsValidPath}, nil, true) ServerLogLevel = createFlag("server-loglevel", SetInt, []setFn{IsPositive}, nil, true) OpenshiftEnv = createFlag("openshift-env", nil, nil, nil, false) Metrics = createFlag("metrics", SetBool, nil, nil, true) Logging = createFlag("logging", SetBool, nil, nil, true) // Setting proxy NoProxyList = createFlag("no-proxy", SetString, nil, nil, true) HttpProxy = createFlag("http-proxy", SetString, []setFn{IsValidProxy}, nil, true) HttpsProxy = createFlag("https-proxy", SetString, []setFn{IsValidProxy}, nil, true) // Subscription Manager Username = createFlag("username", SetString, nil, nil, true) Password = createFlag("password", SetString, nil, nil, true) SkipRegistration = createFlag("skip-registration", SetBool, nil, nil, true) // Global flags LogDir = createFlag("log_dir", SetString, []setFn{IsValidPath}, nil, true) ShowLibmachineLogs = createFlag("show-libmachine-logs", SetBool, nil, nil, true) // Host Folders HostFoldersMountPath = createFlag("hostfolders-mountpath", SetString, nil, nil, true) HostFoldersAutoMount = createFlag("hostfolders-automount", SetBool, nil, nil, true) ImageCaching = createFlag("image-caching", SetBool, nil, nil, true) )
View Source
var ConfigCmd = &cobra.Command{ Use: "config SUBCOMMAND [flags]", Short: "Modifies Minishift configuration properties.", Long: `Modifies Minishift configuration properties. Some of the configuration properties are equivalent to the options that you set when you run the minishift start command. Configurable properties (enter as SUBCOMMAND): ` + "\n\n" + configurableFields(), Run: func(cmd *cobra.Command, args []string) { cmd.Help() }, }
Functions ¶
func IsPositive ¶
func IsValidCIDR ¶
func IsValidDiskSize ¶
func IsValidDriver ¶
func IsValidPath ¶
func IsValidProxy ¶ added in v1.1.0
func IsValidUrl ¶
func RequiresRestartMsg ¶
func WriteConfig ¶
func WriteConfig(m MinishiftConfig) error
Writes a config to the $MINISHIFT_HOME/config/config.json file
Types ¶
type ConfigViewTemplate ¶
type ConfigViewTemplate struct { ConfigKey string ConfigValue interface{} }
type MinishiftConfig ¶
type MinishiftConfig map[string]interface{}
func ReadConfig ¶
func ReadConfig() (MinishiftConfig, error)
ReadConfig reads the config from $MINISHIFT_HOME/config/config.json file
Source Files ¶
Click to show internal directories.
Click to hide internal directories.