REORG: include: move backend.h to haproxy/backend{,-t}.h
The files remained mostly unchanged since they were OK. However, half of the users didn't need to include them, and about as many actually needed to have it and used to find functions like srv_currently_usable() through a long chain that broke when moving the file.
This commit is contained in:
parent
6c58ab0304
commit
4980160ecc
@ -15,6 +15,7 @@
|
||||
|
||||
#include <haproxy/action-t.h>
|
||||
#include <haproxy/applet.h>
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <common/cfgparse.h>
|
||||
#include <haproxy/frontend.h>
|
||||
@ -26,7 +27,6 @@
|
||||
#include <haproxy/pool.h>
|
||||
#include <haproxy/list.h>
|
||||
|
||||
#include <proto/backend.h>
|
||||
#include <haproxy/compression.h>
|
||||
#include <haproxy/pipe.h>
|
||||
#include <haproxy/proxy.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* include/types/backend.h
|
||||
* include/haproxy/backend-t.h
|
||||
* This file assembles definitions for backends
|
||||
*
|
||||
* Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
|
||||
@ -19,17 +19,16 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _TYPES_BACKEND_H
|
||||
#define _TYPES_BACKEND_H
|
||||
#ifndef _HAPROXY_BACKEND_T_H
|
||||
#define _HAPROXY_BACKEND_T_H
|
||||
|
||||
#include <haproxy/lb_chash-t.h>
|
||||
#include <haproxy/lb_fas-t.h>
|
||||
#include <haproxy/lb_fwlc-t.h>
|
||||
#include <haproxy/lb_fwrr-t.h>
|
||||
#include <haproxy/lb_map-t.h>
|
||||
#include <haproxy/thread-t.h>
|
||||
#include <haproxy/api-t.h>
|
||||
#include <haproxy/thread.h>
|
||||
|
||||
#include <types/server.h>
|
||||
|
||||
/* Parameters for lbprm.algo */
|
||||
@ -168,7 +167,7 @@ struct lbprm {
|
||||
void (*server_drop_conn)(struct server *); /* to be called when connection is dropped */
|
||||
};
|
||||
|
||||
#endif /* _TYPES_BACKEND_H */
|
||||
#endif /* _HAPROXY_BACKEND_T_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* include/proto/backend.h
|
||||
* include/haproxy/backend.h
|
||||
* Functions prototypes for the backend.
|
||||
*
|
||||
* Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
|
||||
@ -19,14 +19,13 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _PROTO_BACKEND_H
|
||||
#define _PROTO_BACKEND_H
|
||||
#ifndef _HAPROXY_BACKEND_H
|
||||
#define _HAPROXY_BACKEND_H
|
||||
|
||||
#include <haproxy/backend-t.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/proxy-t.h>
|
||||
#include <haproxy/time.h>
|
||||
|
||||
#include <types/backend.h>
|
||||
#include <types/server.h>
|
||||
#include <types/stream.h>
|
||||
|
||||
@ -144,7 +143,7 @@ static inline int srv_lb_status_changed(const struct server *srv)
|
||||
*/
|
||||
void set_backend_down(struct proxy *be);
|
||||
|
||||
#endif /* _PROTO_BACKEND_H */
|
||||
#endif /* _HAPROXY_BACKEND_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
@ -31,6 +31,7 @@
|
||||
#include <import/ebpttree.h>
|
||||
|
||||
#include <haproxy/arg-t.h>
|
||||
#include <haproxy/backend-t.h>
|
||||
#include <haproxy/check-t.h>
|
||||
#include <haproxy/counters-t.h>
|
||||
#include <haproxy/freq_ctr-t.h>
|
||||
@ -38,7 +39,6 @@
|
||||
#include <haproxy/obj_type-t.h>
|
||||
#include <haproxy/thread-t.h>
|
||||
#include <haproxy/api-t.h>
|
||||
#include <types/backend.h>
|
||||
#include <types/server.h>
|
||||
|
||||
/* values for proxy->state */
|
||||
|
@ -22,6 +22,7 @@
|
||||
#ifndef _PROTO_QUEUE_H
|
||||
#define _PROTO_QUEUE_H
|
||||
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/pool.h>
|
||||
#include <haproxy/proxy-t.h>
|
||||
@ -30,8 +31,6 @@
|
||||
#include <types/stream.h>
|
||||
#include <types/server.h>
|
||||
|
||||
#include <proto/backend.h>
|
||||
|
||||
extern struct pool_head *pool_head_pendconn;
|
||||
|
||||
struct pendconn *pendconn_add(struct stream *strm);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <haproxy/acl.h>
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/channel.h>
|
||||
#include <haproxy/check.h>
|
||||
@ -49,7 +50,6 @@
|
||||
#include <haproxy/global.h>
|
||||
|
||||
#include <haproxy/arg.h>
|
||||
#include <proto/backend.h>
|
||||
#include <haproxy/protocol.h>
|
||||
#include <haproxy/proto_tcp.h>
|
||||
#include <proto/queue.h>
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <haproxy/acl.h>
|
||||
#include <haproxy/action-t.h>
|
||||
#include <haproxy/auth.h>
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/capture.h>
|
||||
#include <common/cfgparse.h>
|
||||
@ -72,7 +73,6 @@
|
||||
|
||||
#include <haproxy/global.h>
|
||||
|
||||
#include <proto/backend.h>
|
||||
#include <haproxy/protocol.h>
|
||||
#include <haproxy/peers.h>
|
||||
#include <haproxy/sample.h>
|
||||
|
@ -58,7 +58,6 @@
|
||||
#include <haproxy/global.h>
|
||||
|
||||
#include <haproxy/arg.h>
|
||||
#include <proto/backend.h>
|
||||
#include <haproxy/fd.h>
|
||||
#include <proto/queue.h>
|
||||
#include <haproxy/port_range.h>
|
||||
|
@ -55,7 +55,6 @@
|
||||
#include <haproxy/global.h>
|
||||
|
||||
#include <haproxy/activity.h>
|
||||
#include <proto/backend.h>
|
||||
#include <haproxy/compression.h>
|
||||
#include <haproxy/fd.h>
|
||||
#include <haproxy/freq_ctr.h>
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include <haproxy/global.h>
|
||||
|
||||
#include <haproxy/arg.h>
|
||||
#include <proto/backend.h>
|
||||
#include <haproxy/freq_ctr.h>
|
||||
#include <proto/stream.h>
|
||||
|
||||
|
@ -123,7 +123,6 @@
|
||||
|
||||
#include <haproxy/activity.h>
|
||||
#include <haproxy/arg.h>
|
||||
#include <proto/backend.h>
|
||||
#include <haproxy/fd.h>
|
||||
#include <haproxy/protocol.h>
|
||||
#include <proto/queue.h>
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
#include <haproxy/acl.h>
|
||||
#include <haproxy/action-t.h>
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/base64.h>
|
||||
#include <haproxy/channel.h>
|
||||
|
@ -16,13 +16,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/tools.h>
|
||||
#include <import/eb32tree.h>
|
||||
|
||||
#include <types/server.h>
|
||||
|
||||
#include <proto/backend.h>
|
||||
#include <proto/queue.h>
|
||||
|
||||
/* Return next tree node after <node> which must still be in the tree, or be
|
||||
|
@ -16,12 +16,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <import/eb32tree.h>
|
||||
|
||||
#include <types/server.h>
|
||||
|
||||
#include <proto/backend.h>
|
||||
#include <proto/queue.h>
|
||||
|
||||
|
||||
|
@ -10,12 +10,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <import/eb32tree.h>
|
||||
|
||||
#include <types/server.h>
|
||||
|
||||
#include <proto/backend.h>
|
||||
#include <proto/queue.h>
|
||||
|
||||
|
||||
|
@ -10,12 +10,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <import/eb32tree.h>
|
||||
|
||||
#include <types/server.h>
|
||||
|
||||
#include <proto/backend.h>
|
||||
#include <proto/queue.h>
|
||||
|
||||
static inline void fwrr_remove_from_tree(struct server *s);
|
||||
|
@ -10,13 +10,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/lb_map.h>
|
||||
#include <import/eb32tree.h>
|
||||
|
||||
#include <types/server.h>
|
||||
|
||||
#include <proto/backend.h>
|
||||
#include <proto/queue.h>
|
||||
|
||||
/* this function updates the map according to server <srv>'s new state.
|
||||
|
@ -41,7 +41,6 @@
|
||||
|
||||
#include <haproxy/capture-t.h>
|
||||
|
||||
#include <proto/backend.h>
|
||||
#include <haproxy/fd.h>
|
||||
#include <haproxy/proto_tcp.h>
|
||||
#include <proto/server.h>
|
||||
|
@ -44,7 +44,7 @@
|
||||
* - a pendconn_add() is only performed by the stream which will own the
|
||||
* pendconn ; the pendconn is allocated at this moment and returned ; it is
|
||||
* added to either the server or the proxy's queue while holding this
|
||||
* queue's lock.
|
||||
s * queue's lock.
|
||||
*
|
||||
* - the pendconn is then met by a thread walking over the proxy or server's
|
||||
* queue with the respective lock held. This lock is exclusive and the
|
||||
@ -69,6 +69,7 @@
|
||||
* - a pendconn doesn't switch between queues, it stays where it is.
|
||||
*/
|
||||
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/http_rules.h>
|
||||
#include <haproxy/pool.h>
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <haproxy/applet-t.h>
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <import/xxhash.h>
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <haproxy/applet-t.h>
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <common/cfgparse.h>
|
||||
#include <haproxy/channel.h>
|
||||
@ -57,7 +58,6 @@
|
||||
#include <haproxy/version.h>
|
||||
#include <haproxy/base64.h>
|
||||
|
||||
#include <proto/backend.h>
|
||||
#include <haproxy/fd.h>
|
||||
#include <haproxy/freq_ctr.h>
|
||||
#include <haproxy/pipe.h>
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <haproxy/acl.h>
|
||||
#include <haproxy/action.h>
|
||||
#include <haproxy/applet.h>
|
||||
#include <haproxy/backend.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/capture.h>
|
||||
#include <common/cfgparse.h>
|
||||
@ -50,7 +51,6 @@
|
||||
|
||||
#include <haproxy/activity.h>
|
||||
#include <haproxy/arg.h>
|
||||
#include <proto/backend.h>
|
||||
#include <haproxy/fd.h>
|
||||
#include <haproxy/freq_ctr.h>
|
||||
#include <proto/stream.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user