Documentation
¶
Index ¶
- func InitRedis() error
- func Ping(ctx context.Context) error
- type Redis
- func (r *Redis) HDel(ctx context.Context, key string, field ...string) error
- func (r *Redis) HGet(ctx context.Context, key, field string) (string, error)
- func (r *Redis) HGetAll(ctx context.Context, key string) (map[string]string, error)
- func (r *Redis) HSet(ctx context.Context, key, field, value string, expire time.Duration) error
- func (r *Redis) HSetNX(ctx context.Context, key, field, value string, expire time.Duration) error
- func (r *Redis) Ping(ctx context.Context) error
- func (r *Redis) TTL(ctx context.Context, key string) (time.Duration, error)
- type RedisConfigItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Redis ¶
type Redis struct { Config *redis.Options Client *redis.Client }
Redis provides a cache backed by a Redis server.
type RedisConfigItem ¶
Click to show internal directories.
Click to hide internal directories.