Commit 3458d0de authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

doc: Polish the none backend section

Going back to lowercase, and aligning code blocks to 4 spaces to match
the rest of the code snippets.
parent 57060899
...@@ -31,41 +31,41 @@ Varnish can have several backends defined you can even join ...@@ -31,41 +31,41 @@ Varnish can have several backends defined you can even join
several backends together into clusters of backends for load balancing several backends together into clusters of backends for load balancing
purposes. purposes.
The "None" backend The "none" backend
------------------ ------------------
Backends can also be declared as ``None`` with the following syntax::: Backends can also be declared as ``none`` with the following syntax:::
backend default None; backend default none;
``None`` backends are special: ``none`` backends are special:
* All backends declared ``None`` compare equal:: * All backends declared ``none`` compare equal::
backend a None; backend a none;
backend b None; backend b none;
sub vcl_recv { sub vcl_recv {
set req.backend_hint = a; set req.backend_hint = a;
if (req.backend_hint == b) { if (req.backend_hint == b) {
return (synth(200, "this is true")); return (synth(200, "this is true"));
} }
} }
* The ``None`` backend evaluates to ``false`` when used in a boolean * The ``none`` backend evaluates to ``false`` when used in a boolean
context:: context::
backend nil None; backend nil none;
sub vcl_recv { sub vcl_recv {
set req.backend_hint = nil; set req.backend_hint = nil;
if (! req.backend_hint) { if (! req.backend_hint) {
return (synth(200, "We get here")); return (synth(200, "We get here"));
} }
} }
* When directors find no healthy backend, they typically return the * When directors find no healthy backend, they typically return the
``None`` backend ``none`` backend
Multiple backends Multiple backends
----------------- -----------------
......
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