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:
authorJaime Martinez <jmartinez@gitlab.com>2020-07-28 02:44:37 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-07-28 02:44:37 +0300
commit98b61cf4663926bec3ae822f60cc34cce6e11b75 (patch)
tree0c3441a103255da9ba240e606f41929b210c1ffc /internal/source/gitlab/gitlab.go
parentfaa6a4f1ed63dfd3d9f6c193275b1186e66978ec (diff)
Replace checker in gitlab package
Add `Status` back to the Gitlab struct and the interfaces it needs. Remove checker interface.
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