29 RCSIDH(redis_pipeline_h,
"$Id: 1617d651e2b2a411deab2e8426c94c9957913ee9 $")
31 #include <freeradius-devel/server/connection.h>
32 #include <freeradius-devel/server/request.h>
33 #include <freeradius-devel/server/trunk.h>
34 #include <freeradius-devel/redis/io.h>
35 #include <hiredis/async.h>
67 char const *cmd_str,
size_t cmd_len);
Head of a doubly linked list.
Stores all information relating to an event list.
Thread local state for a cluster.
Represents a single command.
Represents a collection of pipelined commands.
fr_redis_trunk_t * fr_redis_trunk_alloc(fr_redis_cluster_thread_t *rtcluster, fr_redis_io_conf_t const *conf)
Allocate a new trunk.
void(* fr_redis_command_set_complete_t)(request_t *request, fr_dlist_head_t *completed, void *rctx)
Do something meaningful with the replies to the commands previously issued.
fr_redis_cluster_thread_t * fr_redis_cluster_thread_alloc(TALLOC_CTX *ctx, fr_event_list_t *el, trunk_conf_t const *tconf)
Allocate per-thread, per-cluster instance.
fr_redis_command_set_t * fr_redis_command_set_alloc(TALLOC_CTX *ctx, request_t *request, fr_redis_command_set_complete_t complete, fr_redis_command_set_fail_t fail, void *rctx)
Allocate a new command set.
fr_redis_pipeline_status_t redis_command_set_enqueue(fr_redis_trunk_t *rtrunk, fr_redis_command_set_t *cmds)
Enqueue a command set on a specific trunk.
redisReply * fr_redis_command_get_result(fr_redis_command_t *cmd)
void(* fr_redis_command_set_fail_t)(request_t *request, fr_dlist_head_t *completed, void *rctx)
Write a failure result to the rctx so that the module is aware that the request failed.
fr_redis_pipeline_status_t
@ FR_REDIS_PIPELINE_OK
No failure.
@ FR_REDIS_PIPELINE_TOO_MANY_REDIRECTS
Redirected too many times.
@ FR_REDIS_PIPELINE_BAD_CMDS
Malformed command set.
@ FR_REDIS_PIPELINE_DST_UNAVAILABLE
Cluster or host is down.
@ FR_REDIS_PIPELINE_FAIL
Generic failure.
fr_redis_pipeline_status_t fr_redis_command_preformatted_add(fr_redis_command_set_t *cmds, char const *cmd_str, size_t cmd_len)
Add a preformatted/expanded command to the command set.
Common configuration parameters for a trunk.
static fr_event_list_t * el