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/source/gitlab/gitlab.go')
-rw-r--r--internal/source/gitlab/gitlab.go13
1 files changed, 4 insertions, 9 deletions
diff --git a/internal/source/gitlab/gitlab.go b/internal/source/gitlab/gitlab.go
index 77192478..5bacb603 100644
--- a/internal/source/gitlab/gitlab.go
+++ b/internal/source/gitlab/gitlab.go
@@ -20,28 +20,23 @@ import (
// information about domains from GitLab instance.
type Gitlab struct {
client api.Resolver
- checker checker
mu *sync.RWMutex
isReady bool
}
-type checker interface {
- Status() error
-}
-
// New returns a new instance of gitlab domain source.
func New(config client.Config) (*Gitlab, error) {
client, err := client.NewFromConfig(config)
if err != nil {
return nil, err
}
+
g := &Gitlab{
- client: cache.NewCache(client, nil),
- mu: &sync.RWMutex{},
- checker: client,
+ client: cache.NewCache(client, nil),
+ mu: &sync.RWMutex{},
}
- go g.Poll(defaultPollingMaxRetries, defaultPollingInterval)
+ go g.poll(defaultPollingMaxRetries, defaultPollingInterval)
// using nil for cache config will use the default values specified in internal/source/gitlab/cache/cache.go#12
return g, nil