mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
api/types: move PluginCreateOptions to client
While it is imported by both the client and the daemon, values of the PluginCreateOptions struct are not marshaled or unmarshaled. The only field is mapped to and from an HTTP query parameter. Furthermore, this options type is the odd one out: the daemon uses types in api/types/backend to pass options around for the other plugin lifecycle operations. Move the PluginCreateOptions type into client, and define a new PluginCreateConfig struct in api/types/backend for the daemon to use alongside PluginRmConfig, PluginEnableConfig and PluginDisableConfig. Signed-off-by: Cory Snider <csnider@mirantis.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
committed by
Sebastiaan van Stijn
parent
b93ad81898
commit
24aa86991c
@@ -626,7 +626,7 @@ func (pm *Manager) Set(name string, args []string) error {
|
||||
|
||||
// CreateFromContext creates a plugin from the given pluginDir which contains
|
||||
// both the rootfs and the config.json and a repoName with optional tag.
|
||||
func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.ReadCloser, options *types.PluginCreateOptions) (retErr error) {
|
||||
func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.ReadCloser, options *backend.PluginCreateConfig) (retErr error) {
|
||||
pm.muGC.RLock()
|
||||
defer pm.muGC.RUnlock()
|
||||
|
||||
|
||||
@@ -69,6 +69,6 @@ func (pm *Manager) Set(name string, args []string) error {
|
||||
|
||||
// CreateFromContext creates a plugin from the given pluginDir which contains
|
||||
// both the rootfs and the config.json and a repoName with optional tag.
|
||||
func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.ReadCloser, options *types.PluginCreateOptions) error {
|
||||
func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.ReadCloser, options *backend.PluginCreateConfig) error {
|
||||
return errNotSupported
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user