MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / normalizeSSHConnectOptions

Function normalizeSSHConnectOptions

utils/ssh.go:207–225  ·  view source on GitHub ↗
(opts *SSHConnectOptions)

Source from the content-addressed store, hash-verified

205}
206
207func 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
227type sshRetryState struct {
228 deadline time.Time

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected