Documentation
¶
Index ¶
- type GRPCPlugin
- func (p *GRPCPlugin) Client(_ *plugin.MuxBroker, _ *rpc.Client) (any, error)
- func (p *GRPCPlugin) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn) (any, error)
- func (p *GRPCPlugin) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error
- func (p *GRPCPlugin) Server(_ *plugin.MuxBroker) (any, error)
- type PluginServer
- func (p *PluginServer) Close(ctx context.Context, req *pb.CloseRequest) (*pb.CloseResponse, error)
- func (p *PluginServer) GetMetadata(ctx context.Context, req *pb.GetMetadataRequest) (*pb.GetMetadataResponse, error)
- func (p *PluginServer) Initialize(ctx context.Context, req *pb.InitializeRequest) (*pb.InitializeResponse, error)
- func (p *PluginServer) Serve()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCPlugin ¶
type GRPCPlugin struct {
plugin.NetRPCUnsupportedPlugin
Impl pb.PluginServer
}
GRPCPlugin is the plugin implementation for go-plugin
func (*GRPCPlugin) GRPCClient ¶
func (p *GRPCPlugin) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn) (any, error)
GRPCClient is required by the go-plugin interface
func (*GRPCPlugin) GRPCServer ¶
func (p *GRPCPlugin) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error
GRPCServer is required by the go-plugin interface
type PluginServer ¶
type PluginServer struct {
pb.UnimplementedPluginServer
// contains filtered or unexported fields
}
PluginServer is the server implementation that plugins will use
func NewPluginServer ¶
func NewPluginServer(impl pb.PluginServer) *PluginServer
NewPluginServer creates a new plugin server
func (*PluginServer) Close ¶
func (p *PluginServer) Close(ctx context.Context, req *pb.CloseRequest) (*pb.CloseResponse, error)
Close implements the plugin.Plugin interface
func (*PluginServer) GetMetadata ¶
func (p *PluginServer) GetMetadata(ctx context.Context, req *pb.GetMetadataRequest) (*pb.GetMetadataResponse, error)
GetMetadata implements the plugin.Plugin interface
func (*PluginServer) Initialize ¶
func (p *PluginServer) Initialize(ctx context.Context, req *pb.InitializeRequest) (*pb.InitializeResponse, error)
Initialize implements the plugin.Plugin interface
Click to show internal directories.
Click to hide internal directories.