mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-24 18:31:41 -05:00
This patch adds support of variables during the processing of each stream. The variables scope can be set as 'session', 'transaction', 'request' or 'response'. The variable type is the type returned by the assignment expression. The type can change while the processing. The allocated memory can be controlled for each scope and each request, and for the global process.
33 lines
582 B
C
33 lines
582 B
C
#ifndef _TYPES_VARS_H
|
|
#define _TYPES_VARS_H
|
|
|
|
#include <common/mini-clist.h>
|
|
|
|
#include <types/sample.h>
|
|
|
|
enum vars_scope {
|
|
SCOPE_SESS = 0,
|
|
SCOPE_TXN,
|
|
SCOPE_REQ,
|
|
SCOPE_RES,
|
|
};
|
|
|
|
struct vars {
|
|
struct list head;
|
|
enum vars_scope scope;
|
|
unsigned int size;
|
|
};
|
|
|
|
/* 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_storage data; /* data storage. */
|
|
};
|
|
|
|
#endif
|