]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stats: export function to allocate extra proxy counters
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 18 Mar 2021 14:48:14 +0000 (15:48 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 18 Mar 2021 14:52:07 +0000 (15:52 +0100)
Remove static qualifier on stats_allocate_proxy_counters_internal. This
function will be used to allocate extra counters at runtime for dynamic
servers.

include/haproxy/stats.h
src/stats.c

index cbc33f279e5cf7078ed1cb028a0ccf8059074375..a97740d28b00cf4415927dbae61d4a3084fdda60 100644 (file)
@@ -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);
index 67d85a7f0568a96fee9ab222f660c124df192cc8..e54d13adffbeb5a55d10b6f68612ae1b0e5a1a7e 100644 (file)
@@ -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;