1package client // import "github.com/docker/docker/client" 2 3import ( 4 "context" 5 "net/url" 6 "strconv" 7 8 "github.com/docker/docker/api/types" 9) 10 11// PluginEnable enables a plugin 12func (cli *Client) PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error { 13 query := url.Values{} 14 query.Set("timeout", strconv.Itoa(options.Timeout)) 15 16 resp, err := cli.post(ctx, "/plugins/"+name+"/enable", query, nil, nil) 17 ensureReaderClosed(resp) 18 return err 19} 20