From e8446490f7dba46aa3fdaf8d47fafc0d71b40899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Svensson?= Date: Mon, 21 Oct 2024 09:19:16 +0200 Subject: [PATCH] Remove API valkeyClusterSetOptionAddNode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit valkeyClusterSetOptionAddNodes can be used instead. Signed-off-by: Björn Svensson --- docs/migration-guide.md | 1 + include/valkey/cluster.h | 1 - src/cluster.c | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/migration-guide.md b/docs/migration-guide.md index 748d76e..05b77d2 100644 --- a/docs/migration-guide.md +++ b/docs/migration-guide.md @@ -30,6 +30,7 @@ The type `sds` is removed from the public API. ### Removed API functions * `redisClusterSetMaxRedirect` removed and replaced with `valkeyClusterSetOptionMaxRetry`. +* `redisClusterSetOptionAddNode` removed and replaced with `valkeyClusterSetOptionAddNodes`. * `redisClusterSetOptionConnectBlock` removed since it was deprecated. * `redisClusterSetOptionConnectNonBlock` removed since it was deprecated. * `parse_cluster_nodes` removed from API, for internal use only. diff --git a/include/valkey/cluster.h b/include/valkey/cluster.h index fda0872..9a7d283 100644 --- a/include/valkey/cluster.h +++ b/include/valkey/cluster.h @@ -171,7 +171,6 @@ valkeyClusterContext *valkeyClusterContextInit(void); void valkeyClusterFree(valkeyClusterContext *cc); /* Configuration options */ -int valkeyClusterSetOptionAddNode(valkeyClusterContext *cc, const char *addr); int valkeyClusterSetOptionAddNodes(valkeyClusterContext *cc, const char *addrs); int valkeyClusterSetOptionUsername(valkeyClusterContext *cc, const char *username); diff --git a/src/cluster.c b/src/cluster.c index f3dad34..7c7fef8 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -1374,7 +1374,7 @@ valkeyClusterContext *valkeyClusterConnectWithTimeout(const char *addrs, return valkeyClusterConnectInternal(cc, addrs); } -int valkeyClusterSetOptionAddNode(valkeyClusterContext *cc, const char *addr) { +static int valkeyClusterSetOptionAddNode(valkeyClusterContext *cc, const char *addr) { dictEntry *node_entry; valkeyClusterNode *node = NULL; int port, ret;