commands

package
v2.8.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandRequiresSession                        = "cobra.telepresence.io/with-session"
	CommandRequiresConnectorServer                = "cobra.telepresence.io/with-connector-server"
	ValidArgsFuncRequiresConnectorServer          = "cobra.telepresence.io/valid-args-func/with-connector-server"
	FlagAutocompletionFuncRequiresConnectorServer = "cobra.telepresence.io/flag-autocompletion-func/with-connector-server"
	FlagAutocompletionFuncRequiresSession         = "cobra.telepresence.io/flag-autocompletion-func/with-session"
)

Variables

This section is empty.

Functions

func GetCommandByName added in v2.7.2

func GetCommandByName(ctx context.Context, name string) *cobra.Command

func GetCommands

func GetCommands(ctx context.Context) cliutil.CommandGroups

GetCommands will return all commands implemented by the connector daemon.

func GetCommandsForLocal

func GetCommandsForLocal(ctx context.Context, err error) cliutil.CommandGroups

GetCommandsForLocal will return the same commands as GetCommands but in a non-runnable state that reports the error given. Should be used to build help strings even if it's not possible to connect to the connector daemon.

func GetCwd added in v2.7.0

func GetCwd(ctx context.Context) string

func WithConnectorServer added in v2.7.0

func WithConnectorServer(ctx context.Context, cs ConnectorServer) context.Context

func WithCwd added in v2.7.0

func WithCwd(ctx context.Context, cwd string) context.Context

Types

type AutocompletionFunc added in v2.7.2

type AutocompletionFunc func(ctx context.Context, cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func GetFlagAutocompletionFuncFor added in v2.7.2

func GetFlagAutocompletionFuncFor(ctx context.Context, cmd *cobra.Command, flagName string) AutocompletionFunc

func GetValidArgsFunctionFor added in v2.7.2

func GetValidArgsFunctionFor(ctx context.Context, cmd *cobra.Command) AutocompletionFunc

type ConnectorServer added in v2.8.0

type ConnectorServer interface {
	rpc.ConnectorServer
	FuseFTPError() error
}

func GetConnectorServer added in v2.7.0

func GetConnectorServer(ctx context.Context) ConnectorServer

Jump to

Keyboard shortcuts

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