StopTask attempts to stop/cancel a running task.
(node, upid string)
| 566 | |
| 567 | // StopTask attempts to stop/cancel a running task. |
| 568 | func (c *Client) StopTask(node, upid string) error { |
| 569 | path := fmt.Sprintf("/nodes/%s/tasks/%s", node, url.PathEscape(upid)) |
| 570 | return c.Delete(path) |
| 571 | } |
| 572 | |
| 573 | // GetClusterTasks retrieves recent cluster tasks. |
| 574 | func (c *Client) GetClusterTasks() ([]*ClusterTask, error) { |