watchtower: add forceNext to NextSessionKeyIndex
This commit adds a forceNext boolean parameter to NextSessionKeyIndex. Setting this param to true will force the index to cycle over 1000 key indices before returning the new key.
This commit is contained in:
5 files changed
+81
-39
No files matched your search
@@ -306,7 +306,7 @@ retryWithBackoff:
|
||||
// with this specific tower. If one is already reserved, the
|
||||
// existing index will be returned.
|
||||
keyIndex, err := n.cfg.DB.NextSessionKeyIndex(
|
||||
tower.ID, n.cfg.Policy.BlobType,
|
||||
tower.ID, n.cfg.Policy.BlobType, false,
|
||||
)
|
||||
if err != nil {
|
||||
n.log.Debugf("Unable to reserve session key index "+
|
||||
|
||||
Reference in new issue
Block a user