mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
Move database connections map out to separate package (#21207)
The upcoming event main plugin will use a very similar pattern as the database plugin map, so it makes sense to refactor this and move this map out. It also cleans up the database plugin backend so that it does not have to keep track of the lock. Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
58b6cb1c42
commit
cf48236a3c
@@ -462,7 +462,7 @@ func (b *databaseBackend) connectionWriteHandler() framework.OperationFunc {
|
||||
b.Logger().Debug("created database object", "name", name, "plugin_name", config.PluginName)
|
||||
|
||||
// Close and remove the old connection
|
||||
oldConn := b.connPut(name, &dbPluginInstance{
|
||||
oldConn := b.connections.Put(name, &dbPluginInstance{
|
||||
database: dbw,
|
||||
name: name,
|
||||
id: id,
|
||||
|
||||
Reference in New Issue
Block a user