diff options
author | Vladimir Shushlin <vshushlin@gitlab.com> | 2020-08-04 12:02:38 +0300 |
---|---|---|
committer | Vladimir Shushlin <vshushlin@gitlab.com> | 2020-08-04 12:02:38 +0300 |
commit | 4a4d5746fca079a59204ef4ef738367a9a150660 (patch) | |
tree | 7ee2faa60dd72dae5029033f200b1a8e22735f2b /internal/source/domains.go | |
parent | 185e0a0e5c621f350335495291c535e5c05df89b (diff) |
Revert "Merge branch 'add-polling-to-domain-package' into 'master'"revert-b3bf3ac4
This reverts merge request !306
Diffstat (limited to 'internal/source/domains.go')
-rw-r--r-- | internal/source/domains.go | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/internal/source/domains.go b/internal/source/domains.go index ca2a8b6e..77e1aa1d 100644 --- a/internal/source/domains.go +++ b/internal/source/domains.go @@ -44,22 +44,19 @@ func NewDomains(config Config) (*Domains, error) { // TODO: choose domain source config via config.DomainConfigSource() // https://gitlab.com/gitlab-org/gitlab/-/issues/217912 - domains := &Domains{ - disk: disk.New(), - } - if len(config.InternalGitLabServerURL()) == 0 || len(config.GitlabAPISecret()) == 0 { - return domains, nil + return &Domains{disk: disk.New()}, nil } - glClient, err := gitlab.New(config) + gitlab, err := gitlab.New(config) if err != nil { return nil, err } - domains.gitlab = glClient - - return domains, nil + return &Domains{ + gitlab: gitlab, + disk: disk.New(), + }, nil } // GetDomain retrieves a domain information from a source. We are using two @@ -88,7 +85,7 @@ func (d *Domains) IsReady() bool { } func (d *Domains) source(domain string) Source { - if d.gitlab == nil || !d.gitlab.IsReady() { + if d.gitlab == nil { return d.disk } |