@@ -16,6 +16,9 @@ applications such as command line tools and REPLs. That being said, it _is_
16
16
intended to be used from OTP release apps (e.g., making use of configuration
17
17
data in ` ./config/sys.config ` ).
18
18
19
+ Exponential backoff for an unavailable TCP server is provided via Fred's
20
+ [ Erlang backoff library] ( https://github.com/ferd/backoff ) .
21
+
19
22
## Configuration
20
23
21
24
Update your application's ` sys.config ` to include the following:
@@ -38,7 +41,10 @@ Update your application's `sys.config` to include the following:
38
41
{parser , {Mod , Func }},
39
42
% % It is up to the parser to call this next M/F, but the reporter
40
43
% % tuple is what gets passed to the paser M/F.
41
- {reporter , {Mod , Func }}
44
+ {reporter , {Mod , Func }},
45
+ % % Exponential backoff support with initial and max values
46
+ {'init-backoff' , 500 }, % in ms
47
+ {'max-backoff' , 60000 } % in ms
42
48
]}
43
49
]}
44
50
]}
@@ -117,7 +123,7 @@ Copyright © 2020, Duncan McGreggor
117
123
[ gh-actions ] : https://github.com/lfex/tcp-client/actions
118
124
[ lfe ] : https://github.com/rvirding/lfe
119
125
[ lfe-badge ] : https://img.shields.io/badge/lfe-2.0-blue.svg
120
- [ erlang-badge ] : https://img.shields.io/badge/erlang-19 %20to%2023-blue.svg
126
+ [ erlang-badge ] : https://img.shields.io/badge/erlang-21 %20to%2023-blue.svg
121
127
[ versions ] : https://github.com/lfex/tcp-client/blob/master/.github/workflows/cicd.yml
122
128
[ github-tag ] : https://github.com/lfex/tcp-client/tags
123
129
[ github-tag-badge ] : https://img.shields.io/github/tag/lfex/tcp-client.svg
0 commit comments