cmd

package
v0.0.0-...-fee303e Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2018 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClusterConfigPath string

ClusterConfigPath to be used by subcommands using --config

View Source
var DockerAPIVersion = client.DefaultVersion

DockerAPIVersion defines the docker api version used.

View Source
var ExitCode int

ExitCode is used by commands and subcommands to write out main's exitcode

View Source
var KrakenGitCommit string

KrakenGitCommit refers to the Git Commit sha

View Source
var KrakenMajorMinorPatch string

KrakenMajorMinorPatch refers to the version

View Source
var KrakenType = "alpha"

KrakenType refers to the release type

View Source
var KrakenlibTag string

KrakenlibTag this is set via linker flag

View Source
var RootCmd = &cobra.Command{
	Use:   "kraken",
	Short: "Kraken is an orchestration and cluster level management system for Kubernetes",
	Long:  "Kraken is an orchestration and cluster level management system for Kubernetes that creates a production scale cluster on a range of platforms using its default settings.",
	PreRun: func(cmd *cobra.Command, args []string) {
		if _, err := os.Stat(outputLocation); os.IsNotExist(err) {
			os.Mkdir(outputLocation, 0755)
		}
	},

	SilenceErrors: true,
}

RootCmd represents the base command when called without any subcommands

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func Close

func Close(c io.Closer)

Close can throw an err, so to defer to it is risky, review http://www.blevesearch.com/news/Deferred-Cleanup,-Checking-Errors,-and-Potential-Problems/

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

Types

type DockerClientConfig

type DockerClientConfig struct {
	DockerHost       string
	DockerAPIVersion string
	TLSEnabled       bool
	TLSVerify        bool
	TLSCACertificate string
	TLSCertificate   string
	TLSKey           string
}

DockerClientConfig provides a simple encapsulation of parameters to construct the Docker API client

func (*DockerClientConfig) GetDefaultDockerAPIVersion

func (conf *DockerClientConfig) GetDefaultDockerAPIVersion() string

GetDefaultDockerAPIVersion produces either the environment-provided Docker API version, or a sensible default.

func (*DockerClientConfig) GetDefaultHost

func (conf *DockerClientConfig) GetDefaultHost() string

GetDefaultHost produces either the environment-provided host, or a sensible default.

func (*DockerClientConfig) GetDefaultTLSCACertificate

func (conf *DockerClientConfig) GetDefaultTLSCACertificate() string

GetDefaultTLSCACertificate produces the path to the environment-configured CA certificate for TLS verification.

func (*DockerClientConfig) GetDefaultTLSCertificate

func (conf *DockerClientConfig) GetDefaultTLSCertificate() string

GetDefaultTLSCertificate produces the path to the environment-configured TLS certificate.

func (*DockerClientConfig) GetDefaultTLSCertificatePath

func (conf *DockerClientConfig) GetDefaultTLSCertificatePath() string

GetDefaultTLSCertificatePath produces either the environment-provided path to TLS certificates, or a sensible default.

func (*DockerClientConfig) GetDefaultTLSKey

func (conf *DockerClientConfig) GetDefaultTLSKey() string

GetDefaultTLSKey produces the path to the environment-configured TLS key.

func (*DockerClientConfig) GetDefaultTLSVerify

func (conf *DockerClientConfig) GetDefaultTLSVerify() bool

GetDefaultTLSVerify indicates whether TLS is enabled by the current environment.

type HelpType

type HelpType int

HelpType is an enum type for cluster post processing message handling

const (
	// HelpTypeCreated is for the case where cluster up was ran
	HelpTypeCreated HelpType = iota
	// HelpTypeDestroyed is for the case where cluster down was ran
	HelpTypeDestroyed
	// HelpTypeUpdated is for the case where cluster udpated was ran
	HelpTypeUpdated
)

Jump to

Keyboard shortcuts

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