Documentation ¶
Overview ¶
Package mcmutex provides a mutex using memcached(golibmc)
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLockFailed = errors.New("failed to acquire lock")
ErrLockFailed means failure to acquire lock after all retrys.
Functions ¶
This section is empty.
Types ¶
type MCMutex ¶
type MCMutex struct { // retry interval Interval time.Duration // retry count before acquisition lock (default: 0) Retry int // lock will be expired after Expiration time (default: 30s) Expiration int64 // contains filtered or unexported fields }
MCMutex can create mutex using golibmc
func NewMCMutex ¶
NewMCMutex create *MCMutex using default configure.
Click to show internal directories.
Click to hide internal directories.