Limiter.Token_bucketImplements a basic token-bucket-based rate limiter. Users of the throttle must successfully call try_take before doing work.
type t = private limiterval sexp_of_t : t -> Sexplib0.Sexp.tval create_exn :
now:Core.Time_ns.t ->
burst_size:int ->
sustained_rate_per_sec:float ->
?initial_bucket_level:int ->
unit ->
tval try_take : t -> now:Core.Time_ns.t -> int -> Try_take_result.tmodule Starts_full : sig ... end