Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-backend_dyn
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-backend_dyn
Commits
7767e77c
Commit
7767e77c
authored
Jun 25, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a real SYNOPSIS, and move the examples down into the text.
parent
2f1c284e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
40 deletions
+70
-40
README.rst
README.rst
+35
-20
vmod.vcc
src/vmod.vcc
+35
-20
No files found.
README.rst
View file @
7767e77c
...
@@ -26,6 +26,41 @@ import backend_dyn [from "path"] ;
...
@@ -26,6 +26,41 @@ import backend_dyn [from "path"] ;
::
::
BOOL backend_dyn.create(STRING name, STRING host, [STRING port,]
[PROBE probe,] [STRING host_header,]
[DURATION connect_timeout,]
[DURATION first_byte_timeout,]
[DURATION between_bytes_timeout,]
[INT max_connections])
BACKEND backend_dyn.by_name(STRING name)
BOOL backend_dyn.delete(BACKEND be)
STRING backend_dyn.version()
DESCRIPTION
===========
This Varnish module (VMOD) provides functions to create and delete
backends at runtime. This means that backends can be created at any
time while Varnish is running without reloading VCL, and that backends
created by the VMOD can also be deleted by the VMOD at runtime.
Backends created by the VMOD are the same as backends defined by
static declarations with the ``backend`` keyword, and they have the
same configuration parameters with the same default values. Once
created, a backend can be added to a director or assigned as a value
of ``req.backend_hint`` or ``bereq.backend``. Backends created by the
VMOD are accessed by the finder method ``by_name``, using the name
string assigned at creation.
Once deleted, a backend is no longer in use by Varnish -- it is not
selected by any director to which it may have been added, and is no
longer returned by ``by_name``.
Examples::
import directors;
import directors;
probe p { .url = "/"; }
probe p { .url = "/"; }
...
@@ -86,26 +121,6 @@ import backend_dyn [from "path"] ;
...
@@ -86,26 +121,6 @@ import backend_dyn [from "path"] ;
set bereq.backend = backend_dyn.by_name("be2");
set bereq.backend = backend_dyn.by_name("be2");
}
}
DESCRIPTION
===========
This Varnish module (VMOD) provides functions to create and delete
backends at runtime. This means that backends can be created at any
time while Varnish is running without reloading VCL, and that backends
created by the VMOD can also be deleted by the VMOD at runtime.
Backends created by the VMOD are the same as backends defined by
static declarations with the ``backend`` keyword, and they have the
same configuration parameters with the same default values. Once
created, a backend can be added to a director or assigned as a value
of ``req.backend_hint`` or ``bereq.backend``. Backends created by the
VMOD are accessed by the finder method ``by_name``, using the name
string assigned at creation.
Once deleted, a backend is no longer in use by Varnish -- it is not
selected by any director to which it may have been added, and is no
longer returned by ``by_name``.
CONTENTS
CONTENTS
========
========
...
...
src/vmod.vcc
View file @
7767e77c
...
@@ -11,6 +11,41 @@ $Module backend_dyn 3 Varnish Module to dynamically create and delete backends
...
@@ -11,6 +11,41 @@ $Module backend_dyn 3 Varnish Module to dynamically create and delete backends
::
::
BOOL backend_dyn.create(STRING name, STRING host, [STRING port,]
[PROBE probe,] [STRING host_header,]
[DURATION connect_timeout,]
[DURATION first_byte_timeout,]
[DURATION between_bytes_timeout,]
[INT max_connections])
BACKEND backend_dyn.by_name(STRING name)
BOOL backend_dyn.delete(BACKEND be)
STRING backend_dyn.version()
DESCRIPTION
===========
This Varnish module (VMOD) provides functions to create and delete
backends at runtime. This means that backends can be created at any
time while Varnish is running without reloading VCL, and that backends
created by the VMOD can also be deleted by the VMOD at runtime.
Backends created by the VMOD are the same as backends defined by
static declarations with the ``backend`` keyword, and they have the
same configuration parameters with the same default values. Once
created, a backend can be added to a director or assigned as a value
of ``req.backend_hint`` or ``bereq.backend``. Backends created by the
VMOD are accessed by the finder method ``by_name``, using the name
string assigned at creation.
Once deleted, a backend is no longer in use by Varnish -- it is not
selected by any director to which it may have been added, and is no
longer returned by ``by_name``.
Examples::
import directors;
import directors;
probe p { .url = "/"; }
probe p { .url = "/"; }
...
@@ -71,26 +106,6 @@ $Module backend_dyn 3 Varnish Module to dynamically create and delete backends
...
@@ -71,26 +106,6 @@ $Module backend_dyn 3 Varnish Module to dynamically create and delete backends
set bereq.backend = backend_dyn.by_name("be2");
set bereq.backend = backend_dyn.by_name("be2");
}
}
DESCRIPTION
===========
This Varnish module (VMOD) provides functions to create and delete
backends at runtime. This means that backends can be created at any
time while Varnish is running without reloading VCL, and that backends
created by the VMOD can also be deleted by the VMOD at runtime.
Backends created by the VMOD are the same as backends defined by
static declarations with the ``backend`` keyword, and they have the
same configuration parameters with the same default values. Once
created, a backend can be added to a director or assigned as a value
of ``req.backend_hint`` or ``bereq.backend``. Backends created by the
VMOD are accessed by the finder method ``by_name``, using the name
string assigned at creation.
Once deleted, a backend is no longer in use by Varnish -- it is not
selected by any director to which it may have been added, and is no
longer returned by ``by_name``.
$Function BOOL create(PRIV_VCL, STRING name, STRING host, STRING port="",
$Function BOOL create(PRIV_VCL, STRING name, STRING host, STRING port="",
PROBE probe=0, STRING host_header="",
PROBE probe=0, STRING host_header="",
DURATION connect_timeout=0, DURATION first_byte_timeout=0,
DURATION connect_timeout=0, DURATION first_byte_timeout=0,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment