func NewHTTPTLSTransport(config TransportConfig) *http.Transport {
	// See https://code.google.com/p/go/issues/detail?id=4677
	// We need to force the connection to close each time so that we don't
	// hit the above Go bug.
	transport := &http.Transport{
		TLSClientConfig:     config.TLSConfig,
		DisableKeepAlives:   config.DisableKeepAlives,
		TLSHandshakeTimeout: config.TLSHandshakeTimeout,
	}
	for _, middlewareFn := range config.Middlewares {
		transport = middlewareFn(transport)
	}
	return transport
}
// NewHTTPTLSTransport returns a new http.Transport constructed with the TLS config
// and the necessary parameters for Juju.
NewHTTPTLSTransport returns a new http.Transport constructed with the TLS config
and the necessary parameters for Juju.
// NewHTTPTLSTransport returns a new http . Transport constructed with the TLS config // and the necessary parameters for Juju .
func NewHTTPTLSTransport(config TransportConfig) *http.Transport {
	transport := &http.Transport{
		TLSClientConfig:     config.TLSConfig,
		DisableKeepAlives:   config.DisableKeepAlives,
		TLSHandshakeTimeout: config.TLSHandshakeTimeout,
	}
	for _, middlewareFn := range config.Middlewares {
		transport = middlewareFn(transport)
	}
	return transport
}
func NewHTTPTLSTransport ( config TransportConfig ) * http . Transport { transport := & http . Transport { TLSClientConfig : config . TLSConfig , DisableKeepAlives : config . DisableKeepAlives , TLSHandshakeTimeout : config . TLSHandshakeTimeout , } for _ , middlewareFn := range config . Middlewares { transport = middlewareFn ( transport ) } return transport }
NewHTTPTLSTransport returns a new http.Transport constructed with the TLS config
and the necessary parameters for Juju.
NewHTTPTLSTransport returns a new http . Transport constructed with the TLS config and the necessary parameters for Juju .
// See https://code.google.com/p/go/issues/detail?id=4677 // We need to force the connection to close each time so that we don't // hit the above Go bug.