]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: stats: define an API to register stat modules
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 5 Oct 2020 09:49:40 +0000 (11:49 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 5 Oct 2020 10:02:14 +0000 (12:02 +0200)
commit58d395e0d6da1b73524f9ad9a8e10e437c680b89
treed544733c1d86a1e1868c3c1983e3126badcd38f7
parent50660a894d533e7ed448df87acbe74c978de8db4
MEDIUM: stats: define an API to register stat modules

A stat module can be registered to quickly add new statistics on
haproxy. It must be attached to one of the available stats domain. The
register must be done using INITCALL on STG_REGISTER.

The stat module has a name which should be unique for each new module in
a domain. It also contains a statistics list with their name/desc and a
pointer to a function used to fill the stats from the module counters.

The module also provides the initial counters values used on
automatically allocated counters. The offset for these counters
are stored in the module structure.
include/haproxy/stats-t.h
include/haproxy/stats.h
src/stats.c