package
1.11.0-alpha.1
Repository: https://github.com/mjudeikis/kubernetes.git
Documentation: pkg.go.dev

# Functions

FlagToEnv converts a flag and its value into an Env.
FlagToEnvName converts a flag string into a UNIX like environment variable name.
KubectlPluginsPathPluginLoader returns a PluginLoader that loads plugins from one or more directories specified by the KUBECTL_PLUGINS_PATH env var.
PathFromEnvVarPluginLoader returns a PluginLoader that loads plugins from one or more directories specified by the provided env var name.
UserDirPluginLoader returns a PluginLoader that loads plugins from the "plugins" directory under the user's kubeconfig dir (usually "~/.kube/plugins/").
XDGDataDirsPluginLoader returns a PluginLoader that loads plugins from one or more directories specified by the XDG system directory structure spec in the XDG_DATA_DIRS env var, plus the "kubectl/plugins/" suffix.

# Constants

PluginDescriptorFilename is the default file name for plugin descriptions.

# Variables

ErrIncompleteFlag indicates flag is incomplete.
ErrIncompletePlugin indicates plugin is incomplete.
ErrInvalidFlagName indicates flag name is invalid.
ErrInvalidFlagShorthand indicates flag shorthand is invalid.
ErrInvalidPluginName indicates plugin name is invalid.

# Structs

Description holds everything needed to register a plugin as a command.
DirectoryPluginLoader is a PluginLoader that loads plugin descriptions from a given directory in the filesystem.
DummyPluginLoader is a noop PluginLoader.
EmptyEnvProvider satisfies the EnvProvider interface.
Env represents an environment variable with its name and value.
ExecPluginRunner is a PluginRunner that uses Go's os/exec to run plugins.
Flag describes a single flag supported by a given plugin.
OSEnvProvider satisfies the EnvProvider interface.
Plugin is the representation of a CLI extension (plugin).
PluginCallerEnvProvider satisfies the EnvProvider interface.
PluginDescriptorEnvProvider satisfies the EnvProvider interface.
RunningContext holds the context in which a given plugin is running - the in, out, and err streams, arguments and environment passed to it, and the working directory.
Source holds the location of a given plugin in the filesystem.

# Interfaces

EnvProvider provides the environment in which the plugin will run.
PluginLoader is capable of loading a list of plugin descriptions.
PluginRunner is capable of running a plugin in a given running context.

# Type aliases

EnvList is a list of Env.
MultiEnvProvider satisfies the EnvProvider interface for multiple env providers.
MultiPluginLoader is a PluginLoader that can encapsulate multiple plugin loaders, a successful loading means every encapsulated loader was able to load without errors.
Plugins is a list of plugins.
TolerantMultiPluginLoader is a PluginLoader than encapsulates multiple plugins loaders, but is tolerant to errors while loading from them.