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?
_______________________________________________
varnish-dev mailing list
varnish-dev@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
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?
_______________________________________________
varnish-dev mailing list
varnish-dev@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev