cmd

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2015 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteResult added in v0.5.1

func DeleteResult(r *resource.Result, out io.Writer, ignoreNotFound bool) error

func DescribeMatchingResources added in v0.5.1

func DescribeMatchingResources(mapper meta.RESTMapper, typer runtime.ObjectTyper, describer kubectl.Describer, f *cmdutil.Factory, namespace, rsrc, prefix string, out io.Writer) error

func NewCmdApiVersions added in v0.4.4

func NewCmdApiVersions(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewCmdClusterInfo added in v0.4.4

func NewCmdClusterInfo(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewCmdCreate added in v0.4.4

func NewCmdCreate(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewCmdDelete added in v0.4.4

func NewCmdDelete(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewCmdDescribe added in v0.4.4

func NewCmdDescribe(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewCmdExec added in v0.4.4

func NewCmdExec(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command

func NewCmdExposeService added in v0.4.4

func NewCmdExposeService(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewCmdGet added in v0.4.4

func NewCmdGet(f *cmdutil.Factory, out io.Writer) *cobra.Command

NewCmdGet creates a command object for the generic "get" action, which retrieves one or more resources from a server.

func NewCmdLabel added in v0.4.4

func NewCmdLabel(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewCmdLog added in v0.4.4

func NewCmdLog(f *cmdutil.Factory, out io.Writer) *cobra.Command

NewCmdLog creates a new pod log command

func NewCmdNamespace

func NewCmdNamespace(out io.Writer) *cobra.Command

TODO remove once people have been given enough time to notice

func NewCmdPatch added in v1.0.2

func NewCmdPatch(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewCmdPortForward added in v0.4.4

func NewCmdPortForward(f *cmdutil.Factory) *cobra.Command

func NewCmdProxy added in v0.4.4

func NewCmdProxy(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewCmdReplace added in v1.0.2

func NewCmdReplace(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewCmdRollingUpdate added in v0.4.4

func NewCmdRollingUpdate(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewCmdRun added in v1.0.2

func NewCmdRun(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewCmdScale added in v0.5.4

func NewCmdScale(f *cmdutil.Factory, out io.Writer) *cobra.Command

NewCmdScale returns a cobra command with the appropriate configuration and flags to run scale

func NewCmdStop added in v0.4.4

func NewCmdStop(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewCmdVersion added in v0.4.4

func NewCmdVersion(f *cmdutil.Factory, out io.Writer) *cobra.Command

func NewKubectlCommand added in v0.4.4

func NewKubectlCommand(f *cmdutil.Factory, in io.Reader, out, err io.Writer) *cobra.Command

NewKubectlCommand creates the `kubectl` command and its nested children.

func ReapResult added in v0.5.1

func ReapResult(r *resource.Result, f *cmdutil.Factory, out io.Writer, isDefaultDelete, ignoreNotFound bool, timeout time.Duration, gracePeriod int) error

func Run added in v1.0.2

func Run(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string) error

func RunApiVersions added in v0.4.2

func RunApiVersions(f *cmdutil.Factory, out io.Writer) error

func RunClusterInfo added in v0.4.2

func RunClusterInfo(factory *cmdutil.Factory, out io.Writer, cmd *cobra.Command) error

func RunCreate added in v0.4.2

func RunCreate(f *cmdutil.Factory, out io.Writer, filenames util.StringList) error

func RunDelete added in v0.4.2

func RunDelete(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, filenames util.StringList) error

func RunDescribe added in v0.4.2

func RunDescribe(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string) error

func RunExpose added in v0.4.2

func RunExpose(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string) error

func RunGet

func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string) error

RunGet implements the generic Get command TODO: convert all direct flag accessors to a struct and pass that instead of cmd

func RunLabel added in v0.4.2

func RunLabel(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string) error

func RunLog added in v0.4.2

func RunLog(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, p *logParams) error

RunLog retrieves a pod log

func RunPatch added in v1.0.2

func RunPatch(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string) error

func RunPortForward added in v0.4.2

func RunPortForward(f *cmdutil.Factory, cmd *cobra.Command, args []string, fw portForwarder) error

func RunProxy added in v0.4.2

func RunProxy(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command) error

func RunReplace added in v1.0.2

func RunReplace(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, filenames util.StringList) error

func RunRollingUpdate added in v0.4.2

func RunRollingUpdate(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string) error

func RunScale added in v0.5.4

func RunScale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string) error

RunScale executes the scaling

func RunStop added in v0.5.1

func RunStop(f *cmdutil.Factory, cmd *cobra.Command, args []string, filenames util.StringList, out io.Writer) error

func RunVersion added in v0.4.2

func RunVersion(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command) error

func ValidateArgs added in v0.4.3

func ValidateArgs(cmd *cobra.Command, args []string) error

Types

type DefaultRemoteExecutor added in v1.0.4

type DefaultRemoteExecutor struct{}

DefaultRemoteExecutor is the standard implementation of remote command execution

func (*DefaultRemoteExecutor) Execute added in v1.0.4

func (*DefaultRemoteExecutor) Execute(req *client.Request, config *client.Config, command []string, stdin io.Reader, stdout, stderr io.Writer, tty bool) error

type ExecOptions added in v1.0.4

type ExecOptions struct {
	Namespace     string
	PodName       string
	ContainerName string
	Stdin         bool
	TTY           bool
	Args          []string

	In  io.Reader
	Out io.Writer
	Err io.Writer

	Executor RemoteExecutor
	Client   *client.Client
	Config   *client.Config
}

ExecOptions declare the arguments accepted by the Exec command

func (*ExecOptions) Complete added in v1.0.4

func (p *ExecOptions) Complete(f *cmdutil.Factory, cmd *cobra.Command, argsIn []string) error

Complete verifies command line arguments and loads data from the command environment

func (*ExecOptions) Run added in v1.0.4

func (p *ExecOptions) Run() error

Run executes a validated remote execution against a pod.

func (*ExecOptions) Validate added in v1.0.4

func (p *ExecOptions) Validate() error

Validate checks that the provided exec options are specified.

type RemoteExecutor added in v1.0.4

type RemoteExecutor interface {
	Execute(req *client.Request, config *client.Config, command []string, stdin io.Reader, stdout, stderr io.Writer, tty bool) error
}

RemoteExecutor defines the interface accepted by the Exec command - provided for test stubbing

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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