Documentation ¶
Index ¶
- func ExecCommand(cmd string) (string, error)
- func ExecCommandWithPipe(cmd1, cmd2 string) (string, error)
- func ExecCommandWithSudo(cmd string) (string, error)
- func GetConfigPath() (string, error)
- func GetHomeDir() (string, error)
- func GetYAMLString(fileName string) (string, error)
- func RunCommand(cmd string) error
- func RunCommandWithSudo(cmd string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecCommand ¶
ExecCommand runs a command on the host and get the output
func ExecCommandWithPipe ¶
ExecCommandWithPipe runs 2 commands, pipe the output of first command to second, and returns output from the second
func ExecCommandWithSudo ¶
ExecCommandWithSudo runs a command with sudo permissions and return the output as a string
func GetConfigPath ¶
GetConfigPath returns the filepath of kubeconfig file
func GetHomeDir ¶
GetHomeDir gets the home directory for the system. It is required to locate the .kube/config file
func GetYAMLString ¶
GetYAMLString gets the yaml-string from the given YAML file
func RunCommandWithSudo ¶
RunCommandWithSudo runs a command with sudo permissions
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.