Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-11-29 13:27:05 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-11-29 13:27:05 +0300
commit9e4e8df6142dceb64c45c6c1d5b7de65a8f3a0e8 (patch)
treed2dc7dbfc3593b2221c6a373860256d3c92fc8cf
parent570d6e165d79a41597b8574026ab3d27629553c9 (diff)
Extract GitLab API connection timeout to a variable
-rw-r--r--internal/source/gitlab/client/client.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/source/gitlab/client/client.go b/internal/source/gitlab/client/client.go
index 6b475047..9d8e4f48 100644
--- a/internal/source/gitlab/client/client.go
+++ b/internal/source/gitlab/client/client.go
@@ -30,6 +30,7 @@ var (
)
var tokenTimeout = 30 * time.Second
+var connectionTimeout = 10 * time.Second
// NewClient initializes and returns new Client baseUrl is
// appConfig.GitLabServer secretKey is appConfig.GitLabAPISecretKey
@@ -43,7 +44,7 @@ func NewClient(baseURL string, secretKey []byte) *Client {
secretKey: secretKey,
baseURL: url,
httpClient: &http.Client{
- Timeout: 5 * time.Second,
+ Timeout: connectionTimeout,
Transport: httptransport.Transport,
},
}