aboutsummaryrefslogtreecommitdiff
path: root/lib/http/rl.mli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/http/rl.mli')
-rw-r--r--lib/http/rl.mli14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/http/rl.mli b/lib/http/rl.mli
index 54bc5ee..737dcd3 100644
--- a/lib/http/rl.mli
+++ b/lib/http/rl.mli
@@ -1,8 +1,5 @@
(** Internal ratelimit route mapping. *)
-open Core
-open Async
-
(** Type for mapping route -> {!rl}. *)
module RouteMap : module type of Map.Make(String)
@@ -14,13 +11,13 @@ type rl = {
} [@@deriving sexp]
(** Type representing the specific case of {!RouteMap}. *)
-type t = ((rl, read_write) Mvar.t) RouteMap.t
+type t = rl Lwt_mvar.t RouteMap.t
val get_rl :
[ `Get | `Delete | `Post | `Patch | `Put ] ->
string ->
t ->
- (rl, read_write) Mvar.t * t
+ rl Lwt_mvar.t * t
(** Converts Cohttp header data into ratelimit information.
@return Some of ratelimit information or None on bad headers
@@ -34,10 +31,7 @@ val default : rl
val empty : t
(** Analogous to {!RouteMap.update}. *)
-val update : 'a RouteMap.t -> string -> f:('a option -> 'a) -> 'a RouteMap.t
+val update : string -> ('a option -> 'a option) -> 'a RouteMap.t -> '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
+val find : string -> 'a RouteMap.t -> 'a \ No newline at end of file