1 /* SPDX-License-Identifier: LGPL-2.1+ */
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
;
30 sd_event_source
*sigterm_event
, *sigint_event
, *listen_event
;
33 Writer
*_single_writer
;
39 const char *output
; /* either the output file or directory */
41 JournalWriteSplitMode split_mode
;
46 extern RemoteServer
*journal_remote_server_global
;
48 int journal_remote_server_init(
51 JournalWriteSplitMode split_mode
,
55 int journal_remote_get_writer(RemoteServer
*s
, const char *host
, Writer
**writer
);
57 int journal_remote_add_source(RemoteServer
*s
, int fd
, char* name
, bool own_name
);
58 int journal_remote_add_raw_socket(RemoteServer
*s
, int fd
);
59 int journal_remote_handle_raw_source(
60 sd_event_source
*event
,
65 void journal_remote_server_destroy(RemoteServer
*s
);