]> git.kaiwu.me - haproxy.git/commit
MINOR: server: refactor cli_find_server()
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 10 Sep 2026 09:11:42 +0000 (11:11 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 14 Oct 2026 09:15:39 +0000 (11:15 +0200)
commitbcbdf95eee1892c48d92870e399595b25796288e
treeed97fdbfbaa2a2f20134a3a2e925ca2c51418f3e
parentc698e8b8c8c35afb28e07600694c12575cebc8d8
MINOR: server: refactor cli_find_server()

Refactor cli_find_server() by splitting its execution into two separated
functions. The first one parse_be_srv() is able to extract a backend and
server name from an argument of the form <bename>/<svname>. The second
function find_be_srv() is responsible to perform the lookup of a server
using a backend and server name.

Now cli_find_server() consists mainly of these two calls. The objective
is to be able to perform only the parsing or lookup parts, without
automatic CLI error display. This will be used to extend CLI "wait"
command handler.

CLI parser "delete server" has been updated to use the new
parse_be_srv() as an example of usage. In the future, it could be useful
to update all similar handlers relying on the same argument format.
include/haproxy/server.h
src/server.c