MINOR: server: export functions used during server initialization

Export _srv_parse_kw() and srv_postinit() so they can be called from
haload (to come), which needs to configure servers using HAProxy's configuration
parser keywords.
This commit is contained in:
Frederic Lecaille 2026-04-21 08:01:27 +02:00
parent b749ec95e0
commit 5f2274aa1e
2 changed files with 5 additions and 1 deletions

View File

@ -74,6 +74,7 @@ uint server_get_next_id(const struct proxy *px, uint from);
void apply_server_state(void);
void srv_compute_all_admin_states(struct proxy *px);
int srv_set_addr_via_libc(struct server *srv, int *err_code);
int srv_postinit(struct server *srv);
int srv_init_addr(void);
struct server *cli_find_server(struct appctx *appctx, char *arg);
struct server *new_server(struct proxy *proxy);
@ -108,6 +109,9 @@ struct task *srv_cleanup_toremove_conns(struct task *task, void *context, unsign
int srv_apply_track(struct server *srv, struct proxy *curproxy);
int _srv_parse_kw(struct server *srv, char **args, int *cur_arg,
struct proxy *curproxy,
int parse_flags);
/*
* Registers the server keyword list <kwl> as a list of valid keywords for next
* parsing sessions.

View File

@ -3881,7 +3881,7 @@ out:
* A mask of errors is returned. ERR_FATAL is set if the parsing should be
* interrupted.
*/
static int _srv_parse_kw(struct server *srv, char **args, int *cur_arg,
int _srv_parse_kw(struct server *srv, char **args, int *cur_arg,
struct proxy *curproxy,
int parse_flags)
{