[PATCH] add documentation about backend naming for VMOD authors

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Nov 2 12:27:37 CET 2015


--------
In message <CABoVN9CLPe=L2wHFDQEmz+vNJ+tJni5S=9nzBnrVZ=SCVCFM9Q at mail.gmail.com>, Dridi Bouke
lmoune writes:

Let me try to summarize at an even higher level:

* All "struct director" (= VCL_BACKEND) have a "vcl_name" which can
  be queried from VCL.  VMODs are responsible for doing something
  sensible here.

* struct director without a struct backend do not appear in CLI/VSM
  unless the VMOD implements all the stuff for this.

* struct director with a struct backend, defined in VCL is always
  in CLI/VSM, and the vcl_name is the name from the VCL namespace.

* struct director with a struct backend, created by VMOD, may or
  may not be in CLI/VSM, at the VMODs discretion.

* If it is in CLI/VSM, the VRT() used to register it there may
  modify the vcl_name to make sure it is globally unique.
  (In practice: vcl-unique, because the namespace is $VCL.$BACKEND)

* If the VMOD ensures there are no duplicate vcl_names in the
  first place, the vcl_name will not be touched.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-dev mailing list