bo access from VFP
Guillaume Quintard
guillaume.quintard at gmail.com
Mon Dec 27 02:11:50 UTC 2021
Happy holidays to everyone,
Unless I'm mistaken, there's no way for a VFP to access the busyobj, and
was wondering if that could change as I need it to retrieve a vmod_priv.
For some context, I stumbled on this while working on this vmod:
https://github.com/gquintard/vmod_rers/tree/v0.0.2
(It's in rust, and I'm using it to explore what kind of bindings we need. I
already have a couple of examples for VDP[1] and VFP[2] in the crate[3]
repo, but of course they don't need as much as a real vmod.)
With vmod_rers, the user is able to add regex/sub pairs on a per-request
basis [4], and they will be acted upon by the VDP. To store and retrieve
the pairs I use the regular "fake vrt_ctx trick"[4], since the VDP has
access to the req struct, it's very easy to build.
However, I'm unable to do the same thing on the VFP side since I have
neither a req (fair) nor a bo.
Is there a big reason for not having access to it, or is it just that
nobody asked for it until now?
Happy new year!
[1]: https://github.com/gquintard/varnish-rs/tree/main/examples/vmod_vdp
[2]: https://github.com/gquintard/varnish-rs/tree/main/examples/vmod_vfp
[3]: https://crates.io/crates/varnish
[4]: https://github.com/gquintard/vmod_rers/blob/v0.0.2/vmod.vcc#L47
[5]: https://github.com/gquintard/vmod_rers/blob/v0.0.2/src/lib.rs#L221
--
Guillaume Quintard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20211226/50e78eb6/attachment.html>
More information about the varnish-dev
mailing list