Documentation ¶ Index ¶ type Locker func GetLocker(rdb redis.UniversalClient) *Locker func (l *Locker) Obtain(ctx context.Context, key string, ttl int, opt ...*redislock.Options) (*redislock.Lock, error) func (l *Locker) ObtainWaitRetry(ctx context.Context, key string, ttl int, retryCount int, retryDelay int) (*redislock.Lock, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Locker ¶ type Locker struct { Locker *redislock.Client } func GetLocker ¶ func GetLocker(rdb redis.UniversalClient) *Locker func (*Locker) Obtain ¶ func (l *Locker) Obtain(ctx context.Context, key string, ttl int, opt ...*redislock.Options) (*redislock.Lock, error) func (*Locker) ObtainWaitRetry ¶ func (l *Locker) ObtainWaitRetry(ctx context.Context, key string, ttl int, retryCount int, retryDelay int) (*redislock.Lock, error) Source Files ¶ View all Source files lock.go Click to show internal directories. Click to hide internal directories.