MCPcopy Index your code
hub / github.com/coder/coder / ResumeTask

Method ResumeTask

codersdk/aitasks.go:361–377  ·  view source on GitHub ↗
(ctx context.Context, user string, id uuid.UUID)

Source from the content-addressed store, hash-verified

359}
360
361func (c *Client) ResumeTask(ctx context.Context, user string, id uuid.UUID) (ResumeTaskResponse, error) {
362 res, err := c.Request(ctx, http.MethodPost, fmt.Sprintf("/api/v2/tasks/%s/%s/resume", user, id.String()), nil)
363 if err != nil {
364 return ResumeTaskResponse{}, err
365 }
366 defer res.Body.Close()
367 if res.StatusCode != http.StatusAccepted {
368 return ResumeTaskResponse{}, ReadBodyAsError(res)
369 }
370
371 var resp ResumeTaskResponse
372 if err := json.NewDecoder(res.Body).Decode(&resp); err != nil {
373 return ResumeTaskResponse{}, err
374 }
375
376 return resp, nil
377}
378
379// TaskLogType indicates the source of a task log entry.
380type TaskLogType string

Callers 4

TestResumeTaskFunction · 0.80
taskSendMethod · 0.80
resumeTaskFunction · 0.80
taskResumeMethod · 0.80

Calls 4

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
StringMethod · 0.45

Tested by 2

TestResumeTaskFunction · 0.64
resumeTaskFunction · 0.64