mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-08 14:14:52 +00:00
feat: try each cluster connection in order until one succeeds, add progress spinner
This commit is contained in:
1 parent
e1734a1aa6
commit
831c581e0f
6 files changed
+253
-50
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/netip"
|
||||
"strconv"
|
||||
@@ -24,6 +25,15 @@ type MachineConnection struct {
|
||||
PublicKey secret.Secret `yaml:"public_key,omitempty"`
|
||||
}
|
||||
|
||||
func (c MachineConnection) String() string {
|
||||
if c.SSH != "" {
|
||||
return string(c.SSH)
|
||||
} else if c.TCP != nil && c.TCP.IsValid() {
|
||||
return fmt.Sprintf("tcp://%s", c.TCP)
|
||||
}
|
||||
return "unknown connection"
|
||||
}
|
||||
|
||||
// SSHDestination represents an SSH destination string in the canonical form of "user@host:port".
|
||||
// The default user "root" and port 22 can be omitted.
|
||||
type SSHDestination string
|
||||
|
||||
Reference in new issue
Block a user