summaryrefslogtreecommitdiffstats
path: root/queue.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-02 16:53:29 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-02 16:53:29 +0000
commit9b48c4a481c64503605f25e1d0648d24f43437f1 (patch)
tree017325a20b756a2047cb3eb7d9aacdf19a52d964 /queue.h
parent38f0cd67626ce56b0014b05b513e2e573da25e6f (diff)
downloadrsyslog-9b48c4a481c64503605f25e1d0648d24f43437f1.tar.gz
rsyslog-9b48c4a481c64503605f25e1d0648d24f43437f1.tar.xz
rsyslog-9b48c4a481c64503605f25e1d0648d24f43437f1.zip
begun working on time-window based dequeueing (and rate limiting in
general)
Diffstat (limited to 'queue.h')
-rw-r--r--queue.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/queue.h b/queue.h
index bc09fbd8..6aa09a1b 100644
--- a/queue.h
+++ b/queue.h
@@ -82,9 +82,20 @@ typedef struct queue_s {
int toActShutdown; /* timeout for long-running action shutdown in ms */
int toWrkShutdown; /* timeout for idle workers in ms, -1 means indefinite (0 is immediate) */
int toEnq; /* enqueue timeout */
- /* rate limiting settings (will be expanded */
+ /* rate limiting settings (will be expanded) */
int iDeqSlowdown; /* slow down dequeue by specified nbr of microseconds */
/* end rate limiting */
+ /* dequeue time window settings (may also be expanded) */
+ int iDeqtWinFromHr; /* begin of dequeue time window (hour only) */
+ int iDeqtWinToHr; /* end of dequeue time window (hour only) */
+ /* note that begin and end have specific semantics. It is a big difference if we have
+ * begin 4, end 22 or begin 22, end 4. In the later case, dequeuing will run from 10p,
+ * throughout the night and stop at 4 in the morning. In the first case, it will start
+ * at 4am, run throughout the day, and stop at 10 in the evening! So far, not logic is
+ * applied to detect user configuration errors (and tell me how should we detect what
+ * the user really wanted...). -- rgerhards, 2008-04-02
+ */
+ /* ane dequeue time window */
rsRetVal (*pConsumer)(void *,void*); /* user-supplied consumer function for dequeued messages */
/* calling interface for pConsumer: arg1 is the global user pointer from this structure, arg2 is the
* user pointer that was dequeued (actual sample: for actions, arg1 is the pAction and arg2 is pointer