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
path: root/app.go
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-09-21 17:17:03 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-09-22 13:08:27 +0300
commit079f5e979142bceeeb6506c4d31d7c9f1488ce78 (patch)
tree1d0f83071f8978594dbe1a7c43b3d112f6073839 /app.go
parente33a670211b5a63b5db4c024b95ec2d96d2ef463 (diff)
Separate domain config source from a domain
Diffstat (limited to 'app.go')
-rw-r--r--app.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/app.go b/app.go
index 9be4409c..c14d7bc2 100644
--- a/app.go
+++ b/app.go
@@ -28,6 +28,7 @@ import (
"gitlab.com/gitlab-org/gitlab-pages/internal/logging"
"gitlab.com/gitlab-org/gitlab-pages/internal/netutil"
"gitlab.com/gitlab-org/gitlab-pages/internal/request"
+ "gitlab.com/gitlab-org/gitlab-pages/internal/source/dirs"
)
const (
@@ -47,7 +48,7 @@ var (
type theApp struct {
appConfig
- dm domain.Map
+ dm dirs.Map
lock sync.RWMutex
Artifact *artifact.Artifact
Auth *auth.Auth
@@ -322,7 +323,7 @@ func (a *theApp) buildHandlerPipeline() (http.Handler, error) {
return handler, nil
}
-func (a *theApp) UpdateDomains(dm domain.Map) {
+func (a *theApp) UpdateDomains(dm dirs.Map) {
a.lock.Lock()
defer a.lock.Unlock()
a.dm = dm
@@ -366,7 +367,7 @@ func (a *theApp) Run() {
a.listenAdminUnix(&wg)
a.listenAdminHTTPS(&wg)
- go domain.Watch(a.Domain, a.UpdateDomains, time.Second)
+ go dirs.Watch(a.Domain, a.UpdateDomains, time.Second)
wg.Wait()
}