mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
plugin: remove unused pluginRegistryService
It wrapped the regular registry service, but the ResolveRepository() function was not called anywhere. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
a583434ebc
commit
61599d0a4d
1 changed files with 0 additions and 18 deletions
|
@ -14,7 +14,6 @@ import (
|
||||||
|
|
||||||
"github.com/containerd/containerd/content"
|
"github.com/containerd/containerd/content"
|
||||||
"github.com/containerd/containerd/content/local"
|
"github.com/containerd/containerd/content/local"
|
||||||
"github.com/docker/distribution/reference"
|
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types"
|
||||||
"github.com/docker/docker/pkg/authorization"
|
"github.com/docker/docker/pkg/authorization"
|
||||||
"github.com/docker/docker/pkg/containerfs"
|
"github.com/docker/docker/pkg/containerfs"
|
||||||
|
@ -83,25 +82,8 @@ type controller struct {
|
||||||
timeoutInSecs int
|
timeoutInSecs int
|
||||||
}
|
}
|
||||||
|
|
||||||
// pluginRegistryService ensures that all resolved repositories
|
|
||||||
// are of the plugin class.
|
|
||||||
type pluginRegistryService struct {
|
|
||||||
registry.Service
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s pluginRegistryService) ResolveRepository(name reference.Named) (repoInfo *registry.RepositoryInfo, err error) {
|
|
||||||
repoInfo, err = s.Service.ResolveRepository(name)
|
|
||||||
if repoInfo != nil {
|
|
||||||
repoInfo.Class = "plugin"
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewManager returns a new plugin manager.
|
// NewManager returns a new plugin manager.
|
||||||
func NewManager(config ManagerConfig) (*Manager, error) {
|
func NewManager(config ManagerConfig) (*Manager, error) {
|
||||||
if config.RegistryService != nil {
|
|
||||||
config.RegistryService = pluginRegistryService{config.RegistryService}
|
|
||||||
}
|
|
||||||
manager := &Manager{
|
manager := &Manager{
|
||||||
config: config,
|
config: config,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue