Documentation
¶
Overview ¶
Package internal 依赖的内部实现
Index ¶
Constants ¶
View Source
const ( OK = "ok" ErrTypeNotMatch = "redis return type not match" // redis返回数据类型不匹配 ErrWLockConflict = "write lock conflict" // 写锁冲突 ErrHadWLock = "had write lock, lock read lock failed" // 已经有写锁,加读锁失败 ErrLockNotExist = "lock not exist" // 锁不存在 ErrLockFailed = "lock failed" // 加锁失败 ErrCasConflict = "cas conflict" // cas 冲突 )
分布式锁相关常量定义
Variables ¶
View Source
var ( //go:embed script/lock_or_refresh.lua LockOrRefreshScript string //go:embed script/refresh.lua RefreshScript string //go:embed script/unlock.lua UnLockScript string //go:embed script/rlock.lua RLockScript string //go:embed script/runlock.lua RUnlockScript string //go:embed script/wlock.lua WLockScript string //go:embed script/wunlock.lua WUnlockScript string //go:embed script/cas.lua CasScript string )
lua脚本变量定义,直接将lua脚本加载进二进制
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.