...
Package clientset
Package clientset is used to inject clients inside commands
To use this package:
From a command definition, use the `Add` function to declare the clients needed by the command
Then, from the `SetClientset` method of the `Runnable` interface, you can access the clients
To add a new client to this package:
- add a new constant for the client
- if the client has sub-dependencies, define a new entry in the map of sub-dependencies
- add the packages's client to the Clientset structure
- complete the Fetch function to instantiate the package's client
Constants
const (
ALIZER = "DEP_ALIZER"
BINDING = "DEP_BINDING"
CONFIG_AUTOMOUNT = "DEP_CONFIG_AUTOMOUNT"
DELETE_COMPONENT = "DEP_DELETE_COMPONENT"
DEPLOY = "DEP_DEPLOY"
DEV = "DEP_DEV"
EXEC = "DEP_EXEC"
FILESYSTEM = "DEP_FILESYSTEM"
INFORMER = "DEP_INFORMER"
INIT = "DEP_INIT"
KUBERNETES_NULLABLE = "DEP_KUBERNETES_NULLABLE"
KUBERNETES = "DEP_KUBERNETES"
LOGS = "DEP_LOGS"
PODMAN = "DEP_PODMAN"
PODMAN_NULLABLE = "DEP_PODMAN_NULLABLE"
PORT_FORWARD = "PORT_FORWARD"
PREFERENCE = "DEP_PREFERENCE"
PROJECT = "DEP_PROJECT"
REGISTRY = "DEP_REGISTRY"
STATE = "DEP_STATE"
SYNC = "DEP_SYNC"
SYSTEM = "DEP_SYSTEM"
WATCH = "DEP_WATCH"
)
func Add(command *cobra.Command, dependencies ...string)
type Clientset struct {
Stdout io.Writer
Stderr io.Writer
AlizerClient alizer.Client
BindingClient binding.Client
ConfigAutomountClient configAutomount.Client
DeleteClient _delete.Client
DeployClient deploy.Client
DevClient dev.Client
ExecClient exec.Client
FS filesystem.Filesystem
InformerClient *informer.InformerClient
InitClient _init.Client
KubernetesClient kclient.ClientInterface
LogsClient logs.Client
PodmanClient podman.Client
PortForwardClient portForward.Client
PreferenceClient preference.Client
ProjectClient project.Client
RegistryClient registry.Client
StateClient state.Client
SyncClient sync.Client
WatchClient watch.Client
}
func Fetch(command *cobra.Command, platform string, testClientset Clientset) (*Clientset, error)