[prev in list] [next in list] [prev in thread] [next in thread] 

List:       inn-workers
Subject:    [PATCH 2/4] delayer: Add documentation
From:       Christoph Biedl <isc.cxzo () manchmal ! in-ulm ! de>
Date:       2024-01-15 17:00:00
Message-ID: 1705338002 () manchmal ! in-ulm ! de
[Download RAW message or body]

---
 contrib/README     |  2 +-
 contrib/delayer.in | 68 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+), 1 deletion(-)

diff --git a/contrib/README b/contrib/README
index 944963908..fd6063103 100644
--- a/contrib/README
+++ b/contrib/README
@@ -63,7 +63,7 @@ delayer
     Sits in a data stream and delays it by some constant period of time.
     Mostly useful for delaying innfeed feeds to allow cancels a chance to
     remove articles before innfeed sends them to your peers.  See the
-    beginning of the file for an example of how to use it.
+    embedded documentation for an example of how to use it.
 
 expirectl
 
diff --git a/contrib/delayer.in b/contrib/delayer.in
index 5febfc04d..974efcd2a 100644
--- a/contrib/delayer.in
+++ b/contrib/delayer.in
@@ -67,3 +67,71 @@ while (1) {
     }
     $timeout = $first - $now;
 }
+
+__END__
+
+=head1 NAME
+
+delayer - A pipe to delay line-based input by a given time
+
+=head1 SYNOPSIS
+
+    <some program> | delayer <seconds> | <some other program>
+
+=head1 DESCRIPTION
+
+This program implements a delaying pipe. Lines sent to the process are
+spooled and printed after the given delay time has passed.
+
+The main use case is for a newsfeed that deliberately should not
+distribute articles as soon as possible. One reason is giving
+cybercancels and NoCeMs time to arrive and cancel articles before they
+are spread. Another one is using a link only as a backup.
+
+=head2 Configuration
+
+=over
+
+=item * Choose a name for that feed, e.g. C<delayfeed>.
+
+=item * Copy C<pathetc>/innfeed.conf to C<pathetc>/delayfeed.conf
+
+=item * Edit C<pathetc>/delayfeed.conf and change C<newsfeed> to
+C<delayfeed>, typically C<pid-file>, C<log-file>, C<backlog-directory>,
+and C<status-file>.
+
+=item * Possibly limit C<max-connections> to C<1>.
+
+=item * Add a new entry to B<pathetc>/newsfeeds like
+
+    innfeed-delayed!\
+        :!*\
+        :Tc,Wnm*,S16384:/path/to/delayer 120 \
+            <newsbin>/innfeed -c innfeed-delayed.conf
+
+This will delay articles via that feed for 120 seconds.
+
+=item * Enable the feed:
+
+    ctlinnd begin innfeed-delayed
+
+=back
+
+=head1 BUGS
+
+If the feed is closed, all lines in the store are printed immediately,
+breaking the contract of delaying them.
+
+If the number of articles in that feed is rather low - just a few
+articles per delay time or less - some effects of buffering will delay
+the transmission even further.
+
+=head1 HISTORY
+
+July 1998 christian mock <cm@tahina.priv.at>
+
+=head1 SEE ALSO
+
+delay(1), newsfeeds(5)
+
+=cut
-- 
2.39.2

-- 
inn-workers mailing list
inn-workers@lists.isc.org
https://lists.isc.org/mailman/listinfo/inn-workers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic