cmd

package
v0.12.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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(obj Runnable, cmd cobra.Command) *cobra.Command

func Name

func Name(obj interface{}) string

Types

type DebugConfig

type DebugConfig struct {
	Debug      bool `usage:"Turn on debug logging"`
	DebugLevel int  `usage:"If debugging is enabled, set klog -v=X"`
}

func (*DebugConfig) OverrideZapOpts added in v0.10.0

func (c *DebugConfig) OverrideZapOpts(zopts *crzap.Options) *crzap.Options

OverrideZapOpts, for compatibility override zap opts with legacy debug opts.

func (*DebugConfig) SetupDebug

func (c *DebugConfig) SetupDebug() error

type HasHelpFunc added in v0.10.0

type HasHelpFunc interface {
	HelpFunc(command *cobra.Command, strings []string)
}

type LeaderElectionOptions added in v0.10.0

type LeaderElectionOptions struct {
	// LeaseDuration is the duration that non-leader candidates will
	// wait to force acquire leadership. This is measured against time of
	// last observed ack. Default is 15 seconds.
	LeaseDuration *time.Duration

	// RenewDeadline is the duration that the acting controlplane will retry
	// refreshing leadership before giving up. Default is 10 seconds.
	RenewDeadline *time.Duration

	// RetryPeriod is the duration the LeaderElector clients should wait
	// between tries of actions. Default is 2 seconds.
	RetryPeriod *time.Duration
}

func NewLeaderElectionOptions added in v0.10.0

func NewLeaderElectionOptions() (LeaderElectionOptions, error)

NewLeaderElectionOptions returns a new LeaderElectionOptions struct with the values parsed from environment variables.

type PersistentPreRunnable

type PersistentPreRunnable interface {
	PersistentPre(cmd *cobra.Command, args []string) error
}

type PreRunnable

type PreRunnable interface {
	Pre(cmd *cobra.Command, args []string) error
}

type Runnable

type Runnable interface {
	Run(cmd *cobra.Command, args []string) error
}

Directories

Path Synopsis
cli
Package cli sets up the CLI commands for the fleet apply binary.
Package cli sets up the CLI commands for the fleet apply binary.
Package controller starts the fleet controller.
Package controller starts the fleet controller.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳