cmd

package
v0.0.0-...-bb44ddd Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2015 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteResult

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

func DescribeMatchingResources

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

func NewCmdAnnotate

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

func NewCmdApiVersions

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

func NewCmdAttach

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

func NewCmdClusterInfo

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

func NewCmdCreate

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

func NewCmdDelete

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

func NewCmdDescribe

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

func NewCmdExec

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

func NewCmdExposeService

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

func NewCmdGet

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

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

func NewCmdLog

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

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

func NewCmdPortForward

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

func NewCmdProxy

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

func NewCmdReplace

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

func NewCmdRollingUpdate

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

func NewCmdRun

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

func NewCmdScale

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

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

func NewCmdVersion

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

func NewKubectlCommand

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

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

func Run

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

func RunApiVersions

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

func RunClusterInfo

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

func RunCreate

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

func RunDelete

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

func RunDescribe

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

func RunExpose

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

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

func RunLog

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

RunLog retrieves a pod log

func RunPatch

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

func RunPortForward

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

func RunProxy

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

func RunReplace

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

func RunRollingUpdate

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

func RunScale

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

RunScale executes the scaling

func RunStop

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

func RunVersion

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

func ValidateArgs

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

Types

type AnnotateOptions

type AnnotateOptions struct {
	// contains filtered or unexported fields
}

AnnotateOptions have the data required to perform the annotate operation

func (*AnnotateOptions) Complete

func (o *AnnotateOptions) Complete(f *cmdutil.Factory, args []string, out io.Writer) (err error)

Complete adapts from the command line args and factory to the data required.

func (AnnotateOptions) RunAnnotate

func (o AnnotateOptions) RunAnnotate() error

RunAnnotate does the work

func (AnnotateOptions) Validate

func (o AnnotateOptions) Validate(args []string) error

Validate checks to the AnnotateOptions to see if there is sufficient information run the command.

type AttachOptions

type AttachOptions struct {
	Namespace     string
	PodName       string
	ContainerName string
	Stdin         bool
	TTY           bool

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

	Attach RemoteAttach
	Client *client.Client
	Config *client.Config
}

AttachOptions declare the arguments accepted by the Exec command

func (*AttachOptions) Complete

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

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

func (*AttachOptions) Run

func (p *AttachOptions) Run() error

Run executes a validated remote execution against a pod.

func (*AttachOptions) Validate

func (p *AttachOptions) Validate() error

Validate checks that the provided attach options are specified.

type DefaultRemoteAttach

type DefaultRemoteAttach struct{}

DefaultRemoteAttach is the standard implementation of attaching

func (*DefaultRemoteAttach) Attach

func (*DefaultRemoteAttach) Attach(req *client.Request, config *client.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool) error

type DefaultRemoteExecutor

type DefaultRemoteExecutor struct{}

DefaultRemoteExecutor is the standard implementation of remote command execution

func (*DefaultRemoteExecutor) Execute

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

type ExecOptions

type ExecOptions struct {
	Namespace     string
	PodName       string
	ContainerName string
	Stdin         bool
	TTY           bool
	Command       []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

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

func (p *ExecOptions) Run() error

Run executes a validated remote execution against a pod.

func (*ExecOptions) Validate

func (p *ExecOptions) Validate() error

Validate checks that the provided exec options are specified.

type RemoteAttach

type RemoteAttach interface {
	Attach(req *client.Request, config *client.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool) error
}

RemoteAttach defines the interface accepted by the Attach command - provided for test stubbing

type RemoteExecutor

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