firefly-limiter - v1.0.1
    Preparing search index...

    Function byRequest

    • Picks a policy from the request, for the parts of an API that do not deserve the same deadline as the rest of it.

      A transport applies to every call, which is right for a breaker (one that only some call sites go through is not measuring the dependency) and wrong for a payment endpoint that needs longer than a search box. Build the policies once, outside the selector, so the state inside them is shared as deliberately as anything else.

      Parameters

      • select: (request: Request) => Policy

      Returns ByRequest