aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJan Uhlig <[email protected]>2024-10-02 12:22:10 +0200
committerLoïc Hoguin <[email protected]>2024-11-12 14:56:59 +0100
commit53a8db10195f9aae640b238fa3d571bf0136a55a (patch)
tree6b2ec1f0b3275615e51ce06f5909dd234d47f5f8 /doc
parente5649ba630c5be25a0c9c9f20c78f8f9f72e363e (diff)
downloadranch-53a8db10195f9aae640b238fa3d571bf0136a55a.tar.gz
ranch-53a8db10195f9aae640b238fa3d571bf0136a55a.tar.bz2
ranch-53a8db10195f9aae640b238fa3d571bf0136a55a.zip
Fix alarm setting typo
The setting `threshold` was misspelled as `treshold`.
Diffstat (limited to 'doc')
-rw-r--r--doc/src/guide/listeners.asciidoc6
-rw-r--r--doc/src/guide/migrating_from_2.0.asciidoc2
-rw-r--r--doc/src/manual/ranch.asciidoc8
3 files changed, 8 insertions, 8 deletions
diff --git a/doc/src/guide/listeners.asciidoc b/doc/src/guide/listeners.asciidoc
index 9ee2d98..c30cb5c 100644
--- a/doc/src/guide/listeners.asciidoc
+++ b/doc/src/guide/listeners.asciidoc
@@ -332,14 +332,14 @@ processes.
The `alarms` transport option allows you to configure alarms
which will be triggered when the number of connections tracked
-by one connection supervisor reaches or exceeds the defined treshold.
+by one connection supervisor reaches or exceeds the defined threshold.
The `alarms` transport option takes a map with alarm names as keys and alarm
options as values.
Any term is allowed as an alarm name.
-Alarm options include the alarm type and a treshold that, when reached,
+Alarm options include the alarm type and a threshold that, when reached,
triggers the given callback. A cooldown prevents the alarm from being
triggered too often.
@@ -350,7 +350,7 @@ triggered too often.
Alarms = #{
my_alarm => #{
type => num_connections,
- treshold => 100,
+ threshold => 100,
callback => fun(Ref, Name, ConnSup, ConnPids]) ->
logger:warning("Warning (~s): "
"Supervisor ~s of listener ~s "
diff --git a/doc/src/guide/migrating_from_2.0.asciidoc b/doc/src/guide/migrating_from_2.0.asciidoc
index fb2c69d..498a581 100644
--- a/doc/src/guide/migrating_from_2.0.asciidoc
+++ b/doc/src/guide/migrating_from_2.0.asciidoc
@@ -18,7 +18,7 @@ for Erlang/OTP 21 has been removed.
* Alarms can now be configured. The only alarm currently
available is `num_connections`. When the number of
- connections goes over a configurable treshold Ranch
+ connections goes over a configurable threshold Ranch
will call the given callback. This can be used to
programmatically shut down idle connections to
make up space for new connections, for example.
diff --git a/doc/src/manual/ranch.asciidoc b/doc/src/manual/ranch.asciidoc
index 2f62b81..b5dd615 100644
--- a/doc/src/manual/ranch.asciidoc
+++ b/doc/src/manual/ranch.asciidoc
@@ -91,7 +91,7 @@ transport_opts(SocketOpts) = #{
alarms => #{
term() => #{
type := num_connections,
- treshold := non_neg_integer(),
+ threshold := non_neg_integer(),
callback := fun((ref(), term(), pid(), [pid()]) -> any()),
cooldown => non_neg_integer()
}
@@ -118,7 +118,7 @@ None of the options are required.
alarms (#{})::
Alarms to call a function when the number of connections tracked
-by one connection supervisor reaches or exceeds a defined treshold.
+by one connection supervisor reaches or exceeds a defined threshold.
+
The map keys are the alarm names, which can be any `term`. The
associated values are the respective alarm options, again in a map
@@ -128,9 +128,9 @@ type:::
Must be set to `num_connections`.
-treshold:::
+threshold:::
-Treshold value, which must be a `non_neg_integer`. When the
+Threshold value, which must be a `non_neg_integer`. When the
number of connections tracked by a single connection supervisor
reaches or exceeds this value, The alarm will trigger and call
the function defined in the `callback` key (see below).