mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
This commit is the first one of a serie to implement preloading of haproxy counters via stats-file parsing. This patch defines a basic apply_stats_file() function. It implements reading line by line of a stats-file without any parsing for the moment. It is called automatically on process startup via init().
24 lines
673 B
C
24 lines
673 B
C
#ifndef _HAPROXY_STATS_FILE_H
|
|
#define _HAPROXY_STATS_FILE_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <haproxy/buf-t.h>
|
|
#include <haproxy/stats-t.h>
|
|
|
|
int stats_dump_fields_file(struct buffer *out,
|
|
const struct field *stats, size_t stats_count,
|
|
struct show_stat_ctx *ctx);
|
|
|
|
void stats_dump_file_header(int type, struct buffer *out);
|
|
|
|
/* Maximun number of parsed stat column in a header line.
|
|
* Directly based on ST_I_PX_MAX, with value doubled to obtain compatibility
|
|
* between haproxy adjacent versions.
|
|
*/
|
|
#define STAT_FILE_MAX_COL_COUNT (ST_I_PX_MAX*2)
|
|
|
|
void apply_stats_file(void);
|
|
|
|
#endif /* _HAPROXY_STATS_FILE_H */
|