watchtower: add FetchSessionCommittedUpdates func to DB

In this commit, a new tower client db function is added that can be used
to fetch all the committed updates for a given session ID. This is done
in preparation for an upcoming commit where the CommittedUpdates will be
removed from the ClientSession struct.
This commit is contained in:
Elle Mouton committed 2022-10-13 14:39:23 +02:00
1 parent 15858cae1c
commit fe3d9174ea
4 files changed
+72 -4

No files matched your search

+5
View File
@@ -65,6 +65,11 @@ type DB interface {
ListClientSessions(*wtdb.TowerID, ...wtdb.ClientSessionListOption) (
map[wtdb.SessionID]*wtdb.ClientSession, error)
// FetchSessionCommittedUpdates retrieves the current set of un-acked
// updates of the given session.
FetchSessionCommittedUpdates(id *wtdb.SessionID) (
[]wtdb.CommittedUpdate, error)
// FetchChanSummaries loads a mapping from all registered channels to
// their channel summaries.
FetchChanSummaries() (wtdb.ChannelSummaries, error)