aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-07-13 16:02:35 +0100
committerGitHub <noreply@github.com>2020-07-13 16:02:35 +0100
commit396219ef534093b45ad02cccc8ca9cf0f9742c40 (patch)
tree4cf4eaf0a31cc2a3e42a9bb8be7f7e4d4a17e982 /cmd
parent3178afde2c432d5886fa51e1eacfb1e770da39a6 (diff)
Add boilerplate for key server APIs (#1196)
Also add a README which outilnes how things will work.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dendrite-key-server/main.go4
-rw-r--r--cmd/dendrite-monolith-server/main.go3
2 files changed, 5 insertions, 2 deletions
diff --git a/cmd/dendrite-key-server/main.go b/cmd/dendrite-key-server/main.go
index b557cbd9..813ddddc 100644
--- a/cmd/dendrite-key-server/main.go
+++ b/cmd/dendrite-key-server/main.go
@@ -24,9 +24,9 @@ func main() {
base := setup.NewBaseDendrite(cfg, "KeyServer", true)
defer base.Close() // nolint: errcheck
- userAPI := base.UserAPIClient()
+ intAPI := keyserver.NewInternalAPI()
- keyserver.AddPublicRoutes(base.PublicAPIMux, base.Cfg, userAPI)
+ keyserver.AddInternalRoutes(base.InternalAPIMux, intAPI)
base.SetupAndServeHTTP(string(base.Cfg.Bind.KeyServer), string(base.Cfg.Listen.KeyServer))
diff --git a/cmd/dendrite-monolith-server/main.go b/cmd/dendrite-monolith-server/main.go
index 9ac6941b..83c49d1e 100644
--- a/cmd/dendrite-monolith-server/main.go
+++ b/cmd/dendrite-monolith-server/main.go
@@ -27,6 +27,7 @@ import (
"github.com/matrix-org/dendrite/internal/config"
"github.com/matrix-org/dendrite/internal/httputil"
"github.com/matrix-org/dendrite/internal/setup"
+ "github.com/matrix-org/dendrite/keyserver"
"github.com/matrix-org/dendrite/roomserver"
"github.com/matrix-org/dendrite/roomserver/api"
"github.com/matrix-org/dendrite/serverkeyapi"
@@ -118,6 +119,7 @@ func main() {
rsImpl.SetFederationSenderAPI(fsAPI)
stateAPI := currentstateserver.NewInternalAPI(base.Cfg, base.KafkaConsumer)
+ keyAPI := keyserver.NewInternalAPI()
monolith := setup.Monolith{
Config: base.Cfg,
@@ -136,6 +138,7 @@ func main() {
ServerKeyAPI: serverKeyAPI,
StateAPI: stateAPI,
UserAPI: userAPI,
+ KeyAPI: keyAPI,
}
monolith.AddAllPublicRoutes(base.PublicAPIMux)