From: Amaury Denoyelle Date: Thu, 18 Mar 2021 14:48:14 +0000 (+0100) Subject: MINOR: stats: export function to allocate extra proxy counters X-Git-Tag: v2.4-dev13~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=216a1ce3b9e14b512d050a4a8bc8f3852c24dcd5;p=thirdparty%2Fhaproxy.git MINOR: stats: export function to allocate extra proxy counters Remove static qualifier on stats_allocate_proxy_counters_internal. This function will be used to allocate extra counters at runtime for dynamic servers. --- diff --git a/include/haproxy/stats.h b/include/haproxy/stats.h index cbc33f279e..a97740d28b 100644 --- a/include/haproxy/stats.h +++ b/include/haproxy/stats.h @@ -126,6 +126,8 @@ static inline struct field mkf_flt(uint32_t type, double value) #define MK_STATS_PROXY_DOMAIN(px_cap) \ ((px_cap) << STATS_PX_CAP | STATS_DOMAIN_PROXY) +int stats_allocate_proxy_counters_internal(struct extra_counters **counters, + int type, int px_cap); int stats_allocate_proxy_counters(struct proxy *px); void stats_register_module(struct stats_module *m); diff --git a/src/stats.c b/src/stats.c index 67d85a7f05..e54d13adff 100644 --- a/src/stats.c +++ b/src/stats.c @@ -4859,8 +4859,8 @@ static int cli_io_handler_dump_json_schema(struct appctx *appctx) return stats_dump_json_schema_to_buffer(appctx->owner); } -static int stats_allocate_proxy_counters_internal(struct extra_counters **counters, - int type, int px_cap) +int stats_allocate_proxy_counters_internal(struct extra_counters **counters, + int type, int px_cap) { struct stats_module *mod;