cmd

package
v2.18.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: Apache-2.0 Imports: 71 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, *HelmCommand) error //nolint:gochecknoglobals // extension point
)
View Source
var CLIHelpDocumentationURL = "https://www.telepresence.io" //nolint:gochecknoglobals // extension point
View Source
var GetStatusInfo = func(ctx context.Context) (ioutil.WriterTos, error) {
	return nil, nil
}

GetStatusInfo may return an extended struct

View Source
var GetTrafficManagerStatusExtras = func(context.Context, *daemon.UserClient) ioutil.KeyValueProvider {
	return nil
}

GetTrafficManagerStatusExtras may return an extended struct

Functions

func AddSubCommands

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 GetCommandKubeConfig added in v2.18.0

func GetCommandKubeConfig(cmd *cobra.Command) (*client.Kubeconfig, error)

GetCommandKubeConfig will return the fully resolved client.Kubeconfig for the given command.

func MergeSubCommands

func MergeSubCommands(ctx context.Context, commands ...*cobra.Command) 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 RunSubcommands

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

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

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

Telepresence returns the top level "telepresence" CLI command.

func TelepresenceDaemon

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

TelepresenceDaemon returns the top level "telepresence" CLI limited to the subcommands [kubeauth|connector|daemon]-foreground.

func WithDaemonSubCommands added in v2.14.3

func WithDaemonSubCommands(ctx context.Context) context.Context

func WithSubCommands

func WithSubCommands(ctx context.Context) context.Context

Types

type ConnectStatusIntercept added in v2.18.0

type ConnectStatusIntercept struct {
	Name   string `json:"name,omitempty" yaml:"name,omitempty"`
	Client string `json:"client,omitempty" yaml:"client,omitempty"`
}

type ContainerizedDaemonStatus added in v2.18.0

type ContainerizedDaemonStatus struct {
	*UserDaemonStatus    `yaml:",inline"`
	DNS                  *client.DNSSnake `json:"dns,omitempty" yaml:"dns,omitempty"`
	*client.RoutingSnake `yaml:",inline"`
}

func (*ContainerizedDaemonStatus) WriteTo added in v2.18.0

func (cs *ContainerizedDaemonStatus) WriteTo(out io.Writer) (int64, error)

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 MultiConnectStatusInfo added in v2.18.0

type MultiConnectStatusInfo struct {
	// contains filtered or unexported fields
}

func (*MultiConnectStatusInfo) MarshalJSON added in v2.18.0

func (s *MultiConnectStatusInfo) MarshalJSON() ([]byte, error)

func (*MultiConnectStatusInfo) MarshalYAML added in v2.18.0

func (s *MultiConnectStatusInfo) MarshalYAML() (any, error)

func (*MultiConnectStatusInfo) WriterTos added in v2.18.0

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

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"`
}

func (*RootDaemonStatus) WriteTo added in v2.16.0

func (ds *RootDaemonStatus) WriteTo(out io.Writer) (int64, error)

type SingleConnectStatusInfo added in v2.18.0

type SingleConnectStatusInfo struct {
	// contains filtered or unexported fields
}

func (*SingleConnectStatusInfo) MarshalJSON added in v2.18.0

func (s *SingleConnectStatusInfo) MarshalJSON() ([]byte, error)

func (*SingleConnectStatusInfo) MarshalYAML added in v2.18.0

func (s *SingleConnectStatusInfo) MarshalYAML() (any, error)

func (*SingleConnectStatusInfo) WriterTos added in v2.18.0

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

type StatusInfo

type StatusInfo struct {
	RootDaemon     RootDaemonStatus     `json:"root_daemon" yaml:"root_daemon"`
	UserDaemon     UserDaemonStatus     `json:"user_daemon" yaml:"user_daemon"`
	TrafficManager TrafficManagerStatus `json:"traffic_manager" yaml:"traffic_manager"`
}

func (*StatusInfo) MarshalJSON added in v2.18.0

func (s *StatusInfo) MarshalJSON() ([]byte, error)

func (*StatusInfo) MarshalYAML added in v2.18.0

func (s *StatusInfo) MarshalYAML() (any, error)

func (*StatusInfo) WriterTos

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

type TrafficManagerStatus added in v2.18.0

type TrafficManagerStatus struct {
	Name         string `json:"name,omitempty" yaml:"name,omitempty"`
	Version      string `json:"version,omitempty" yaml:"version,omitempty"`
	TrafficAgent string `json:"traffic_agent,omitempty" yaml:"traffic_agent,omitempty"`
	// contains filtered or unexported fields
}

func (*TrafficManagerStatus) MarshalJSON added in v2.18.0

func (ts *TrafficManagerStatus) MarshalJSON() ([]byte, error)

func (*TrafficManagerStatus) MarshalYAML added in v2.18.0

func (ts *TrafficManagerStatus) MarshalYAML() (any, error)

func (*TrafficManagerStatus) WriteTo added in v2.18.0

func (ts *TrafficManagerStatus) WriteTo(out io.Writer) (int64, error)

type UserDaemonStatus added in v2.16.0

type UserDaemonStatus struct {
	Running           bool                     `json:"running,omitempty" yaml:"running,omitempty"`
	InDocker          bool                     `json:"in_docker,omitempty" yaml:"in_docker,omitempty"`
	Name              string                   `json:"name,omitempty" yaml:"name,omitempty"`
	DaemonPort        int                      `json:"daemon_port,omitempty" yaml:"daemon_port,omitempty"`
	ContainerNetwork  string                   `json:"container_network,omitempty" yaml:"container_network,omitempty"`
	Hostname          string                   `json:"hostname,omitempty" yaml:"hostname,omitempty"`
	ExposedPorts      []string                 `json:"exposedPorts,omitempty" yaml:"exposedPorts,omitempty"`
	Version           string                   `json:"version,omitempty" yaml:"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"`
	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"`
	// contains filtered or unexported fields
}

func (*UserDaemonStatus) WriteTo added in v2.16.0

func (cs *UserDaemonStatus) WriteTo(out io.Writer) (int64, error)

Jump to

Keyboard shortcuts

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