mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
More porting from rep (#2388)
* More porting from rep * Address review feedback
This commit is contained in:
@@ -32,6 +32,8 @@ func Backend() *backend {
|
||||
secretCreds(&b),
|
||||
},
|
||||
|
||||
Invalidate: b.invalidate,
|
||||
|
||||
Clean: b.ResetDB,
|
||||
}
|
||||
|
||||
@@ -112,6 +114,13 @@ func (b *backend) ResetDB() {
|
||||
b.db = nil
|
||||
}
|
||||
|
||||
func (b *backend) invalidate(key string) {
|
||||
switch key {
|
||||
case "config/connection":
|
||||
b.ResetDB()
|
||||
}
|
||||
}
|
||||
|
||||
// LeaseConfig returns the lease configuration
|
||||
func (b *backend) LeaseConfig(s logical.Storage) (*configLease, error) {
|
||||
entry, err := s.Get("config/lease")
|
||||
|
||||
Reference in New Issue
Block a user