(create-throttler rate-limits)
Creates a per-instance throttler with the given rate limits.
Creates a per-instance throttler with the given rate limits.
(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.
(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:
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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close