Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultTransport http.RoundTripper = &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, DualStack: true, }).DialContext, MaxIdleConns: 100, IdleConnTimeout: 10 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, }
DefaultTransport is a custom implementation of the DefaultTransport. It limits the IdleConnTimeout to 10 seconds instead of 90 seconds.
from "net/http/transport.go"
var ErrCannotUpdateIdleConnTimeout = errors.New("cannot update transport")
ErrCannotUpdateIdleConnTimeout is an error returned when the Transport is unable to be updated.
Functions ¶
func NewAuthError ¶
NewAuthError returns an AuthError struct with the reason for erroring, as well as the Name of the image reference
func UpdateIdleConnectionsTimeout ¶
UpdateIdleConnectionsTimeout limits the default timeout for idle connections to 10 seconds. If the OAuth2 transport is nil, redefine it with our own DefaultTransport. This should limit the number of idle connections left open after the initial requests are made, which in turn should reduce the chances of the number of available connections being depleted.