watchtower/wtdb: add ClientDB
This commit adds the full bbolt-backed client database as well as a set of unit tests to assert that it exactly implements the same behavior as the mock ClientDB.
This commit is contained in:
6 files changed
+1601
-53
No files matched your search
@@ -21,6 +21,11 @@ type version struct {
|
||||
// migrations must be applied.
|
||||
var towerDBVersions = []version{}
|
||||
|
||||
// clientDBVersions stores all versions and migrations of the client database.
|
||||
// This list will be used when opening the database to determine if any
|
||||
// migrations must be applied.
|
||||
var clientDBVersions = []version{}
|
||||
|
||||
// getLatestDBVersion returns the last known database version.
|
||||
func getLatestDBVersion(versions []version) uint32 {
|
||||
return uint32(len(versions))
|
||||
|
||||
Reference in new issue
Block a user