[master] 025f102 Firmly split "director" from "backend".
Poul-Henning Kamp
phk at FreeBSD.org
Wed Oct 1 21:05:14 CEST 2014
commit 025f1029abfb75069996b605a6ebf52cea5b4c23
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Oct 1 18:14:38 2014 +0000
Firmly split "director" from "backend".
A director is noe an abstract entity which can fetch something for us,
however it decides to do that and using whatever protocol (or none).
A backend is a network endpoint designated by a precise triplet of
VCL backend name
IPv4 address (incl port)
IPv6 address (incl port)
Backends are _also_ "simple" directors, but have an extra layer of
complexity in order to enable connection management, including
connection reuse across vcl.use commands.
diff --git a/bin/varnishd/Makefile.am b/bin/varnishd/Makefile.am
index 26ad745..64fd313 100644
--- a/bin/varnishd/Makefile.am
+++ b/bin/varnishd/Makefile.am
@@ -16,7 +16,7 @@ varnishd_SOURCES = \
cache/cache_ban.c \
cache/cache_busyobj.c \
cache/cache_cli.c \
- cache/cache_dir.c \
+ cache/cache_director.c \
cache/cache_esi_deliver.c \
cache/cache_esi_fetch.c \
cache/cache_esi_parse.c \
@@ -91,6 +91,7 @@ varnishd_SOURCES = \
noinst_HEADERS = \
cache/cache_backend.h \
+ cache/cache_director.h \
cache/cache_esi.h \
common/heritage.h \
builtin_vcl.h \
diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index 2032787..0918301 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -40,6 +40,7 @@
#include "cache.h"
#include "cache_backend.h"
+#include "cache_director.h"
#include "vrt.h"
#include "vtcp.h"
diff --git a/bin/varnishd/cache/cache_backend.h b/bin/varnishd/cache/cache_backend.h
index fefb7bd..e809926 100644
--- a/bin/varnishd/cache/cache_backend.h
+++ b/bin/varnishd/cache/cache_backend.h
@@ -26,14 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * Backend and Director APIs
- *
- * A director ("VDI") is an abstract entity which can either satisfy a
- * backend fetch request or select another director for the job.
- *
- * In theory a director does not have to talk HTTP over TCP, it can satisfy
- * the backend request using any means it wants, although this is presently
- * not implemented.
+ * Backend and APIs
*
* A backend ("VBE") is a director which talks HTTP over TCP.
*
@@ -49,39 +42,6 @@ struct vbc;
struct vrt_backend_probe;
/*--------------------------------------------------------------------
- * A director is a piece of code which selects one of possibly multiple
- * backends to use.
- */
-
-typedef struct vbc *vdi_getfd_f(const struct director *, struct busyobj *);
-typedef unsigned vdi_healthy_f(const struct director *, double *changed);
-typedef const struct director *vdi_resolve_f(const struct director *,
- struct worker *, struct busyobj *);
-typedef int vdi_gethdrs_f(const struct director *, struct worker *,
- struct busyobj *);
-typedef int vdi_getbody_f(const struct director *, struct worker *,
- struct busyobj *);
-typedef void vdi_finish_f(const struct director *, struct worker *,
- struct busyobj *);
-typedef struct suckaddr *vdi_suckaddr_f(const struct director *,
- struct worker *, struct busyobj *);
-
-struct director {
- unsigned magic;
-#define DIRECTOR_MAGIC 0x3336351d
- const char *name;
- char *vcl_name;
- vdi_getfd_f *getfd;
- vdi_healthy_f *healthy;
- vdi_resolve_f *resolve;
- vdi_gethdrs_f *gethdrs;
- vdi_getbody_f *getbody;
- vdi_finish_f *finish;
- vdi_suckaddr_f *suckaddr;
- void *priv;
-};
-
-/*--------------------------------------------------------------------
* An instance of a backend from a VCL program.
*/
@@ -154,6 +114,7 @@ void VBE_DropRefLocked(struct backend *b, const struct acct_bereq *);
unsigned VBE_Healthy(const struct backend *b, double *changed);
void VBE_InitCfg(void);
struct backend *VBE_AddBackend(struct cli *cli, const struct vrt_backend *vb);
+void VBE_Poll(void);
/* cache_backend_poll.c */
void VBP_Insert(struct backend *b, struct vrt_backend_probe const *p,
@@ -162,21 +123,6 @@ void VBP_Remove(struct backend *b, struct vrt_backend_probe const *p);
void VBP_Use(const struct backend *b, const struct vrt_backend_probe *p);
void VBP_Summary(struct cli *cli, const struct vbp_target *vt);
-/* cache_dir.c */
-int VDI_GetHdr(struct worker *wrk, struct busyobj *bo);
-int VDI_GetBody(const struct director *d, struct worker *wrk,
- struct busyobj *bo);
-void VDI_Finish(const struct director *d, struct worker *wrk,
- struct busyobj *bo);
-struct vbc *VDI_GetFd(const struct director *d, struct worker *wrk,
- struct busyobj *);
-int VDI_Healthy(const struct director *);
-struct suckaddr *VDI_Suckaddr(const struct director *d, struct worker *wrk,
- struct busyobj *bo);
-void VDI_AddHostHeader(struct http *to, const struct vbc *vbc);
-void VBE_Poll(void);
-void VDI_Init(void);
-
/* cache_backend_poll.c */
void VBP_Init(void);
diff --git a/bin/varnishd/cache/cache_dir.c b/bin/varnishd/cache/cache_dir.c
deleted file mode 100644
index 9d5b31b..0000000
--- a/bin/varnishd/cache/cache_dir.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*-
- * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2014 Varnish Software AS
- * All rights reserved.
- *
- * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Abstract director API
- *
- * The abstract director API does not know how we talk to the backend or
- * if there even is one in the usual meaning of the word.
- *
- */
-
-#include "config.h"
-
-#include "cache.h"
-
-#include "cache_backend.h"
-
-/* Resolve director --------------------------------------------------*/
-
-static const struct director *
-vdi_resolve(struct worker *wrk, struct busyobj *bo, const struct director *d)
-{
-
- CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
- CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
-
- if (d == NULL) {
- VSLb(bo->vsl, SLT_FetchError, "No backend");
- return (NULL);
- }
-
- while (d != NULL && d->resolve != NULL) {
- CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
- d = d->resolve(d, wrk, bo);
- }
- CHECK_OBJ_ORNULL(d, DIRECTOR_MAGIC);
- if (d == NULL)
- VSLb(bo->vsl, SLT_FetchError, "Backend selection failed");
- bo->director_resp = d;
- return (d);
-}
-
-/* Get a set of response headers -------------------------------------*/
-
-int
-VDI_GetHdr(struct worker *wrk, struct busyobj *bo)
-{
- const struct director *d;
- int i = -1;
-
- CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
- CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
-
- d = vdi_resolve(wrk, bo, bo->director_req);
- if (d != NULL) {
- AN(d->gethdrs);
- bo->director_state = DIR_S_HDRS;
- i = d->gethdrs(d, wrk, bo);
- }
- if (i)
- bo->director_state = DIR_S_NULL;
- return (i);
-}
-
-/* Setup body fetch --------------------------------------------------*/
-
-int
-VDI_GetBody(const struct director *d, struct worker *wrk, struct busyobj *bo)
-{
-
- CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
- CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
- CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
-
- AZ(d->resolve);
- AN(d->getbody);
-
- bo->director_state = DIR_S_BODY;
- return (d->getbody(d, wrk, bo));
-}
-
-/* Finish fetch ------------------------------------------------------*/
-
-void
-VDI_Finish(const struct director *d, struct worker *wrk, struct busyobj *bo)
-{
-
- CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
- CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
- CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
-
- AZ(d->resolve);
- AN(d->finish);
-
- assert(bo->director_state != DIR_S_NULL);
- bo->director_state = DIR_S_NULL;
-
- d->finish(d, wrk, bo);
-}
-
-/* Get a connection --------------------------------------------------*/
-
-struct vbc *
-VDI_GetFd(const struct director *d, struct worker *wrk, struct busyobj *bo)
-{
-
- CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
- CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
- CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
-
- d = vdi_resolve(wrk, bo, d);
- if (d == NULL)
- return (NULL);
-
- AN(d->getfd);
- return (d->getfd(d, bo));
-}
-
-/* Check health ------------------------------------------------------
- */
-
-int
-VDI_Healthy(const struct director *d)
-{
-
- CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
- AN(d->healthy);
- return (d->healthy(d, NULL));
-}
-
-/* Get suckaddr ------------------------------------------------------*/
-
-struct suckaddr *
-VDI_Suckaddr(const struct director *d, struct worker *wrk, struct busyobj *bo)
-{
- CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
- CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
- CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
-
- AN(d->suckaddr);
- return (d->suckaddr(d, wrk, bo));
-}
diff --git a/bin/varnishd/cache/cache_director.c b/bin/varnishd/cache/cache_director.c
new file mode 100644
index 0000000..7a961ad
--- /dev/null
+++ b/bin/varnishd/cache/cache_director.c
@@ -0,0 +1,167 @@
+/*-
+ * Copyright (c) 2006 Verdens Gang AS
+ * Copyright (c) 2006-2014 Varnish Software AS
+ * All rights reserved.
+ *
+ * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Abstract director API
+ *
+ * The abstract director API does not know how we talk to the backend or
+ * if there even is one in the usual meaning of the word.
+ *
+ */
+
+#include "config.h"
+
+#include "cache.h"
+
+// #include "cache_backend.h"
+#include "cache_director.h"
+
+/* Resolve director --------------------------------------------------*/
+
+static const struct director *
+vdi_resolve(struct worker *wrk, struct busyobj *bo, const struct director *d)
+{
+
+ CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
+ CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
+
+ if (d == NULL) {
+ VSLb(bo->vsl, SLT_FetchError, "No backend");
+ return (NULL);
+ }
+
+ while (d != NULL && d->resolve != NULL) {
+ CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
+ d = d->resolve(d, wrk, bo);
+ }
+ CHECK_OBJ_ORNULL(d, DIRECTOR_MAGIC);
+ if (d == NULL)
+ VSLb(bo->vsl, SLT_FetchError, "Backend selection failed");
+ bo->director_resp = d;
+ return (d);
+}
+
+/* Get a set of response headers -------------------------------------*/
+
+int
+VDI_GetHdr(struct worker *wrk, struct busyobj *bo)
+{
+ const struct director *d;
+ int i = -1;
+
+ CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
+ CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
+
+ d = vdi_resolve(wrk, bo, bo->director_req);
+ if (d != NULL) {
+ AN(d->gethdrs);
+ bo->director_state = DIR_S_HDRS;
+ i = d->gethdrs(d, wrk, bo);
+ }
+ if (i)
+ bo->director_state = DIR_S_NULL;
+ return (i);
+}
+
+/* Setup body fetch --------------------------------------------------*/
+
+int
+VDI_GetBody(const struct director *d, struct worker *wrk, struct busyobj *bo)
+{
+
+ CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
+ CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
+ CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
+
+ AZ(d->resolve);
+ AN(d->getbody);
+
+ bo->director_state = DIR_S_BODY;
+ return (d->getbody(d, wrk, bo));
+}
+
+/* Finish fetch ------------------------------------------------------*/
+
+void
+VDI_Finish(const struct director *d, struct worker *wrk, struct busyobj *bo)
+{
+
+ CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
+ CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
+ CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
+
+ AZ(d->resolve);
+ AN(d->finish);
+
+ assert(bo->director_state != DIR_S_NULL);
+ bo->director_state = DIR_S_NULL;
+
+ d->finish(d, wrk, bo);
+}
+
+/* Get a connection --------------------------------------------------*/
+
+struct vbc *
+VDI_GetFd(const struct director *d, struct worker *wrk, struct busyobj *bo)
+{
+
+ CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
+ CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
+ CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
+
+ d = vdi_resolve(wrk, bo, d);
+ if (d == NULL)
+ return (NULL);
+
+ AN(d->getfd);
+ return (d->getfd(d, bo));
+}
+
+/* Check health ------------------------------------------------------
+ */
+
+int
+VDI_Healthy(const struct director *d)
+{
+
+ CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
+ AN(d->healthy);
+ return (d->healthy(d, NULL));
+}
+
+/* Get suckaddr ------------------------------------------------------*/
+
+struct suckaddr *
+VDI_Suckaddr(const struct director *d, struct worker *wrk, struct busyobj *bo)
+{
+ CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
+ CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
+ CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
+
+ AN(d->suckaddr);
+ return (d->suckaddr(d, wrk, bo));
+}
diff --git a/bin/varnishd/cache/cache_director.h b/bin/varnishd/cache/cache_director.h
new file mode 100644
index 0000000..2c5e72f
--- /dev/null
+++ b/bin/varnishd/cache/cache_director.h
@@ -0,0 +1,86 @@
+/*-
+ * Copyright (c) 2006 Verdens Gang AS
+ * Copyright (c) 2006-2014 Varnish Software AS
+ * All rights reserved.
+ *
+ * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Director APIs
+ *
+ * A director ("VDI") is an abstract entity which can either satisfy a
+ * backend fetch request or select another director for the job.
+ *
+ * In theory a director does not have to talk HTTP over TCP, it can satisfy
+ * the backend request using any means it wants, although this is presently
+ * not implemented.
+ *
+ */
+
+/*--------------------------------------------------------------------
+ * A director is a piece of code which selects one of possibly multiple
+ * backends to use.
+ */
+
+typedef struct vbc *vdi_getfd_f(const struct director *, struct busyobj *);
+typedef unsigned vdi_healthy_f(const struct director *, double *changed);
+typedef const struct director *vdi_resolve_f(const struct director *,
+ struct worker *, struct busyobj *);
+typedef int vdi_gethdrs_f(const struct director *, struct worker *,
+ struct busyobj *);
+typedef int vdi_getbody_f(const struct director *, struct worker *,
+ struct busyobj *);
+typedef void vdi_finish_f(const struct director *, struct worker *,
+ struct busyobj *);
+typedef struct suckaddr *vdi_suckaddr_f(const struct director *,
+ struct worker *, struct busyobj *);
+
+struct director {
+ unsigned magic;
+#define DIRECTOR_MAGIC 0x3336351d
+ const char *name;
+ char *vcl_name;
+ vdi_getfd_f *getfd;
+ vdi_healthy_f *healthy;
+ vdi_resolve_f *resolve;
+ vdi_gethdrs_f *gethdrs;
+ vdi_getbody_f *getbody;
+ vdi_finish_f *finish;
+ vdi_suckaddr_f *suckaddr;
+ void *priv;
+};
+
+/* cache_director.c */
+int VDI_GetHdr(struct worker *wrk, struct busyobj *bo);
+int VDI_GetBody(const struct director *d, struct worker *wrk,
+ struct busyobj *bo);
+void VDI_Finish(const struct director *d, struct worker *wrk,
+ struct busyobj *bo);
+struct vbc *VDI_GetFd(const struct director *d, struct worker *wrk,
+ struct busyobj *);
+int VDI_Healthy(const struct director *);
+struct suckaddr *VDI_Suckaddr(const struct director *d, struct worker *wrk,
+ struct busyobj *bo);
+void VDI_AddHostHeader(struct http *to, const struct vbc *vbc);
+void VDI_Init(void);
+
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 030c1bb..03e366d 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -35,7 +35,7 @@
#include <stdlib.h>
#include "cache.h"
-#include "cache_backend.h"
+#include "cache_director.h"
#include "vend.h"
#include "hash/hash_slinger.h"
#include "vcl.h"
diff --git a/bin/varnishd/cache/cache_http1_fetch.c b/bin/varnishd/cache/cache_http1_fetch.c
index 7c61514..1b3514a 100644
--- a/bin/varnishd/cache/cache_http1_fetch.c
+++ b/bin/varnishd/cache/cache_http1_fetch.c
@@ -38,6 +38,7 @@
#include "hash/hash_slinger.h"
#include "cache_backend.h"
+#include "cache_director.h"
#include "vcli_priv.h"
#include "vtcp.h"
#include "vtim.h"
diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index 15b8daa..d949059 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -34,6 +34,7 @@
#include "cache.h"
#include "cache_backend.h"
+#include "cache_director.h"
#include "common/heritage.h"
#include "vcli_priv.h"
diff --git a/bin/varnishd/cache/cache_pipe.c b/bin/varnishd/cache/cache_pipe.c
index 3d17735..a27e3de 100644
--- a/bin/varnishd/cache/cache_pipe.c
+++ b/bin/varnishd/cache/cache_pipe.c
@@ -37,6 +37,7 @@
#include "cache.h"
#include "cache_backend.h"
+#include "cache_director.h"
#include "vtcp.h"
#include "vtim.h"
diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c
index faae807..a49da52 100644
--- a/bin/varnishd/cache/cache_vrt.c
+++ b/bin/varnishd/cache/cache_vrt.c
@@ -37,7 +37,7 @@
#include "cache.h"
-#include "cache_backend.h"
+#include "cache_director.h"
#include "hash/hash_slinger.h"
#include "vav.h"
#include "vcl.h"
diff --git a/bin/varnishd/cache/cache_vrt_var.c b/bin/varnishd/cache/cache_vrt_var.c
index 489a074..8448317 100644
--- a/bin/varnishd/cache/cache_vrt_var.c
+++ b/bin/varnishd/cache/cache_vrt_var.c
@@ -39,6 +39,7 @@
#include "hash/hash_slinger.h"
#include "cache_backend.h"
+#include "cache_director.h"
#include "vrt.h"
#include "vrt_obj.h"
#include "vsa.h"
diff --git a/lib/libvmod_directors/fall_back.c b/lib/libvmod_directors/fall_back.c
index a317e46..a3d2a9c 100644
--- a/lib/libvmod_directors/fall_back.c
+++ b/lib/libvmod_directors/fall_back.c
@@ -31,7 +31,7 @@
#include <stdlib.h>
#include "cache/cache.h"
-#include "cache/cache_backend.h"
+#include "cache/cache_director.h"
#include "vrt.h"
#include "vcc_if.h"
diff --git a/lib/libvmod_directors/hash.c b/lib/libvmod_directors/hash.c
index 6ff2a77..e7b63a0 100644
--- a/lib/libvmod_directors/hash.c
+++ b/lib/libvmod_directors/hash.c
@@ -32,7 +32,7 @@
#include <stdlib.h>
#include "cache/cache.h"
-#include "cache/cache_backend.h"
+#include "cache/cache_director.h"
#include "vrt.h"
#include "vbm.h"
diff --git a/lib/libvmod_directors/random.c b/lib/libvmod_directors/random.c
index d83b840..a693bc6 100644
--- a/lib/libvmod_directors/random.c
+++ b/lib/libvmod_directors/random.c
@@ -32,7 +32,7 @@
#include <stdlib.h>
#include "cache/cache.h"
-#include "cache/cache_backend.h"
+#include "cache/cache_director.h"
#include "vrt.h"
#include "vbm.h"
diff --git a/lib/libvmod_directors/round_robin.c b/lib/libvmod_directors/round_robin.c
index 1f7d9e8..39f6b3d 100644
--- a/lib/libvmod_directors/round_robin.c
+++ b/lib/libvmod_directors/round_robin.c
@@ -31,7 +31,7 @@
#include <stdlib.h>
#include "cache/cache.h"
-#include "cache/cache_backend.h"
+#include "cache/cache_director.h"
#include "vrt.h"
#include "vcc_if.h"
diff --git a/lib/libvmod_directors/vdir.c b/lib/libvmod_directors/vdir.c
index 52cf4c4..3488026 100644
--- a/lib/libvmod_directors/vdir.c
+++ b/lib/libvmod_directors/vdir.c
@@ -31,7 +31,7 @@
#include <stdlib.h>
#include "cache/cache.h"
-#include "cache/cache_backend.h"
+#include "cache/cache_director.h"
#include "vrt.h"
#include "vbm.h"
diff --git a/lib/libvmod_std/vmod_std.c b/lib/libvmod_std/vmod_std.c
index 0778637..4bba4b7 100644
--- a/lib/libvmod_std/vmod_std.c
+++ b/lib/libvmod_std/vmod_std.c
@@ -44,7 +44,7 @@
#include "vtim.h"
#include "cache/cache.h"
-#include "cache/cache_backend.h"
+#include "cache/cache_director.h"
#include "vcc_if.h"
More information about the varnish-commit
mailing list