summaryrefslogtreecommitdiffstats
path: root/include/haproxy/proxy-t.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/haproxy/proxy-t.h')
-rw-r--r--include/haproxy/proxy-t.h42
1 files changed, 14 insertions, 28 deletions
diff --git a/include/haproxy/proxy-t.h b/include/haproxy/proxy-t.h
index 2f7bf7b..f6ed211 100644
--- a/include/haproxy/proxy-t.h
+++ b/include/haproxy/proxy-t.h
@@ -34,7 +34,7 @@
#include <haproxy/backend-t.h>
#include <haproxy/compression-t.h>
#include <haproxy/counters-t.h>
-#include <haproxy/freq_ctr-t.h>
+#include <haproxy/guid-t.h>
#include <haproxy/obj_type-t.h>
#include <haproxy/queue-t.h>
#include <haproxy/server-t.h>
@@ -92,11 +92,11 @@ enum PR_SRV_STATE_FILE {
#define PR_O_IGNORE_PRB 0x00000200 /* ignore empty requests (aborts and timeouts) */
#define PR_O_NULLNOLOG 0x00000400 /* a connect without request will not be logged */
#define PR_O_WREQ_BODY 0x00000800 /* always wait for the HTTP request body */
-#define PR_O_HTTP_UPG 0x00001000 /* Contain a "switch-mode http" tcp-request rule */
+#define PR_O_HTTP_UPG 0x00001000 /* implicit (default/use backend) or explicit (switch-mode) http upgrade */
/* unused: 0x00002000 */
#define PR_O_PERSIST 0x00004000 /* server persistence stays effective even when server is down */
#define PR_O_LOGASAP 0x00008000 /* log as soon as possible, without waiting for the stream to complete */
-#define PR_O_ERR_LOGFMT 0x00010000 /* use log-format for connection error message */
+/* unused: 0x00010000 */
#define PR_O_CHK_CACHE 0x00020000 /* require examination of cacheability of the 'set-cookie' field */
#define PR_O_TCP_CLI_KA 0x00040000 /* enable TCP keep-alive on client-side streams */
#define PR_O_TCP_SRV_KA 0x00080000 /* enable TCP keep-alive on server-side streams */
@@ -214,6 +214,7 @@ enum PR_SRV_STATE_FILE {
#define PR_FL_EXPLICIT_REF 0x08 /* The default proxy is explicitly referenced by another proxy */
#define PR_FL_IMPLICIT_REF 0x10 /* The default proxy is implicitly referenced by another proxy */
#define PR_FL_PAUSED 0x20 /* The proxy was paused at run time (reversible) */
+#define PR_FL_CHECKED 0x40 /* The proxy configuration was fully checked (including postparsing checks) */
struct stream;
@@ -352,10 +353,6 @@ struct proxy {
struct queue queue; /* queued requests (pendconns) */
int totpend; /* total number of pending connections on this instance (for stats) */
unsigned int feconn, beconn; /* # of active frontend and backends streams */
- struct freq_ctr fe_req_per_sec; /* HTTP requests per second on the frontend */
- struct freq_ctr fe_conn_per_sec; /* received connections per second on the frontend */
- struct freq_ctr fe_sess_per_sec; /* accepted sessions per second on the frontend (after tcp rules) */
- struct freq_ctr be_sess_per_sec; /* sessions per second on the backend */
unsigned int fe_sps_lim; /* limit on new sessions per second on the frontend */
unsigned int fullconn; /* #conns on backend above which servers are used at full load */
unsigned int tot_fe_maxconn; /* #maxconn of frontends linked to that backend, it is used to compute fullconn */
@@ -363,9 +360,7 @@ struct proxy {
int conn_retries; /* maximum number of connect retries */
unsigned int retry_type; /* Type of retry allowed */
int redispatch_after; /* number of retries before redispatch */
- unsigned down_trans; /* up-down transitions */
unsigned down_time; /* total time the proxy was down */
- time_t last_change; /* last time, when the state was changed */
int (*accept)(struct stream *s); /* application layer's accept() */
struct conn_src conn_src; /* connection source settings */
enum obj_type *default_target; /* default target to use for accepted streams or NULL */
@@ -373,12 +368,12 @@ struct proxy {
struct proxy *next_stkt_ref; /* Link to the list of proxies which refer to the same stick-table. */
struct list loggers; /* one per 'log' directive */
- struct list logformat; /* log_format linked list */
- struct list logformat_sd; /* log_format linked list for the RFC5424 structured-data part */
- struct list logformat_error; /* log_format linked list used in case of connection error on the frontend */
+ struct lf_expr logformat; /* log_format linked list */
+ struct lf_expr logformat_sd; /* log_format linked list for the RFC5424 structured-data part */
+ struct lf_expr logformat_error; /* log_format linked list used in case of connection error on the frontend */
struct buffer log_tag; /* override default syslog tag */
struct ist header_unique_id; /* unique-id header */
- struct list format_unique_id; /* unique-id format */
+ struct lf_expr format_unique_id; /* unique-id format */
int to_log; /* things to be logged (LW_*) */
int nb_req_cap, nb_rsp_cap; /* # of headers to be captured */
struct cap_hdr *req_cap; /* chained list of request headers to be captured */
@@ -426,18 +421,7 @@ struct proxy {
struct arg_list args; /* sample arg list that need to be resolved */
unsigned int refcount; /* refcount on this proxy (only used for default proxy for now) */
struct ebpt_node by_name; /* proxies are stored sorted by name here */
- char *logformat_string; /* log format string */
- char *lfs_file; /* file name where the logformat string appears (strdup) */
- int lfs_line; /* file name where the logformat string appears */
- int uif_line; /* file name where the unique-id-format string appears */
- char *uif_file; /* file name where the unique-id-format string appears (strdup) */
- char *uniqueid_format_string; /* unique-id format string */
- char *logformat_sd_string; /* log format string for the RFC5424 structured-data part */
- char *lfsd_file; /* file name where the structured-data logformat string for RFC5424 appears (strdup) */
- int lfsd_line; /* file name where the structured-data logformat string for RFC5424 appears */
- char *error_logformat_string;
- char *elfs_file;
- int elfs_line;
+ struct list lf_checks; /* list of logformats found in the proxy section that needs to be checked during postparse */
} conf; /* config information */
struct http_ext *http_ext; /* http ext options */
struct eb_root used_server_addr; /* list of server addresses in use */
@@ -467,6 +451,8 @@ struct proxy {
*/
struct list filter_configs; /* list of the filters that are declared on this proxy */
+ struct guid_node guid; /* GUID global tree node */
+
EXTRA_COUNTERS(extra_counters_fe);
EXTRA_COUNTERS(extra_counters_be);
};
@@ -478,7 +464,7 @@ struct switching_rule {
union {
struct proxy *backend; /* target backend */
char *name; /* target backend name during config parsing */
- struct list expr; /* logformat expression to use for dynamic rules */
+ struct lf_expr expr; /* logformat expression to use for dynamic rules */
} be;
char *file;
int line;
@@ -492,7 +478,7 @@ struct server_rule {
struct server *ptr; /* target server */
char *name; /* target server name during config parsing */
} srv;
- struct list expr; /* logformat expression to use for dynamic rules */
+ struct lf_expr expr; /* logformat expression to use for dynamic rules */
char *file;
int line;
};
@@ -521,7 +507,7 @@ struct redirect_rule {
int type;
int rdr_len;
char *rdr_str;
- struct list rdr_fmt;
+ struct lf_expr rdr_fmt;
int code;
unsigned int flags;
int cookie_len;