Documentation
¶
Index ¶
Constants ¶
View Source
const ( PluginName = "plugin" DefaultProtocolVersion = 1 )
Variables ¶
View Source
var Handshake = p.HandshakeConfig{ ProtocolVersion: DefaultProtocolVersion, MagicCookieKey: "RUN_PLUGIN_MAGIC_COOKIE", MagicCookieValue: "iaafij5485d5utqh", }
Handshake is configuring the handshake for the gRPC client.
View Source
var VersionedPlugins = map[int]p.PluginSet{ 1: { "plugin": &GRPCProviderPlugin{}, }, }
Functions ¶
Types ¶
type Factory ¶
type Factory func() (*GRPCPlugin, error)
Factory is creatig a new instance of the plugin.
type GRPCPlugin ¶
type GRPCPlugin struct {
PluginClient *p.Client
Meta *Meta
// contains filtered or unexported fields
}
GRPCPlugin contains the configuration and the client connection for the provider Plugin.
func (*GRPCPlugin) Close ¶
func (p *GRPCPlugin) Close() error
Close is closing the gRPC connection if a plugin is configured.
type GRPCProviderPlugin ¶
type GRPCProviderPlugin struct {
p.Plugin
GRPCPlugin func() proto.PluginServer
}
GRPCProviderPlugin ...
func (*GRPCProviderPlugin) GRPCClient ¶
func (p *GRPCProviderPlugin) GRPCClient(_ context.Context, _ *p.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
GRPCClient ...
func (*GRPCProviderPlugin) GRPCServer ¶
func (p *GRPCProviderPlugin) GRPCServer(_ *p.GRPCBroker, s *grpc.Server) error
Click to show internal directories.
Click to hide internal directories.