Commit 14aabf7d authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Update README

parent 8ae50a4b
This is an example skeleton for developing out-of-tree Varnish vmods.
This is an example skeleton for developing out-of-tree Varnish
vmods. It implements the "Hello, World!" as a vmod callback. Not
particular useful in good hello world tradition, but demonstrates how
to get the glue around a vmod working.
The source tree is based on autotools to configure the building, and
does also have the necessary bits in place to do functional unit tests
using the varnishtest tool.
Usage:
./configure VARNISHSRC=DIR [VMODDIR=DIR]
......@@ -11,4 +18,16 @@ Optionally you can also set the vmod install dir by adding VMODDIR=DIR
(defaults to the pkg-config discovered directory from your Varnish
installation).
Make targets:
make - builds the vmod
make install - installs your vmod in VMODDIR
make check - runs the unit tests in src/tests/*.vtc
In your VCL you could then use this vmod along the following lines:
import example;
sub vcl_deliver {
# This sets resp.http.hello to "Hello, World"
set resp.http.hello = example.hello("World");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment