mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 18:48:08 +00:00 
			
		
		
		
	More porting from rep (#2388)
* More porting from rep * Address review feedback
This commit is contained in:
		| @@ -34,6 +34,8 @@ func Backend(conf *logical.BackendConfig) *backend { | ||||
| 		}, | ||||
|  | ||||
| 		Clean: b.ResetDB, | ||||
|  | ||||
| 		Invalidate: b.invalidate, | ||||
| 	} | ||||
|  | ||||
| 	b.logger = conf.Logger | ||||
| @@ -126,6 +128,13 @@ func (b *backend) ResetDB() { | ||||
| 	b.db = nil | ||||
| } | ||||
|  | ||||
| func (b *backend) invalidate(key string) { | ||||
| 	switch key { | ||||
| 	case "config/connection": | ||||
| 		b.ResetDB() | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // Lease returns the lease information | ||||
| func (b *backend) Lease(s logical.Storage) (*configLease, error) { | ||||
| 	entry, err := s.Get("config/lease") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jeff Mitchell
					Jeff Mitchell