Line data Source code
1 : /* SPDX-License-Identifier: LGPL-2.1+ */ 2 : #pragma once 3 : 4 : #include "journal-file.h" 5 : #include "journal-importer.h" 6 : 7 : typedef struct RemoteServer RemoteServer; 8 : 9 : typedef struct Writer { 10 : JournalFile *journal; 11 : JournalMetrics metrics; 12 : 13 : MMapCache *mmap; 14 : RemoteServer *server; 15 : char *hashmap_key; 16 : 17 : uint64_t seqnum; 18 : 19 : unsigned n_ref; 20 : } Writer; 21 : 22 : Writer* writer_new(RemoteServer* server); 23 : Writer* writer_ref(Writer *w); 24 : Writer* writer_unref(Writer *w); 25 : 26 0 : DEFINE_TRIVIAL_CLEANUP_FUNC(Writer*, writer_unref); 27 : 28 : int writer_write(Writer *s, 29 : struct iovec_wrapper *iovw, 30 : dual_timestamp *ts, 31 : sd_id128_t *boot_id, 32 : bool compress, 33 : bool seal); 34 : 35 : typedef enum JournalWriteSplitMode { 36 : JOURNAL_WRITE_SPLIT_NONE, 37 : JOURNAL_WRITE_SPLIT_HOST, 38 : _JOURNAL_WRITE_SPLIT_MAX, 39 : _JOURNAL_WRITE_SPLIT_INVALID = -1 40 : } JournalWriteSplitMode;