(rw http.ResponseWriter, r *http.Request)
| 10 | ) |
| 11 | |
| 12 | func (a *agent) HandleNetcheck(rw http.ResponseWriter, r *http.Request) { |
| 13 | ni := a.TailnetConn().GetNetInfo() |
| 14 | |
| 15 | ifReport, err := healthsdk.RunInterfacesReport() |
| 16 | if err != nil { |
| 17 | httpapi.Write(r.Context(), rw, http.StatusInternalServerError, codersdk.Response{ |
| 18 | Message: "Failed to run interfaces report", |
| 19 | Detail: err.Error(), |
| 20 | }) |
| 21 | return |
| 22 | } |
| 23 | |
| 24 | httpapi.Write(r.Context(), rw, http.StatusOK, healthsdk.AgentNetcheckReport{ |
| 25 | BaseReport: healthsdk.BaseReport{ |
| 26 | Severity: health.SeverityOK, |
| 27 | }, |
| 28 | NetInfo: ni, |
| 29 | Interfaces: ifReport, |
| 30 | }) |
| 31 | } |
nothing calls this directly
no test coverage detected