[feature] Add healthcheck endpoints /livez and /readyz (#2783)

* [feature] Add healthcheck endpoints `/livez` and `/readyz`

* use select that returns no data
This commit is contained in:
tobi
2024-03-25 18:05:14 +01:00
committed by GitHub
parent 36f79e650c
commit b7b42e832a
11 changed files with 328 additions and 4 deletions

View File

@@ -7878,6 +7878,23 @@ paths:
summary: View instance information.
tags:
- instance
/livez:
get:
operationId: liveGet
responses:
"200":
description: OK
summary: Returns code 200 with no body if GoToSocial is "live", ie., able to respond to HTTP requests.
tags:
- health
head:
operationId: liveHead
responses:
"200":
description: OK
summary: Returns code 200 if GoToSocial is "live", ie., able to respond to HTTP requests.
tags:
- health
/nodeinfo/2.0:
get:
description: 'See: https://nodeinfo.diaspora.software/schema.html'
@@ -7892,6 +7909,27 @@ paths:
summary: Returns a compliant nodeinfo response to node info queries.
tags:
- nodeinfo
/readyz:
get:
description: If GtS is not ready, 500 Internal Error will be returned, and an error will be logged (but not returned to the caller, to avoid leaking internals).
operationId: readyGet
responses:
"200":
description: OK
"500":
description: Not ready. Check logs for error message.
summary: Returns code 200 with no body if GoToSocial is "ready", ie., able to connect to the database backend and do a simple SELECT.
tags:
- health
head:
description: If GtS is not ready, 500 Internal Error will be returned, and an error will be logged (but not returned to the caller, to avoid leaking internals).
operationId: readyHead
responses:
"200":
description: OK
summary: Returns code 200 with no body if GoToSocial is "ready", ie., able to connect to the database backend and do a simple SELECT.
tags:
- health
/users/{username}/collections/featured:
get:
description: |-