cli

package
v2.11.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 65 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HelmInstallExtendFlagsFunc func(*pflag.FlagSet)                                   //nolint:gochecknoglobals // extension point
	HelmExtendFlagsFunc        func(*pflag.FlagSet)                                   //nolint:gochecknoglobals // extension point
	HelmInstallPrologFunc      func(context.Context, *pflag.FlagSet, *HelmOpts) error //nolint:gochecknoglobals // extension point
)
View Source
var GetStatusInfo = BasicGetStatusInfo //nolint:gochecknoglobals // extension point

GetStatusInfo may return an extended struct, based on the one returned by the BasicGetStatusInfo.

Functions

func AddSubCommands added in v2.9.0

func AddSubCommands(cmd *cobra.Command)

AddSubCommands adds subcommands to the given command, including the default help, the commands in the CommandGroups found in the given command's context, and the completion command. It also replaces the standard usage template with a custom template.

func BasicGetStatusInfo added in v2.9.0

func BasicGetStatusInfo(ctx context.Context) (ioutil.WriterTos, error)

func ClusterIdCommand added in v2.2.0

func ClusterIdCommand() *cobra.Command

ClusterIdCommand is a simple command that makes it easier for users to figure out what their cluster ID is. For now this is just used when people are making licenses for air-gapped environments.

func Command

func Command(ctx context.Context) *cobra.Command

Command returns the top level "telepresence" CLI command.

func GatherTracesCommand added in v2.9.0

func GatherTracesCommand() *cobra.Command

func GlobalFlags added in v2.9.0

func GlobalFlags() *pflag.FlagSet

func InitConnectRequest added in v2.10.5

func InitConnectRequest(ctx context.Context, cmd *cobra.Command) (*connector.ConnectRequest, *pflag.FlagSet)

InitConnectRequest adds the networking flags and Kubernetes flags to the given command and returns a ConnectRequest and a FlagSet with the Kubernetes flags. The FlagSet is returned here so that a map of flags that gets modified can be extracted using FlagMap once the flag parsing has completed.

func InitContext added in v2.9.0

func InitContext(ctx context.Context) context.Context

func Main added in v2.9.0

func Main(ctx context.Context)

func OnlySubcommands

func OnlySubcommands(cmd *cobra.Command, args []string) error

OnlySubcommands is a cobra.PositionalArgs that is similar to cobra.NoArgs, but prints a better error message.

func PerhapsLegacyCommands added in v2.4.0

func PerhapsLegacyCommands(cmd *cobra.Command, args []string) error

PerhapsLegacyCommands is like OnlySubcommands but performs some initial check for legacy flags.

func PushTracesCommand added in v2.9.0

func PushTracesCommand() *cobra.Command

func RunSubcommands

func RunSubcommands(cmd *cobra.Command, args []string) error

RunSubcommands is for use as a cobra.Command.RunE for commands that don't do anything themselves but have subcommands. In such cases, it is important to set RunE even though there's nothing to run, because otherwise cobra will treat that as "success", and it shouldn't be "success" if the user typos a command and types something invalid.

func WithSubCommands added in v2.9.0

func WithSubCommands(ctx context.Context) context.Context

Types

type HelmOpts added in v2.10.0

type HelmOpts struct {
	values.Options
	AllValues   map[string]any
	ReuseValues bool
	ResetValues bool
	Request     *connector.ConnectRequest

	CRDs bool
	// contains filtered or unexported fields
}

func (*HelmOpts) Type added in v2.10.0

func (ha *HelmOpts) Type() connector.HelmRequest_Type

type StatusInfo added in v2.9.0

type StatusInfo struct {
	RootDaemon io.WriterTo `json:"root_daemon" yaml:"root_daemon"`
	UserDaemon io.WriterTo `json:"user_daemon" yaml:"user_daemon"`
}

func (*StatusInfo) WriterTos added in v2.9.0

func (s *StatusInfo) WriterTos() []io.WriterTo

Directories

Path Synopsis
Package output provides structured output for *cobra.Command.
Package output provides structured output for *cobra.Command.

Jump to

Keyboard shortcuts

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