Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheInterceptor ¶
type CacheInterceptor struct { MethodToCache map[string]*Option // contains filtered or unexported fields }
func New ¶
func New(redisClient redis.UniversalClient, prefix string, methodToCache map[string]*Option, opt *Option) *CacheInterceptor
func (*CacheInterceptor) AddMethodToCache ¶
func (c *CacheInterceptor) AddMethodToCache(method string, opt *Option)
func (*CacheInterceptor) Interceptor ¶
func (c *CacheInterceptor) Interceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.