Documentation ¶
Index ¶
Constants ¶
View Source
const PluginName = "user-storage"
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "BASIC_PLUGIN",
MagicCookieValue: "hello",
}
Handshake is a common handshake that is shared by plugin and host.
View Source
var PluginMap = map[string]plugin.Plugin{ PluginName: &UserStoragePlugin{}, }
PluginMap is the map of plugins we can dispense.
Functions ¶
This section is empty.
Types ¶
type UserStoragePlugin ¶
type UserStoragePlugin struct { plugin.Plugin Impl model.UserStorage }
This is the implementation of plugin.GRPCPlugin so we can serve/consume this.
func (*UserStoragePlugin) GRPCClient ¶
func (p *UserStoragePlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*UserStoragePlugin) GRPCServer ¶
func (p *UserStoragePlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
Click to show internal directories.
Click to hide internal directories.