diff options
author | Martin Polden <mpolden@mpolden.no> | 2023-03-23 12:03:42 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2023-03-23 15:05:37 +0100 |
commit | 8780612685274a5c40f0f9537bbc6872bf8c7748 (patch) | |
tree | d449a7caf7eeaf3205860a890214d3387c7ec008 /client/go/internal/vespa/target_cloud.go | |
parent | d402dd4a6d999fb82aa335f7f316e58f5b5bf556 (diff) |
Always use HTTP/2 transport when using TLS
Diffstat (limited to 'client/go/internal/vespa/target_cloud.go')
-rw-r--r-- | client/go/internal/vespa/target_cloud.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/client/go/internal/vespa/target_cloud.go b/client/go/internal/vespa/target_cloud.go index 827d6c6a56a..2335d4f3432 100644 --- a/client/go/internal/vespa/target_cloud.go +++ b/client/go/internal/vespa/target_cloud.go @@ -160,8 +160,8 @@ func (t *cloudTarget) Service(name string, timeout time.Duration, runID int64, c return nil, fmt.Errorf("unknown service: %s", name) } - if service.TLSOptions.KeyPair.Certificate != nil { - util.SetCertificate(service, []tls.Certificate{service.TLSOptions.KeyPair}) + if service.TLSOptions.KeyPair != nil { + util.SetCertificate(service.httpClient, []tls.Certificate{*service.TLSOptions.KeyPair}) } return service, nil } @@ -275,7 +275,7 @@ func (t *cloudTarget) PrintLog(options LogOptions) error { if options.Follow { timeout = math.MaxInt64 // No timeout } - _, err = wait(t.httpClient, logFunc, requestFunc, &t.apiOptions.TLSOptions.KeyPair, timeout) + _, err = wait(t.httpClient, logFunc, requestFunc, t.apiOptions.TLSOptions.KeyPair, timeout) return err } @@ -326,7 +326,7 @@ func (t *cloudTarget) waitForRun(runID int64, timeout time.Duration) error { } return true, nil } - _, err = wait(t.httpClient, jobSuccessFunc, requestFunc, &t.apiOptions.TLSOptions.KeyPair, timeout) + _, err = wait(t.httpClient, jobSuccessFunc, requestFunc, t.apiOptions.TLSOptions.KeyPair, timeout) return err } @@ -384,7 +384,7 @@ func (t *cloudTarget) discoverEndpoints(timeout time.Duration) error { } return true, nil } - if _, err = wait(t.httpClient, endpointFunc, func() *http.Request { return req }, &t.apiOptions.TLSOptions.KeyPair, timeout); err != nil { + if _, err = wait(t.httpClient, endpointFunc, func() *http.Request { return req }, t.apiOptions.TLSOptions.KeyPair, timeout); err != nil { return err } if len(urlsByCluster) == 0 { |