From afa6b297bd7bf9361727ae78794d9310d3678d13 Mon Sep 17 00:00:00 2001 From: Adelyn Breelove Date: Wed, 13 Feb 2019 10:58:39 -0700 Subject: Re-arrange and whatnot --- lib/rl.mli | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 lib/rl.mli (limited to 'lib/rl.mli') diff --git a/lib/rl.mli b/lib/rl.mli deleted file mode 100644 index 973f02f..0000000 --- a/lib/rl.mli +++ /dev/null @@ -1,37 +0,0 @@ -(** Internal ratelimit route mapping. *) - -open Core -open Async - -(** Type for mapping route -> {!rl}. *) -module RouteMap : module type of Map.Make(String) - -(** Type representing ratelimit information. *) -type rl = { - limit: int; - remaining: int; - reset: int; -} - -(** Type representing the specific case of {!RouteMap}. *) -type t = ((rl, read_write) Mvar.t) RouteMap.t - -(** Converts Cohttp header data into ratelimit information. - @return Some of ratelimit information or None on bad headers -*) -val rl_of_header : Cohttp.Header.t -> rl option - -(** Default for type rl. Used for prepopulating routes. *) -val default : rl - -(** Empty ratelimit route map. *) -val empty : t - -(** Analogous to {!RouteMap.update}. *) -val update : 'a RouteMap.t -> string -> f:('a option -> 'a) -> 'a RouteMap.t - -(** Analogous to {!RouteMap.find}. *) -val find : 'a RouteMap.t -> string -> 'a option - -(** Analogous to {!RouteMap.find_exn}. *) -val find_exn : 'a RouteMap.t -> string -> 'a \ No newline at end of file -- cgit v1.2.3