(ctx context.Context)
| 55 | } |
| 56 | |
| 57 | func (c *HealthClient) DebugHealth(ctx context.Context) (HealthcheckReport, error) { |
| 58 | res, err := c.client.Request(ctx, http.MethodGet, "/api/v2/debug/health", nil) |
| 59 | if err != nil { |
| 60 | return HealthcheckReport{}, err |
| 61 | } |
| 62 | defer res.Body.Close() |
| 63 | if res.StatusCode != http.StatusOK { |
| 64 | return HealthcheckReport{}, codersdk.ReadBodyAsError(res) |
| 65 | } |
| 66 | var rpt HealthcheckReport |
| 67 | return rpt, json.NewDecoder(res.Body).Decode(&rpt) |
| 68 | } |
| 69 | |
| 70 | func (c *HealthClient) HealthSettings(ctx context.Context) (HealthSettings, error) { |
| 71 | res, err := c.client.Request(ctx, http.MethodGet, "/api/v2/debug/health/settings", nil) |
no test coverage detected