kubernetes: k8s.io/kubernetes/pkg/kubectl/cmd Index | Files | Directories

package cmd

import "k8s.io/kubernetes/pkg/kubectl/cmd"

Index

Package Files

alpha.go cmd.go profiling.go

func HandlePluginCommand Uses

func HandlePluginCommand(pluginHandler PluginHandler, cmdArgs []string) error

HandlePluginCommand receives a pluginHandler and command-line arguments and attempts to find a plugin executable on the PATH that satisfies the given arguments.

func NewCmdAlpha Uses

func NewCmdAlpha(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdAlpha creates a command that acts as an alternate root command for features in alpha

func NewDefaultKubectlCommand Uses

func NewDefaultKubectlCommand() *cobra.Command

NewDefaultKubectlCommand creates the `kubectl` command with default arguments

func NewDefaultKubectlCommandWithArgs Uses

func NewDefaultKubectlCommandWithArgs(pluginHandler PluginHandler, args []string, in io.Reader, out, errout io.Writer) *cobra.Command

NewDefaultKubectlCommandWithArgs creates the `kubectl` command with arguments

func NewKubectlCommand Uses

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

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

type DefaultPluginHandler Uses

type DefaultPluginHandler struct {
    ValidPrefixes []string
}

DefaultPluginHandler implements PluginHandler

func NewDefaultPluginHandler Uses

func NewDefaultPluginHandler(validPrefixes []string) *DefaultPluginHandler

NewDefaultPluginHandler instantiates the DefaultPluginHandler with a list of given filename prefixes used to identify valid plugin filenames.

func (*DefaultPluginHandler) Execute Uses

func (h *DefaultPluginHandler) Execute(executablePath string, cmdArgs, environment []string) error

Execute implements PluginHandler

func (*DefaultPluginHandler) Lookup Uses

func (h *DefaultPluginHandler) Lookup(filename string) (string, bool)

Lookup implements PluginHandler

type PluginHandler Uses

type PluginHandler interface {
    // exists at the given filename, or a boolean false.
    // Lookup will iterate over a list of given prefixes
    // in order to recognize valid plugin filenames.
    // The first filepath to match a prefix is returned.
    Lookup(filename string) (string, bool)
    // Execute receives an executable's filepath, a slice
    // of arguments, and a slice of environment variables
    // to relay to the executable.
    Execute(executablePath string, cmdArgs, environment []string) error
}

PluginHandler is capable of parsing command line arguments and performing executable filename lookups to search for valid plugin files, and execute found plugins.

Directories

PathSynopsis
annotate
apiresources
apply
attach
auth
autoscale
certificates
clusterinfo
completion
config
convert
cp
create
delete
describe
diff
drain
edit
exec
explain
expose
get
help
kustomize
label
logs
options
patch
plugin
portforward
proxy
replace
rollingupdate
rollout
run
scale
set
set/envPackage env provides functions to incorporate environment variables into set env.
taintPackage taints implements utilites for working with taints
testing
top
util
util/editor
util/editor/crlf
util/openapiPackage openapi is a collection of libraries for fetching the openapi spec from a Kubernetes server and then indexing the type definitions.
util/openapi/testing
util/openapi/validation
util/sanity
version
wait

Package cmd imports 57 packages (graph) and is imported by 196 packages. Updated 2019-07-16. Refresh now. Tools for package owners.