diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-06-21 14:43:14 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-06-21 14:43:14 +0100 |
commit | 2d5d3c2a0dc6bb2600cce2ebcd73c95cb21a58db (patch) | |
tree | 6a252cfd13f51422cfa8a92cd9b7cca8a9243eca /src/libserver/worker_util.h | |
parent | 90b73439d20d6e5b9b9e61cecbaa9809d7d0ddcd (diff) | |
download | rspamd-2d5d3c2a0dc6bb2600cce2ebcd73c95cb21a58db.tar.gz rspamd-2d5d3c2a0dc6bb2600cce2ebcd73c95cb21a58db.zip |
[Rework] Allow metrics endpoint to be enabled for each scanner
Diffstat (limited to 'src/libserver/worker_util.h')
-rw-r--r-- | src/libserver/worker_util.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libserver/worker_util.h b/src/libserver/worker_util.h index e3627092d..1be7e0180 100644 --- a/src/libserver/worker_util.h +++ b/src/libserver/worker_util.h @@ -1,11 +1,11 @@ -/*- - * Copyright 2016 Vsevolod Stakhov +/* + * Copyright 2024 Vsevolod Stakhov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -299,6 +299,11 @@ void rspamd_worker_init_controller(struct rspamd_worker *worker, void rspamd_controller_store_saved_stats(struct rspamd_main *rspamd_main, struct rspamd_config *cfg); +/** + * Get metrics object for a worker + */ +ucl_object_t *rspamd_worker_metrics_object(struct rspamd_config *cfg, struct rspamd_stat *stat, ev_tstamp uptime); + #ifdef WITH_HYPERSCAN struct rspamd_control_command; |