summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Wiedler <iwiedler@gitlab.com>2021-07-20 18:24:22 +0200
committerIgor Wiedler <iwiedler@gitlab.com>2021-07-20 18:24:22 +0200
commitaf6b041069f731ee16b0855306d7deeb74240ae9 (patch)
treeb72fbdeae3ac5345c4fc0950fd32a83523ae9b19
parent9becd67d431d215e9460b667b919801ec5f75042 (diff)
downloadgitlab-shell-af6b041069f731ee16b0855306d7deeb74240ae9.tar.gz
remove tracing.NewRoundTripper from internal/Config, now that NewHTTPClient already includes it
-rw-r--r--internal/config/config.go14
1 files changed, 4 insertions, 10 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 71e7840..4c75ad5 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -10,7 +10,6 @@ import (
"sync"
"time"
- "gitlab.com/gitlab-org/labkit/tracing"
yaml "gopkg.in/yaml.v2"
"gitlab.com/gitlab-org/gitlab-shell/client"
@@ -73,9 +72,9 @@ var (
Listen: "[::]:22",
WebListen: "localhost:9122",
ConcurrentSessionsLimit: 10,
- GracePeriodSeconds: 10,
- ReadinessProbe: "/start",
- LivenessProbe: "/health",
+ GracePeriodSeconds: 10,
+ ReadinessProbe: "/start",
+ LivenessProbe: "/health",
HostKeyFiles: []string{
"/run/secrets/ssh-hostkeys/ssh_host_rsa_key",
"/run/secrets/ssh-hostkeys/ssh_host_ecdsa_key",
@@ -96,7 +95,7 @@ func (c *Config) ApplyGlobalState() {
func (c *Config) HttpClient() *client.HttpClient {
c.httpClientOnce.Do(func() {
- client := client.NewHTTPClient(
+ c.httpClient = client.NewHTTPClient(
c.GitlabUrl,
c.GitlabRelativeURLRoot,
c.HttpSettings.CaFile,
@@ -104,11 +103,6 @@ func (c *Config) HttpClient() *client.HttpClient {
c.HttpSettings.SelfSignedCert,
c.HttpSettings.ReadTimeoutSeconds,
)
-
- tr := client.Transport
- client.Transport = tracing.NewRoundTripper(tr)
-
- c.httpClient = client
})
return c.httpClient