base

package
v0.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 3 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// OptOutOfDefaultKubectlFlags indicates that the standard kubectl/kubeconfig-related flags should not be bound
	// by default.
	OptOutOfDefaultKubectlFlags bool
	// Kubeconfig specifies kubeconfig file(s).
	Kubeconfig string
	// KubectlOverrides stores the extra client connection fields, such as context, user, etc.
	KubectlOverrides *clientcmd.ConfigOverrides

	genericclioptions.IOStreams

	// ClientConfig is the resolved cliendcmd.ClientConfig based on the client connection flags. This is only valid
	// after calling Complete.
	ClientConfig clientcmd.ClientConfig
}

Options contains options common to most CLI plugins, including settings for connecting to kcp (kubeconfig, etc).

func NewOptions

func NewOptions(streams genericclioptions.IOStreams) *Options

NewOptions provides an instance of Options with default values.

func (*Options) BindFlags

func (o *Options) BindFlags(cmd *cobra.Command)

BindFlags binds options fields to cmd's flagset.

func (*Options) Complete

func (o *Options) Complete() error

Complete initializes ClientConfig based on Kubeconfig and KubectlOverrides.

func (*Options) Validate

func (o *Options) Validate() error

Validate validates the configured options.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL