Documentation ¶
Overview ¶
Package plugin contains core GRPC plugin functionality
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Handshake = plugin.HandshakeConfig{
MagicCookieKey: "PHOBOS_PLUGIN",
MagicCookieValue: "76ea237a1ea9728a9e294c76e503a38c4409707e477266c0b5525512ec81f174",
}
Handshake is a common handshake that is shared by plugin and host.
Functions ¶
Types ¶
type ActionExecutionResponse ¶
type ActionExecutionResponse struct {
// contains filtered or unexported fields
}
ActionExecutionResponse is the response returned after executing an action
type MetadataPlugin ¶
type MetadataPlugin struct { plugin.NetRPCUnsupportedPlugin Logger hclog.Logger Description string }
MetadataPlugin implements plugin.Plugin (specifically GRPCPlugin)
func (*MetadataPlugin) GRPCClient ¶
func (p *MetadataPlugin) GRPCClient( _ context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn, ) (interface{}, error)
GRPCClient returns the GRPC client
func (*MetadataPlugin) GRPCServer ¶
func (p *MetadataPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
GRPCServer returns the GRPC server
type Option ¶
type Option func(*pluginConfig)
Option configures Plugins
func WithComponents ¶
func WithComponents(cs ...interface{}) Option
WithComponents sets the components to configure for the plugins. This will append to the components.
func WithLogger ¶
func WithLogger(log hclog.Logger) Option
WithLogger sets the logger for the plugins.
func WithMappers ¶
func WithMappers(ms ...*argmapper.Func) Option
WithMappers sets the mappers to configure for the plugins. This will append to the existing mappers.
func WithPluginDescription ¶
WithPluginDescription sets the description for the plugin
type PipelinePlugin ¶
type PipelinePlugin struct { plugin.NetRPCUnsupportedPlugin Impl pipeline.Plugin Logger hclog.Logger Mappers []*argmapper.Func }
PipelinePlugin implements plugin.Plugin (specifically GRPCPlugin) for the pipeline component type.
func (*PipelinePlugin) GRPCClient ¶
func (p *PipelinePlugin) GRPCClient( _ context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn, ) (interface{}, error)
GRPCClient returns the GRPC client
func (*PipelinePlugin) GRPCServer ¶
func (p *PipelinePlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
GRPCServer returns the GRPC server