diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-01-03 14:07:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-03 14:07:05 +0000 |
commit | c28577ea25d4f9c82110450f7f371905c2750f71 (patch) | |
tree | 7eda596a39f4c6ef2fbb2fc3f6a7caeb4ccc77d1 /syncapi/sync | |
parent | 6cab62246816baf1fdd026744727cba9a7b21c28 (diff) |
Implement storage interfaces (#841)
* Implement interfaces for federationsender storage
* Implement interfaces for mediaapi storage
* Implement interfaces for publicroomsapi storage
* Implement interfaces for roomserver storage
* Implement interfaces for syncapi storage
* Implement interfaces for keydb storage
* common.PartitionStorer in publicroomsapi interface
* Update copyright notices
Diffstat (limited to 'syncapi/sync')
-rw-r--r-- | syncapi/sync/notifier.go | 2 | ||||
-rw-r--r-- | syncapi/sync/requestpool.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/syncapi/sync/notifier.go b/syncapi/sync/notifier.go index 15d6b070..548a17ac 100644 --- a/syncapi/sync/notifier.go +++ b/syncapi/sync/notifier.go @@ -141,7 +141,7 @@ func (n *Notifier) GetListener(req syncRequest) UserStreamListener { } // Load the membership states required to notify users correctly. -func (n *Notifier) Load(ctx context.Context, db *storage.SyncServerDatasource) error { +func (n *Notifier) Load(ctx context.Context, db storage.Database) error { roomToUsers, err := db.AllJoinedUsersInRooms(ctx) if err != nil { return err diff --git a/syncapi/sync/requestpool.go b/syncapi/sync/requestpool.go index 94a36900..82505e68 100644 --- a/syncapi/sync/requestpool.go +++ b/syncapi/sync/requestpool.go @@ -31,13 +31,13 @@ import ( // RequestPool manages HTTP long-poll connections for /sync type RequestPool struct { - db *storage.SyncServerDatasource + db storage.Database accountDB *accounts.Database notifier *Notifier } // NewRequestPool makes a new RequestPool -func NewRequestPool(db *storage.SyncServerDatasource, n *Notifier, adb *accounts.Database) *RequestPool { +func NewRequestPool(db storage.Database, n *Notifier, adb *accounts.Database) *RequestPool { return &RequestPool{db, adb, n} } |