@@ -15,6 +15,7 @@ type RedisClient interface {
1515 Del (ctx context.Context , keys ... string ) * redis.IntCmd
1616 Scan (ctx context.Context , cursor uint64 , match string , count int64 ) * redis.ScanCmd
1717 HSet (ctx context.Context , key string , values ... interface {}) * redis.IntCmd
18+ HDel (ctx context.Context , key string , fields ... string ) * redis.IntCmd
1819 RPush (ctx context.Context , key string , value interface {}) * redis.IntCmd
1920 LRange (ctx context.Context , key string , start , stop int64 ) * redis.StringSliceCmd
2021 PSubscribe (ctx context.Context , patterns ... string ) (* redis.PubSub , error )
@@ -80,6 +81,11 @@ func (r *redisClient) HSet(ctx context.Context, key string, values ...interface{
8081 return r .client .HSet (ctx , key , values ... )
8182}
8283
84+ /* hash delete for redis */
85+ func (r * redisClient ) HDel (ctx context.Context , key string , fields ... string ) * redis.IntCmd {
86+ return r .client .HDel (ctx , key , fields ... )
87+ }
88+
8389/* subscribe to redis keyspace notifications */
8490func (r * redisClient ) PSubscribe (ctx context.Context , patterns ... string ) (* redis.PubSub , error ) {
8591 pubsub := r .client .PSubscribe (ctx , patterns ... )
0 commit comments