Limiter.Token_bucket
Implements a basic token-bucket-based rate limiter. Users of the throttle must successfully call try_take
before doing work.
type t = private limiter
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val create_exn : now:Core_kernel.Time_ns.t -> burst_size:int -> sustained_rate_per_sec:float ->
?initial_bucket_level:int -> unit -> t
val try_take : t -> now:Core_kernel.Time_ns.t -> int -> Try_take_result.t
module Starts_full : sig ... end