plugin

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Handshake = plugin.HandshakeConfig{
	MagicCookieKey:   "SESSION_PLUGIN",
	MagicCookieValue: "m9erzlkcuac9gy4a2szc19j7xjleo4s4epwiio9opv8tjv9sid0qetl7cjo6ulkiskorqyg26pcsfyf979pgn28s5a7byfbq0n66",
}
View Source
var VersionedPlugins = map[int]plugin.PluginSet{
	1: {
		"session": &GRPCSessionPlugin{},
	},
}

Functions

func NewClient

func NewClient(cmd *exec.Cmd, loglevel string, writer io.Writer) *plugin.Client

Types

type GRPCSessionClient

type GRPCSessionClient struct {
	PluginClient *plugin.Client
	TestServer   *grpc.Server
	// contains filtered or unexported fields
}

func (*GRPCSessionClient) Close

func (p *GRPCSessionClient) Close(ctx context.Context) error

func (*GRPCSessionClient) Delete

func (p *GRPCSessionClient) Delete(ctx context.Context, key string) error

func (*GRPCSessionClient) Get

func (p *GRPCSessionClient) Get(ctx context.Context, key string) (string, error)

func (*GRPCSessionClient) Init

func (p *GRPCSessionClient) Init(ctx context.Context, setting map[string]interface{}) error

func (*GRPCSessionClient) Put

func (p *GRPCSessionClient) Put(ctx context.Context, key string, value string) error

type GRPCSessionPlugin

type GRPCSessionPlugin struct {
	plugin.Plugin
	Impl session.Session
}

func (*GRPCSessionPlugin) GRPCClient

func (p *GRPCSessionPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*GRPCSessionPlugin) GRPCServer

func (p *GRPCSessionPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

type GRPCSessionServer

type GRPCSessionServer struct {
	Impl session.Session
	proto.UnimplementedSessionServer
}

func (*GRPCSessionServer) Close

func (c *GRPCSessionServer) Close(ctx context.Context, e *proto.Empty) (*proto.Empty, error)

func (*GRPCSessionServer) Delete

func (*GRPCSessionServer) Get

func (*GRPCSessionServer) Init

func (*GRPCSessionServer) Put

Jump to

Keyboard shortcuts

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