plugin

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type CacheServer added in v1.0.0

type CacheServer struct {
	Impl cache.Cache
	proto.UnimplementedCacheServer
}

func (*CacheServer) Delete added in v1.0.0

func (c *CacheServer) Delete(ctx context.Context, r *proto.DeleteRequest) (*proto.Empty, error)

func (*CacheServer) Get added in v1.0.0

func (*CacheServer) Init added in v1.0.0

func (*CacheServer) Put added in v1.0.0

type GRPCCache added in v1.0.0

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

func (*GRPCCache) Close added in v1.0.0

func (p *GRPCCache) Close() error

func (*GRPCCache) Delete added in v1.0.0

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

func (*GRPCCache) Get added in v1.0.0

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

func (*GRPCCache) Put added in v1.0.0

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

func (*GRPCCache) Setting added in v1.0.0

func (p *GRPCCache) Setting(ctx context.Context, setting cache.CacheSetting)

type GRPCCachePlugin added in v1.0.0

type GRPCCachePlugin struct {
	plugin.Plugin
	GRPCCache func() *CacheServer
}

func (*GRPCCachePlugin) GRPCClient added in v1.0.0

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

func (*GRPCCachePlugin) GRPCServer added in v1.0.0

func (p *GRPCCachePlugin) 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