rlocker

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LockFactory 分布式锁工厂
	LockFactory gorlock.LockFactory
)
View Source
var (
	PoolInstance *redis.Pool
)

Functions

func Lock

func Lock(key string, expireMillSecond int) (lock *gorlock.Lock, err error)

Lock 获取锁

func LockForceNotKeepAlive

func LockForceNotKeepAlive(key string, expireMillSecond int) (lock *gorlock.Lock, err error)

LockForceNotKeepAlive 强制不续命锁

func UnLock

func UnLock(lock *gorlock.Lock) (success bool, err error)

UnLock 解锁

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL