1 Star 0 Fork 0

CaptialSTeam/ubdframe

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
locker.go 463 Bytes
一键复制 编辑 原始数据 按行查看 历史
sage 提交于 2024-12-17 18:17 +08:00 . add admin app
package interfaces
// ItfOptimisticLock 乐观锁实现
type ItfOptimisticLock interface {
Lock(name string) bool
UnLock(name string) bool
}
// ItfDistributeLocker 分布式锁接口
type ItfDistributeLocker interface {
Lock(key string, ttl int64) (bool, error) //加锁
Release(key string) error //释放锁
Delay(key string, ttl int64) error //延迟锁,对锁进行续期延长
TTL(key string) (int64, error) //锁剩余时间
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/captials-team/ubdframe.git
git@gitee.com:captials-team/ubdframe.git
captials-team
ubdframe
ubdframe
v1.0.4

搜索帮助