Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LockGenerator ¶
type LockGenerator struct {
// contains filtered or unexported fields
}
LockGenerator 分布式锁生成器
func NewLockGenerator ¶
func NewLockGenerator(clients []*redis.Client) *LockGenerator
NewLockGenerator 基于多个redis客户端生成NewLockGenerator实例
type Option ¶
type Option interface {
Apply(*Mutex)
}
Option
func SetDriftFactor ¶
SetDriftFactor can be used to set the clock drift factor.
func SetGenValueFunc ¶
SetGenValueFunc can be used to set the custom value generator.
func SetRetryDelayFunc ¶
SetRetryDelayFunc can be used to override default delay behavior.
Click to show internal directories.
Click to hide internal directories.