mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-20 20:50:44 +00:00
MEDIUM: stick-tables: Add GPT0 in the stick tables
This patch adds GPT0 (General Purpose Tag 0). It is useful for storing a simple state.
This commit is contained in:
parent
7e25df3f17
commit
3cf1111eb3
@ -36,6 +36,7 @@
|
||||
/* The types of extra data we can store in a stick table */
|
||||
enum {
|
||||
STKTABLE_DT_SERVER_ID, /* the server ID to use with this stream if > 0 */
|
||||
STKTABLE_DT_GPT0, /* General Purpose Flag 0. */
|
||||
STKTABLE_DT_GPC0, /* General Purpose Counter 0 (unsigned 32-bit integer) */
|
||||
STKTABLE_DT_GPC0_RATE, /* General Purpose Counter 0's event rate */
|
||||
STKTABLE_DT_CONN_CNT, /* cumulated number of connections */
|
||||
@ -83,6 +84,7 @@ union stktable_data {
|
||||
|
||||
/* types of each storable data */
|
||||
int server_id;
|
||||
unsigned int gpt0;
|
||||
unsigned int gpc0;
|
||||
struct freq_ctr_period gpc0_rate;
|
||||
unsigned int conn_cnt;
|
||||
|
@ -584,6 +584,7 @@ int stktable_compatible_sample(struct sample_expr *expr, unsigned long table_typ
|
||||
*/
|
||||
struct stktable_data_type stktable_data_types[STKTABLE_DATA_TYPES] = {
|
||||
[STKTABLE_DT_SERVER_ID] = { .name = "server_id", .std_type = STD_T_SINT },
|
||||
[STKTABLE_DT_GPT0] = { .name = "gpt0", .std_type = STD_T_UINT },
|
||||
[STKTABLE_DT_GPC0] = { .name = "gpc0", .std_type = STD_T_UINT },
|
||||
[STKTABLE_DT_GPC0_RATE] = { .name = "gpc0_rate", .std_type = STD_T_FRQP, .arg_type = ARG_T_DELAY },
|
||||
[STKTABLE_DT_CONN_CNT] = { .name = "conn_cnt", .std_type = STD_T_UINT },
|
||||
|
Loading…
Reference in New Issue
Block a user