Merge pull request #18744 from runcom/plugins-deadcode

pkg: plugins: remove dead code
This commit is contained in:
Alexander Morozov 2015-12-17 10:50:04 -08:00
commit 7051dc2661

View file

@ -18,23 +18,15 @@ var (
specsPaths = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"} specsPaths = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"}
) )
// Registry defines behavior of a registry of plugins. // localRegistry defines a registry that is local (using unix socket).
type Registry interface { type localRegistry struct{}
// Plugins lists all plugins.
Plugins() ([]*Plugin, error)
// Plugin returns the plugin registered with the given name (or returns an error).
Plugin(name string) (*Plugin, error)
}
// LocalRegistry defines a registry that is local (using unix socket). func newLocalRegistry() localRegistry {
type LocalRegistry struct{} return localRegistry{}
func newLocalRegistry() LocalRegistry {
return LocalRegistry{}
} }
// Plugin returns the plugin registered with the given name (or returns an error). // Plugin returns the plugin registered with the given name (or returns an error).
func (l *LocalRegistry) Plugin(name string) (*Plugin, error) { func (l *localRegistry) Plugin(name string) (*Plugin, error) {
socketpaths := pluginPaths(socketsPath, name, ".sock") socketpaths := pluginPaths(socketsPath, name, ".sock")
for _, p := range socketpaths { for _, p := range socketpaths {