mycocepurus-smithii - v2.0.1
    Preparing search index...

    Function decide

    • The whole policy, over one entry, at one instant.

      Store holds Fingerprint Decision
      nothing first
      a completion within retainFor same replay
      a completion within retainFor different mismatch
      a claim within leaseFor same in-flight
      a claim within leaseFor different mismatch
      either, past its window any first

      A mismatch wins over an in-flight claim because "you sent a different body under a used key" is something the caller can act on and "try later" is not.

      A clock that went backwards is treated as an entry written this instant. A store handing back something from the future is not a reason to throw.

      Type Parameters

      • T

      Parameters

      • entry: Entry<T> | undefined
      • fingerprint: string
      • now: number

      Returns Decision<T>