Prepare multiplexing support for database plugins (#16995)

* prepare multiplexing support for database plugins
This commit is contained in:
Max Coulombe
2022-09-06 14:00:37 -04:00
committed by GitHub
parent 41f78c66d8
commit 59114c5cc1
9 changed files with 21 additions and 62 deletions

View File

@@ -5,7 +5,7 @@ import (
"os"
"github.com/hashicorp/vault/plugins/database/mssql"
dbplugin "github.com/hashicorp/vault/sdk/database/dbplugin/v5"
"github.com/hashicorp/vault/sdk/database/dbplugin/v5"
)
func main() {
@@ -18,12 +18,7 @@ func main() {
// Run instantiates a MSSQL object, and runs the RPC server for the plugin
func Run() error {
dbType, err := mssql.New()
if err != nil {
return err
}
dbplugin.Serve(dbType.(dbplugin.Database))
dbplugin.ServeMultiplex(mssql.New)
return nil
}