chiark / gitweb /
journal-upload: a tool to push messages to systemd-journal-remote
[elogind.git] / src / journal-remote / journal-upload.h
diff --git a/src/journal-remote/journal-upload.h b/src/journal-remote/journal-upload.h
new file mode 100644 (file)
index 0000000..68d85be
--- /dev/null
@@ -0,0 +1,25 @@
+#pragma once
+
+#include <inttypes.h>
+
+#include "sd-event.h"
+
+typedef struct Uploader {
+        sd_event *events;
+
+        const char *url;
+        CURL *easy;
+        bool uploading;
+        struct curl_slist *header;
+
+        int input;
+
+        sd_event_source *input_event;
+} Uploader;
+
+int start_upload(Uploader *u,
+                 size_t (*input_callback)(void *ptr,
+                                          size_t size,
+                                          size_t nmemb,
+                                          void *userdata),
+                 void *data);