Documentation
¶
Index ¶
- func AcquireLock(ctx context.Context, key string, value interface{}, expiration time.Duration) (bool, error)
- func BGSave(ctx context.Context) error
- func Close() error
- func Delete(ctx context.Context, key string) error
- func ExtendLock(ctx context.Context, key string, expiration time.Duration) error
- func Get(ctx context.Context, key string) (string, error)
- func GetRedis() *redis.Client
- func GetRedisCluster() *redis.ClusterClient
- func GetUniversalClient() redis.Cmdable
- func HGet(ctx context.Context, key, field string) (string, error)
- func HGetAll(ctx context.Context, key string) (map[string]string, error)
- func HSet(ctx context.Context, key string, field string, value interface{}) error
- func HSetMap(ctx context.Context, key string, fields map[string]interface{}) error
- func IsAlive() bool
- func LPush(ctx context.Context, key string, values ...interface{}) error
- func LRange(ctx context.Context, key string, start, stop int64) ([]string, error)
- func MGet(ctx context.Context, keys ...string) ([]string, error)
- func MSet(ctx context.Context, pairs map[string]interface{}) error
- func Pipeline(ctx context.Context, f func(pipe redis.Pipeliner)) error
- func PipelineSet(ctx context.Context, keyValues map[string]interface{}, ...) error
- func PublishMessage(ctx context.Context, channel, message string) error
- func RPop(ctx context.Context, key string) (string, error)
- func ReleaseLock(ctx context.Context, key string) error
- func SAdd(ctx context.Context, key string, members ...interface{}) error
- func SMembers(ctx context.Context, key string) ([]string, error)
- func SRem(ctx context.Context, key string, members ...interface{}) error
- func Save(ctx context.Context) error
- func ScanKeys(ctx context.Context, pattern string, count int64) ([]string, error)
- func Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error
- func Setup() error
- func SubscribeToChannel(ctx context.Context, channel string, handler func(message string)) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquireLock ¶
func Close ¶ added in v0.3.0
func Close() error
Close closes the active Redis client and releases all connections. Safe to call even if Redis was never set up (no-op when not enabled).
func GetRedisCluster ¶ added in v0.1.9
func GetRedisCluster() *redis.ClusterClient
func GetUniversalClient ¶ added in v0.1.9
GetUniversalClient returns a universal client interface that works with both standard and cluster clients.
func PipelineSet ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.