1 Star 0 Fork 0

siddontang / tlock

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
const.go 483 Bytes
一键复制 编辑 原始数据 按行查看 历史
siddontang 提交于 2015-04-14 14:45 . update
package tlock
import (
"time"
)
type LockerGroup interface {
Lock(args ...string)
LockTimeout(timeout time.Duration, args ...string) bool
Unlock(args ...string)
}
var InfiniteTimeout = 30 * 24 * 3600 * time.Second
const (
KeyLockType = "key"
PathLockType = "path"
)
type Client interface {
GetLocker(tp string, names ...string) (ClientLocker, error)
}
type ClientLocker interface {
Lock() error
// timeout is seconds
LockTimeout(timeout int) error
Unlock() error
}
1
https://gitee.com/siddontang/tlock.git
git@gitee.com:siddontang/tlock.git
siddontang
tlock
tlock
master

搜索帮助