# Functions
分布式锁,锁数据* 调用实例
_ = anvil_redis.NewRedisLock(
anvil_redis.RedisLockDuration(10*time.Second),
anvil_redis.RedisLockContext(r.Context),
anvil_redis.RedisLockCtx(r.Ctx),
anvil_redis.RedisLockAttemptsTime(100), //尝试获取锁的次数
anvil_redis.RedisLockAttemptsInterval(30*time.Millisecond),
anvil_redis.RedisLockUniqueKey(utils.Guid(uk)),
anvil_redis.RedisLockLockKey(uk),
anvil_redis.RedisLockOkHandler(func(ctx context.Context) (err error) {
// TODO 获取到锁的逻辑 ..
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
key的生命周期.
No description provided by the author
.
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
DistributedOkHandler redis 分布式锁实现结构体.
DistributedOkHandler redis 分布式锁实现结构体.