Use a single storage.Database interface (#978)

This commit is contained in:
Kegsay 2020-04-24 10:38:58 +01:00 committed by GitHub
parent c30b12b5a1
commit a202d88fe5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 65 additions and 204 deletions

View file

@ -23,6 +23,7 @@ import (
"github.com/matrix-org/dendrite/common"
"github.com/matrix-org/dendrite/roomserver/api"
"github.com/matrix-org/dendrite/roomserver/state"
"github.com/matrix-org/dendrite/roomserver/storage"
"github.com/matrix-org/dendrite/roomserver/types"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/util"
@ -47,7 +48,7 @@ import (
// Can only be called once at a time
func updateLatestEvents(
ctx context.Context,
db RoomEventDatabase,
db storage.Database,
ow OutputRoomEventWriter,
roomNID types.RoomNID,
stateAtEvent types.StateAtEvent,
@ -86,7 +87,7 @@ func updateLatestEvents(
// when there are so many variables to pass around.
type latestEventsUpdater struct {
ctx context.Context
db RoomEventDatabase
db storage.Database
updater types.RoomRecentEventsUpdater
ow OutputRoomEventWriter
roomNID types.RoomNID