-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmain.go
31 lines (26 loc) · 854 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package main
import (
"log"
"os"
"github.com/consensys/quorum-account-plugin-hashicorp-vault/internal/server"
"github.com/hashicorp/go-plugin"
)
const defaultProtocolVersion = 1
var (
defaultHandshakeConfig = plugin.HandshakeConfig{
ProtocolVersion: defaultProtocolVersion,
MagicCookieKey: "QUORUM_PLUGIN_MAGIC_COOKIE",
MagicCookieValue: "CB9F51969613126D93468868990F77A8470EB9177503C5A38D437FEFF7786E0941152E05C06A9A3313391059132A7F9CED86C0783FE63A8B38F01623C8257664",
}
)
func main() {
log.SetFlags(0) // remove timestamp when logging to host process
log.SetOutput(os.Stderr) // host process listens to stderr to log
plugin.Serve(&plugin.ServeConfig{
HandshakeConfig: defaultHandshakeConfig,
Plugins: map[string]plugin.Plugin{
"impl": &server.HashicorpPlugin{},
},
GRPCServer: plugin.DefaultGRPCServer,
})
}