GetSSHConnectorFromConfig creates an SSHConnector from a ServerListConfig entry.
(conf *config.ServerListConfig)
| 144 | |
| 145 | // GetSSHConnectorFromConfig creates an SSHConnector from a ServerListConfig entry. |
| 146 | func GetSSHConnectorFromConfig(conf *config.ServerListConfig) *SSHConnector { |
| 147 | return &SSHConnector{ |
| 148 | IP: conf.IP, |
| 149 | Port: conf.Port, |
| 150 | User: conf.User, |
| 151 | Password: conf.Password, |
| 152 | Key: conf.Key, |
| 153 | SSHTimeout: 5 * time.Second, |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | // GetConfigFromSSHConnector converts an SSHConnector back into a ServerListConfig. |
| 158 | func GetConfigFromSSHConnector(tgt *SSHConnector) *config.ServerListConfig { |
no outgoing calls