github.com/aavshr/aws-sdk-go@v1.41.3/aws/session/custom_transport_go1.12.go (about) 1 //go:build !go1.13 && go1.7 2 // +build !go1.13,go1.7 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 MaxIdleConns: 100, 23 IdleConnTimeout: 90 * time.Second, 24 TLSHandshakeTimeout: 10 * time.Second, 25 ExpectContinueTimeout: 1 * time.Second, 26 } 27 }