cmd

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2017 License: MIT Imports: 21 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GlobalFlags are flags what all commands have common
	GlobalFlags = []cli.Flag{
		cli.BoolFlag{
			Name:  "debug",
			Usage: "enable debug output in logs",
		},
	}
)

Functions

func FilterByPodName

func FilterByPodName(source []*pods.Pod, podName string) []*pods.Pod

FilterByPodName return new list of Pods which name matches with given podName

func First added in v0.2.0

func First(values ...string) string

First return first non empty "" string or empty ""

func ForwardAllSignals

func ForwardAllSignals(handler func(syscall.Signal) error) chan os.Signal

ForwardAllSignals will listen all kill signals and pass it to the handler

func GetBinds

func GetBinds(clicontext *cli.Context, extra ...string) (result []*containers.Mount)

GetBinds parses a --bind string flags

func GetClient

func GetClient(config *config.Provider) api.Client

GetClient creates new cloud API client

func GetConfig

func GetConfig(clicontext *cli.Context) *config.Config

GetConfig parse yaml config and return the file representation In normal cases, you should use GetConfigProvider

func GetConfigProvider

func GetConfigProvider(clicontext *cli.Context) *config.Provider

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 GetLabels

func GetLabels(clicontext *cli.Context) map[string]string

GetLabels return --labels CLI parameter value as string map

func GetMounts

func GetMounts(clicontext *cli.Context) (result []*containers.Mount)

GetMounts parses a --mount string flags

func GetPrinter

func GetPrinter(clicontext *cli.Context) printers.ResourcePrinter

GetPrinter returns printer for formating resources output

func GetRuntimeClient

func GetRuntimeClient(clicontext *cli.Context, hostname string) runtime.Client

GetRuntimeClient initialises new runtime client from CLI parameters

func GlobalBefore

func GlobalBefore(context *cli.Context) error

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 ParseBindFlag

func ParseBindFlag(b string) (*containers.Mount, error)

ParseBindFlag parses a mount string in the form "/var:/var:rshared"

func UpdateConfig

func UpdateConfig(clicontext *cli.Context, updated *config.Config) error

UpdateConfig writes config to the config file in yaml format

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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