| 1 |
Index: b/token-bucket.cabal |
| 2 |
=================================================================== |
| 3 |
--- a/token-bucket.cabal |
| 4 |
+++ b/token-bucket.cabal |
| 5 |
@@ -1,24 +1,43 @@ |
| 6 |
+cabal-version: >=1.10 |
| 7 |
name: token-bucket |
| 8 |
version: 0.1.0.1 |
| 9 |
+x-revision: 7 |
| 10 |
+ |
| 11 |
synopsis: Rate limiter using lazy bucket algorithm |
| 12 |
-homepage: https://github.com/hvr/token-bucket |
| 13 |
-bug-reports: https://github.com/hvr/token-bucket/issues |
| 14 |
+homepage: https://github.com/haskell-hvr/token-bucket |
| 15 |
+bug-reports: https://github.com/haskell-hvr/token-bucket/issues |
| 16 |
license: GPL-3 |
| 17 |
license-file: LICENSE |
| 18 |
author: Herbert Valerio Riedel |
| 19 |
-maintainer: [email protected] |
| 20 |
+maintainer: https://github.com/haskell-hvr/token-bucket |
| 21 |
category: Concurrency |
| 22 |
build-type: Simple |
| 23 |
-cabal-version: >=1.10 |
| 24 |
description: |
| 25 |
- This implementation is heavily inspired by the one described in |
| 26 |
- <http://ksdlck.com/post/17418037348/rate-limiting-at-webscale-lazy-leaky-buckets "Rate Limiting at Webscale: Lazy Leaky Buckets"> |
| 27 |
+ This package provides a variant of a [Token Bucket](https://en.wikipedia.org/wiki/Token_bucket) |
| 28 |
+ or [Leaky Bucket](https://en.wikipedia.org/wiki/Leaky_bucket) rate-limiting algorithm optimised for low overhead. |
| 29 |
+ . |
| 30 |
+ The rate-limiting variant implemented by this package is heavily inspired by the algorithm described in |
| 31 |
+ <https://web.archive.org/web/20120808023806/http://ksdlck.com/post/17418037348/rate-limiting-at-webscale-lazy-leaky-buckets "Rate Limiting at Webscale: Lazy Leaky Buckets">. |
| 32 |
+ |
| 33 |
+tested-with: |
| 34 |
+ GHC == 9.4.4 |
| 35 |
+ GHC == 9.2.5 |
| 36 |
+ GHC == 9.0.2 |
| 37 |
+ GHC == 8.10.7 |
| 38 |
+ GHC == 8.8.4 |
| 39 |
+ GHC == 8.6.5 |
| 40 |
+ GHC == 8.4.4 |
| 41 |
+ GHC == 8.2.2 |
| 42 |
+ GHC == 8.0.2 |
| 43 |
+ GHC == 7.10.3 |
| 44 |
+ GHC == 7.8.4 |
| 45 |
+ GHC == 7.6.3 |
| 46 |
|
| 47 |
extra-source-files: changelog.md |
| 48 |
|
| 49 |
source-repository head |
| 50 |
type: git |
| 51 |
- location: https://github.com/hvr/token-bucket.git |
| 52 |
+ location: https://github.com/haskell-hvr/token-bucket.git |
| 53 |
|
| 54 |
flag use-cbits |
| 55 |
description: Use optimized getPOSIXTime implementation (faster by roughly one order of magnitude) |
| 56 |
@@ -27,19 +46,21 @@ flag use-cbits |
| 57 |
|
| 58 |
library |
| 59 |
default-language: Haskell2010 |
| 60 |
- build-depends: base >=4.6 && <4.9 |
| 61 |
+ build-depends: base >=4.6 && <5 |
| 62 |
hs-source-dirs: src |
| 63 |
if flag(use-cbits) |
| 64 |
cpp-options: -DUSE_CBITS |
| 65 |
c-sources: cbits/get_posix_time.c |
| 66 |
else |
| 67 |
- build-depends: time >=1.4 && <1.6 |
| 68 |
+ build-depends: time >=1.4 && <1.13 |
| 69 |
ghc-options: -Wall |
| 70 |
exposed-modules: Control.Concurrent.TokenBucket |
| 71 |
|
| 72 |
test-suite test-tb |
| 73 |
default-language: Haskell2010 |
| 74 |
type: exitcode-stdio-1.0 |
| 75 |
- build-depends: base >=4.6 && <4.9, time >=1.4 && <1.6, token-bucket |
| 76 |
+ build-depends: base |
| 77 |
+ , time |
| 78 |
+ , token-bucket |
| 79 |
main-is: test-tb.hs |
| 80 |
ghc-options: -Wall -threaded -rtsopts |