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 ...
View Source
var VersionedPlugins = map[int]p.PluginSet{ 1: { "plugin": &GRPCTaskPlugin{}, }, }
Functions ¶
Types ¶
type ExecuteRequest ¶
ExecuteRequest ...
type GRPCPlugin ¶
GRPCPlugin ...
func (*GRPCPlugin) Execute ¶
func (p *GRPCPlugin) Execute(req ExecuteRequest) (ExecuteResponse, error)
Execute ...
type GRPCTaskPlugin ¶
type GRPCTaskPlugin struct { p.Plugin GRPCPlugin func() proto.PluginServer }
GRPCTaskPlugin ...
func (*GRPCTaskPlugin) GRPCClient ¶
func (p *GRPCTaskPlugin) GRPCClient(ctx context.Context, broker *p.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
GRPCClient ...
func (*GRPCTaskPlugin) GRPCServer ¶
func (p *GRPCTaskPlugin) GRPCServer(broker *p.GRPCBroker, s *grpc.Server) error
type Plugin ¶
type Plugin interface { // Execute ... Execute(ExecuteRequest) (ExecuteResponse, error) // Close ... Close() error }
Plugin ...
Click to show internal directories.
Click to hide internal directories.