MCPcopy Index your code
hub / github.com/go-redsync/redsync / WithGenValueFunc

Function WithGenValueFunc

redsync.go:127–131  ·  view source on GitHub ↗

WithGenValueFunc can be used to set the custom value generator.

(genValueFunc func() (string, error))

Source from the content-addressed store, hash-verified

125
126// WithGenValueFunc can be used to set the custom value generator.
127func WithGenValueFunc(genValueFunc func() (string, error)) Option {
128 return OptionFunc(func(m *Mutex) {
129 m.genValueFunc = genValueFunc
130 })
131}
132
133// WithValue can be used to assign the random value without having to call lock.
134// This allows the ownership of a lock to be "transferred" and allows the lock to be unlocked from elsewhere.

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…