iya-sts
    Preparing search index...
    claim: (opts: any) => Promise<ClaimResult> = claim

    Type Declaration

      • (opts: any): Promise<ClaimResult>
      • 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.

        Parameters

        • opts: any

        Returns Promise<ClaimResult>