summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/retry/Readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/retry/Readme.md')
-rw-r--r--deps/npm/node_modules/retry/Readme.md30
1 files changed, 29 insertions, 1 deletions
diff --git a/deps/npm/node_modules/retry/Readme.md b/deps/npm/node_modules/retry/Readme.md
index ba6602205a..09d9c8a81b 100644
--- a/deps/npm/node_modules/retry/Readme.md
+++ b/deps/npm/node_modules/retry/Readme.md
@@ -96,10 +96,36 @@ Explaining the various values from left to right:
To make this a little easier for you, use wolfram alpha to do the calculations:
-[http://www.wolframalpha.com/input/?i=Sum%5B1000*x^k%2C+{k%2C+0%2C+9}%5D+%3D+5+*+60+*+1000]()
+<http://www.wolframalpha.com/input/?i=Sum%5B1000*x^k%2C+{k%2C+0%2C+9}%5D+%3D+5+*+60+*+1000>
[article]: http://dthain.blogspot.com/2009/02/exponential-backoff-in-distributed.html
+### retry.createTimeout(attempt, opts)
+
+Returns a new `timeout` (integer in milliseconds) based on the given parameters.
+
+`attempt` is an integer representing for which retry the timeout should be calculated. If your retry operation was executed 4 times you had one attempt and 3 retries. If you then want to calculate a new timeout, you should set `attempt` to 4 (attempts are zero-indexed).
+
+`opts` can include `factor`, `minTimeout`, `randomize` (boolean) and `maxTimeout`. They are documented above.
+
+`retry.createTimeout()` is used internally by `retry.timeouts()` and is public for you to be able to create your own timeouts for reinserting an item, see [issue #13](https://github.com/tim-kos/node-retry/issues/13).
+
+### retry.wrap(obj, [options], [methodNames])
+
+Wrap all functions of the `obj` with retry. Optionally you can pass operation options and
+an array of method names which need to be wrapped.
+
+```
+retry.wrap(obj)
+
+retry.wrap(obj, ['method1', 'method2']);
+
+retry.wrap(obj, {retries: 3});
+
+retry.wrap(obj, {retries: 3}, ['method1', 'method2']);
+```
+The `options` object can take any options that the usual call to `retry.operation` can take.
+
### new RetryOperation(timeouts)
Creates a new `RetryOperation` where `timeouts` is an array where each value is
@@ -156,6 +182,8 @@ retry is licensed under the MIT license.
#Changelog
+0.7.0 Some bugfixes and made retry.createTimeout() public. Fixed issues [#10](https://github.com/tim-kos/node-retry/issues/10), [#12](https://github.com/tim-kos/node-retry/issues/12), and [#13](https://github.com/tim-kos/node-retry/issues/13).
+
0.6.0 Introduced optional timeOps parameter for the attempt() function which is an object having a property timeout in miliseconds and a property cb callback function. Whenever your retry operation takes longer than timeout to execute, the timeout callback function cb is called.
0.5.0 Some minor refactorings.