Documentation ¶
Index ¶
- Variables
- type Lock
- func (this *Lock) Commit() (err error)
- func (this *Lock) GetLockStatus() (r LockStatus)
- func (this *Lock) Lock(aliveSeconds int64) (err error)
- func (this *Lock) Release() (err error)
- func (this *Lock) Transaction() *Lock
- func (this *Lock) Wait() (err error)
- func (this *Lock) WaitAndLock(aliveSeconds int64) (err error)
- type LockStatus
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
func (*Lock) GetLockStatus ¶
func (this *Lock) GetLockStatus() (r LockStatus)
func (*Lock) Transaction ¶
func (*Lock) WaitAndLock ¶
阻塞业务进程并直到加锁成功,需指定锁有效时间
type LockStatus ¶
type LockStatus int
const ( LockStatusNormal LockStatus = 0 LockStatusDoing LockStatus = 1 LockStatusFinished LockStatus = 2 )
Click to show internal directories.
Click to hide internal directories.