Claims a single-use value once, for the whole cluster where the store is
shared and for this process otherwise. opts holds scope, value,
ttlMs, realm (the ambient realm by default), origin (the holder
the row records, this process when omitted), fence (install the
claim's lock before resolving) and noFlushWait (postgres commits the
statement without waiting for the log flush, #886). Resolves
{ ok: true, handle, claimedAt }
— with fenced and lockName when the lock is held, and fenced: false
when a fence was asked of a memory store — { ok: false, reason: 'used', existing } or { ok: false, reason: 'store', why }, on which the caller
refuses; it never rejects.
Claims a single-use value once, for the whole cluster where the store is shared and for this process otherwise.
optsholdsscope,value,ttlMs,realm(the ambient realm by default),origin(the holder the row records, this process when omitted),fence(install the claim's lock before resolving) andnoFlushWait(postgres commits the statement without waiting for the log flush, #886). Resolves{ ok: true, handle, claimedAt }— withfencedandlockNamewhen the lock is held, andfenced: falsewhen a fence was asked of a memory store —{ ok: false, reason: 'used', existing }or{ ok: false, reason: 'store', why }, on which the caller refuses; it never rejects.