watchtower: add GetClientSession func to DB

This commit adds a new `GetClientSession` method to the tower client DB
which can be used to fetch a session by its ID from the DB.
This commit is contained in:
Elle Mouton committed 2023-03-20 10:46:52 +02:00
1 parent 5283e2c341
commit a3050ed213
3 files changed
+65

No files matched your search

+5
View File
@@ -64,6 +64,11 @@ type DB interface {
...wtdb.ClientSessionListOption) (
map[wtdb.SessionID]*wtdb.ClientSession, error)
// GetClientSession loads the ClientSession with the given ID from the
// DB.
GetClientSession(wtdb.SessionID,
...wtdb.ClientSessionListOption) (*wtdb.ClientSession, error)
// FetchSessionCommittedUpdates retrieves the current set of un-acked
// updates of the given session.
FetchSessionCommittedUpdates(id *wtdb.SessionID) (