Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
2107068a
Commit
2107068a
authored
Mar 05, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update directors developer docs
parent
3d90373d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
directors.rst
doc/sphinx/reference/directors.rst
+10
-3
No files found.
doc/sphinx/reference/directors.rst
View file @
2107068a
...
...
@@ -52,7 +52,6 @@ code instead::
struct director {
unsigned magic;
#define DIRECTOR_MAGIC 0x3336351d
unsigned sick;
void *priv;
char *vcl_name;
struct vcldir *vdir;
...
...
@@ -62,8 +61,9 @@ A director can be summed up as:
- being of a specific ``type`` with a set of operations which is
identical for all instances of that particular type
- some instance specific attributes such as a ``vcl_name``, health
state and ``type``\ -specific private data
- some instance specific attributes such as a ``vcl_name``
and ``type``\ -specific private data
The difference between a *load balancing* director and a *backend*
director is mainly the functions they will implement.
...
...
@@ -71,14 +71,21 @@ director is mainly the functions they will implement.
The fundamental steps towards a director implementation are:
- implement the required functions
- fill a ``struct vdi_methods`` with the name of your director type
and your function pointers
Existence of a ``healthy`` callback signifies that the director has
some means of dynamically determining its health state.
- in your constructor or other initialization routine, allocate and
initialize your director-specific configuration state (aka private
data) and call ``VRT_AddDirector()`` with your ``struct
vdi_methods``, the pointer to your state and a printf format for the
name of your director instance
- implement methods or functions returning ``VCL_BACKEND``
- in your destructor or other finalizer, call ``VRT_DelDirector()``
For forwards compatibility, it is strongly recommended for the last
...
...
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