Add push server component template

This commit is contained in:
Neil Alexander 2021-05-05 11:45:28 +01:00
parent 092edee210
commit 6843c3beee
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
22 changed files with 487 additions and 0 deletions

View file

@ -36,6 +36,7 @@ import (
"github.com/matrix-org/dendrite/internal"
"github.com/matrix-org/dendrite/internal/httputil"
"github.com/matrix-org/dendrite/keyserver"
"github.com/matrix-org/dendrite/pushserver"
"github.com/matrix-org/dendrite/roomserver"
"github.com/matrix-org/dendrite/setup"
"github.com/matrix-org/dendrite/setup/config"
@ -130,6 +131,12 @@ func main() {
}
})
psAPI := pushserver.NewInternalAPI(base)
if base.UseHTTPAPIs {
pushserver.AddInternalRoutes(base.InternalAPIMux, psAPI)
psAPI = base.PushServerHTTPClient()
}
rsComponent.SetFederationSenderAPI(fsAPI)
monolith := setup.Monolith{
@ -145,6 +152,7 @@ func main() {
RoomserverAPI: rsAPI,
UserAPI: userAPI,
KeyAPI: keyAPI,
PushserverAPI: psAPI,
ExtPublicRoomsProvider: yggrooms.NewYggdrasilRoomProvider(
ygg, fsAPI, federation,
),