support hscan in redis (#428)

This commit is contained in:
Hkesd
2021-02-02 17:02:18 +08:00
committed by GitHub
parent c3b9c3c5ab
commit 04284e31cd
2 changed files with 47 additions and 0 deletions

View File

@@ -501,6 +501,20 @@ func (s *Redis) Hvals(key string) (val []string, err error) {
return
}
func (s *Redis) Hscan(key string, cursor uint64, match string, count int64) (keys []string, cur uint64, err error) {
err = s.brk.DoWithAcceptable(func() error {
conn, err := getRedis(s)
if err != nil {
return err
}
keys, cur, err = conn.HScan(key, cursor, match, count).Result()
return err
}, acceptable)
return
}
func (s *Redis) Incr(key string) (val int64, err error) {
err = s.brk.DoWithAcceptable(func() error {
conn, err := getRedis(s)