Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-cluster
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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-cluster
Commits
74e0b928
Commit
74e0b928
authored
Mar 20, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add direct argument to .backend and .*_selected
parent
eadac954
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
+17
-13
vmod_cluster.c
src/vmod_cluster.c
+3
-1
vmod_cluster.vcc
src/vmod_cluster.vcc
+14
-12
No files found.
src/vmod_cluster.c
View file @
74e0b928
...
...
@@ -595,9 +595,11 @@ cluster_choose(VRT_CTX,
.valid_deny = arg->valid_deny, \
.valid_real = arg->valid_real, \
.valid_uncacheable_direct = arg->valid_uncacheable_direct, \
.valid_direct = arg->valid_direct, \
.deny = arg->deny, \
.real = arg->real, \
.uncacheable_direct = arg->uncacheable_direct \
.uncacheable_direct = arg->uncacheable_direct, \
.direct = arg->direct \
}}
...
...
src/vmod_cluster.vcc
View file @
74e0b928
...
...
@@ -189,7 +189,7 @@ See :ref:`meth_ctx` for limitations.
$Method BACKEND .backend(ENUM {LAZY, SHALLOW, DEEP, CLD} resolve=LAZY,
[ BACKEND deny ], [ BACKEND real ],
[ BOOL uncacheable_direct ])
[ BOOL uncacheable_direct ]
, [ BOOL direct ]
)
Return a backend by the method described in the rest of this
documentation:
...
...
@@ -209,25 +209,27 @@ documentation:
`cluster` was selected with ``resolve=DEEP`` and a reference to the
`real` backend otherwise.
The optional `deny`, `real`
and `uncacheable_direct` arguments behave
differently depending on context:
The optional `deny`, `real`
, `uncacheable_direct` and `direct`
arguments behave
differently depending on context:
* in ``vcl_backend_fetch {}`` and ``vcl_init {}``, they have the same
effect as calling the methods :ref:`func_cluster.deny`,
:ref:`func_cluster.set_real` and
:ref:`func_cluster.set_uncacheable_direct` before the `.backend()`
method - in other words, they affect future method calls on the same
cluster object also.
:ref:`func_cluster.set_real`,
:ref:`func_cluster.set_uncacheable_direct` or
:ref:`func_cluster.set_direct`, before the `.backend()` method - in
other words, they affect future method calls on the same cluster
object also.
* Outside ``vcl_backend_fetch {}`` and ``vcl_init {}``, the `deny`,
`real` and `uncacheable_direct` a
rguments only affect the curren
t
return value.
`real` and `uncacheable_direct` a
nd `direct` arguments only affec
t
the current
return value.
Also, they cannot be used together with ``resolve=LAZY``.
Also, in these contexts they cannot be used together with
``resolve=LAZY``.
$Method BOOL .cluster_selected(
[ BACKEND deny ], [ BACKEND real ],
[ BOOL uncacheable_direct ])
[ BOOL uncacheable_direct ]
, [ BOOL direct ]
)
The indended use case is::
...
...
@@ -252,7 +254,7 @@ the vcl otherwise.
$Method BOOL .real_selected(
[ BACKEND deny ], [ BACKEND real ],
[ BOOL uncacheable_direct ])
[ BOOL uncacheable_direct ]
, [ BOOL direct ]
)
mirrors :ref:`func_cluster.cluster_selected`, but returns true if the
real backend is selected.
...
...
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