mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-20 00:10:41 -05:00
REORG: stats: export some functions
Un-mark stats_dump_one_line and stats_putchk as static and export them in the header file. These functions will be reusable by other components to print their statistics. This patch is needed to extend stat support to components other than proxies objects.
This commit is contained in:
parent
a53ce4cc01
commit
3ca927e68f
2 changed files with 7 additions and 2 deletions
|
|
@ -39,6 +39,11 @@ extern const char *stat_status_codes[];
|
|||
extern struct applet http_stats_applet;
|
||||
|
||||
|
||||
struct htx;
|
||||
int stats_putchk(struct channel *chn, struct htx *htx, struct buffer *chk);
|
||||
|
||||
int stats_dump_one_line(const struct field *stats, struct proxy *px, struct appctx *appctx);
|
||||
|
||||
int stats_fill_info(struct field *info, int len);
|
||||
int stats_fill_fe_stats(struct proxy *px, struct field *stats, int len);
|
||||
int stats_fill_li_stats(struct proxy *px, struct listener *l, int flags,
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ static THREAD_LOCAL struct field stats[ST_F_TOTAL_FIELDS];
|
|||
|
||||
static void stats_dump_json_schema(struct buffer *out);
|
||||
|
||||
static int stats_putchk(struct channel *chn, struct htx *htx, struct buffer *chk)
|
||||
int stats_putchk(struct channel *chn, struct htx *htx, struct buffer *chk)
|
||||
{
|
||||
if (htx) {
|
||||
if (chk->data >= channel_htx_recv_max(chn, htx))
|
||||
|
|
@ -1381,7 +1381,7 @@ static int stats_dump_fields_html(struct buffer *out,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int stats_dump_one_line(const struct field *stats, struct proxy *px, struct appctx *appctx)
|
||||
int stats_dump_one_line(const struct field *stats, struct proxy *px, struct appctx *appctx)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue