1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
7 #include "journal-remote-parse.h"
8 #include "journal-remote-write.h"
11 #include "microhttpd-util.h"
13 typedef struct MHDDaemonWrapper MHDDaemonWrapper
;
15 struct MHDDaemonWrapper
{
17 struct MHD_Daemon
*daemon
;
19 sd_event_source
*io_event
;
20 sd_event_source
*timer_event
;
25 RemoteSource
**sources
;
29 sd_event_source
*sigterm_event
, *sigint_event
, *listen_event
;
32 Writer
*_single_writer
;
38 const char *output
; /* either the output file or directory */
40 JournalWriteSplitMode split_mode
;
45 extern RemoteServer
*journal_remote_server_global
;
47 int journal_remote_server_init(
50 JournalWriteSplitMode split_mode
,
54 int journal_remote_get_writer(RemoteServer
*s
, const char *host
, Writer
**writer
);
56 int journal_remote_add_source(RemoteServer
*s
, int fd
, char* name
, bool own_name
);
57 int journal_remote_add_raw_socket(RemoteServer
*s
, int fd
);
58 int journal_remote_handle_raw_source(
59 sd_event_source
*event
,
64 void journal_remote_server_destroy(RemoteServer
*s
);