plugins

package
v0.0.0-...-9d1237e Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginMapKeyWebHandler = "webhandler"
)

Variables

View Source
var HandshakeConfig = plugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "my-helper-bot",
	MagicCookieValue: "my-helper-bot-plugins",
}

HandshakeConfig is to be used by all plugin implementers wishing to communicate with this main application.

View Source
var PluginMap = map[string]plugin.Plugin{
	PluginMapKeyWebHandler: &WebHandlerPlugin{},
}

PluginMap is to be used by the main application. For plugin implementers, define your own map declaring only for keys that your plugin is implementing. This acts as a reference to which plugin map keys are used for which plugin type.

Functions

This section is empty.

Types

type WebHandlerGRPCClient

type WebHandlerGRPCClient struct {
	// contains filtered or unexported fields
}

func (*WebHandlerGRPCClient) GetEndpoints

func (c *WebHandlerGRPCClient) GetEndpoints() []interfaces.WebEndpoint

func (*WebHandlerGRPCClient) HandleRequest

type WebHandlerGRPCServer

type WebHandlerGRPCServer struct {
	proto.UnimplementedWebHandlerServer
	Impl interfaces.WebHandler
}

func (*WebHandlerGRPCServer) GetEndpoints

func (s *WebHandlerGRPCServer) GetEndpoints(ctx context.Context, msg *proto.Empty) (*proto.WebEndpointList, error)

func (*WebHandlerGRPCServer) HandleRequest

type WebHandlerPlugin

type WebHandlerPlugin struct {
	plugin.Plugin
	Impl interfaces.WebHandler
}

func (*WebHandlerPlugin) GRPCClient

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

func (*WebHandlerPlugin) GRPCServer

func (p *WebHandlerPlugin) GRPCServer(b *plugin.GRPCBroker, s *grpc.Server) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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