cli

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	// contains filtered or unexported fields
}

CLI represents command line interface for the operator.

func New

func New(m metadata.Info) *CLI

New returns a new CLI.

func (*CLI) FlagSet

func (c *CLI) FlagSet() *flag.FlagSet

FlagSet returns bare underlying flagset of the cli. It can be used to generate documentation for CLI or to register additional flags. They will be parsed by Parse() method. Caller needs to take care of values set by flags added to this flagset.

func (*CLI) Metadata

func (c *CLI) Metadata() metadata.Info

Metadata returns the metadata for the controller manager.

func (*CLI) Parse

func (c *CLI) Parse(arguments []string) manager.Config

Parse parses flag definitions from the argument list, which should not include the command name. Must be called after all additional flags in the FlagSet() are defined and before flags are accessed by the program. It returns config for controller manager.

type DiscardFlagValue added in v2.1.1

type DiscardFlagValue struct{}

DiscardFlagValue is a flag.Value implementation that discards any value set to it. Use for deprecated flags that are deprecated.

func (DiscardFlagValue) Set added in v2.1.1

func (DiscardFlagValue) Set(_ string) error

Set fulfill interface.

func (DiscardFlagValue) String added in v2.1.1

func (DiscardFlagValue) String() string

Jump to

Keyboard shortcuts

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