WithSetNXOnExtend improves extending logic to extend the key if exist and if not, tries to set a new key in redis Useful if your redises restart often and you want to reduce the chances of losing the lock Read this MR for more info: https://github.com/go-redsync/redsync/pull/149
()
| 95 | // Useful if your redises restart often and you want to reduce the chances of losing the lock |
| 96 | // Read this MR for more info: https://github.com/go-redsync/redsync/pull/149 |
| 97 | func WithSetNXOnExtend() Option { |
| 98 | return OptionFunc(func(m *Mutex) { |
| 99 | m.setNXOnExtend = true |
| 100 | }) |
| 101 | } |
| 102 | |
| 103 | // WithRetryDelayFunc can be used to override default delay behavior. |
| 104 | func WithRetryDelayFunc(delayFunc DelayFunc) Option { |
nothing calls this directly
no test coverage detected
searching dependent graphs…