cmd

package
v1.115.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogfSetLogger = logf.SetLogger

LogfSetLogger is an alias for logf.SetLogger for testing purposes. logf.SetLogger discards all calls after the first invocation and there is no way of telling from the outside whether it was called at all. Without a func alias, we cannot verify that Options.Complete correctly initialized the global controller-runtime logger.

Functions

This section is empty.

Types

type Options

type Options struct {
	genericiooptions.IOStreams

	// Log is the global logger.
	Log logr.Logger
	// LogLevel is the log level (one of [info,debug,error]).
	LogLevel string
	// LogFormat is the log format (one of [json,text]).
	LogFormat string
}

Options contains persistent options for all commands.

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

AddFlags adds the flags to the flag set.

func (*Options) Complete

func (o *Options) Complete() error

Complete completes the options.

func (*Options) Validate

func (o *Options) Validate() error

Validate validates the options.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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