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:
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 7644e5ad..a1fca236 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -20,6 +20,7 @@ type Config struct {
GitLab GitLab
Log Log
Sentry Sentry
+ Server Server
TLS TLS
Zip ZipServing
@@ -137,6 +138,13 @@ type ZipServing struct {
AllowedPaths []string
}
+type Server struct {
+ ReadTimeout time.Duration
+ ReadHeaderTimeout time.Duration
+ WriteTimeout time.Duration
+ ListenKeepAlive time.Duration
+}
+
func internalGitlabServerFromFlags() string {
if *internalGitLabServer != "" {
return *internalGitLabServer
@@ -241,6 +249,12 @@ func loadConfig() (*Config, error) {
OpenTimeout: *zipOpenTimeout,
AllowedPaths: []string{*pagesRoot},
},
+ Server: Server{
+ ReadTimeout: *serverReadTimeout,
+ ReadHeaderTimeout: *serverReadHeaderTimeout,
+ WriteTimeout: *serverWriteTimeout,
+ ListenKeepAlive: *serverKeepAlive,
+ },
// Actual listener pointers will be populated in appMain. We populate the
// raw strings here so that they are available in appMain