github.com/aavshr/aws-sdk-go@v1.41.3/aws/session/custom_transport.go (about) 1 //go:build go1.13 2 // +build go1.13 3 4 package session 5 6 import ( 7 "net" 8 "net/http" 9 "time" 10 ) 11 12 // Transport that should be used when a custom CA bundle is specified with the 13 // SDK. 14 func getCustomTransport() *http.Transport { 15 return &http.Transport{ 16 Proxy: http.ProxyFromEnvironment, 17 DialContext: (&net.Dialer{ 18 Timeout: 30 * time.Second, 19 KeepAlive: 30 * time.Second, 20 DualStack: true, 21 }).DialContext, 22 ForceAttemptHTTP2: true, 23 MaxIdleConns: 100, 24 IdleConnTimeout: 90 * time.Second, 25 TLSHandshakeTimeout: 10 * time.Second, 26 ExpectContinueTimeout: 1 * time.Second, 27 } 28 }