mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-29 12:42:46 +00:00
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
This commit is contained in:
parent
3c940c428d
commit
d86dcbef66
20 changed files with 95 additions and 91 deletions
|
@ -42,8 +42,7 @@ type OutputKeyChangeEventConsumer struct {
|
|||
notifier *notifier.Notifier
|
||||
stream types.StreamProvider
|
||||
serverName gomatrixserverlib.ServerName // our server name
|
||||
rsAPI roomserverAPI.RoomserverInternalAPI
|
||||
keyAPI api.KeyInternalAPI
|
||||
rsAPI roomserverAPI.SyncRoomserverAPI
|
||||
}
|
||||
|
||||
// NewOutputKeyChangeEventConsumer creates a new OutputKeyChangeEventConsumer.
|
||||
|
@ -53,8 +52,7 @@ func NewOutputKeyChangeEventConsumer(
|
|||
cfg *config.SyncAPI,
|
||||
topic string,
|
||||
js nats.JetStreamContext,
|
||||
keyAPI api.KeyInternalAPI,
|
||||
rsAPI roomserverAPI.RoomserverInternalAPI,
|
||||
rsAPI roomserverAPI.SyncRoomserverAPI,
|
||||
store storage.Database,
|
||||
notifier *notifier.Notifier,
|
||||
stream types.StreamProvider,
|
||||
|
@ -66,7 +64,6 @@ func NewOutputKeyChangeEventConsumer(
|
|||
topic: topic,
|
||||
db: store,
|
||||
serverName: cfg.Matrix.ServerName,
|
||||
keyAPI: keyAPI,
|
||||
rsAPI: rsAPI,
|
||||
notifier: notifier,
|
||||
stream: stream,
|
||||
|
|
|
@ -41,7 +41,7 @@ type PresenceConsumer struct {
|
|||
db storage.Database
|
||||
stream types.StreamProvider
|
||||
notifier *notifier.Notifier
|
||||
deviceAPI api.UserDeviceAPI
|
||||
deviceAPI api.SyncUserAPI
|
||||
cfg *config.SyncAPI
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ func NewPresenceConsumer(
|
|||
db storage.Database,
|
||||
notifier *notifier.Notifier,
|
||||
stream types.StreamProvider,
|
||||
deviceAPI api.UserDeviceAPI,
|
||||
deviceAPI api.SyncUserAPI,
|
||||
) *PresenceConsumer {
|
||||
return &PresenceConsumer{
|
||||
ctx: process.Context(),
|
||||
|
|
|
@ -38,7 +38,7 @@ import (
|
|||
type OutputRoomEventConsumer struct {
|
||||
ctx context.Context
|
||||
cfg *config.SyncAPI
|
||||
rsAPI api.RoomserverInternalAPI
|
||||
rsAPI api.SyncRoomserverAPI
|
||||
jetstream nats.JetStreamContext
|
||||
durable string
|
||||
topic string
|
||||
|
@ -58,7 +58,7 @@ func NewOutputRoomEventConsumer(
|
|||
notifier *notifier.Notifier,
|
||||
pduStream types.StreamProvider,
|
||||
inviteStream types.StreamProvider,
|
||||
rsAPI api.RoomserverInternalAPI,
|
||||
rsAPI api.SyncRoomserverAPI,
|
||||
producer *producers.UserAPIStreamEventProducer,
|
||||
) *OutputRoomEventConsumer {
|
||||
return &OutputRoomEventConsumer{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue