feat(controller-peers-env-fallback): add the environment-variable reader for the default candidate list (task 1.1)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ab21c1622d
commit
7328b06c53
4 changed files with 57 additions and 1 deletions
|
|
@ -137,6 +137,17 @@ void xce_reconnect_fini(xce_reconnect_ctx_t* rctx);
|
|||
*/
|
||||
int xce_parse_peers(const char* peers_str, xce_cluster_config_t* cfg);
|
||||
|
||||
/**
|
||||
* xce_controller_peers_env() — default controller candidate list from the
|
||||
* XCE_CONTROLLER_PEERS environment variable.
|
||||
*
|
||||
* Returns the variable's value unchanged (same format as --peers, not parsed
|
||||
* here) when it is set and non-empty; NULL when it is unset or empty, so an
|
||||
* empty value behaves exactly like an unset one. The returned pointer is
|
||||
* owned by the process environment; do not free or modify it.
|
||||
*/
|
||||
const char* xce_controller_peers_env(void);
|
||||
|
||||
/* Test seam: set to non-NULL to override the real connect (unit tests only) */
|
||||
typedef void* (*xce_connect_fn_t)(const char* host, int port);
|
||||
void xce_cluster_set_connect_fn(xce_connect_fn_t fn);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue