summaryrefslogtreecommitdiff
path: root/registry/service.go
diff options
context:
space:
mode:
authorallencloud <allen.sun@daocloud.io>2016-12-21 18:31:05 +0800
committerallencloud <allen.sun@daocloud.io>2017-01-04 11:04:00 +0800
commit5b9348c553d183bc62f6e7cc8f934766fac162bd (patch)
tree3543d18b57ef6ea1c2681439556353b50a5f2021 /registry/service.go
parent355f2ae972cc6b5070d14c16113bc9da076561d4 (diff)
downloaddocker-5b9348c553d183bc62f6e7cc8f934766fac162bd.tar.gz
support registry mirror config reload
Signed-off-by: allencloud <allen.sun@daocloud.io>
Diffstat (limited to 'registry/service.go')
-rw-r--r--registry/service.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/registry/service.go b/registry/service.go
index 596a9c7e5f..af74cbad26 100644
--- a/registry/service.go
+++ b/registry/service.go
@@ -31,6 +31,7 @@ type Service interface {
Search(ctx context.Context, term string, limit int, authConfig *types.AuthConfig, userAgent string, headers map[string][]string) (*registrytypes.SearchResults, error)
ServiceConfig() *registrytypes.ServiceConfig
TLSConfig(hostname string) (*tls.Config, error)
+ LoadMirrors([]string) error
LoadInsecureRegistries([]string) error
}
@@ -73,6 +74,14 @@ func (s *DefaultService) ServiceConfig() *registrytypes.ServiceConfig {
return &servConfig
}
+// LoadMirrors loads registry mirrors for Service
+func (s *DefaultService) LoadMirrors(mirrors []string) error {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ return s.config.LoadMirrors(mirrors)
+}
+
// LoadInsecureRegistries loads insecure registries for Service
func (s *DefaultService) LoadInsecureRegistries(registries []string) error {
s.mu.Lock()