mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
Too many 'T' in NewHTTTPTransport
This commit is contained in:
@@ -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 != "" {
|
||||
|
||||
2
main.go
2
main.go
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user