]> git.kaiwu.me - haproxy.git/commitdiff
MINOR: server: export functions used during server initialization
authorFrederic Lecaille <flecaille@haproxy.com>
Tue, 21 Apr 2026 06:01:27 +0000 (08:01 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Fri, 24 Apr 2026 09:32:45 +0000 (11:32 +0200)
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.

include/haproxy/server.h
src/server.c

index 5ffc06880f1eda342a4069db03b0501bcafeeed6..84442d3eeef7fd1ced50d82189a470b93e887c96 100644 (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.
index 88a05288ec9239dfee956f9ec570ff3584283b1f..89700eb801aa55982a05c2ca4cc1d5cb517b5a39 100644 (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)
 {