Documentation ¶
Index ¶
- Variables
- func AddSubCommands(cmd *cobra.Command)
- func BasicGetStatusInfo(ctx context.Context) (ioutil.WriterTos, error)
- func MergeSubCommands(ctx context.Context, commands ...*cobra.Command) context.Context
- func OnlySubcommands(cmd *cobra.Command, args []string) error
- func RunSubcommands(cmd *cobra.Command, args []string) error
- func Telepresence(ctx context.Context) *cobra.Command
- func TelepresenceDaemon(ctx context.Context) *cobra.Command
- func WithDaemonSubCommands(ctx context.Context) context.Context
- func WithSubCommands(ctx context.Context) context.Context
- type HelmCommand
- type RootDaemonStatus
- type StatusInfo
- type StatusInfoEmbedded
- type UserDaemonStatus
Constants ¶
This section is empty.
Variables ¶
var ( HelmInstallExtendFlagsFunc func(*pflag.FlagSet) //nolint:gochecknoglobals // extension point HelmExtendFlagsFunc func(*pflag.FlagSet) //nolint:gochecknoglobals // extension point HelmInstallPrologFunc func(context.Context, *pflag.FlagSet, *HelmCommand) error //nolint:gochecknoglobals // extension point )
var GetStatusInfo = BasicGetStatusInfo //nolint:gochecknoglobals // extension point
GetStatusInfo may return an extended struct, based on the one returned by the BasicGetStatusInfo.
Functions ¶
func AddSubCommands ¶
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 MergeSubCommands ¶
func OnlySubcommands ¶
OnlySubcommands is a cobra.PositionalArgs that is similar to cobra.NoArgs, but prints a better error message.
func RunSubcommands ¶
RunSubcommands is for use as a cobra.interceptCmd.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 Telepresence ¶
Telepresence returns the top level "telepresence" CLI command.
func TelepresenceDaemon ¶
TelepresenceDaemon returns the top level "telepresence" CLI limited to the subcommands [kubeauth|connector|daemon]-foreground.
func WithDaemonSubCommands ¶ added in v2.14.3
Types ¶
type HelmCommand ¶
type HelmCommand struct { values.Options helm.Request AllValues map[string]any // contains filtered or unexported fields }
func (*HelmCommand) Type ¶
func (ha *HelmCommand) Type() helm.RequestType
type RootDaemonStatus ¶ added in v2.16.0
type RootDaemonStatus struct { Running bool `json:"running,omitempty" yaml:"running,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Version string `json:"version,omitempty" yaml:"version,omitempty"` APIVersion int32 `json:"api_version,omitempty" yaml:"api_version,omitempty"` DNS *client.DNSSnake `json:"dns,omitempty" yaml:"dns,omitempty"` *client.RoutingSnake `yaml:",inline"` }
type StatusInfo ¶
type StatusInfo struct { RootDaemon io.WriterTo `json:"root_daemon" yaml:"root_daemon"` UserDaemon io.WriterTo `json:"user_daemon" yaml:"user_daemon"` }
func (*StatusInfo) WriterTos ¶
func (s *StatusInfo) WriterTos() []io.WriterTo
type StatusInfoEmbedded ¶
type StatusInfoEmbedded struct { RootDaemon io.WriterTo `json:"root_daemon" yaml:"root_daemon"` UserDaemon io.WriterTo `json:"user_daemon" yaml:"user_daemon"` }
func (*StatusInfoEmbedded) WriteTo ¶
func (s *StatusInfoEmbedded) WriteTo(out io.Writer) (int64, error)
func (*StatusInfoEmbedded) WriterTos ¶
func (s *StatusInfoEmbedded) WriterTos() []io.WriterTo
type UserDaemonStatus ¶ added in v2.16.0
type UserDaemonStatus struct { Running bool `json:"running,omitempty" yaml:"running,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` ContainerNetwork string `json:"container_network,omitempty" yaml:"container_network,omitempty"` Version string `json:"version,omitempty" yaml:"version,omitempty"` APIVersion int32 `json:"api_version,omitempty" yaml:"api_version,omitempty"` Executable string `json:"executable,omitempty" yaml:"executable,omitempty"` InstallID string `json:"install_id,omitempty" yaml:"install_id,omitempty"` Status string `json:"status,omitempty" yaml:"status,omitempty"` Error string `json:"error,omitempty" yaml:"error,omitempty"` KubernetesServer string `json:"kubernetes_server,omitempty" yaml:"kubernetes_server,omitempty"` KubernetesContext string `json:"kubernetes_context,omitempty" yaml:"kubernetes_context,omitempty"` ConnectionName string `json:"connection_name,omitempty" yaml:"connection_name,omitempty"` Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` ManagerNamespace string `json:"manager_namespace,omitempty" yaml:"manager_namespace,omitempty"` MappedNamespaces []string `json:"mapped_namespaces,omitempty" yaml:"mapped_namespaces,omitempty"` Intercepts []connectStatusIntercept `json:"intercepts,omitempty" yaml:"intercepts,omitempty"` }