package
2.1.0
Repository: https://github.com/golang-tools/redishelper.git
Documentation: pkg.go.dev

# Functions

New 新建一个锁对象.
WithAutoRefreshInterval 设置自动刷新过期时间的设置.
WithCheckPeriod 锁的设置项,设置检查锁状态的轮询间隔时间.
WithSpecifiedKey 中间件通用设置,指定使用的键,注意设置key后namespace将失效.
WithKey 中间件通用设置,指定使用的键,注意设置后namespace依然有效.
WithMaxTTL 设置token消减间隔时长,单位s.
WithNamespace 中间件通用设置,指定锁的命名空间.
WithSpecifiedKey 中间件通用设置,指定使用的键,注意设置key后namespace将失效.
WithTaskCron 设置定时器.

# Constants

MiniCheckPeriod 等待的轮询间隔最低100微秒.

# Variables

ErrAlreadyLocked 该锁已经被锁定.
ErrAlreadyUnLocked 该锁已经被解锁.
ErrCheckPeriodLessThan100Microsecond checkperiod小于100微秒.
ErrNoRightToUnLock 无权解锁该锁.

# Structs

Lock 分布式锁结构.
No description provided by the author

# Interfaces

LockInterface 锁对象的接口.