...

Package clientset

Overview ▾

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 instantiates client for pkg/alizer
    ALIZER = "DEP_ALIZER"
    // BINDING instantiates client for pkg/binding
    BINDING = "DEP_BINDING"
    // CONFIG_AUTOMOUNT instantiates client for pkg/configAutomount
    CONFIG_AUTOMOUNT = "DEP_CONFIG_AUTOMOUNT"
    // DELETE_COMPONENT instantiates client for pkg/component/delete
    DELETE_COMPONENT = "DEP_DELETE_COMPONENT"
    // DEPLOY instantiates client for pkg/deploy
    DEPLOY = "DEP_DEPLOY"
    // DEV instantiates client for pkg/dev
    DEV = "DEP_DEV"
    // EXEC instantiates client for pkg/exec
    EXEC = "DEP_EXEC"
    // FILESYSTEM instantiates client for pkg/testingutil/filesystem
    FILESYSTEM = "DEP_FILESYSTEM"
    // INFORMER instantiates client for pkg/informer
    INFORMER = "DEP_INFORMER"
    // INIT instantiates client for pkg/init
    INIT = "DEP_INIT"
    // KUBERNETES_NULLABLE instantiates client for pkg/kclient, can be nil
    KUBERNETES_NULLABLE = "DEP_KUBERNETES_NULLABLE"
    // KUBERNETES instantiates client for pkg/kclient
    KUBERNETES = "DEP_KUBERNETES"
    // LOGS instantiates client for pkg/logs
    LOGS = "DEP_LOGS"
    // PODMAN instantiates client for pkg/podman
    PODMAN = "DEP_PODMAN"
    // PODMAN_NULLABLE instantiates client for pkg/podman, can be nil
    PODMAN_NULLABLE = "DEP_PODMAN_NULLABLE"
    // PORT_FORWARD instantiates client for pkg/portForward
    PORT_FORWARD = "PORT_FORWARD"
    // PREFERENCE instantiates client for pkg/preference
    PREFERENCE = "DEP_PREFERENCE"
    // PROJECT instantiates client for pkg/project
    PROJECT = "DEP_PROJECT"
    // REGISTRY instantiates client for pkg/registry
    REGISTRY = "DEP_REGISTRY"
    // STATE instantiates client for pkg/state
    STATE = "DEP_STATE"
    // SYNC instantiates client for pkg/sync
    SYNC = "DEP_SYNC"
    // SYSTEM instantiates client for pkg/testingutil/system
    SYSTEM = "DEP_SYSTEM"
    // WATCH instantiates client for pkg/watch
    WATCH = "DEP_WATCH"
)

func Add

func Add(command *cobra.Command, dependencies ...string)

type Clientset

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
    // contains filtered or unexported fields
}

func Fetch

func Fetch(command *cobra.Command, platform string, testClientset Clientset) (*Clientset, error)