1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-01 16:51:13 -05:00
denoland-deno/tests/registry/npm/retry/registry.json

2 lines
11 KiB
JSON
Raw Normal View History

{"name":"retry","description":"Abstraction for exponential and custom retry strategies for failed operations.","dist-tags":{"latest":"0.12.0"},"versions":{"0.12.0":{"author":{"name":"Tim Koschützki","email":"tim@debuggable.com","url":"http://debuggable.com/"},"name":"retry","description":"Abstraction for exponential and custom retry strategies for failed operations.","license":"MIT","version":"0.12.0","repository":{"type":"git","url":"git://github.com/tim-kos/node-retry.git"},"directories":{"lib":"./lib"},"main":"index","engines":{"node":">= 4"},"dependencies":{},"devDependencies":{"fake":"0.2.0","istanbul":"^0.4.5","tape":"^4.8.0"},"scripts":{"test":"istanbul cover ./node_modules/tape/bin/tape ./test/integration/*.js","release:major":"env SEMANTIC=major npm run release","release:minor":"env SEMANTIC=minor npm run release","release:patch":"env SEMANTIC=patch npm run release","release":"npm version ${SEMANTIC:-patch} -m \"Release %s\" && git push && git push --tags && npm publish"},"gitHead":"f802d9edc2fdbca727d3e368234b6d714db06f8e","bugs":{"url":"https://github.com/tim-kos/node-retry/issues"},"_id":"retry@0.12.0","_shasum":"1b42a6266a21f07421d1b0b54b7dc167b01c013b","_from":".","_npmVersion":"4.1.2","_nodeVersion":"6.10.0","dist":{"shasum":"1b42a6266a21f07421d1b0b54b7dc167b01c013b","tarball":"http://localhost:4260/retry/retry-0.12.0.tgz","fileCount":17,"unpackedSize":32210,"integrity":"sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMDGASpQgnZsQGbQrEfU7i4L+ZKTo9locIjyOG8CM7zgIhALH9AixwT4LkB513kWXw3P2vIZ6kqYNzDWTD7UQ/RdD7"}]},"_hasShrinkwrap":false}},"author":{"name":"Tim Koschützki","email":"tim@debuggable.com","url":"http://debuggable.com/"},"repository":{"type":"git","url":"git://github.com/tim-kos/node-retry.git"},"readme":"<!-- badges/ -->\n[![Build Status](https://secure.travis-ci.org/tim-kos/node-retry.svg?branch=master)](http://travis-ci.org/tim-kos/node-retry \"Check this project's build status on TravisCI\")\n[![codecov](https://codecov.io/gh/tim-kos/node-retry/branch/master/graph/badge.svg)](https://codecov.io/gh/tim-kos/node-retry)\n<!-- /badges -->\n\n# retry\n\nAbstraction for exponential and custom retry strategies for failed operations.\n\n## Installation\n\n npm install retry\n\n## Current Status\n\nThis module has been tested and is ready to be used.\n\n## Tutorial\n\nThe example below will retry a potentially failing `dns.resolve` operation\n`10` times using an exponential backoff strategy. With the default settings, this\nmeans the last attempt is made after `17 minutes and 3 seconds`.\n\n``` javascript\nvar dns = require('dns');\nvar retry = require('retry');\n\nfunction faultTolerantResolve(address, cb) {\n var operation = retry.operation();\n\n operation.attempt(function(currentAttempt) {\n dns.resolve(address, function(err, addresses) {\n if (operation.retry(err)) {\n return;\n }\n\n cb(err ? operation.mainError() : null, addresses);\n });\n });\n}\n\nfaultTolerantResolve('nodejs.org', function(err, addresses) {\n console.log(err, addresses);\n});\n```\n\nOf course you can also configure the factors that go into the exponential\nbackoff. See the API documentation below for all available settings.\ncurrentAttempt is an int representing the number of attempts so far.\n\n``` javascript\nvar operation = retry.operation({\n retries: 5,\n factor: 3,\n minTimeout: 1 * 1000,\n maxTimeout: 60 * 1000,\n randomize: true,\n});\n```\n\n## API\n\n### retry.operation([options])\n\nCreates a new `RetryOperation` object. `options` is the same as `retry.timeouts()`'s `options`, with three additions:\n\n* `forever`: Whether to retry forever, defaults to `false`.\n* `unref`: Whether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's, defaults to `false`.\n* `maxRetryTime`: The maximum time (in milliseconds) that the retried operation is allowed to run. Default is `Infinity`. \n\n### retry.timeouts([options])\n\nR