(maxWait int, lastErr error)
| 744 | } |
| 745 | |
| 746 | func timeoutError(maxWait int, lastErr error) error { |
| 747 | if lastErr != nil { |
| 748 | return fmt.Errorf("%w: SSH connection timeout after %d seconds: %w", ErrSSHUnreachable, maxWait, lastErr) |
| 749 | } |
| 750 | return fmt.Errorf("%w: SSH connection timeout after %d seconds", ErrSSHUnreachable, maxWait) |
| 751 | } |
| 752 | |
| 753 | func WaitForTCPPort(ctx context.Context, host string, port int, overallTimeout time.Duration) error { |
| 754 | address := net.JoinHostPort(host, strconv.Itoa(port)) |
no outgoing calls
no test coverage detected