WithRetryDelay can be used to set the amount of time to wait between retries. The default value is rand(50ms, 250ms).
(delay time.Duration)
| 83 | // WithRetryDelay can be used to set the amount of time to wait between retries. |
| 84 | // The default value is rand(50ms, 250ms). |
| 85 | func WithRetryDelay(delay time.Duration) Option { |
| 86 | return OptionFunc(func(m *Mutex) { |
| 87 | m.delayFunc = func(tries int) time.Duration { |
| 88 | return delay |
| 89 | } |
| 90 | }) |
| 91 | } |
| 92 | |
| 93 | // WithSetNXOnExtend improves extending logic to extend the key if exist |
| 94 | // and if not, tries to set a new key in redis |
nothing calls this directly
no test coverage detected
searching dependent graphs…