Too many 'T' in NewHTTTPTransport

This commit is contained in:
Łukasz Mierzwa
2018-01-24 13:04:27 -08:00
parent 0d228d2def
commit 60b1c696a3
2 changed files with 4 additions and 2 deletions

View File

@@ -33,7 +33,9 @@ func configureTLSClientCert(tlsConfig *tls.Config, certPath, keyPath string) err
return nil
}
func NewHTTTPTransport(caPath, certPath, keyPath string) (http.RoundTripper, error) {
// NewHTTPTransport handles the logic of creating a http.RoundTripper instance
// with properl tls.Config setup
func NewHTTPTransport(caPath, certPath, keyPath string) (http.RoundTripper, error) {
tlsConfig := &tls.Config{}
if caPath != "" {

View File

@@ -66,7 +66,7 @@ func setupUpstreams() {
var err error
// if either TLS root CA or client cert is configured then initialize custom transport where we have this setup
if s.TLS.CA != "" || s.TLS.Cert != "" {
httpTransport, err = alertmanager.NewHTTTPTransport(s.TLS.CA, s.TLS.Cert, s.TLS.Key)
httpTransport, err = alertmanager.NewHTTPTransport(s.TLS.CA, s.TLS.Cert, s.TLS.Key)
if err != nil {
log.Fatalf("Failed to create HTTP transport for Alertmanager '%s' with URI '%s': %s", s.Name, s.URI, err)
}