Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 14aabf7

Browse files
committed
Update README
1 parent 8ae50a4 commit 14aabf7

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

README

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
This is an example skeleton for developing out-of-tree Varnish vmods.
1+
This is an example skeleton for developing out-of-tree Varnish
2+
vmods. It implements the "Hello, World!" as a vmod callback. Not
3+
particular useful in good hello world tradition, but demonstrates how
4+
to get the glue around a vmod working.
5+
6+
The source tree is based on autotools to configure the building, and
7+
does also have the necessary bits in place to do functional unit tests
8+
using the varnishtest tool.
29

310
Usage:
411
./configure VARNISHSRC=DIR [VMODDIR=DIR]
@@ -11,4 +18,16 @@ Optionally you can also set the vmod install dir by adding VMODDIR=DIR
1118
(defaults to the pkg-config discovered directory from your Varnish
1219
installation).
1320

21+
Make targets:
22+
make - builds the vmod
23+
make install - installs your vmod in VMODDIR
24+
make check - runs the unit tests in src/tests/*.vtc
25+
26+
In your VCL you could then use this vmod along the following lines:
27+
28+
import example;
1429

30+
sub vcl_deliver {
31+
# This sets resp.http.hello to "Hello, World"
32+
set resp.http.hello = example.hello("World");
33+
}

0 commit comments

Comments
 (0)