Documentation ¶
Index ¶
- Constants
- func GetCommandByName(ctx context.Context, name string) *cobra.Command
- func GetCommands(ctx context.Context) cliutil.CommandGroups
- func GetCommandsForLocal(ctx context.Context, err error) cliutil.CommandGroups
- func GetCwd(ctx context.Context) string
- func WithConnectorServer(ctx context.Context, cs ConnectorServer) context.Context
- func WithCwd(ctx context.Context, cwd string) context.Context
- type AutocompletionFunc
- type ConnectorServer
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 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 WithConnectorServer ¶ added in v2.7.0
func WithConnectorServer(ctx context.Context, cs ConnectorServer) 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 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
Click to show internal directories.
Click to hide internal directories.