]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: server: Add 'server-template' new keyword supported in backend sections.
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 13 Apr 2017 16:24:23 +0000 (18:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 21 Apr 2017 13:42:10 +0000 (15:42 +0200)
commitb82f742b7879a37c12c7915aaef2392e2f48a0e0
tree9f6662de5001d7d80430d600a8a663d39ba647ee
parent759ea98db2cd90e4c9f81e46fbd88bc60a69e309
MINOR: server: Add 'server-template' new keyword supported in backend sections.

This patch makes backend sections support 'server-template' new keyword.
Such 'server-template' objects are parsed similarly to a 'server' object
by parse_server() function, but its first arguments are as follows:
    server-template <ID prefix> <nb | range> <ip | fqdn>:<port> ...

The remaining arguments are the same as for 'server' lines.

With such server template declarations, servers may be allocated with IDs
built from <ID prefix> and <nb | range> arguments.

For instance declaring:
    server-template foo 1-5 google.com:80 ...
or
    server-template foo 5 google.com:80 ...

would be equivalent to declare:
    server foo1 google.com:80 ...
    server foo2 google.com:80 ...
    server foo3 google.com:80 ...
    server foo4 google.com:80 ...
    server foo5 google.com:80 ...
include/common/standard.h
include/types/server.h
src/cfgparse.c
src/server.c
src/standard.c