Pause pauses a Crawler. It returns the Task ID if successful.
(crawlerID string)
| 244 | // Pause pauses a Crawler. |
| 245 | // It returns the Task ID if successful. |
| 246 | func (c *Client) Pause(crawlerID string) (string, error) { |
| 247 | var res TaskIDResponse |
| 248 | path := fmt.Sprintf("crawlers/%s/pause", crawlerID) |
| 249 | |
| 250 | err := c.request(&res, http.MethodPost, path, nil, nil) |
| 251 | if err != nil { |
| 252 | return "", err |
| 253 | } |
| 254 | |
| 255 | return res.TaskID, nil |
| 256 | } |
| 257 | |
| 258 | // Reindex reindexes a Crawler. |
| 259 | // It returns the Task ID if successful. |