Documentation
¶
Index ¶
Constants ¶
const PluginName = "plugin"
PluginName overwritten to be 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 Injection
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 GreeterRPCServer for this.
Client must return an implementation of our interface that communicates over an RPC client. We return GreeterRPC 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 {
// This 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