From c22cea2e99dff9ff45057ef33553dac8adebf0c1 Mon Sep 17 00:00:00 2001 From: Adelyn Breelove Date: Thu, 17 Jan 2019 09:03:52 -0700 Subject: new event dispatching --- lib/rl.mli | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/rl.mli (limited to 'lib/rl.mli') diff --git a/lib/rl.mli b/lib/rl.mli new file mode 100644 index 0000000..f583653 --- /dev/null +++ b/lib/rl.mli @@ -0,0 +1,19 @@ +open Core +open Async + +module RouteMap : module type of Map.Make(String) + +type rl = { + limit: int; + remaining: int; + reset: int; +} + +type t = ((rl, read_write) Mvar.t) RouteMap.t + +val rl_of_header : Cohttp.Header.t -> rl option +val default : rl +val empty : t +val update : 'a RouteMap.t -> string -> f:('a option -> 'a) -> 'a RouteMap.t +val find : 'a RouteMap.t -> string -> 'a option +val find_exn : 'a RouteMap.t -> string -> 'a \ No newline at end of file -- cgit v1.2.3