aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/monitored.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-07-26 10:49:23 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-07-26 10:49:23 +0100
commit537a7180a0d5132c11636c4fd8b1450cd99d352c (patch)
treefb9f8c84955a411bdffbd6371ea32f2716fb3687 /src/libserver/monitored.h
parent5fd7a90fdaa33f52c59bdb0ca84451e5c1e22365 (diff)
downloadrspamd-537a7180a0d5132c11636c4fd8b1450cd99d352c.tar.gz
rspamd-537a7180a0d5132c11636c4fd8b1450cd99d352c.zip
[Rework] Use clang-format to unify formatting in all sources
No meaningful changes.
Diffstat (limited to 'src/libserver/monitored.h')
-rw-r--r--src/libserver/monitored.h66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/libserver/monitored.h b/src/libserver/monitored.h
index 2453a8f48..01f050a76 100644
--- a/src/libserver/monitored.h
+++ b/src/libserver/monitored.h
@@ -19,7 +19,7 @@
#include "config.h"
#include "rdns.h"
-#ifdef __cplusplus
+#ifdef __cplusplus
extern "C" {
#endif
@@ -43,11 +43,11 @@ enum rspamd_monitored_flags {
* Initialize new monitored context
* @return opaque context pointer (should be configured)
*/
-struct rspamd_monitored_ctx *rspamd_monitored_ctx_init (void);
+struct rspamd_monitored_ctx *rspamd_monitored_ctx_init(void);
-typedef void (*mon_change_cb) (struct rspamd_monitored_ctx *ctx,
- struct rspamd_monitored *m, gboolean alive,
- void *ud);
+typedef void (*mon_change_cb)(struct rspamd_monitored_ctx *ctx,
+ struct rspamd_monitored *m, gboolean alive,
+ void *ud);
/**
* Configure context for monitored objects
@@ -56,14 +56,14 @@ typedef void (*mon_change_cb) (struct rspamd_monitored_ctx *ctx,
* @param ev_base events base
* @param resolver resolver object
*/
-void rspamd_monitored_ctx_config (struct rspamd_monitored_ctx *ctx,
- struct rspamd_config *cfg,
- struct ev_loop *ev_base,
- struct rdns_resolver *resolver,
- mon_change_cb change_cb,
- gpointer ud);
+void rspamd_monitored_ctx_config(struct rspamd_monitored_ctx *ctx,
+ struct rspamd_config *cfg,
+ struct ev_loop *ev_base,
+ struct rdns_resolver *resolver,
+ mon_change_cb change_cb,
+ gpointer ud);
-struct ev_loop *rspamd_monitored_ctx_get_ev_base (struct rspamd_monitored_ctx *ctx);
+struct ev_loop *rspamd_monitored_ctx_get_ev_base(struct rspamd_monitored_ctx *ctx);
/**
* Create monitored object
@@ -73,16 +73,16 @@ struct ev_loop *rspamd_monitored_ctx_get_ev_base (struct rspamd_monitored_ctx *c
* @param flags specific flags for monitoring
* @return new monitored object
*/
-struct rspamd_monitored *rspamd_monitored_create_ (
- struct rspamd_monitored_ctx *ctx,
- const gchar *line,
- enum rspamd_monitored_type type,
- enum rspamd_monitored_flags flags,
- const ucl_object_t *opts,
- const gchar *loc);
+struct rspamd_monitored *rspamd_monitored_create_(
+ struct rspamd_monitored_ctx *ctx,
+ const gchar *line,
+ enum rspamd_monitored_type type,
+ enum rspamd_monitored_flags flags,
+ const ucl_object_t *opts,
+ const gchar *loc);
#define rspamd_monitored_create(ctx, line, type, flags, opts) \
- rspamd_monitored_create_(ctx, line, type, flags, opts, G_STRFUNC)
+ rspamd_monitored_create_(ctx, line, type, flags, opts, G_STRFUNC)
/**
* Return monitored by its tag
@@ -90,71 +90,71 @@ struct rspamd_monitored *rspamd_monitored_create_ (
* @param tag
* @return
*/
-struct rspamd_monitored *rspamd_monitored_by_tag (struct rspamd_monitored_ctx *ctx,
- guchar tag[RSPAMD_MONITORED_TAG_LEN]);
+struct rspamd_monitored *rspamd_monitored_by_tag(struct rspamd_monitored_ctx *ctx,
+ guchar tag[RSPAMD_MONITORED_TAG_LEN]);
/**
* Sets `tag_out` to the monitored tag
* @param m
* @param tag_out
*/
-void rspamd_monitored_get_tag (struct rspamd_monitored *m,
- guchar tag_out[RSPAMD_MONITORED_TAG_LEN]);
+void rspamd_monitored_get_tag(struct rspamd_monitored *m,
+ guchar tag_out[RSPAMD_MONITORED_TAG_LEN]);
/**
* Return TRUE if monitored object is alive
* @param m monitored object
* @return TRUE or FALSE
*/
-gboolean rspamd_monitored_alive (struct rspamd_monitored *m);
+gboolean rspamd_monitored_alive(struct rspamd_monitored *m);
/**
* Force alive flag for a monitored object
* @param m monitored object
* @return TRUE or FALSE
*/
-gboolean rspamd_monitored_set_alive (struct rspamd_monitored *m, gboolean alive);
+gboolean rspamd_monitored_set_alive(struct rspamd_monitored *m, gboolean alive);
/**
* Returns the current offline time for a monitored object
* @param m
* @return
*/
-gdouble rspamd_monitored_offline_time (struct rspamd_monitored *m);
+gdouble rspamd_monitored_offline_time(struct rspamd_monitored *m);
/**
* Returns the total offline time for a monitored object
* @param m
* @return
*/
-gdouble rspamd_monitored_total_offline_time (struct rspamd_monitored *m);
+gdouble rspamd_monitored_total_offline_time(struct rspamd_monitored *m);
/**
* Returns the latency for monitored object (in seconds)
* @param m
* @return
*/
-gdouble rspamd_monitored_latency (struct rspamd_monitored *m);
+gdouble rspamd_monitored_latency(struct rspamd_monitored *m);
/**
* Explicitly disable monitored object
* @param m
*/
-void rspamd_monitored_stop (struct rspamd_monitored *m);
+void rspamd_monitored_stop(struct rspamd_monitored *m);
/**
* Explicitly enable monitored object
* @param m
*/
-void rspamd_monitored_start (struct rspamd_monitored *m);
+void rspamd_monitored_start(struct rspamd_monitored *m);
/**
* Destroy monitored context and all monitored objects inside
* @param ctx
*/
-void rspamd_monitored_ctx_destroy (struct rspamd_monitored_ctx *ctx);
+void rspamd_monitored_ctx_destroy(struct rspamd_monitored_ctx *ctx);
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif