package core_kernel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Implements a basic token bucket based rate limiter. Users of the throttle must successfully call try_take before doing work.

Implements a basic token bucket based rate limiter. Users of the throttle must successfully call try_take before doing work.

Implements a basic token bucket based rate limiter. Users of the throttle must successfully call try_take before doing work.

type t = private Limiter.limiter
val create_exn : now:Time_ns.t -> burst_size:Base.Int.t -> sustained_rate_per_sec:Base.Float.t -> ?initial_bucket_level:Base.Int.t -> Base.Unit.t -> t
val try_take : t -> now:Time_ns.t -> Base.Int.t -> Limiter.Try_take_result.t
OCaml

Innovation. Community. Security.