Commit 349256d6 authored by Federico G. Schwindt's avatar Federico G. Schwindt

Sync with vmod.vcc

parent 2d1a8c11
......@@ -23,7 +23,7 @@ DESCRIPTION
Vmod_std contains basic functions which are part and parcel of Varnish,
but which for reasons of architecture fit better in a VMOD.
One specific class of functions in vmod_std is the conversions functions
One particular class of functions in vmod_std is the conversions functions
which all have the form::
TYPE type(STRING, TYPE)
......@@ -127,9 +127,10 @@ duration
Prototype
DURATION duration(STRING s, DURATION fallback)
Description
Converts the string *s* to seconds. *s* can be quantified with
the usual s (seconds), m (minutes), h (hours), d (days) and w
(weeks) units. If *s* fails to parse, *fallback* will be returned.
Converts the string *s* to seconds. *s* must be quantified
with ms (milliseconds), s (seconds), m (minutes), h (hours),
d (days) or w (weeks) units. If *s* fails to parse,
*fallback* will be returned.
Example
set beresp.ttl = std.duration("1w", 3600s);
......@@ -154,6 +155,22 @@ Description
Example
if (std.ip(req.http.X-forwarded-for, "0.0.0.0") ~ my_acl) { ... }
healthy
-------
Prototype
BOOL healthy(BACKEND backend)
Description
Returns true if the backend is healthy.
port
----
Prototype
INT port(IP ip)
Description
Returns the port number of an IP address.
SEE ALSO
========
......
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