-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
28 lines (28 loc) · 2.04 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
"name": "volos-spikearrest-memory",
"version": "0.10.1",
"main": "lib/memory_spikearrest.js",
"license": "MIT",
"description": "In-memory provider for Spike Arrest enforcement in the Volos system.",
"homepage": "https://github.com/apigee/volos",
"keywords": [
"spike arrest",
"memory"
],
"dependencies": {
"debug": "^2.2.0",
"volos-spikearrest-common": "0.10.x"
},
"devDependencies": {},
"repository": {
"type": "git",
"url": "https://github.com/apigee/volos.git"
},
"readme": "# volos-quota-memory\n\nThis is a memory-backed implementation of Spike Arrest support for Volos.\n\nOnce initialized, the interface to the module is exactly what is in the \"volos-spikearrest-common\" module. See\nthat module for detailed docs.\n\n## Initialization\n\nTo initialize a SpikeArrest, you call \"create\" on the exported module and pass a single \"options\" object.\nIt can contain the following parameters:\n\n* timeUnit: How often the SpikeArrest resets - may be in seconds or minutes\n* allow: The maximum number of requests to allow during the timeUnit.\n* bufferSize: (optional, default = 0) if bufferSize > 0, SpikeArrest will attempt to smooth requests by returning only\n when the next appropriate execution window is available. bufferSize is how many requests to \"queue\" before returning\n (immediately) with a isAllowed = false.\n\nOnce the quota has been initialized, the module that is returned has the programming interface defined\nby the \"volos-quota-common\" module.\n\n## Example\n\n var SpikeArrest = require('volos-spikearrest-memory');\n var spikeArrest = SpikeArrest.create({\n timeUnit: 'second',\n allow: 10,\n bufferSize: 10\n });\n\n spikeArrest.apply({ key: 'Foo', weight: 1 }, function(err, result) {\n if (err) { throw err; }\n console.log('Status: %s', result.isAllowed);\n });\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/apigee/volos/issues"
},
"_id": "volos-spikearrest-memory@0.10.1",
"_from": "volos-spikearrest-memory@"
}