Skip to content

Commit 39e5664

Browse files
Updated for transaction struct
1 parent 3fdd3ac commit 39e5664

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/redis/redis.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ type RedisClient interface {
1313
Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error
1414
Get(ctx context.Context, key string) (string, error)
1515
Del(ctx context.Context, keys ...string) *redis.IntCmd
16+
Scan(ctx context.Context, cursor uint64, match string, count int64) *redis.ScanCmd
1617
HSet(ctx context.Context, key string, values ...interface{}) *redis.IntCmd
1718
RPush(ctx context.Context, key string, value interface{}) *redis.IntCmd
1819
LRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd
@@ -59,6 +60,11 @@ func (r *redisClient) Del(ctx context.Context, keys ...string) *redis.IntCmd {
5960
return r.client.Del(ctx, keys...)
6061
}
6162

63+
/* scan for redis */
64+
func (r *redisClient) Scan(ctx context.Context, cursor uint64, match string, count int64) *redis.ScanCmd {
65+
return r.client.Scan(ctx, cursor, match, count)
66+
}
67+
6268
/* for pushing multiple elements in Redis */
6369
func (r *redisClient) RPush(ctx context.Context, key string, value interface{}) *redis.IntCmd {
6470
return r.client.RPush(ctx, key, value)

0 commit comments

Comments
 (0)