2018-02-05 21:05:59 +00:00
|
|
|
package client // import "github.com/docker/docker/client"
|
2016-09-06 18:46:37 +00:00
|
|
|
|
|
|
|
import (
|
2018-04-19 22:30:59 +00:00
|
|
|
"context"
|
2016-11-21 17:24:01 +00:00
|
|
|
"net/url"
|
|
|
|
"strconv"
|
|
|
|
|
|
|
|
"github.com/docker/docker/api/types"
|
2016-09-06 18:46:37 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// PluginEnable enables a plugin
|
2016-11-21 17:24:01 +00:00
|
|
|
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)
|
2016-09-06 18:46:37 +00:00
|
|
|
ensureReaderClosed(resp)
|
|
|
|
return err
|
|
|
|
}
|