Documentation
¶
Overview ¶
Package redsync provides a Redis-based distributed mutual exclusion lock implementation as described in the post http://redis.io/topics/distlock.
Values containing the types defined in this package should not be copied.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFailed = errors.New("redsync: failed to acquire lock")
Functions ¶
This section is empty.
Types ¶
type DelayFunc ¶ added in v1.1.1
A DelayFunc is used to decide the amount of time to wait between retries.
type Mutex ¶
type Mutex struct {
// contains filtered or unexported fields
}
A Mutex is a distributed mutual exclusion lock.
type Option ¶
type Option interface {
Apply(*Mutex)
}
An Option configures a mutex.
func SetDriftFactor ¶
SetDriftFactor can be used to set the clock drift factor.
func SetGenValueFunc ¶ added in v1.2.0
SetGenValueFunc can be used to set the custom value generator.
func SetRetryDelay ¶
SetRetryDelay can be used to set the amount of time to wait between retries.
func SetRetryDelayFunc ¶ added in v1.1.1
SetRetryDelayFunc can be used to override default delay behavior.
Click to show internal directories.
Click to hide internal directories.