2023-03-15 16:00:52 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2017-04-13 20:48:32 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2017-05-03 20:01:05 +00:00
|
|
|
"log"
|
2017-04-13 20:48:32 +00:00
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/hashicorp/vault/plugins/database/mssql"
|
2022-09-06 18:00:37 +00:00
|
|
|
"github.com/hashicorp/vault/sdk/database/dbplugin/v5"
|
2017-04-13 20:48:32 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2020-10-22 21:43:19 +00:00
|
|
|
err := Run()
|
2017-04-13 20:48:32 +00:00
|
|
|
if err != nil {
|
2017-05-03 20:01:05 +00:00
|
|
|
log.Println(err)
|
2017-04-13 20:48:32 +00:00
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|
2020-10-22 21:43:19 +00:00
|
|
|
|
|
|
|
// Run instantiates a MSSQL object, and runs the RPC server for the plugin
|
|
|
|
func Run() error {
|
2022-09-06 18:00:37 +00:00
|
|
|
dbplugin.ServeMultiplex(mssql.New)
|
2020-10-22 21:43:19 +00:00
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|