cmd

package
v0.0.0-...-80cfa99 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2017 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Overview

Based on Minikube (https://github.com/kubernetes/minikube), which is licensed under The Apache License, Version 2.0:

Copyright 2016 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "sbox",
	Short: "Sandbox is a tool that runs Docker-based workflows.",
	Long: `Sandbox is a tool that runs Docker-based workflows.
For help, visit https://stack.foundation/docs`,
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		if debug {
			log.SetDebug(true)
		}

		if len(originalCommand) > 0 {
			cmd.Use = originalCommand
		}
		for _, path := range dirs {
			if err := os.MkdirAll(path, 0777); err != nil {

			}
		}

	},
}

Functions

func Execute

func Execute()

func FormatError

func FormatError(err error) (string, error)

func GetKubeConfigPath

func GetKubeConfigPath() string

func GetPort

func GetPort() (string, error)

Ask the kernel for a free open port that is ready to use

func KillMountProcess

func KillMountProcess() error

func MarshallError

func MarshallError(errMsg, service, version string) ([]byte, error)

func MaybeReportErrorAndExit

func MaybeReportErrorAndExit(errToReport error)

func PromptUserForAccept

func PromptUserForAccept(r io.Reader) bool

func ReportError

func ReportError(err error, url string) error

func UploadError

func UploadError(b []byte, url string) error

Types

type EnvNoProxyGetter

type EnvNoProxyGetter struct{}

func (EnvNoProxyGetter) GetNoProxyVar

func (EnvNoProxyGetter) GetNoProxyVar() (string, string)

type LibmachineShellDetector

type LibmachineShellDetector struct{}

func (LibmachineShellDetector) GetShell

func (LibmachineShellDetector) GetShell(userShell string) (string, error)

type LookPath

type LookPath func(filename string) (string, error)

type Message

type Message struct {
	Message        string `json:"message"`
	ServiceContext `json:"serviceContext"`
}

type NoProxyGetter

type NoProxyGetter interface {
	GetNoProxyVar() (string, string)
}

type ServiceContext

type ServiceContext struct {
	Service string `json:"service"`
	Version string `json:"version"`
}

type ShellConfig

type ShellConfig struct {
	Prefix           string
	Delimiter        string
	Suffix           string
	DockerCertPath   string
	DockerHost       string
	DockerTLSVerify  string
	DockerAPIVersion string
	UsageHint        string
	NoProxyVar       string
	NoProxyValue     string
}

type ShellDetector

type ShellDetector interface {
	GetShell(string) (string, error)
}

Jump to

Keyboard shortcuts

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