options

package
v0.0.0-...-ec1031e Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonOption

type CommonOption func(opts *CommonOptions)

func WithContext

func WithContext(ctx context.Context) CommonOption

func WithEmbeddedFS

func WithEmbeddedFS(embedded *embed.FS) CommonOption

func WithLogger

func WithLogger(logger log.Logger) CommonOption

func WithNamespace

func WithNamespace(namespace string) CommonOption

func WithPrinter

func WithPrinter(printer *output.Printer) CommonOption

type CommonOptions

type CommonOptions struct {
	Context           context.Context
	Verbosity         int8
	Printer           *output.Printer
	Logger            log.Logger
	Embedded          *embed.FS
	KubeconfigOptions *genericclioptions.ConfigFlags

	// Whether to get TenantControlPlanes across all namespaces.
	AllNamespaces bool
}

CommonOptions represents the output options of the command line.

func NewCommonOptions

func NewCommonOptions(opts ...CommonOption) *CommonOptions

func (*CommonOptions) AddFlags

func (o *CommonOptions) AddFlags(flags *pflag.FlagSet)

func (*CommonOptions) Set

func (o *CommonOptions) Set(opts ...CommonOption)

func (*CommonOptions) Validate

func (o *CommonOptions) Validate() error

Jump to

Keyboard shortcuts

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