Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "BASIC_PLUGIN",
MagicCookieValue: "hello",
}
View Source
var PluginMap = map[string]plugin.Plugin{ "kv_grpc": &KVGRPCPlugin{}, }
Functions ¶
This section is empty.
Types ¶
type KVGRPCClient ¶
type KVGRPCClient struct {
// contains filtered or unexported fields
}
type KVGRPCPlugin ¶
type KVGRPCPlugin struct { plugin.Plugin Impl KV }
func (*KVGRPCPlugin) GRPCClient ¶
func (k *KVGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, client *grpc.ClientConn) (interface{}, error)
func (*KVGRPCPlugin) GRPCServer ¶
func (k *KVGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
type KVGRPCServer ¶
type KVGRPCServer struct {
Impl KV
}
func (*KVGRPCServer) Get ¶
func (k *KVGRPCServer) Get(ctx context.Context, request *proto.GetRequest) (*proto.GetResponse, error)
func (*KVGRPCServer) Put ¶
func (k *KVGRPCServer) Put(ctx context.Context, request *proto.PutRequest) (*proto.Empty, error)
Click to show internal directories.
Click to hide internal directories.