get.porter.sh/porter@v1.3.0/pkg/storage/migrations/crudstore/plugin.go (about) 1 package crudstore 2 3 import ( 4 "net/rpc" 5 6 "github.com/hashicorp/go-plugin" 7 ) 8 9 var _ plugin.Plugin = &Plugin{} 10 11 // Plugin is a generic type of plugin for working with any implementation of a crud store. 12 type Plugin struct { 13 Impl Store 14 } 15 16 func (p *Plugin) Server(*plugin.MuxBroker) (interface{}, error) { 17 return &Server{Impl: p.Impl}, nil 18 } 19 20 func (Plugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error) { 21 return &Client{client: c}, nil 22 }