Skip to content

Commit 2f2cb92

Browse files
committed
Added logjam support.
1 parent 9a3ab23 commit 2f2cb92

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.github/workflows/cicd.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
otp_version: [19, 20, 21, 22, 23]
18-
# otp_version: [22]
17+
otp_version: [21, 22, 23]
1918
os: [ubuntu-latest]
2019

2120
container:

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ applications such as command line tools and REPLs. That being said, it _is_
1616
intended to be used from OTP release apps (e.g., making use of configuration
1717
data in `./config/sys.config`).
1818

19+
Exponential backoff for an unavailable TCP server is provided via Fred's
20+
[Erlang backoff library](https://github.com/ferd/backoff).
21+
1922
## Configuration
2023

2124
Update your application's `sys.config` to include the following:
@@ -38,7 +41,10 @@ Update your application's `sys.config` to include the following:
3841
{parser, {Mod, Func}},
3942
%% It is up to the parser to call this next M/F, but the reporter
4043
%% 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
4248
]}
4349
]}
4450
]}
@@ -117,7 +123,7 @@ Copyright © 2020, Duncan McGreggor
117123
[gh-actions]: https://github.com/lfex/tcp-client/actions
118124
[lfe]: https://github.com/rvirding/lfe
119125
[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
121127
[versions]: https://github.com/lfex/tcp-client/blob/master/.github/workflows/cicd.yml
122128
[github-tag]: https://github.com/lfex/tcp-client/tags
123129
[github-tag-badge]: https://img.shields.io/github/tag/lfex/tcp-client.svg

rebar.config

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
{deps, [
44
{backoff, {git, "https://github.com/ferd/backoff", {tag, "1.1.6"}}},
5-
{lfe, {git, "https://github.com/rvirding/lfe", {branch, "develop"}}}
5+
{lfe, {git, "https://github.com/rvirding/lfe", {branch, "develop"}}},
6+
{logjam, {git, "https://github.com/lfex/logjam", {branch, "release/1.0.x"}}}
67
]}.
78

89
{plugins, [

src/tcp-client.app.src

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
{'tcp-opts', [binary, {active, true}, {packet, 0}]},
1414
{parser, {'tcp-client-mgr', 'parse-response'}},
1515
{reporter, {'tcp-client-mgr', report}},
16-
{'init-backoff', 500}, % ms
17-
{'max-backoff', 60000} % ms
16+
{'init-backoff', 500}, % in ms
17+
{'max-backoff', 60000} % in ms
1818
]}
1919
]}
2020
]},

0 commit comments

Comments
 (0)