struct cli;
struct vsb;
struct sess;
+struct director;
struct object;
struct objhead;
struct objexp;
const char **hashptr;
};
-/* -------------------------------------------------------------------
- * A director is a piece of code which selects one of possibly multiple
- * backends to use.
- */
-
-typedef struct backend *vdi_choose_f(struct sess *sp);
-typedef void vdi_fini_f(struct director *d);
-
-struct director {
- unsigned magic;
-#define DIRECTOR_MAGIC 0x3336351d
- const char *name;
- vdi_choose_f *choose;
- vdi_fini_f *fini;
- void *priv;
-};
/* -------------------------------------------------------------------*/
struct vbp_target;
struct vrt_backend_probe;
+/* -------------------------------------------------------------------
+ * A director is a piece of code which selects one of possibly multiple
+ * backends to use.
+ */
+
+typedef struct backend *vdi_choose_f(struct sess *sp);
+typedef void vdi_fini_f(struct director *d);
+
+struct director {
+ unsigned magic;
+#define DIRECTOR_MAGIC 0x3336351d
+ const char *name;
+ vdi_choose_f *choose;
+ vdi_fini_f *fini;
+ void *priv;
+};
+
/* Backend indstance */
struct backend {
unsigned magic;
CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
AN(sp->bereq);
- CHECK_OBJ_NOTNULL(sp->director, DIRECTOR_MAGIC);
+ AN(sp->director);
i = Fetch(sp);
- CHECK_OBJ_NOTNULL(sp->director, DIRECTOR_MAGIC);
+ AN(sp->director);
if (i) {
-VSL(SLT_Debug, sp->fd, "Fetch = %d", i);
sp->err_code = 503;
sp->step = STP_ERROR;
VBE_free_bereq(sp->bereq);
/* By default we use the first backend */
AZ(sp->director);
sp->director = sp->vcl->director[0];
- CHECK_OBJ_NOTNULL(sp->director, DIRECTOR_MAGIC);
+ AN(sp->director);
VCL_recv_method(sp);
CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
CHECK_OBJ_ORNULL(w->nobj, OBJECT_MAGIC);
CHECK_OBJ_ORNULL(w->nobjhead, OBJHEAD_MAGIC);
- CHECK_OBJ_ORNULL(sp->director, DIRECTOR_MAGIC);
switch (sp->step) {
#define STEP(l,u) \
#include "shmlog.h"
#include "cache.h"
+#include "cache_backend.h"
#include "vrt.h"
/*--------------------------------------------------------------------*/
#include "shmlog.h"
#include "cache.h"
+#include "cache_backend.h"
#include "vrt.h"
/*--------------------------------------------------------------------*/
#include "shmlog.h"
#include "cache.h"
+#include "cache_backend.h"
#include "vrt.h"
/*--------------------------------------------------------------------*/
CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
CHECK_OBJ_NOTNULL(sp->bereq, BEREQ_MAGIC);
- CHECK_OBJ_NOTNULL(sp->director, DIRECTOR_MAGIC);
+ AN(sp->director);
assert(sp->obj->busy != 0);
w = sp->wrk;
bereq = sp->bereq;