cli

package
v2.9.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 61 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 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 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 PrintVersion added in v2.9.0

func PrintVersion(cmd *cobra.Command, _ []string) error

PrintVersion requests version info from the daemon and prints both client and daemon version.

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

This section is empty.

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