REORG: include: move lb_chash.h to haproxy/lb_chash{,-t}.h

Nothing fancy, includes were already OK. The proto didn't reference the
type, this was fixed. Still references proxy.h and server.h from types/.
This commit is contained in:
Willy Tarreau 2020-06-04 14:34:27 +02:00
parent 52d88725ab
commit fbe8da3320
5 changed files with 12 additions and 12 deletions

View File

@ -1,5 +1,5 @@
/* /*
* include/types/lb_chash.h * include/haproxy/lb_chash-t.h
* Types for Consistent Hash LB algorithm. * Types for Consistent Hash LB algorithm.
* *
* Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu * Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
@ -19,10 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _TYPES_LB_CHASH_H #ifndef _HAPROXY_LB_CHASH_T_H
#define _TYPES_LB_CHASH_H #define _HAPROXY_LB_CHASH_T_H
#include <haproxy/api-t.h>
#include <import/ebtree.h> #include <import/ebtree.h>
#include <import/eb32tree.h> #include <import/eb32tree.h>
@ -32,7 +31,7 @@ struct lb_chash {
struct eb32_node *last; /* last node found in case of round robin (or NULL) */ struct eb32_node *last; /* last node found in case of round robin (or NULL) */
}; };
#endif /* _TYPES_LB_CHASH_H */ #endif /* _HAPROXY_LB_CHASH_T_H */
/* /*
* Local variables: * Local variables:

View File

@ -1,5 +1,5 @@
/* /*
* include/proto/lb_chash.h * include/haproxy/lb_chash.h
* Function declarations for Consistent Hash LB algorithm. * Function declarations for Consistent Hash LB algorithm.
* *
* Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu * Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
@ -19,10 +19,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _PROTO_LB_CHASH_H #ifndef _HAPROXY_LB_CHASH_H
#define _PROTO_LB_CHASH_H #define _HAPROXY_LB_CHASH_H
#include <haproxy/api.h> #include <haproxy/api.h>
#include <haproxy/lb_chash-t.h>
#include <types/proxy.h> #include <types/proxy.h>
#include <types/server.h> #include <types/server.h>
@ -30,7 +31,7 @@ void chash_init_server_tree(struct proxy *p);
struct server *chash_get_next_server(struct proxy *p, struct server *srvtoavoid); struct server *chash_get_next_server(struct proxy *p, struct server *srvtoavoid);
struct server *chash_get_server_hash(struct proxy *p, unsigned int hash, const struct server *avoid); struct server *chash_get_server_hash(struct proxy *p, unsigned int hash, const struct server *avoid);
#endif /* _PROTO_LB_CHASH_H */ #endif /* _HAPROXY_LB_CHASH_H */
/* /*
* Local variables: * Local variables:

View File

@ -22,10 +22,10 @@
#ifndef _TYPES_BACKEND_H #ifndef _TYPES_BACKEND_H
#define _TYPES_BACKEND_H #define _TYPES_BACKEND_H
#include <haproxy/lb_chash-t.h>
#include <haproxy/api-t.h> #include <haproxy/api-t.h>
#include <haproxy/thread.h> #include <haproxy/thread.h>
#include <types/lb_chash.h>
#include <types/lb_fas.h> #include <types/lb_fas.h>
#include <types/lb_fwlc.h> #include <types/lb_fwlc.h>
#include <types/lb_fwrr.h> #include <types/lb_fwrr.h>

View File

@ -25,6 +25,7 @@
#include <haproxy/http.h> #include <haproxy/http.h>
#include <haproxy/http_htx.h> #include <haproxy/http_htx.h>
#include <haproxy/htx.h> #include <haproxy/htx.h>
#include <haproxy/lb_chash.h>
#include <haproxy/obj_type.h> #include <haproxy/obj_type.h>
#include <haproxy/ticks.h> #include <haproxy/ticks.h>
#include <haproxy/time.h> #include <haproxy/time.h>
@ -37,7 +38,6 @@
#include <proto/backend.h> #include <proto/backend.h>
#include <proto/channel.h> #include <proto/channel.h>
#include <proto/checks.h> #include <proto/checks.h>
#include <proto/lb_chash.h>
#include <proto/lb_fas.h> #include <proto/lb_fas.h>
#include <proto/lb_fwlc.h> #include <proto/lb_fwlc.h>
#include <proto/lb_fwrr.h> #include <proto/lb_fwrr.h>

View File

@ -43,6 +43,7 @@
#include <haproxy/errors.h> #include <haproxy/errors.h>
#include <haproxy/frontend.h> #include <haproxy/frontend.h>
#include <haproxy/http_rules.h> #include <haproxy/http_rules.h>
#include <haproxy/lb_chash.h>
#include <haproxy/mailers-t.h> #include <haproxy/mailers-t.h>
#include <haproxy/obj_type-t.h> #include <haproxy/obj_type-t.h>
#include <haproxy/pool.h> #include <haproxy/pool.h>
@ -63,7 +64,6 @@
#include <proto/checks.h> #include <proto/checks.h>
#include <proto/stats.h> #include <proto/stats.h>
#include <proto/filters.h> #include <proto/filters.h>
#include <proto/lb_chash.h>
#include <proto/lb_fas.h> #include <proto/lb_fas.h>
#include <proto/lb_fwlc.h> #include <proto/lb_fwlc.h>
#include <proto/lb_fwrr.h> #include <proto/lb_fwrr.h>