aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMaria Scott <[email protected]>2021-09-07 12:10:47 +0200
committerLoïc Hoguin <[email protected]>2021-09-07 12:27:39 +0200
commit0277ef97335099cfb64d10b5382c87486b27717a (patch)
tree45bc8de5699e5e61c78d2c58d29bd2dd3c3eea4b /doc
parentad1dc0c538610bdaf5e7b197ca997820d4a3d348 (diff)
downloadranch-0277ef97335099cfb64d10b5382c87486b27717a.tar.gz
ranch-0277ef97335099cfb64d10b5382c87486b27717a.tar.bz2
ranch-0277ef97335099cfb64d10b5382c87486b27717a.zip
Improve listener guide for alarms
Diffstat (limited to 'doc')
-rw-r--r--doc/src/guide/listeners.asciidoc23
1 files changed, 3 insertions, 20 deletions
diff --git a/doc/src/guide/listeners.asciidoc b/doc/src/guide/listeners.asciidoc
index 0e94e45..65ade28 100644
--- a/doc/src/guide/listeners.asciidoc
+++ b/doc/src/guide/listeners.asciidoc
@@ -339,26 +339,9 @@ options as values.
Any term is allowed as an alarm name.
-Alarm options, defining the alarm behavior, are again a map with the following
-keys:
-
-`type`::
-The alarm type. Currently, `num_connections` is the only allowed type.
-
-`treshold`::
-The alarm treshold. When the number of connections under a connection
-supervisor reaches or exceeds this value, the alarm will trigger and
-call the function given in the `callback` key.
-
-`callback`::
-The alarm function, that is, the function which will be called when the
-alarm is triggered. Its arguments are the listener name, the alarm
-name, the Pid of the triggering connection supervisor, and the Pids of
-all the connection processes under that supervisor.
-
-`cooldown` (5000)::
-The minimum time to elapse before the alarm can trigger again, in
-milliseconds.
+Alarm options include the alarm type and a treshold that, when reached,
+triggers the given callback. A cooldown prevents the alarm from being
+triggered too often.
.Setting an alarm to log warnings when the number of connections exceed 100