mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-13 23:31:34 +00:00
c8b873abc8
* Initial work on roomserver NID caches * Give caches to roomserver storage * Populate caches * Fix bugs * Fix WASM build * Don't hit cache twice in RoomNIDExcludingStubs * Store reverse room ID-room NID mapping, consult caches when assigning NIDs
27 lines
992 B
Go
27 lines
992 B
Go
package internal
|
|
|
|
import (
|
|
"sync"
|
|
|
|
"github.com/Shopify/sarama"
|
|
fsAPI "github.com/matrix-org/dendrite/federationsender/api"
|
|
"github.com/matrix-org/dendrite/internal/caching"
|
|
"github.com/matrix-org/dendrite/internal/config"
|
|
"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
|
|
Cfg *config.RoomServer
|
|
Producer sarama.SyncProducer
|
|
Cache caching.RoomServerCaches
|
|
ServerName gomatrixserverlib.ServerName
|
|
KeyRing gomatrixserverlib.JSONVerifier
|
|
FedClient *gomatrixserverlib.FederationClient
|
|
OutputRoomEventTopic string // Kafka topic for new output room events
|
|
mutexes sync.Map // room ID -> *sync.Mutex, protects calls to processRoomEvent
|
|
fsAPI fsAPI.FederationSenderInternalAPI
|
|
}
|