MCPcopy
hub / github.com/go-redsync/redsync / WithRetryDelay

Function WithRetryDelay

redsync.go:85–91  ·  view source on GitHub ↗

WithRetryDelay can be used to set the amount of time to wait between retries. The default value is rand(50ms, 250ms).

(delay time.Duration)

Source from the content-addressed store, hash-verified

83// WithRetryDelay can be used to set the amount of time to wait between retries.
84// The default value is rand(50ms, 250ms).
85func 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

Callers

nothing calls this directly

Calls 1

OptionFuncFuncType · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…