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 ¶
var ErrFailed = errors.New("redsync: failed to acquire lock")
Functions ¶
This section is empty.
Types ¶
type DelayFunc ¶ added in v1.1.2
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 SetRetryDelay ¶
SetRetryDelay can be used to set the amount of time to wait between retries.
func SetRetryDelayFunc ¶ added in v1.1.2
SetRetryDelayFunc can be used to override default delay behavior.
type Redsync ¶
type Redsync struct {
// contains filtered or unexported fields
}
Redsync provides a simple method for creating distributed mutexes using multiple Redis connection pools.