Closed dembekadam closed 1 year ago
I see redisClusterSetOptionPassword(redisClusterContext *cc, ) in hircluster.h but how this can be used with redisClusterAsyncContext ?
In async example the context is created together with connect
redisClusterAsyncContext *cc = redisClusterAsyncConnect(nodes.c_str(), HIRCLUSTER_FLAG_NULL); if (cc && cc->err) { printf("Error: %s\n", cc->errstr); return 1; }
Is it possible to pass redisClusterContext with password to redisClusterAsyncContext before connect ?
Hi, you should be able to do that like we do in the tests. See for details: https://github.com/Nordix/hiredis-cluster/blob/master/tests/ct_connection.c#L321
Thanks, it works fine.
I see redisClusterSetOptionPassword(redisClusterContext *cc, ) in hircluster.h but how this can be used with redisClusterAsyncContext ?
In async example the context is created together with connect
redisClusterAsyncContext *cc = redisClusterAsyncConnect(nodes.c_str(), HIRCLUSTER_FLAG_NULL); if (cc && cc->err) { printf("Error: %s\n", cc->errstr); return 1; }
Is it possible to pass redisClusterContext with password to redisClusterAsyncContext before connect ?