0403addc5f
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 83ca993c15
)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
19 lines
449 B
Go
19 lines
449 B
Go
package client
|
|
|
|
import (
|
|
"net/url"
|
|
"strconv"
|
|
|
|
"github.com/docker/docker/api/types"
|
|
"golang.org/x/net/context"
|
|
)
|
|
|
|
// PluginEnable enables a plugin
|
|
func (cli *Client) PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error {
|
|
query := url.Values{}
|
|
query.Set("timeout", strconv.Itoa(options.Timeout))
|
|
|
|
resp, err := cli.post(ctx, "/plugins/"+name+"/enable", query, nil, nil)
|
|
ensureReaderClosed(resp)
|
|
return err
|
|
}
|