Documentation
¶
Overview ¶
Package shared provides shared functionality for Privateer plugins.
Index ¶
Constants ¶
const PluginName = "plugin"
PluginName is used by Privateer Core sally.go: rpcClient.Dispense(plugin.PluginName).
Variables ¶
This section is empty.
Functions ¶
func GetHandshakeConfig ¶
func GetHandshakeConfig() hcplugin.HandshakeConfig
GetHandshakeConfig provides handshake config details. It is used by core and service packs.
Types ¶
type Plugin ¶
type Plugin struct {
// Impl is the plugin implementation.
Impl Pluginer
}
Plugin is the implementation of plugin.Plugin so we can serve/consume this.
This has two methods: Server must return an RPC server for this plugin type. We construct a PluginRPCServer for this.
Client must return an implementation of our interface that communicates over an RPC client. We return PluginRPC for this.
Ignore MuxBroker. That is used to create more multiplexed streams on our plugin connection and is a more advanced use case.
type PluginRPC ¶
type PluginRPC struct {
// contains filtered or unexported fields
}
PluginRPC is an implementation that talks over RPC.
type PluginRPCServer ¶
type PluginRPCServer struct {
// Impl is the real implementation.
Impl Pluginer
}
PluginRPCServer is the RPC server that PluginRPC talks to, conforming to the requirements of net/rpc.
func (*PluginRPCServer) Start ¶
func (s *PluginRPCServer) Start(args interface{}, resp *error) error
Start is a wrapper for interface implementation.