Documentation ¶
Overview ¶
Package utils contains logquiet
Package utils contains helpers
Index ¶
- func AttachToSerial(serverID string, apiToken string, attachStdin bool) error
- func GeneratingAnSSHKey(cfg SpawnRedirection, path string, name string) (string, error)
- func IsTCPPortOpen(dest string) bool
- func LogQuiet(str string)
- func NewSSHExecCmd(publicIPAddress string, privateIPAddress string, allocateTTY bool, ...) *sshcommand.Command
- func PathToTARPathparts(fullPath string) (string, string)
- func Quiet(option bool)
- func RemoveDuplicates(elements []string) []string
- func SSHExec(publicIPAddress string, privateIPAddress string, command []string, ...) error
- func TruncIf(str string, max int, cond bool) string
- func WaitForTCPPortOpen(dest string) error
- func Wordify(str string) string
- type LogQuietStruct
- type SpawnRedirection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachToSerial ¶
AttachToSerial tries to connect to server serial using 'term.js-cli' and fallback with a help message
func GeneratingAnSSHKey ¶
func GeneratingAnSSHKey(cfg SpawnRedirection, path string, name string) (string, error)
GeneratingAnSSHKey generates an SSH key
func IsTCPPortOpen ¶
IsTCPPortOpen returns true if a TCP communication with "host:port" can be initialized
func NewSSHExecCmd ¶
func NewSSHExecCmd(publicIPAddress string, privateIPAddress string, allocateTTY bool, command []string, gatewayIPAddress string) *sshcommand.Command
NewSSHExecCmd computes execve compatible arguments to run a command via ssh
func PathToTARPathparts ¶
PathToTARPathparts returns the two parts of a unix path
func RemoveDuplicates ¶
RemoveDuplicates transforms an array into a unique array
func SSHExec ¶
func SSHExec(publicIPAddress string, privateIPAddress string, command []string, checkConnection bool, gateway string) error
SSHExec executes a command over SSH and redirects file-descriptors
func WaitForTCPPortOpen ¶
WaitForTCPPortOpen calls IsTCPPortOpen in a loop
Types ¶
type LogQuietStruct ¶
type LogQuietStruct struct {
// contains filtered or unexported fields
}
LogQuietStruct is a struct to store information about quiet state