Versions in this module Expand all Collapse all v0 v0.1.0 Jan 12, 2024 Changes in this version + const TTLForever + func MustParseKeyDuration(s string) time.Duration + func ParseKeyDuration(s string) (time.Duration, error) + func RdKey(format string, id ...interface{}) string + func Uint64ToStringRdKeys(format string, ids []uint64) []string + type Client struct + func New(client *redis.Client) *Client + func (c *Client) DelValues(ctx context.Context, keys ...string) error + func (c *Client) DistrbLock(ctx context.Context, lockKey string, ttl time.Duration) error + func (c *Client) DistrbUnLock(ctx context.Context, busKey string) error + func (c *Client) GetClient() *redis.Client + func (c *Client) GetString(ctx context.Context, format string, injects ...interface{}) (string, error) + func (c *Client) PipeRead(ctx context.Context, keys []string) (map[string]string, error) + func (c *Client) PipeWrite(ctx context.Context, objs []interface{}, kfn KeyFunc, ttl time.Duration) error + type ICurrencyLocker interface + DistrbLock func(ctx context.Context, lockKey string, ttl time.Duration) error + DistrbUnLock func(ctx context.Context, busKey string) error + type IRedisHand interface + DelValues func(ctx context.Context, keys ...string) error + GetClient func() *redis.Client + GetString func(ctx context.Context, keyFormat string, injects ...interface{}) (string, error) + PipeRead func(ctx context.Context, keys []string) (map[string]string, error) + PipeWrite func(ctx context.Context, objs []interface{}, kfn KeyFunc, ttl time.Duration) error + type KeyFunc func(obj interface{}) string