syslog-ng source
healthcheck.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 László Várady <laszlo.varady93@gmail.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * As an additional exemption you are allowed to compile & link against the
19  * OpenSSL libraries as published by the OpenSSL project. See the file
20  * COPYING for details.
21  *
22  */
23 
24 #ifndef HEALTHCHECK_H
25 #define HEALTHCHECK_H
26 
27 #include "syslog-ng.h"
28 
29 typedef struct _HealthCheck HealthCheck;
30 
31 typedef struct _HealthCheckResult
32 {
36 
37 typedef void(*HealthCheckCompletionCB)(HealthCheckResult, gpointer);
38 
39 HealthCheck *healthcheck_new(void);
40 HealthCheck *healthcheck_ref(HealthCheck *self);
41 void healthcheck_unref(HealthCheck *self);
42 
43 gboolean healthcheck_run(HealthCheck *self, HealthCheckCompletionCB completion, gpointer user_data);
44 
45 #endif
void healthcheck_unref(HealthCheck *self)
Definition: healthcheck.c:144
HealthCheck * healthcheck_ref(HealthCheck *self)
Definition: healthcheck.c:134
HealthCheck * healthcheck_new(void)
Definition: healthcheck.c:154
void(* HealthCheckCompletionCB)(HealthCheckResult, gpointer)
Definition: healthcheck.h:37
gboolean healthcheck_run(HealthCheck *self, HealthCheckCompletionCB completion, gpointer user_data)
Definition: healthcheck.c:91
Definition: healthcheck.h:32
guint64 mainloop_io_worker_roundtrip_latency
Definition: healthcheck.h:34
guint64 io_worker_latency
Definition: healthcheck.h:33
Definition: healthcheck.c:31