server

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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) Client

func (p *GRPCPlugin) Client(_ *plugin.MuxBroker, _ *rpc.Client) (any, error)

Client is required by the go-plugin interface

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

func (*GRPCPlugin) Server

func (p *GRPCPlugin) Server(_ *plugin.MuxBroker) (any, error)

Server 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

GetMetadata implements the plugin.Plugin interface

func (*PluginServer) Initialize

Initialize implements the plugin.Plugin interface

func (*PluginServer) Serve

func (p *PluginServer) Serve()

Serve starts the plugin server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL