Documentation ¶
Index ¶
- func HandlePluginCommand(pluginHandler PluginHandler, cmdArgs []string) error
- func NewCmdAlpha(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewDefaultKubectlCommand() *cobra.Command
- func NewDefaultKubectlCommandWithArgs(pluginHandler PluginHandler, args []string, in io.Reader, ...) *cobra.Command
- func NewKubectlCommand(in io.Reader, out, err io.Writer) *cobra.Command
- type DefaultPluginHandler
- type PluginHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandlePluginCommand ¶ added in v1.14.1
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 ¶ added in v1.8.0
NewCmdAlpha creates a command that acts as an alternate root command for features in alpha
func NewDefaultKubectlCommand ¶ added in v1.10.6
NewDefaultKubectlCommand creates the `kubectl` command with default arguments
func NewDefaultKubectlCommandWithArgs ¶ added in v1.12.6
func NewDefaultKubectlCommandWithArgs(pluginHandler PluginHandler, args []string, in io.Reader, out, errout io.Writer) *cobra.Command
NewDefaultKubectlCommandWithArgs creates the `kubectl` command with arguments
Types ¶
type DefaultPluginHandler ¶ added in v1.14.1
type DefaultPluginHandler struct {
ValidPrefixes []string
}
DefaultPluginHandler implements PluginHandler
func NewDefaultPluginHandler ¶ added in v1.14.1
func NewDefaultPluginHandler(validPrefixes []string) *DefaultPluginHandler
NewDefaultPluginHandler instantiates the DefaultPluginHandler with a list of given filename prefixes used to identify valid plugin filenames.
type PluginHandler ¶ added in v1.12.6
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 ¶
Path | Synopsis |
---|---|
env
Package env provides functions to incorporate environment variables into set env.
|
Package env provides functions to incorporate environment variables into set env. |
Package taints implements utilites for working with taints
|
Package taints implements utilites for working with taints |
openapi
Package openapi is a collection of libraries for fetching the openapi spec from a Kubernetes server and then indexing the type definitions.
|
Package openapi is a collection of libraries for fetching the openapi spec from a Kubernetes server and then indexing the type definitions. |