Documentation ¶
Index ¶
- Variables
- func AddSubCommands(cmd *cobra.Command)
- func BasicGetStatusInfo(ctx context.Context) (ioutil.WriterTos, error)
- func ClusterIdCommand() *cobra.Command
- func Command(ctx context.Context) *cobra.Command
- func GatherTracesCommand() *cobra.Command
- func GlobalFlags() *pflag.FlagSet
- func InitContext(ctx context.Context) context.Context
- func Main(ctx context.Context)
- func OnlySubcommands(cmd *cobra.Command, args []string) error
- func PerhapsLegacyCommands(cmd *cobra.Command, args []string) error
- func PrintVersion(cmd *cobra.Command, _ []string) error
- func PushTracesCommand() *cobra.Command
- func RunSubcommands(cmd *cobra.Command, args []string) error
- func WithSubCommands(ctx context.Context) context.Context
- type StatusInfo
Constants ¶
This section is empty.
Variables ¶
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
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 ClusterIdCommand ¶ added in v2.2.0
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 GatherTracesCommand ¶ added in v2.9.0
func GlobalFlags ¶ added in v2.9.0
func OnlySubcommands ¶
OnlySubcommands is a cobra.PositionalArgs that is similar to cobra.NoArgs, but prints a better error message.
func PerhapsLegacyCommands ¶ added in v2.4.0
PerhapsLegacyCommands is like OnlySubcommands but performs some initial check for legacy flags.
func PrintVersion ¶ added in v2.9.0
PrintVersion requests version info from the daemon and prints both client and daemon version.
func PushTracesCommand ¶ added in v2.9.0
func RunSubcommands ¶
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.