Skip to content
Snippets Groups Projects

Change the current gosdn plugin implementation from Go's internal plugin system to hashicorp's go-plugins

Merged Ghost User requested to merge mb/plugin-registry-hashicorp-go-plugin into develop
2 files
+ 10
5
Compare changes
  • Side-by-side
  • Inline
Files
2
package main
import (
"log"
"os"
"code.fbi.h-da.de/danet/gosdn/controller/plugin/shared"
"code.fbi.h-da.de/danet/gosdn/plugins/openconfig"
openconfig "code.fbi.h-da.de/danet/gosdn/plugins/openconfig"
"github.com/hashicorp/go-plugin"
)
func main() {
deviceModel, _ := openconfig.NewDeviceModel()
deviceModel, err := openconfig.NewDeviceModel()
if err != nil {
log.Println(err)
os.Exit(1)
}
plugin.Serve(&plugin.ServeConfig{
HandshakeConfig: shared.Handshake,
Plugins: map[string]plugin.Plugin{
Loading