diff options
| author | Adelyn Breelove <[email protected]> | 2019-01-17 09:03:52 -0700 |
|---|---|---|
| committer | Adelyn Breelove <[email protected]> | 2019-01-17 09:03:52 -0700 |
| commit | c22cea2e99dff9ff45057ef33553dac8adebf0c1 (patch) | |
| tree | b6f571ad2197e6614ad64392d65f774bb34eee4e /lib/rl.mli | |
| parent | more mlis (diff) | |
| download | disml-c22cea2e99dff9ff45057ef33553dac8adebf0c1.tar.xz disml-c22cea2e99dff9ff45057ef33553dac8adebf0c1.zip | |
new event dispatching
Diffstat (limited to 'lib/rl.mli')
| -rw-r--r-- | lib/rl.mli | 19 |
1 files changed, 19 insertions, 0 deletions
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 |