mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-03 20:39:41 -05:00
Add a dedicated vars scope for checks. This scope is considered as part of the session scope for accounting purposes. The scope can be addressed by a valid session, even embryonic. The stream is not necessary. The scope is initialized after the check session is created. All variables are then pruned before the session is destroyed.
37 lines
675 B
C
37 lines
675 B
C
#ifndef _TYPES_VARS_H
|
|
#define _TYPES_VARS_H
|
|
|
|
#include <common/mini-clist.h>
|
|
#include <common/hathreads.h>
|
|
|
|
#include <types/sample.h>
|
|
|
|
enum vars_scope {
|
|
SCOPE_SESS = 0,
|
|
SCOPE_TXN,
|
|
SCOPE_REQ,
|
|
SCOPE_RES,
|
|
SCOPE_PROC,
|
|
SCOPE_CHECK,
|
|
};
|
|
|
|
struct vars {
|
|
struct list head;
|
|
enum vars_scope scope;
|
|
unsigned int size;
|
|
__decl_hathreads(HA_RWLOCK_T rwlock);
|
|
};
|
|
|
|
/* This struct describes a variable. */
|
|
struct var_desc {
|
|
const char *name; /* Contains the normalized variable name. */
|
|
enum vars_scope scope;
|
|
};
|
|
|
|
struct var {
|
|
struct list l; /* Used for chaining vars. */
|
|
const char *name; /* Contains the variable name. */
|
|
struct sample_data data; /* data storage. */
|
|
};
|
|
|
|
#endif
|