29 #ifndef LIBFREERADIUS_REDIS_CLUSTER_H
30 #define LIBFREERADIUS_REDIS_CLUSTER_H
32 RCSIDH(cluster_h,
"$Id: 6455947cb2d7987e776342f2dac7e535f0580a20 $")
70 uint8_t
const *key,
size_t key_len,
bool read_only);
int fr_redis_cluster_pool_by_node_addr(fr_connection_pool_t **pool, fr_redis_cluster_t *cluster, fr_ipaddr_t *ipaddr, uint16_t port, bool create)
Get the pool associated with a node in the cluster.
Configuration parameters for a redis connection.
uint32_t reconnects
How many connections we've tried in this pool.
bool close_conn
Set by caller of fr_redis_cluster_state_next, to indicate that connection must be closed...
fr_connection_pool_t * pool
Pool associated with this node.
uint8_t const * key
Key we performed hashing on.
bool fr_redis_cluster_min_version(fr_redis_cluster_t *cluster, char const *min_version)
Check if members of the cluster are above a certain version.
void * fr_redis_cluster_conn_create(TALLOC_CTX *ctx, void *instance, struct timeval const *timeout)
Create a new connection to a Redis node.
uint32_t redirects
How many redirects have we followed.
struct fr_redis_cluster_node * node
Node we're communicating with.
fr_redis_rcode_t fr_redis_cluster_state_init(fr_redis_cluster_state_t *state, fr_redis_conn_t **conn, fr_redis_cluster_t *cluster, REQUEST *request, uint8_t const *key, size_t key_len, bool read_only)
Resolve a key to a pool, and reserve a connection in that pool.
Redis connection sequence state.
size_t key_len
Length of the key.
fr_redis_rcode_t fr_redis_cluster_state_next(fr_redis_cluster_state_t *state, fr_redis_conn_t **conn, fr_redis_cluster_t *cluster, REQUEST *request, fr_redis_rcode_t status, redisReply **reply)
Get the next connection to attempt a command against.
struct fr_redis_cluster_state fr_redis_cluster_state_t
Redis connection sequence state.
fr_redis_cluster_t * fr_redis_cluster_alloc(TALLOC_CTX *ctx, CONF_SECTION *cs, fr_redis_conf_t *conf)
Allocate and initialise a new cluster structure.
uint32_t in_pool
How many available connections are there in the pool.
fr_redis_rcode_t
Codes are ordered inversely by priority.
uint32_t retries
How many time's we've received TRYAGAIN.
Connection handle, holding a redis context.