watchtower/wtmock: add in-memory impl of Queue

This commit adds an in-memory implementation of the Queue interface.
This can be used for tests.
This commit is contained in:
Elle Mouton committed 2023-05-16 10:57:49 +02:00
1 parent 5cc7438d33
commit 66f6bf3955
4 files changed
+161 -13

No files matched your search

+4
View File
@@ -131,6 +131,10 @@ type DB interface {
// update identified by seqNum was received and saved. The returned
// lastApplied will be recorded.
AckUpdate(id *wtdb.SessionID, seqNum, lastApplied uint16) error
// GetDBQueue returns a BackupID Queue instance under the given name
// space.
GetDBQueue(namespace []byte) wtdb.Queue[*wtdb.BackupID]
}
// AuthDialer connects to a remote node using an authenticated transport, such