Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExtendFailed = errors.New("redis: failed to extend lock")
ErrExtendFailed is the error resulting if Redsync fails to extend the lock.
Functions ¶
This section is empty.
Types ¶
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
A Lock is a distributed mutual exclusion lock.
func (*Lock) Lock ¶
Lock locks m. In case it returns an error on failure, you may retry to acquire the lock by calling this method again.
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) DoUntilQuorumAsync ¶
type RedisOption ¶
type RedisOption func(*Lock)
OptionFunc is a function that configures a mutex.
func WithDriftFactor ¶
func WithDriftFactor(factor float64) RedisOption
WithDriftFactor can be used to set the clock drift factor.
func WithExpiry ¶
func WithExpiry(expiry time.Duration) RedisOption
WithExpiry can be used to set the expiry of a mutex to the given value.
Click to show internal directories.
Click to hide internal directories.