annotate src/lib/iostream-rawlog.h @ 22664:fea53c2725c0

director: Fix director_max_parallel_moves/kicks type Should be uint, not time.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 09 Nov 2017 12:24:16 +0200
parents 4a8a68cf1456
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13534
0860ac364dec Added rawlog i/ostreams.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1 #ifndef IOSTREAM_RAWLOG_H
0860ac364dec Added rawlog i/ostreams.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2 #define IOSTREAM_RAWLOG_H
0860ac364dec Added rawlog i/ostreams.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3
20019
4a8a68cf1456 lib: Moved enum iostream_rawlog_flags to public iostream-rawlog.h
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 18166
diff changeset
4 enum iostream_rawlog_flags {
4a8a68cf1456 lib: Moved enum iostream_rawlog_flags to public iostream-rawlog.h
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 18166
diff changeset
5 IOSTREAM_RAWLOG_FLAG_AUTOCLOSE = 0x01,
4a8a68cf1456 lib: Moved enum iostream_rawlog_flags to public iostream-rawlog.h
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 18166
diff changeset
6 IOSTREAM_RAWLOG_FLAG_BUFFERED = 0x02,
4a8a68cf1456 lib: Moved enum iostream_rawlog_flags to public iostream-rawlog.h
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 18166
diff changeset
7 IOSTREAM_RAWLOG_FLAG_TIMESTAMP = 0x04
4a8a68cf1456 lib: Moved enum iostream_rawlog_flags to public iostream-rawlog.h
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 18166
diff changeset
8 };
4a8a68cf1456 lib: Moved enum iostream_rawlog_flags to public iostream-rawlog.h
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 18166
diff changeset
9
14967
8ce6d41d2d41 iostream-rawlog: Added possibility to save input/output to the same file.
Timo Sirainen <tss@iki.fi>
parents: 14688
diff changeset
10 /* Create rawlog *.in and *.out files to the given directory. */
14688
128c598d2870 Avoid using (void)s by adding ATTR_NOWARN_UNUSED_RESULT attributes and other ways.
Timo Sirainen <tss@iki.fi>
parents: 13534
diff changeset
11 int ATTR_NOWARN_UNUSED_RESULT
128c598d2870 Avoid using (void)s by adding ATTR_NOWARN_UNUSED_RESULT attributes and other ways.
Timo Sirainen <tss@iki.fi>
parents: 13534
diff changeset
12 iostream_rawlog_create(const char *dir, struct istream **input,
128c598d2870 Avoid using (void)s by adding ATTR_NOWARN_UNUSED_RESULT attributes and other ways.
Timo Sirainen <tss@iki.fi>
parents: 13534
diff changeset
13 struct ostream **output);
14967
8ce6d41d2d41 iostream-rawlog: Added possibility to save input/output to the same file.
Timo Sirainen <tss@iki.fi>
parents: 14688
diff changeset
14 /* Create rawlog prefix.in and prefix.out files. */
8ce6d41d2d41 iostream-rawlog: Added possibility to save input/output to the same file.
Timo Sirainen <tss@iki.fi>
parents: 14688
diff changeset
15 int ATTR_NOWARN_UNUSED_RESULT
8ce6d41d2d41 iostream-rawlog: Added possibility to save input/output to the same file.
Timo Sirainen <tss@iki.fi>
parents: 14688
diff changeset
16 iostream_rawlog_create_prefix(const char *prefix, struct istream **input,
8ce6d41d2d41 iostream-rawlog: Added possibility to save input/output to the same file.
Timo Sirainen <tss@iki.fi>
parents: 14688
diff changeset
17 struct ostream **output);
8ce6d41d2d41 iostream-rawlog: Added possibility to save input/output to the same file.
Timo Sirainen <tss@iki.fi>
parents: 14688
diff changeset
18 /* Create rawlog path, writing both input and output to the same file. */
8ce6d41d2d41 iostream-rawlog: Added possibility to save input/output to the same file.
Timo Sirainen <tss@iki.fi>
parents: 14688
diff changeset
19 int ATTR_NOWARN_UNUSED_RESULT
8ce6d41d2d41 iostream-rawlog: Added possibility to save input/output to the same file.
Timo Sirainen <tss@iki.fi>
parents: 14688
diff changeset
20 iostream_rawlog_create_path(const char *path, struct istream **input,
8ce6d41d2d41 iostream-rawlog: Added possibility to save input/output to the same file.
Timo Sirainen <tss@iki.fi>
parents: 14688
diff changeset
21 struct ostream **output);
18166
c02f29ca104d lib: iostream-rawlog now writes to ostreams instead of directly to fds.
Timo Sirainen <tss@iki.fi>
parents: 14967
diff changeset
22 /* Create rawlog that appends to the given rawlog_output.
c02f29ca104d lib: iostream-rawlog now writes to ostreams instead of directly to fds.
Timo Sirainen <tss@iki.fi>
parents: 14967
diff changeset
23 Both input and output are written to the same stream. */
c02f29ca104d lib: iostream-rawlog now writes to ostreams instead of directly to fds.
Timo Sirainen <tss@iki.fi>
parents: 14967
diff changeset
24 void iostream_rawlog_create_from_stream(struct ostream *rawlog_output,
c02f29ca104d lib: iostream-rawlog now writes to ostreams instead of directly to fds.
Timo Sirainen <tss@iki.fi>
parents: 14967
diff changeset
25 struct istream **input,
c02f29ca104d lib: iostream-rawlog now writes to ostreams instead of directly to fds.
Timo Sirainen <tss@iki.fi>
parents: 14967
diff changeset
26 struct ostream **output);
13534
0860ac364dec Added rawlog i/ostreams.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
27
0860ac364dec Added rawlog i/ostreams.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
28 #endif