package core_kernel

  1. Overview
  2. Docs
Industrial strength alternative to OCaml's standard library

Install

Dune Dependency

Authors

Maintainers

Sources

core_kernel-v0.15.0.tar.gz
sha256=34a0288f16027c6b90e4ad16cb5cc677d7063d310faf918748ce70f1745116c0

doc/core_kernel.limiter/Limiter/Token_bucket/index.html

Module Limiter.Token_bucketSource

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

Sourcetype t = private limiter
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourceval create_exn : now:Core.Time_ns.t -> burst_size:int -> sustained_rate_per_sec:float -> ?initial_bucket_level:int -> unit -> t
  • parameter initial_bucket_level

    defaults to zero.

Sourceval try_take : t -> now:Core.Time_ns.t -> int -> Try_take_result.t
Sourcemodule Starts_full : sig ... end
OCaml

Innovation. Community. Security.