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 Interrupt() chan bool
- func IsDaemonRunning(pidFile string) bool
- func IsWindows() bool
- func PrivateKeyPath(component, identifier string) string
- func RandomString(n int) string
- func StopBackendProcess(stop bool, cancel func())
- func String2Map(str string) map[string]string
- func WritePidFile(pidFile string) (pid int, err error)
- func WritePrivateKey(privateKeyPath string, data []byte) error
- type SSHCredential
- type SSHGenerator
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 String2Map ¶
String2Map Convert parameter string to real map "k1=v1,k2=v2" -> {"k1":"v1","k2","v2"}
func WritePidFile ¶
WritePidFile write pid to file
func WritePrivateKey ¶
WritePrivateKey write ssh private key to privateKeyPath
Types ¶
type SSHCredential ¶
SSHCredential ssh info
func NewDefaultSSHCredential ¶
func NewDefaultSSHCredential() *SSHCredential
NewDefaultSSHCredential ...
type SSHGenerator ¶
SSHGenerator ssh key pair generator
func Generate ¶
func Generate(privateKeyPath string) (*SSHGenerator, error)
Generate generate SSHGenerator
func NewSSHGenerator ¶
func NewSSHGenerator(privateKey string, publicKey string, privateKeyPath string) *SSHGenerator
NewSSHGenerator create ssh generator
Click to show internal directories.
Click to hide internal directories.