mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-20 04:38:36 +02:00
[MAJOR] added the 'use_backend' keyword for full content-switching
The new "use_backend" keyword permits full content switching by the
use of ACLs. Its usage is simple :
use_backend <backend_name> {if|unless} <acl_cond>
This commit is contained in:
@@ -85,6 +85,7 @@ struct proxy {
|
||||
} defbe;
|
||||
struct list acl; /* ACL declared on this proxy */
|
||||
struct list block_cond; /* early blocking conditions (chained) */
|
||||
struct list switching_rules; /* content switching rules (chained) */
|
||||
struct server *srv; /* known servers */
|
||||
int srv_act, srv_bck; /* # of running servers */
|
||||
int tot_wact, tot_wbck; /* total weights of active and backup servers */
|
||||
@@ -150,6 +151,15 @@ struct proxy {
|
||||
struct chunk errmsg[HTTP_ERR_SIZE]; /* default or customized error messages for known errors */
|
||||
};
|
||||
|
||||
struct switching_rule {
|
||||
struct list list; /* list linked to from the proxy */
|
||||
struct acl_cond *cond; /* acl condition to meet */
|
||||
union {
|
||||
struct proxy *backend; /* target backend */
|
||||
char *name; /* target backend name during config parsing */
|
||||
} be;
|
||||
};
|
||||
|
||||
extern struct proxy *proxy;
|
||||
|
||||
#endif /* _TYPES_PROXY_H */
|
||||
|
||||
Reference in New Issue
Block a user