Documentation ¶
Index ¶
- Variables
- func DropDoubleDash(args []string) []string
- func FilterByPodName(source []*pods.Pod, podName string) []*pods.Pod
- func FindRunningContainerID(pod *pods.Pod, name string) (string, error)
- func First(values ...string) string
- func ForwardAllSignals(handler func(syscall.Signal) error) chan os.Signal
- func GetClient(config *config.Provider) *api.Client
- func GetConfig(clicontext *cli.Context) *config.Config
- func GetConfigProvider(clicontext *cli.Context) *config.Provider
- func GetCurrentDirectory() string
- func GetLabels(clicontext *cli.Context) map[string]string
- func GetPrinter(clicontext *cli.Context) printers.ResourcePrinter
- func GetRuntimeClient(clicontext *cli.Context, hostname string) runtime.Client
- func GlobalBefore(context *cli.Context) error
- func MustParseBindFlag(b string) *containers.Mount
- func MustParseBinds(binds []string) (result []*containers.Mount)
- func MustParseMounts(mounts []string) (result []*containers.Mount)
- func MustParseSyncs(syncs []string) (result []sync.Sync)
- func ParseBindFlag(b string) (*containers.Mount, error)
- func ResolveContainerID(containers []*containers.ContainerStatus, containerName string) (string, error)
- func ShowDownloadProgress(progressc <-chan []*progress.ImageFetch)
- func StopCatch(sigc chan os.Signal)
- func UpdateConfig(clicontext *cli.Context, updated *config.Config) error
Constants ¶
This section is empty.
Variables ¶
var ( // GlobalFlags are flags what all commands have common GlobalFlags = []cli.Flag{ cli.BoolFlag{ Name: "debug", Usage: "enable debug output in logs", }, cli.BoolFlag{ Name: "quiet", Usage: "Don't print any progress output", }, cli.StringFlag{ Name: "output, o", Usage: fmt.Sprintf("Output format. One of: %s", []string{outputHuman, outputYaml}), Value: "human", }, } )
Functions ¶
func DropDoubleDash ¶ added in v0.2.3
DropDoubleDash search for double dash (--) and if found return arguments after it, otherwise return all arguments
func FilterByPodName ¶
FilterByPodName return new list of Pods which name matches with given podName
func FindRunningContainerID ¶ added in v0.2.4
FindRunningContainerID search from Pod definition a containerID by container name
func ForwardAllSignals ¶
ForwardAllSignals will listen all kill signals and pass it to the handler
func GetConfig ¶
GetConfig parse yaml config and return the file representation In normal cases, you should use GetConfigProvider
func GetConfigProvider ¶
GetConfigProvider return config.Provider to access the current configuration
func GetCurrentDirectory ¶
func GetCurrentDirectory() string
GetCurrentDirectory resolves current directory where the command were executed Tries different options until find one or fails
func GetPrinter ¶
func GetPrinter(clicontext *cli.Context) printers.ResourcePrinter
GetPrinter returns printer for formating resources output
func GetRuntimeClient ¶
GetRuntimeClient initialises new runtime client from CLI parameters
func GlobalBefore ¶
GlobalBefore is function what get executed before any commands executes
func MustParseBindFlag ¶
func MustParseBindFlag(b string) *containers.Mount
MustParseBindFlag is like ParseBindFlag but panics if syntax is invalid
func MustParseBinds ¶ added in v0.2.4
func MustParseBinds(binds []string) (result []*containers.Mount)
MustParseBinds parses a --bind string flags
func MustParseMounts ¶ added in v0.2.4
func MustParseMounts(mounts []string) (result []*containers.Mount)
MustParseMounts parses a --mount string flags
func MustParseSyncs ¶ added in v0.2.4
MustParseSyncs parses a sync string in the form "~/local/dir:/data"
func ParseBindFlag ¶
func ParseBindFlag(b string) (*containers.Mount, error)
ParseBindFlag parses a mount string in the form "/var:/var:rshared"
func ResolveContainerID ¶ added in v0.2.3
func ResolveContainerID(containers []*containers.ContainerStatus, containerName string) (string, error)
ResolveContainerID resolves ContainerID from list of containers. If multiple containers, you must define containerName, otherwise it's optional.
func ShowDownloadProgress ¶ added in v0.2.4
func ShowDownloadProgress(progressc <-chan []*progress.ImageFetch)
ShowDownloadProgress prints UI "downloading" lines and updates until the progress channel closes
Types ¶
This section is empty.