Documentation ¶
Index ¶
- func CreateDirIfNotExist(dir string)
- func DropHosts(hostsMap map[string]string)
- func DumpHosts(hostsMap map[string]string)
- func GetOutboundIP() (address string)
- func GetRandomSSHPort(podIP string) string
- func HomeDir() string
- func IsDaemonRunning(pidFile string) bool
- func IsWindows() bool
- func PrepareSSHPrivateKey() (err error)
- func PrivateKeyPath() string
- func RandomString(n int) string
- func String2Map(str string) map[string]string
- func WritePidFile(pidFile string) (pid int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOutboundIP ¶
func GetOutboundIP() (address string)
GetOutboundIP Get preferred outbound ip of this machine
func GetRandomSSHPort ¶
GetRandomSSHPort get pod random ssh port
func IsDaemonRunning ¶
IsDaemonRunning check daemon is running or not
func PrepareSSHPrivateKey ¶ added in v0.0.12
func PrepareSSHPrivateKey() (err error)
PrepareSSHPrivateKey generator ssh private key
func PrivateKeyPath ¶ added in v0.0.12
func PrivateKeyPath() string
PrivateKeyPath Get ssh private key path
func String2Map ¶ added in v0.0.12
String2Map Convert parameter string to real map "k1=v1,k2=v2" -> {"k1":"v1","k2","v2"}
func WritePidFile ¶ added in v0.0.12
WritePidFile write pid to file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.