Move plugin client creation to the extension point
Signed-off-by: Brian Goff <cpuguy83@gmail.com> Upstream-commit: f51a96c0165fdcbbe11f62b66b582b7e202f211b Component: engine
This commit is contained in:
@@ -31,6 +31,9 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// ProtocolSchemeHTTPV1 is the name of the protocol used for interacting with plugins using this package.
|
||||
const ProtocolSchemeHTTPV1 = "moby.plugins.http/v1"
|
||||
|
||||
var (
|
||||
// ErrNotImplements is returned if the plugin does not implement the requested driver.
|
||||
ErrNotImplements = errors.New("Plugin does not implement the requested driver")
|
||||
@@ -88,6 +91,11 @@ func (p *Plugin) Client() *Client {
|
||||
return p.client
|
||||
}
|
||||
|
||||
// Protocol returns the protocol name/version used for plugins in this package.
|
||||
func (p *Plugin) Protocol() string {
|
||||
return ProtocolSchemeHTTPV1
|
||||
}
|
||||
|
||||
// IsV1 returns true for V1 plugins and false otherwise.
|
||||
func (p *Plugin) IsV1() bool {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user