Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmd ¶
func NewCmd(opts *CommonOptions) *cobra.Command
Types ¶
type CommonOptions ¶
type CommonOptions struct {
// In, Out, and Err represent the respective data streams that the command
// may act upon. They are attached directly to any sub-process of the executed
// command.
In io.Reader
Out, Err io.Writer
// Clientset represents a factory interface that creates instances of each
// client type. For example, to create an instance of the cloud provider
// client interface, call the following method Clientset.CloudProvider().
Clientset clientset.Factory
// InstallPolicy configures a policy for if/when to install a dependency.
InstallPolicy string
// Noninteractive disables the interactive mode user interface by quieting the
// configuration prompts.
Noninteractive bool
// DryRun configures the command to print the actions that would be executed,
// without executing them.
DryRun bool
// Timeout configures the maximum duration before timing out the execution of
// the command.
Timeout time.Duration
// Verbose enables verbose logging.
Verbose bool
// Profile configures the name of the credentials profile to use.
//
// Defaults to `default`.
Profile string
// PprofProfile and PprofOutput enables collecting of runtime profiling data
// for the command's process in the format expected by the pprof visualization
// tool.
//
// PprofProfile configures the type of profile to capture:
// - cpu
// - heap
// - goroutine
// - threadcreate
// - block
// - mutex
//
// PprofOutput configures the path of the file to write the profile to.
PprofProfile, PprofOutput string
}
CommonOptions contains common options and helper methods.
func NewCommonOptions ¶
func NewCommonOptions(in io.Reader, out, err io.Writer) *CommonOptions
func (*CommonOptions) Init ¶
func (x *CommonOptions) Init(fs *pflag.FlagSet)
func (*CommonOptions) Validate ¶
func (x *CommonOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.