INNER CODE UNIT · Go
main
schemahero/schemahero · plugins/postgres/main.go:16
func main() {
// Create the postgres plugin implementation
postgresPlugin := &PostgresPlugin{}
// Create the RPC plugin wrapper
rpcPlugin := &schemaheroplugin.DatabaseRPCPlugin{
Impl: postgresPlugin,
}
// Create the plugin map
pluginMap := map[string]plugin.Plugin{
"database": rpcPlugin,
}
// Serve the plugin
plugin.Serve(&plugin.ServeConfig{
HandshakeConfig: shared.Handshake,
Plugins: pluginMap,