Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitClient ¶ added in v0.15.1
InitClient initializes the REST client for the command based on direct connection flags or kubeconfig.
Parameters:
- p: common.Params containing configuration parameters.
- cmd: The cobra.Command being executed.
Returns:
- *client.RESTClient: The initialized REST client.
- error: An error if client initialization fails.
func PersistentPreRunE ¶
PersistentPreRunE returns a function that can be used as a persistent pre-run function for Cobra commands. It initializes the provided parameters using the flags defined in the command.
Parameters:
- p: A common.Params struct that will be initialized with values from command flags.
Returns:
- A function that takes a *cobra.Command and a []string, and returns an error. This function initializes the params using flags.InitParams and returns any error encountered.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.