mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
More porting from rep (#2388)
* More porting from rep * Address review feedback
This commit is contained in:
@@ -33,6 +33,8 @@ func Backend() *framework.Backend {
|
||||
},
|
||||
|
||||
Clean: b.ResetSession,
|
||||
|
||||
Invalidate: b.invalidate,
|
||||
}
|
||||
|
||||
return b.Backend
|
||||
@@ -97,6 +99,13 @@ func (b *backend) ResetSession() {
|
||||
b.session = nil
|
||||
}
|
||||
|
||||
func (b *backend) invalidate(key string) {
|
||||
switch key {
|
||||
case "config/connection":
|
||||
b.ResetSession()
|
||||
}
|
||||
}
|
||||
|
||||
// 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