Documentation ¶
Index ¶
Constants ¶
View Source
const ( //SUC relaese lock success SUC = iota //ERR relaese lock failed ERR )
Variables ¶
View Source
var ( //NILClient redis client init error or close NILClient = errors.New("nil client") //LOCKFailed get lock failed LOCKFailed = errors.New("set key failed") //UNLOCKVALUEERROR unlock value not match set value UNLOCKVALUEERROR = errors.New("unlock value error") //UNLOCKKEYNOTFOUND unlock key not found UNLOCKKEYNOTFOUND = errors.New("unlock key not found error") )
Functions ¶
This section is empty.
Types ¶
type RedisLock ¶
type RedisLock struct {
// contains filtered or unexported fields
}
RedisLock base struct
func NewRedisLock ¶
NewRedisLock init a new RedisLock struct
func (*RedisLock) SetContext ¶
SetContext set context,so can use cancle function to canle lock
Click to show internal directories.
Click to hide internal directories.