blob: a72469fd133ab49c200d0fc7d4d80a8e9102fbf4 [file] [log] [blame]
Thierry FOURNIER4834bc72015-06-06 19:29:07 +02001#ifndef _TYPES_VARS_H
2#define _TYPES_VARS_H
3
4#include <common/mini-clist.h>
Christopher Faulete95f2c32017-07-24 16:30:34 +02005#include <common/hathreads.h>
Thierry FOURNIER4834bc72015-06-06 19:29:07 +02006
7#include <types/sample.h>
8
9enum vars_scope {
10 SCOPE_SESS = 0,
11 SCOPE_TXN,
12 SCOPE_REQ,
13 SCOPE_RES,
Christopher Fauletff2613e2016-11-09 11:36:17 +010014 SCOPE_PROC,
Gaetan Rivet13a50432020-02-21 18:13:44 +010015 SCOPE_CHECK,
Thierry FOURNIER4834bc72015-06-06 19:29:07 +020016};
17
18struct vars {
19 struct list head;
20 enum vars_scope scope;
21 unsigned int size;
Christopher Faulet9dcf9b62017-11-13 10:34:01 +010022 __decl_hathreads(HA_RWLOCK_T rwlock);
Thierry FOURNIER4834bc72015-06-06 19:29:07 +020023};
24
25/* This struct describes a variable. */
26struct var_desc {
27 const char *name; /* Contains the normalized variable name. */
28 enum vars_scope scope;
29};
30
31struct var {
32 struct list l; /* Used for chaining vars. */
33 const char *name; /* Contains the variable name. */
Thierry FOURNIER12ba0c22015-08-14 00:02:11 +020034 struct sample_data data; /* data storage. */
Thierry FOURNIER4834bc72015-06-06 19:29:07 +020035};
36
37#endif