Documentation
¶
Overview ¶
Package plugininfo contains type definitions and some boilerplating Go plugins can use The idea is to have it in a separate repo as a library, used by both pluginboss and (Go) plugins Plugins in other languages need to implement it
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConverterGRPCPlugin ¶
type ConverterGRPCPlugin struct {
// GRPCPlugin must still implement the Plugin interface
plugin.Plugin
// Concrete implementation, written in Go. This is only used for plugins that are written in Go.
Impl ConverterPlugin
}
This is the implementation of plugin.GRPCPlugin so we can serve/consume this.
func (*ConverterGRPCPlugin) GRPCClient ¶
func (p *ConverterGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*ConverterGRPCPlugin) GRPCServer ¶
func (p *ConverterGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
type ConverterPlugin ¶
ConverterPlugin is the plugin's interface. Name is deliberatelly wrong (ConverterPlugin instead of Converter) to emphasize the fact it's an interface defining plugin API
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
GRPCClient is an implementation of ConverterPlugin that talks over RPC. Basically a client with RPC communication details abstracted away
type GRPCServer ¶
type GRPCServer struct {
Impl ConverterPlugin // plugin implementation
}
GRPCServer is the RPC server that GRPCClient talks to, a wrapper around plugin's server
type PluginData ¶
type PluginData struct {
Cmd string
Handshake plugin.HandshakeConfig
Plugin plugin.Plugin
}
type PluginInfo ¶
type PluginInfo struct {
PluginDataMap map[string]PluginData
}