diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-03 17:37:28 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-03 17:37:28 +0000 |
commit | b95b5ab28407b75467c6cff63359cba9a0a3bd70 (patch) | |
tree | e5ec5564b97690f1a278f1d693f7390d5818623d /queue.h | |
parent | 64de2f0d2e0dd61dc9703a4ffd62f41f5cf42caa (diff) | |
download | rsyslog-b95b5ab28407b75467c6cff63359cba9a0a3bd70.tar.gz rsyslog-b95b5ab28407b75467c6cff63359cba9a0a3bd70.tar.xz rsyslog-b95b5ab28407b75467c6cff63359cba9a0a3bd70.zip |
begun working on disk queueing (not completed, do not use this mode!)
Diffstat (limited to 'queue.h')
-rw-r--r-- | queue.h | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -28,7 +28,8 @@ /* queue types */ typedef enum { QUEUETYPE_FIXED_ARRAY = 0,/* a simple queue made out of a fixed (initially malloced) array fast but memoryhog */ - QUEUETYPE_LINKEDLIST = 1 /* linked list used as buffer, lower fixed memory overhead but slower */ + QUEUETYPE_LINKEDLIST = 1, /* linked list used as buffer, lower fixed memory overhead but slower */ + QUEUETYPE_DISK = 2 /* disk files used as buffer */ } queueType_t; /* list member definition for linked list types of queues: */ @@ -64,6 +65,18 @@ typedef struct queue_s { qLinkedList_t *pRoot; qLinkedList_t *pLast; } linklist; + struct { + rsRetVal (*serializer)(uchar **ppOutBuf, size_t *lenBuf, void *pUsr); + rsRetVal (*deSerializer)(void *ppUsr, uchar *ppBuf, size_t lenBuf); + uchar *pszSpoolDir; + size_t lenSpoolDir; + uchar *pszFilePrefix; + size_t lenFilePrefix; + int iCurrFileNum; /* number of file currently processed */ + int fd; /* current file descriptor */ + long iWritePos; /* next write position offset */ + long iReadPos; /* next read position offset */ + } disk; } tVars; } queue_t; |