mirror of
https://github.com/moby/moby.git
synced 2026-01-11 02:31:44 +00:00
22 lines
498 B
Go
22 lines
498 B
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
"net/url"
|
|
)
|
|
|
|
type BuildCancelOptions struct{}
|
|
|
|
type BuildCancelResult struct{}
|
|
|
|
// BuildCancel requests the daemon to cancel the ongoing build request
|
|
// with the given id.
|
|
func (cli *Client) BuildCancel(ctx context.Context, id string, _ BuildCancelOptions) (BuildCancelResult, error) {
|
|
query := url.Values{}
|
|
query.Set("id", id)
|
|
|
|
resp, err := cli.post(ctx, "/build/cancel", query, nil, nil)
|
|
defer ensureReaderClosed(resp)
|
|
return BuildCancelResult{}, err
|
|
}
|