Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "MODEL_PLUGIN",
MagicCookieValue: "hello",
}
Handshake is a common handshake that is shared by plugin and host.
View Source
var PluginMap = map[string]plugin.Plugin{ "model": &ModelGRPCPlugin{}, }
PluginMap is the map of plugins we can dispense.
Functions ¶
This section is empty.
Types ¶
type ClientGRPC ¶
type ClientGRPC struct {
// contains filtered or unexported fields
}
ClientGRPC is an implementation of KV that talks over RPC.
type ModelGRPCPlugin ¶
type ModelGRPCPlugin struct {
// GRPCPlugin must still implement the Plugin interface
plugin.Plugin
// Concrete implementation, written in Go. This is only used for plugins
// that are written in Go.
Impl Model
}
ModelGRPCPlugin This is the implementation of plugin.Plugin so we can serve/consume this.
func (*ModelGRPCPlugin) GRPCClient ¶
func (p *ModelGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
GRPCClient the GRPC client
func (*ModelGRPCPlugin) GRPCServer ¶
func (p *ModelGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
GRPCServer the GRPC Server
Click to show internal directories.
Click to hide internal directories.