Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLockerAutoCleanup ¶
func SetLockerAutoCleanup(threshold, minExistTime int64)
Types ¶
type AdaptiveLock ¶ added in v1.8.90
type AdaptiveLock struct {
// contains filtered or unexported fields
}
AdaptiveLock 自适应锁管理器
var (
Adaptive *AdaptiveLock
)
func (*AdaptiveLock) GetActiveLockCount ¶ added in v1.8.90
func (al *AdaptiveLock) GetActiveLockCount() int64
GetActiveLockCount 获取当前活跃的锁数量
func (*AdaptiveLock) IsShardMode ¶ added in v1.8.90
func (al *AdaptiveLock) IsShardMode() bool
IsShardMode 返回当前是否在使用分片模式
func (*AdaptiveLock) Unlock ¶ added in v1.8.90
func (al *AdaptiveLock) Unlock(name string)
Unlock 解锁指定的资源
Click to show internal directories.
Click to hide internal directories.