From b7b42e832ad711ebb5af5c03e1c8e8a471c6bde0 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 25 Mar 2024 18:05:14 +0100 Subject: [feature] Add healthcheck endpoints `/livez` and `/readyz` (#2783) * [feature] Add healthcheck endpoints `/livez` and `/readyz` * use select that returns no data --- cmd/gotosocial/action/server/server.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd/gotosocial/action/server') diff --git a/cmd/gotosocial/action/server/server.go b/cmd/gotosocial/action/server/server.go index 420264e97..1886cd885 100644 --- a/cmd/gotosocial/action/server/server.go +++ b/cmd/gotosocial/action/server/server.go @@ -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) -- cgit v1.3