mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-26 15:23:33 -06:00
[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:
parent
36f79e650c
commit
b7b42e832a
11 changed files with 328 additions and 4 deletions
|
|
@ -309,6 +309,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
|||
authModule = api.NewAuth(dbService, processor, idp, routerSession, sessionName) // auth/oauth paths
|
||||
clientModule = api.NewClient(dbService, processor) // api client endpoints
|
||||
metricsModule = api.NewMetrics() // Metrics endpoints
|
||||
healthModule = api.NewHealth(dbService.Ready) // Health check endpoints
|
||||
fileserverModule = api.NewFileserver(processor) // fileserver endpoints
|
||||
wellKnownModule = api.NewWellKnown(processor) // .well-known endpoints
|
||||
nodeInfoModule = api.NewNodeInfo(processor) // nodeinfo endpoint
|
||||
|
|
@ -340,6 +341,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
|||
authModule.Route(router, clLimit, clThrottle, gzip)
|
||||
clientModule.Route(router, clLimit, clThrottle, gzip)
|
||||
metricsModule.Route(router, clLimit, clThrottle, gzip)
|
||||
healthModule.Route(router, clLimit, clThrottle)
|
||||
fileserverModule.Route(router, fsMainLimit, fsThrottle)
|
||||
fileserverModule.RouteEmojis(router, instanceAccount.ID, fsEmojiLimit, fsThrottle)
|
||||
wellKnownModule.Route(router, gzip, s2sLimit, s2sThrottle)
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
|||
authModule = api.NewAuth(state.DB, processor, idp, routerSession, sessionName) // auth/oauth paths
|
||||
clientModule = api.NewClient(state.DB, processor) // api client endpoints
|
||||
metricsModule = api.NewMetrics() // Metrics endpoints
|
||||
healthModule = api.NewHealth(state.DB.Ready) // Health check endpoints
|
||||
fileserverModule = api.NewFileserver(processor) // fileserver endpoints
|
||||
wellKnownModule = api.NewWellKnown(processor) // .well-known endpoints
|
||||
nodeInfoModule = api.NewNodeInfo(processor) // nodeinfo endpoint
|
||||
|
|
@ -235,6 +236,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
|||
authModule.Route(router)
|
||||
clientModule.Route(router)
|
||||
metricsModule.Route(router)
|
||||
healthModule.Route(router)
|
||||
fileserverModule.Route(router)
|
||||
fileserverModule.RouteEmojis(router, instanceAccount.ID)
|
||||
wellKnownModule.Route(router)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue