]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: server: server_find functions: id, name, best_match
authorBaptiste Assmann <bedis9@gmail.com>
Wed, 8 Jul 2015 20:03:56 +0000 (22:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 21 Jul 2015 21:24:16 +0000 (23:24 +0200)
commit19a106d24a18868bcef66bd6486de0cef48419c7
treeb532a49845db845e07d95e5de4f87099653e8be3
parent7cc419ae1d7557c16c228041bc5ddde87b052d6a
MINOR: server: server_find functions: id, name, best_match

This patch introduces three new functions which can be used to find a
server in a farm using different server information:
- server unique id (srv->puid)
- server name
- find best match using either name or unique id

When performing best matching, the following applies:
 - use the server name first (if provided)
 - use the server id if provided
 in any case, the function can update the caller about mismatches
 encountered.
include/proto/server.h
src/server.c