package core_kernel

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

Install

Dune Dependency

Authors

Maintainers

Sources

core_kernel-v0.16.0.tar.gz
sha256=e37370bad978cfb71fdaf2b1a25ab1506b98ef0b91e0dbd189ffd9d853245ce2

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.