aboutsummaryrefslogtreecommitdiff
path: root/syncapi/syncapi.go
diff options
context:
space:
mode:
authorkegsay <kegan@matrix.org>2022-05-05 09:56:03 +0100
committerGitHub <noreply@github.com>2022-05-05 09:56:03 +0100
commitd86dcbef66dad344bc38c58762a9634ff126d5c7 (patch)
treea8c95692a64a6303e02911c9a2d6b00fec3c84c8 /syncapi/syncapi.go
parent3c940c428d529476b6fa2cbf1ba28d53ec011584 (diff)
syncapi: define specific interfaces for internal HTTP communications (#2416)
* syncapi: use finer-grained interfaces when making the syncapi * Use specific interfaces for syncapi-roomserver interactions * Define query access token api for shared http auth code
Diffstat (limited to 'syncapi/syncapi.go')
-rw-r--r--syncapi/syncapi.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/syncapi/syncapi.go b/syncapi/syncapi.go
index d8becb6e..686e2044 100644
--- a/syncapi/syncapi.go
+++ b/syncapi/syncapi.go
@@ -25,7 +25,6 @@ import (
"github.com/matrix-org/dendrite/setup/base"
"github.com/matrix-org/dendrite/setup/jetstream"
userapi "github.com/matrix-org/dendrite/userapi/api"
- "github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/dendrite/syncapi/consumers"
"github.com/matrix-org/dendrite/syncapi/notifier"
@@ -40,10 +39,9 @@ import (
// component.
func AddPublicRoutes(
base *base.BaseDendrite,
- userAPI userapi.UserInternalAPI,
- rsAPI api.RoomserverInternalAPI,
- keyAPI keyapi.KeyInternalAPI,
- federation *gomatrixserverlib.FederationClient,
+ userAPI userapi.SyncUserAPI,
+ rsAPI api.SyncRoomserverAPI,
+ keyAPI keyapi.SyncKeyAPI,
) {
cfg := &base.Cfg.SyncAPI
@@ -85,7 +83,7 @@ func AddPublicRoutes(
keyChangeConsumer := consumers.NewOutputKeyChangeEventConsumer(
base.ProcessContext, cfg, cfg.Matrix.JetStream.Prefixed(jetstream.OutputKeyChangeEvent),
- js, keyAPI, rsAPI, syncDB, notifier,
+ js, rsAPI, syncDB, notifier,
streams.DeviceListStreamProvider,
)
if err = keyChangeConsumer.Start(); err != nil {
@@ -148,6 +146,6 @@ func AddPublicRoutes(
routing.Setup(
base.PublicClientAPIMux, requestPool, syncDB, userAPI,
- federation, rsAPI, cfg, lazyLoadCache,
+ rsAPI, cfg, lazyLoadCache,
)
}