shared

package
v2.8.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

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