Anchorage API reference
    Preparing search index...
    IdempotencyReservation:
        | { state: "reserved"; token: string; tookOver?: boolean }
        | { record: IdempotencyRecord; state: "replay" }
        | { state: "pending" }

    Outcome of an atomic reservation: execute a newly reserved key, replay a completed record, or report that another isolate still owns the key.

    Type Declaration

    • { state: "reserved"; token: string; tookOver?: boolean }
      • state: "reserved"

        This caller owns the reservation and may execute.

      • token: string

        Opaque lease required to finalize or release the reservation.

      • OptionaltookOver?: boolean

        Whether this reservation replaced a stale pending holder.

    • { record: IdempotencyRecord; state: "replay" }
      • record: IdempotencyRecord

        Completed result associated with the key.

      • state: "replay"

        A completed result exists and must be replayed without execution.

    • { state: "pending" }
      • state: "pending"

        Another isolate owns a non-stale reservation.