Wire in new server key API into hybrid monolith mode

This commit is contained in:
Neil Alexander 2020-05-26 15:17:16 +01:00
parent 68f96d17a5
commit 6f8ebc173d
2 changed files with 5 additions and 1 deletions

View file

@ -72,6 +72,9 @@ func main() {
serverKeyAPI := serverkeyapi.SetupServerKeyAPIComponent( serverKeyAPI := serverkeyapi.SetupServerKeyAPIComponent(
base, federation, base, federation,
) )
if base.EnableHTTPAPIs {
serverKeyAPI = base.CreateHTTPServerKeyAPIs()
}
keyRing := serverKeyAPI.KeyRing() keyRing := serverKeyAPI.KeyRing()
rsComponent := roomserver.SetupRoomServerComponent( rsComponent := roomserver.SetupRoomServerComponent(

View file

@ -5,6 +5,7 @@ import (
"encoding/base64" "encoding/base64"
"github.com/matrix-org/dendrite/internal/basecomponent" "github.com/matrix-org/dendrite/internal/basecomponent"
"github.com/matrix-org/dendrite/serverkeyapi/api"
"github.com/matrix-org/dendrite/serverkeyapi/internal" "github.com/matrix-org/dendrite/serverkeyapi/internal"
"github.com/matrix-org/dendrite/serverkeyapi/storage" "github.com/matrix-org/dendrite/serverkeyapi/storage"
"github.com/matrix-org/dendrite/serverkeyapi/storage/cache" "github.com/matrix-org/dendrite/serverkeyapi/storage/cache"
@ -15,7 +16,7 @@ import (
func SetupServerKeyAPIComponent( func SetupServerKeyAPIComponent(
base *basecomponent.BaseDendrite, base *basecomponent.BaseDendrite,
fedClient *gomatrixserverlib.FederationClient, fedClient *gomatrixserverlib.FederationClient,
) *internal.ServerKeyAPI { ) api.ServerKeyInternalAPI {
innerDB, err := storage.NewDatabase( innerDB, err := storage.NewDatabase(
string(base.Cfg.Database.ServerKey), string(base.Cfg.Database.ServerKey),
base.Cfg.DbProperties(), base.Cfg.DbProperties(),