added basic plugin structure

This commit is contained in:
2022-11-01 14:26:54 +01:00
commit a693cbad37
18 changed files with 481 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package register
import (
"net/rpc"
"github.com/hashicorp/go-plugin"
)
type PluginAPI struct {
Impl Plugin
}
func (pa *PluginAPI) Server(*plugin.MuxBroker) (any, error) {
return &PluginServer{Impl: pa.Impl}, nil
}
func (*PluginAPI) Client(b *plugin.MuxBroker, c *rpc.Client) (any, error) {
return &PluginClient{client: c}, nil
}