Liking cljdoc? Tell your friends :D

stripe-clojure.http.throttle


create-throttlerclj

(create-throttler rate-limits)

Creates a per-instance throttler with the given rate limits.

Creates a per-instance throttler with the given rate limits.
sourceraw docstring

set-rate-limits!clj

(set-rate-limits! throttler custom-limits)

Updates the throttler's rate limit configuration with custom limits. Resets the current limiter state.

Updates the throttler's rate limit configuration with custom limits.
Resets the current limiter state.
sourceraw docstring

with-throttlingclj

(with-throttling throttler method url api-key f)

Wraps the function f with throttling logic using the per-instance throttler. Expects the caller to pass the throttler (as part of the client instance). Parameters:

  • throttler: a Throttler instance (created per client)
  • method: HTTP method keyword (:get, :post, etc.)
  • url: full URL string for the API endpoint
  • api-key: the API key in use (to determine live vs. test mode)
  • f: the function to execute once throttling permits.
Wraps the function f with throttling logic using the per-instance throttler.
Expects the caller to pass the throttler (as part of the client instance).
Parameters:
  - throttler: a Throttler instance (created per client)
  - method: HTTP method keyword (:get, :post, etc.)
  - url: full URL string for the API endpoint
  - api-key: the API key in use (to determine live vs. test mode)
  - f: the function to execute once throttling permits.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close