Documentation
¶
Index ¶
- func AuthMethodFromPrivateKey(key string) (ssh.AuthMethod, error)
- func AuthMethodFromPrivateKeyFile(file string) (ssh.AuthMethod, error)
- func DirExistAndReadable(name string) bool
- func FileExistAndReadable(name string) bool
- func FileExists(name string) bool
- func GetConfigFile() (config string)
- func GetMachinesConfigFile() (config string)
- func GetProviderConfigFile() (config string)
- func GetServerConfigFile() (config string)
- func GetTestMode() bool
- func LoadConfig(fileName string, config any) (err error)
- func LoadTextEnvSubst(fileName string) (string, error)
- func MaxInt(x, y int) int
- func MaxInt64(x, y int64) int64
- func MinInt(x, y int) int
- func MinInt64(x, y int64) int64
- func NewRequestContext(requestTimeout time.Duration) *context.Context
- func NodeFromJSON(s string) (*apiv1.Node, error)
- func Scp(connect *sshutils.AutoScalerServerSSH, host, src, dst string) error
- func Shell(args ...string) (string, error)
- func ShouldTestFeature(name string) bool
- func Sudo(connect *sshutils.AutoScalerServerSSH, host string, ...) (string, error)
- func ToJSON(v any) string
- func ToYAML(v any) string
- func Values[M ~map[K]V, K comparable, V any](m M) []V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMethodFromPrivateKey ¶
func AuthMethodFromPrivateKey(key string) (ssh.AuthMethod, error)
AuthMethodFromPrivateKey read public key
func AuthMethodFromPrivateKeyFile ¶
func AuthMethodFromPrivateKeyFile(file string) (ssh.AuthMethod, error)
AuthMethodFromPrivateKeyFile read public key
func DirExistAndReadable ¶
func FileExistAndReadable ¶
func GetConfigFile ¶ added in v1.30.0
func GetConfigFile() (config string)
func GetMachinesConfigFile ¶ added in v1.30.0
func GetMachinesConfigFile() (config string)
func GetProviderConfigFile ¶ added in v1.30.0
func GetProviderConfigFile() (config string)
func GetServerConfigFile ¶ added in v1.30.0
func GetServerConfigFile() (config string)
func GetTestMode ¶ added in v1.30.0
func GetTestMode() bool
func LoadConfig ¶ added in v1.30.0
func LoadTextEnvSubst ¶ added in v1.30.0
func NodeFromJSON ¶
NodeFromJSON deserialize a string to apiv1.Node
func Scp ¶
func Scp(connect *sshutils.AutoScalerServerSSH, host, src, dst string) error
Scp copy file
func ShouldTestFeature ¶
ShouldTestFeature check if test must be done
func Sudo ¶
func Sudo(connect *sshutils.AutoScalerServerSSH, host string, timeoutInSeconds time.Duration, command ...string) (string, error)
Sudo exec ssh command as sudo
func Values ¶
func Values[M ~map[K]V, K comparable, V any](m M) []V
Values returns the values of the map m. The values will be in an indeterminate order.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.