2020-05-01 09:48:17 +00:00
|
|
|
package internal
|
|
|
|
|
|
|
|
import (
|
|
|
|
"sync"
|
|
|
|
|
|
|
|
"github.com/Shopify/sarama"
|
|
|
|
fsAPI "github.com/matrix-org/dendrite/federationsender/api"
|
2020-05-21 13:40:13 +00:00
|
|
|
"github.com/matrix-org/dendrite/internal/caching"
|
|
|
|
"github.com/matrix-org/dendrite/internal/config"
|
2020-05-01 09:48:17 +00: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 13:18:04 +00:00
|
|
|
Cfg *config.RoomServer
|
2020-05-01 09:48:17 +00:00
|
|
|
Producer sarama.SyncProducer
|
2020-06-05 15:42:01 +00:00
|
|
|
Cache caching.RoomVersionCache
|
2020-05-01 09:48:17 +00:00
|
|
|
ServerName gomatrixserverlib.ServerName
|
|
|
|
KeyRing gomatrixserverlib.JSONVerifier
|
|
|
|
FedClient *gomatrixserverlib.FederationClient
|
2020-08-20 15:24:33 +00:00
|
|
|
OutputRoomEventTopic string // Kafka topic for new output room events
|
|
|
|
mutexes sync.Map // room ID -> *sync.Mutex, protects calls to processRoomEvent
|
2020-05-01 09:48:17 +00:00
|
|
|
fsAPI fsAPI.FederationSenderInternalAPI
|
|
|
|
}
|