summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/throttled/throttled.v1/examples/README.md
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-05-12 23:56:07 -0400
committerChristopher Speller <crspeller@gmail.com>2016-05-12 23:56:07 -0400
commit38ee83e45b4de7edf89bf9f0ef629eb4c6ad0fa8 (patch)
treea4fde09672192b97d453ad605b030bd5a10c5a45 /vendor/gopkg.in/throttled/throttled.v1/examples/README.md
parent84d2482ddbff9564c9ad75b2d30af66e3ddfd44d (diff)
downloadchat-38ee83e45b4de7edf89bf9f0ef629eb4c6ad0fa8.tar.gz
chat-38ee83e45b4de7edf89bf9f0ef629eb4c6ad0fa8.tar.bz2
chat-38ee83e45b4de7edf89bf9f0ef629eb4c6ad0fa8.zip
Moving to glide
Diffstat (limited to 'vendor/gopkg.in/throttled/throttled.v1/examples/README.md')
-rw-r--r--vendor/gopkg.in/throttled/throttled.v1/examples/README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/gopkg.in/throttled/throttled.v1/examples/README.md b/vendor/gopkg.in/throttled/throttled.v1/examples/README.md
new file mode 100644
index 000000000..6b12dad20
--- /dev/null
+++ b/vendor/gopkg.in/throttled/throttled.v1/examples/README.md
@@ -0,0 +1,12 @@
+# Examples
+
+This directory contains examples for all the throttlers implemented by the throttled package, as well as an example of a custom limiter.
+
+* custom/ : implements a custom limiter that allows requests to path /a on even seconds, and on path /b on odd seconds.
+* interval-many/ : implements a common interval throttler to control two different handlers, one for path /a and another for path /b, so that requests to any one of the handlers go through at the specified interval.
+* interval-vary/ : implements an interval throttler that varies by path, so that requests to each different path goes through at the specified interval.
+* interval/ : implements an interval throttler so that any request goes through at the specified interval, regardless of path or any other criteria.
+* memstats/ : implements a memory-usage throttler that limits access based on current memory statistics.
+* rate-limit/ : implements a rate-limiter throttler that varies by path, so that the number of requests allowed are counted based on the requested path.
+
+Each example app supports a number of command-line flags. Run the example with the -h flag to display usage and defaults.