示例#1
0
文件: utils.go 项目: ZuoGuocai/codis
func GetZkLock(zkConn zkhelper.Conn, productName string) zkhelper.ZLocker {
	zkPath := fmt.Sprintf("/zk/codis/db_%s/LOCK", productName)
	ret := zkhelper.CreateMutex(zkConn, zkPath)
	return ret
}
示例#2
0
func GetCoordLock(coordConn zkhelper.Conn, productName string) zkhelper.ZLocker {
	coordPath := fmt.Sprintf("/zk/reborn/db_%s/LOCK", productName)
	ret := zkhelper.CreateMutex(coordConn, coordPath)
	return ret
}