exec

package
v1.14.5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RemotePythonCmd = &cobra.Command{
	Use:   "python [file]",
	Short: "Runs a remote Python shell",
	Long:  `Runs a remote Python shell with a local script file.`,
	Args:  cobra.ExactArgs(1),
	Run: func(cmd *cobra.Command, args []string) {
		podID, _ := cmd.Flags().GetString("pod_id")
		file := args[0]

		fmt.Println("Running remote Python shell...")
		if err := PythonOverSSH(podID, file); err != nil {
			fmt.Fprintf(os.Stderr, "Error executing Python over SSH: %v\n", err)
		}
	},
}

Functions

func PythonOverSSH

func PythonOverSSH(podID string, file string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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