mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-23 14:53:10 -06:00
Add /api/health endpoint where applicable
This commit is contained in:
parent
1f686c07b2
commit
924db7c341
|
|
@ -29,6 +29,7 @@ func main() {
|
|||
|
||||
intAPI := appservice.NewInternalAPI(base, userAPI, rsAPI)
|
||||
appservice.AddInternalRoutes(base.InternalAPIMux, intAPI)
|
||||
setup.AddHealthCheck(base.InternalAPIMux, base.Cfg.AppServiceAPI.Database)
|
||||
|
||||
base.SetupAndServeHTTP(
|
||||
base.Cfg.AppServiceAPI.InternalAPI.Listen,
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ func main() {
|
|||
intAPI.SetUserAPI(base.UserAPIClient())
|
||||
|
||||
keyserver.AddInternalRoutes(base.InternalAPIMux, intAPI)
|
||||
setup.AddHealthCheck(base.InternalAPIMux, base.Cfg.KeyServer.Database)
|
||||
|
||||
base.SetupAndServeHTTP(
|
||||
base.Cfg.KeyServer.InternalAPI.Listen,
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ func main() {
|
|||
client := base.CreateClient()
|
||||
|
||||
mediaapi.AddPublicRoutes(base.PublicMediaAPIMux, &base.Cfg.MediaAPI, userAPI, client)
|
||||
setup.AddHealthCheck(base.InternalAPIMux, base.Cfg.MediaAPI.Database)
|
||||
|
||||
base.SetupAndServeHTTP(
|
||||
base.Cfg.MediaAPI.InternalAPI.Listen,
|
||||
|
|
|
|||
|
|
@ -145,6 +145,17 @@ func main() {
|
|||
base.PublicMediaAPIMux,
|
||||
)
|
||||
|
||||
setup.AddHealthCheck(base.InternalAPIMux,
|
||||
base.Cfg.AppServiceAPI.Database,
|
||||
base.Cfg.FederationSender.Database,
|
||||
base.Cfg.KeyServer.Database,
|
||||
base.Cfg.MediaAPI.Database,
|
||||
base.Cfg.ServerKeyAPI.Database,
|
||||
base.Cfg.SyncAPI.Database,
|
||||
base.Cfg.UserAPI.AccountDatabase,
|
||||
base.Cfg.UserAPI.DeviceDatabase,
|
||||
)
|
||||
|
||||
// Expose the matrix APIs directly rather than putting them under a /api path.
|
||||
go func() {
|
||||
base.SetupAndServeHTTP(
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ func main() {
|
|||
rsAPI := roomserver.NewInternalAPI(base, keyRing)
|
||||
rsAPI.SetFederationSenderAPI(fsAPI)
|
||||
roomserver.AddInternalRoutes(base.InternalAPIMux, rsAPI)
|
||||
setup.AddHealthCheck(base.InternalAPIMux, base.Cfg.RoomServer.Database)
|
||||
|
||||
base.SetupAndServeHTTP(
|
||||
base.Cfg.RoomServer.InternalAPI.Listen,
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ func main() {
|
|||
|
||||
intAPI := serverkeyapi.NewInternalAPI(&base.Cfg.ServerKeyAPI, federation, base.Caches)
|
||||
serverkeyapi.AddInternalRoutes(base.InternalAPIMux, intAPI, base.Caches)
|
||||
setup.AddHealthCheck(base.InternalAPIMux, base.Cfg.ServerKeyAPI.Database)
|
||||
|
||||
base.SetupAndServeHTTP(
|
||||
base.Cfg.ServerKeyAPI.InternalAPI.Listen,
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ func main() {
|
|||
base.KeyServerHTTPClient(),
|
||||
federation, &cfg.SyncAPI,
|
||||
)
|
||||
setup.AddHealthCheck(base.InternalAPIMux, base.Cfg.SyncAPI.Database)
|
||||
|
||||
base.SetupAndServeHTTP(
|
||||
base.Cfg.SyncAPI.InternalAPI.Listen,
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ func main() {
|
|||
userAPI := userapi.NewInternalAPI(accountDB, &cfg.UserAPI, cfg.Derived.ApplicationServices, base.KeyServerHTTPClient())
|
||||
|
||||
userapi.AddInternalRoutes(base.InternalAPIMux, userAPI)
|
||||
setup.AddHealthCheck(base.InternalAPIMux, cfg.UserAPI.AccountDatabase, cfg.UserAPI.DeviceDatabase)
|
||||
|
||||
base.SetupAndServeHTTP(
|
||||
base.Cfg.UserAPI.InternalAPI.Listen,
|
||||
|
|
|
|||
Loading…
Reference in a new issue