Documentation
¶
Overview ¶
Package shared contains shared data between the host and plugins.
Index ¶
Constants ¶
View Source
const ( CAPABILITY_REVIEW_PROCESSOR = "review.v1.ReviewProcessorService" CAPABILITY_RENDER = "render.v1.RenderService" CAPABILITY_ADD_CARD = "addcard.v1.AddCardService" CAPABILITY_UPDATE_CARD = "addcard.v1.UpdateCardService" )
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "FLASHCARD_CLI_PLUGIN_HANDSHAKE",
MagicCookieValue: "flashcards-grpc-ecosystem-auth",
}
Handshake is a common handshake that is shared by plugin and host.
View Source
var PluginMap = map[string]plugin.Plugin{ CAPABILITY_REVIEW_PROCESSOR: &ReviewPlugin{}, CAPABILITY_RENDER: &RenderPlugin{}, CAPABILITY_UPDATE_CARD: &UpdateCardPlugin{}, }
Functions ¶
This section is empty.
Types ¶
type RenderPlugin ¶
type RenderPlugin struct {
plugin.NetRPCUnsupportedPlugin
Impl render.RenderServiceServer
}
func (*RenderPlugin) GRPCClient ¶
func (p *RenderPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*RenderPlugin) GRPCServer ¶
func (p *RenderPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
type ReviewPlugin ¶
type ReviewPlugin struct {
plugin.NetRPCUnsupportedPlugin
Impl review.ReviewProcessorServiceServer
}
func (*ReviewPlugin) GRPCClient ¶
func (p *ReviewPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*ReviewPlugin) GRPCServer ¶
func (p *ReviewPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
type Shutdownable ¶
type Shutdownable interface {
Shutdown(ctx context.Context, in *common.ShutdownRequest, opts ...grpc.CallOption) (*common.ShutdownResponse, error)
}
Shutdownable defines a client plugin that can be shutdown. All plugins should match this interface
type UpdateCardPlugin ¶
type UpdateCardPlugin struct {
plugin.NetRPCUnsupportedPlugin
Impl update.UpdateCardServiceServer
}
func (*UpdateCardPlugin) GRPCClient ¶
func (p *UpdateCardPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*UpdateCardPlugin) GRPCServer ¶
func (p *UpdateCardPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
Click to show internal directories.
Click to hide internal directories.