mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: use *string instead of error in healthcheck response (#8234)
This commit is contained in:
+13
-11
@@ -40,20 +40,22 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
|
||||
```json
|
||||
{
|
||||
"access_url": {
|
||||
"error": null,
|
||||
"access_url": "string",
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"healthz_response": "string",
|
||||
"reachable": true,
|
||||
"status_code": 0
|
||||
},
|
||||
"coder_version": "string",
|
||||
"database": {
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"latency": 0,
|
||||
"reachable": true
|
||||
},
|
||||
"derp": {
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"netcheck": {
|
||||
"captivePortal": "string",
|
||||
@@ -85,18 +87,18 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
|
||||
"udp": true,
|
||||
"upnP": "string"
|
||||
},
|
||||
"netcheck_err": null,
|
||||
"netcheck_err": "string",
|
||||
"netcheck_logs": ["string"],
|
||||
"regions": {
|
||||
"property1": {
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node_reports": [
|
||||
{
|
||||
"can_exchange_messages": true,
|
||||
"client_errs": [[null]],
|
||||
"client_errs": [["string"]],
|
||||
"client_logs": [["string"]],
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node": {
|
||||
"certName": "string",
|
||||
@@ -150,14 +152,14 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
|
||||
}
|
||||
},
|
||||
"property2": {
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node_reports": [
|
||||
{
|
||||
"can_exchange_messages": true,
|
||||
"client_errs": [[null]],
|
||||
"client_errs": [["string"]],
|
||||
"client_logs": [["string"]],
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node": {
|
||||
"certName": "string",
|
||||
@@ -216,7 +218,7 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
|
||||
"healthy": true,
|
||||
"time": "string",
|
||||
"websocket": {
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"response": {
|
||||
"body": "string",
|
||||
|
||||
+48
-43
@@ -5665,7 +5665,8 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
|
||||
```json
|
||||
{
|
||||
"error": null,
|
||||
"access_url": "string",
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"healthz_response": "string",
|
||||
"reachable": true,
|
||||
@@ -5677,7 +5678,8 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------ | ------- | -------- | ------------ | ----------- |
|
||||
| `error` | any | false | | |
|
||||
| `access_url` | string | false | | |
|
||||
| `error` | string | false | | |
|
||||
| `healthy` | boolean | false | | |
|
||||
| `healthz_response` | string | false | | |
|
||||
| `reachable` | boolean | false | | |
|
||||
@@ -5688,9 +5690,9 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
```json
|
||||
{
|
||||
"can_exchange_messages": true,
|
||||
"client_errs": [[null]],
|
||||
"client_errs": [["string"]],
|
||||
"client_logs": [["string"]],
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node": {
|
||||
"certName": "string",
|
||||
@@ -5727,7 +5729,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
| `can_exchange_messages` | boolean | false | | |
|
||||
| `client_errs` | array of array | false | | |
|
||||
| `client_logs` | array of array | false | | |
|
||||
| `error` | any | false | | |
|
||||
| `error` | string | false | | |
|
||||
| `healthy` | boolean | false | | |
|
||||
| `node` | [tailcfg.DERPNode](#tailcfgderpnode) | false | | |
|
||||
| `node_info` | [derp.ServerInfoMessage](#derpserverinfomessage) | false | | |
|
||||
@@ -5739,14 +5741,14 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
|
||||
```json
|
||||
{
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node_reports": [
|
||||
{
|
||||
"can_exchange_messages": true,
|
||||
"client_errs": [[null]],
|
||||
"client_errs": [["string"]],
|
||||
"client_logs": [["string"]],
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node": {
|
||||
"certName": "string",
|
||||
@@ -5805,7 +5807,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------- | ----------------------------------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `error` | any | false | | |
|
||||
| `error` | string | false | | |
|
||||
| `healthy` | boolean | false | | |
|
||||
| `node_reports` | array of [healthcheck.DERPNodeReport](#healthcheckderpnodereport) | false | | |
|
||||
| `region` | [tailcfg.DERPRegion](#tailcfgderpregion) | false | | |
|
||||
@@ -5814,7 +5816,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
|
||||
```json
|
||||
{
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"netcheck": {
|
||||
"captivePortal": "string",
|
||||
@@ -5846,18 +5848,18 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
"udp": true,
|
||||
"upnP": "string"
|
||||
},
|
||||
"netcheck_err": null,
|
||||
"netcheck_err": "string",
|
||||
"netcheck_logs": ["string"],
|
||||
"regions": {
|
||||
"property1": {
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node_reports": [
|
||||
{
|
||||
"can_exchange_messages": true,
|
||||
"client_errs": [[null]],
|
||||
"client_errs": [["string"]],
|
||||
"client_logs": [["string"]],
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node": {
|
||||
"certName": "string",
|
||||
@@ -5911,14 +5913,14 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
}
|
||||
},
|
||||
"property2": {
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node_reports": [
|
||||
{
|
||||
"can_exchange_messages": true,
|
||||
"client_errs": [[null]],
|
||||
"client_errs": [["string"]],
|
||||
"client_logs": [["string"]],
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node": {
|
||||
"certName": "string",
|
||||
@@ -5979,10 +5981,10 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------ | ------------------------------------------------------------ | -------- | ------------ | ----------- |
|
||||
| `error` | any | false | | |
|
||||
| `error` | string | false | | |
|
||||
| `healthy` | boolean | false | | |
|
||||
| `netcheck` | [netcheck.Report](#netcheckreport) | false | | |
|
||||
| `netcheck_err` | any | false | | |
|
||||
| `netcheck_err` | string | false | | |
|
||||
| `netcheck_logs` | array of string | false | | |
|
||||
| `regions` | object | false | | |
|
||||
| » `[any property]` | [healthcheck.DERPRegionReport](#healthcheckderpregionreport) | false | | |
|
||||
@@ -6009,7 +6011,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
|
||||
```json
|
||||
{
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"latency": 0,
|
||||
"reachable": true
|
||||
@@ -6020,7 +6022,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ----------- | ------- | -------- | ------------ | ----------- |
|
||||
| `error` | any | false | | |
|
||||
| `error` | string | false | | |
|
||||
| `healthy` | boolean | false | | |
|
||||
| `latency` | integer | false | | |
|
||||
| `reachable` | boolean | false | | |
|
||||
@@ -6030,20 +6032,22 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
```json
|
||||
{
|
||||
"access_url": {
|
||||
"error": null,
|
||||
"access_url": "string",
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"healthz_response": "string",
|
||||
"reachable": true,
|
||||
"status_code": 0
|
||||
},
|
||||
"coder_version": "string",
|
||||
"database": {
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"latency": 0,
|
||||
"reachable": true
|
||||
},
|
||||
"derp": {
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"netcheck": {
|
||||
"captivePortal": "string",
|
||||
@@ -6075,18 +6079,18 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
"udp": true,
|
||||
"upnP": "string"
|
||||
},
|
||||
"netcheck_err": null,
|
||||
"netcheck_err": "string",
|
||||
"netcheck_logs": ["string"],
|
||||
"regions": {
|
||||
"property1": {
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node_reports": [
|
||||
{
|
||||
"can_exchange_messages": true,
|
||||
"client_errs": [[null]],
|
||||
"client_errs": [["string"]],
|
||||
"client_logs": [["string"]],
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node": {
|
||||
"certName": "string",
|
||||
@@ -6140,14 +6144,14 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
}
|
||||
},
|
||||
"property2": {
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node_reports": [
|
||||
{
|
||||
"can_exchange_messages": true,
|
||||
"client_errs": [[null]],
|
||||
"client_errs": [["string"]],
|
||||
"client_logs": [["string"]],
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"node": {
|
||||
"certName": "string",
|
||||
@@ -6206,7 +6210,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
"healthy": true,
|
||||
"time": "string",
|
||||
"websocket": {
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"response": {
|
||||
"body": "string",
|
||||
@@ -6218,21 +6222,22 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------ | ---------------------------------------------------------- | -------- | ------------ | ------------------------------------------------ |
|
||||
| `access_url` | [healthcheck.AccessURLReport](#healthcheckaccessurlreport) | false | | |
|
||||
| `database` | [healthcheck.DatabaseReport](#healthcheckdatabasereport) | false | | |
|
||||
| `derp` | [healthcheck.DERPReport](#healthcheckderpreport) | false | | |
|
||||
| `failing_sections` | array of string | false | | |
|
||||
| `healthy` | boolean | false | | Healthy is true if the report returns no errors. |
|
||||
| `time` | string | false | | Time is the time the report was generated at. |
|
||||
| `websocket` | [healthcheck.WebsocketReport](#healthcheckwebsocketreport) | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------ | ---------------------------------------------------------- | -------- | ------------ | -------------------------------------------------------------------------- |
|
||||
| `access_url` | [healthcheck.AccessURLReport](#healthcheckaccessurlreport) | false | | |
|
||||
| `coder_version` | string | false | | The Coder version of the server that the report was generated on. |
|
||||
| `database` | [healthcheck.DatabaseReport](#healthcheckdatabasereport) | false | | |
|
||||
| `derp` | [healthcheck.DERPReport](#healthcheckderpreport) | false | | |
|
||||
| `failing_sections` | array of string | false | | Failing sections is a list of sections that have failed their healthcheck. |
|
||||
| `healthy` | boolean | false | | Healthy is true if the report returns no errors. |
|
||||
| `time` | string | false | | Time is the time the report was generated at. |
|
||||
| `websocket` | [healthcheck.WebsocketReport](#healthcheckwebsocketreport) | false | | |
|
||||
|
||||
## healthcheck.WebsocketReport
|
||||
|
||||
```json
|
||||
{
|
||||
"error": null,
|
||||
"error": "string",
|
||||
"healthy": true,
|
||||
"response": {
|
||||
"body": "string",
|
||||
@@ -6245,7 +6250,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------- | -------------------------------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `error` | any | false | | |
|
||||
| `error` | string | false | | |
|
||||
| `healthy` | boolean | false | | |
|
||||
| `response` | [healthcheck.WebsocketResponse](#healthcheckwebsocketresponse) | false | | |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user