RFC: unify directors and backends vcl interface
Nils Goroll
slink at schokola.de
Wed Sep 19 10:14:16 UTC 2018
backends and directors are both represented as VCL_BACKEND aka struct director,
yet VCL authors need to differentiate between them:
* backends are represented directly as the BACKEND type
* directors are represented as vmod objects, for which a method (.backend() by
convention only) returns a BACKEND
I don't see why we would need to make this distinction and getting rid of it
would simplify VCL code generation and -refactoring. Consider the case having
backend "b" which you now want to layer under director "d": all instances of "b"
in the vcl now need to be replaced with something like "d.backend()".
I see two obvious options to simplify:
* implement backends as vmod objects
and/or
* add a default getter method for objects such that
d == d.backend()
Opinions?
More information about the varnish-dev
mailing list