Documentation ¶
Index ¶
- func DB(db int) *redis.Client
- func Init(add, pwd string) error
- func Lock(ctx context.Context, c *redis.Client, key, uniID string, ...) (success bool)
- func LockSentinel(ctx context.Context, c *redis.ClusterClient, key, uniID string, ...) (success bool)
- func NewClient(addr, pwd string, db int) *redis.Client
- func NewSentinelClient(masterName, sentinelPassword, pwd string, sentinels []string, db int) *redis.Client
- func NewSentinelClusterClient(masterName, sentinelPassword, pwd string, sentinelAddrs []string, db int) *redis.ClusterClient
- func Unlock(ctx context.Context, c *redis.Client, key, uniID string) (success bool)
- func UnlockSentinel(ctx context.Context, c *redis.ClusterClient, key, uniID string) (success bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LockSentinel ¶
func NewSentinelClient ¶
func NewSentinelClusterClient ¶
func NewSentinelClusterClient(masterName, sentinelPassword, pwd string, sentinelAddrs []string, db int) *redis.ClusterClient
NewSentinelClusterClient deprecated!!! 连接cluster模式的redis集群 哨兵集群请使用NewSentinelClient方法
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.