Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRedisProvider ¶
func NewRedisProvider(cfg *config.Config, deps *Dependencies) (*provider, error)
NewRedisProvider returns a new redis provider
Types ¶
type Dependencies ¶
Dependencies struct for redis provider
type RedisClient ¶
type RedisClient interface {
HMSet(ctx context.Context, key string, values ...interface{}) *redis.BoolCmd
Del(ctx context.Context, keys ...string) *redis.IntCmd
HDel(ctx context.Context, key string, fields ...string) *redis.IntCmd
HMGet(ctx context.Context, key string, fields ...string) *redis.SliceCmd
HSet(ctx context.Context, key string, values ...interface{}) *redis.IntCmd
HGet(ctx context.Context, key, field string) *redis.StringCmd
HGetAll(ctx context.Context, key string) *redis.MapStringStringCmd
Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.StatusCmd
Get(ctx context.Context, key string) *redis.StringCmd
Scan(ctx context.Context, cursor uint64, match string, count int64) *redis.ScanCmd
Keys(ctx context.Context, pattern string) *redis.StringSliceCmd
Eval(ctx context.Context, script string, keys []string, args ...interface{}) *redis.Cmd
}
RedisClient is the interface for redis client & redis cluster client
Click to show internal directories.
Click to hide internal directories.