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 ¶
func (c *WebHandlerGRPCClient) HandleRequest(r interfaces.WebRequest) interfaces.WebResponse
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 ¶
func (s *WebHandlerGRPCServer) HandleRequest(ctx context.Context, r *proto.WebRequest) (*proto.WebResponse, error)
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
Click to show internal directories.
Click to hide internal directories.