grpcplugin

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolVersion = 2

	MagicCookieKey = "ev_author"

	MagicCookieValue = "xiaowenlong"
)

Variables

This section is empty.

Functions

func Serve

func Serve(opts ServeOpts)

Types

type PluginInfoClient

type PluginInfoClient interface {
	pluginv2.PluginInfoClient
}

type PluginInfoGRPCPlugin

type PluginInfoGRPCPlugin struct {
	plugin.NetRPCUnsupportedPlugin
	plugin.GRPCPlugin
	PluginInfoServer PluginInfoServer
}

func (*PluginInfoGRPCPlugin) GRPCClient

func (p *PluginInfoGRPCPlugin) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*PluginInfoGRPCPlugin) GRPCServer

func (p *PluginInfoGRPCPlugin) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error

type PluginInfoServer

type PluginInfoServer interface {
	pluginv2.PluginInfoServer
}

type ResourceClient

type ResourceClient interface {
	pluginv2.ResourceClient
}

type ResourceGRPCPlugin

type ResourceGRPCPlugin struct {
	plugin.NetRPCUnsupportedPlugin
	plugin.GRPCPlugin
	ResourceServer ResourceServer
}

func (*ResourceGRPCPlugin) GRPCClient

func (p *ResourceGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*ResourceGRPCPlugin) GRPCServer

func (p *ResourceGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

type ResourceServer

type ResourceServer interface {
	pluginv2.ResourceServer
}

type ServeOpts

type ServeOpts struct {
	PluginID         string
	PluginJson       *build.PluginJsonData
	ResourceServer   ResourceServer
	PluginInfoServer PluginInfoServer

	GRPCServer func(options []grpc.ServerOption) *grpc.Server

	Debug bool

	ExitCallback func()
}

Jump to

Keyboard shortcuts

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