peridot/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.6.go

25 lines
486 B
Go
Raw Normal View History

2022-11-04 02:21:49 +00:00
//go:build !go1.7 && go1.6
2022-07-07 20:11:50 +00:00
// +build !go1.7,go1.6
package session
import (
"net"
"net/http"
"time"
)
// Transport that should be used when a custom CA bundle is specified with the
// SDK.
func getCustomTransport() *http.Transport {
return &http.Transport{
Proxy: http.ProxyFromEnvironment,
Dial: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
}).Dial,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
}
}