(opts *SSHConnectOptions)
| 205 | } |
| 206 | |
| 207 | func normalizeSSHConnectOptions(opts *SSHConnectOptions) sshConnectConfig { |
| 208 | config := sshConnectConfig{ |
| 209 | detectPersistentAuthFailure: false, |
| 210 | persistentAuthTimeout: PersistentAuthTimeout, |
| 211 | persistentAuthMaxAttempts: PersistentAuthMaxAttempts, |
| 212 | } |
| 213 | if opts == nil { |
| 214 | return config |
| 215 | } |
| 216 | |
| 217 | config.detectPersistentAuthFailure = opts.DetectPersistentAuthFailure |
| 218 | if opts.PersistentAuthTimeout > 0 { |
| 219 | config.persistentAuthTimeout = opts.PersistentAuthTimeout |
| 220 | } |
| 221 | if opts.PersistentAuthMaxAttempts != 0 { |
| 222 | config.persistentAuthMaxAttempts = opts.PersistentAuthMaxAttempts |
| 223 | } |
| 224 | return config |
| 225 | } |
| 226 | |
| 227 | type sshRetryState struct { |
| 228 | deadline time.Time |
no outgoing calls
no test coverage detected