2020-05-01 10:48:17 +01:00
|
|
|
package internal
|
|
|
|
|
|
|
|
import (
|
|
|
|
"sync"
|
|
|
|
|
|
|
|
"github.com/Shopify/sarama"
|
|
|
|
fsAPI "github.com/matrix-org/dendrite/federationsender/api"
|
2020-05-21 14:40:13 +01:00
|
|
|
"github.com/matrix-org/dendrite/internal/caching"
|
|
|
|
"github.com/matrix-org/dendrite/internal/config"
|
2020-05-01 10:48:17 +01:00
|
|
|
"github.com/matrix-org/dendrite/roomserver/storage"
|
|
|
|
"github.com/matrix-org/gomatrixserverlib"
|
|
|
|
)
|
|
|
|
|
|
|
|
// RoomserverInternalAPI is an implementation of api.RoomserverInternalAPI
|
|
|
|
type RoomserverInternalAPI struct {
|
|
|
|
DB storage.Database
|
2020-08-10 14:18:04 +01:00
|
|
|
Cfg *config.RoomServer
|
2020-05-01 10:48:17 +01:00
|
|
|
Producer sarama.SyncProducer
|
2020-06-05 16:42:01 +01:00
|
|
|
Cache caching.RoomVersionCache
|
2020-05-01 10:48:17 +01:00
|
|
|
ServerName gomatrixserverlib.ServerName
|
|
|
|
KeyRing gomatrixserverlib.JSONVerifier
|
|
|
|
FedClient *gomatrixserverlib.FederationClient
|
2020-08-20 16:24:33 +01:00
|
|
|
OutputRoomEventTopic string // Kafka topic for new output room events
|
|
|
|
mutexes sync.Map // room ID -> *sync.Mutex, protects calls to processRoomEvent
|
2020-05-01 10:48:17 +01:00
|
|
|
fsAPI fsAPI.FederationSenderInternalAPI
|
|
|
|
}
|