Documentation
¶
Index ¶
- Variables
- type CacheServer
- func (c *CacheServer) Delete(ctx context.Context, r *proto.DeleteRequest) (*proto.Empty, error)
- func (c *CacheServer) Get(ctx context.Context, r *proto.GetRequest) (*proto.GetResponse, error)
- func (c *CacheServer) Init(ctx context.Context, r *proto.SettingRequest) (*proto.Empty, error)
- func (c *CacheServer) Put(ctx context.Context, r *proto.PutRequest) (*proto.Empty, error)
- type GRPCCache
- func (p *GRPCCache) Close() error
- func (p *GRPCCache) Delete(ctx context.Context, key string) error
- func (p *GRPCCache) Get(ctx context.Context, key string) (string, error)
- func (p *GRPCCache) Put(ctx context.Context, key string, value string) error
- func (p *GRPCCache) Setting(ctx context.Context, setting cache.CacheSetting)
- type GRPCCachePlugin
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 (c *CacheServer) Get(ctx context.Context, r *proto.GetRequest) (*proto.GetResponse, error)
func (*CacheServer) Init ¶ added in v1.0.0
func (c *CacheServer) Init(ctx context.Context, r *proto.SettingRequest) (*proto.Empty, error)
func (*CacheServer) Put ¶ added in v1.0.0
func (c *CacheServer) Put(ctx context.Context, r *proto.PutRequest) (*proto.Empty, error)
type GRPCCache ¶ added in v1.0.0
type GRPCCache struct { PluginClient *plugin.Client TestServer *grpc.Server // contains filtered or unexported fields }
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
Click to show internal directories.
Click to hide internal directories.