Apache HTTPD
Classes | Macros | Functions | Variables
apr_redis.c File Reference
#include "apr_redis.h"
#include "apr_poll.h"
#include "apr_version.h"
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Classes

struct  apr_redis_conn_t
 

Macros

#define BUFFER_SIZE   512
 
#define LILBUFF_SIZE   64
 
#define RC_EOL   "\r\n"
 
#define RC_EOL_LEN   (sizeof(RC_EOL)-1)
 
#define RC_WS   " "
 
#define RC_WS_LEN   (sizeof(RC_WS)-1)
 
#define RC_RESP_1   "*1\r\n"
 
#define RC_RESP_1_LEN   (sizeof(RC_RESP_1)-1)
 
#define RC_RESP_2   "*2\r\n"
 
#define RC_RESP_2_LEN   (sizeof(RC_RESP_2)-1)
 
#define RC_RESP_3   "*3\r\n"
 
#define RC_RESP_3_LEN   (sizeof(RC_RESP_3)-1)
 
#define RC_RESP_4   "*4\r\n"
 
#define RC_RESP_4_LEN   (sizeof(RC_RESP_4)-1)
 
#define RC_GET   "GET\r\n"
 
#define RC_GET_LEN   (sizeof(RC_GET)-1)
 
#define RC_GET_SIZE   "$3\r\n"
 
#define RC_GET_SIZE_LEN   (sizeof(RC_GET_SIZE)-1)
 
#define RC_SET   "SET\r\n"
 
#define RC_SET_LEN   (sizeof(RC_SET)-1)
 
#define RC_SET_SIZE   "$3\r\n"
 
#define RC_SET_SIZE_LEN   (sizeof(RC_SET_SIZE)-1)
 
#define RC_SETEX   "SETEX\r\n"
 
#define RC_SETEX_LEN   (sizeof(RC_SETEX)-1)
 
#define RC_SETEX_SIZE   "$5\r\n"
 
#define RC_SETEX_SIZE_LEN   (sizeof(RC_SETEX_SIZE)-1)
 
#define RC_DEL   "DEL\r\n"
 
#define RC_DEL_LEN   (sizeof(RC_DEL)-1)
 
#define RC_DEL_SIZE   "$3\r\n"
 
#define RC_DEL_SIZE_LEN   (sizeof(RC_DEL_SIZE)-1)
 
#define RC_QUIT   "QUIT\r\n"
 
#define RC_QUIT_LEN   (sizeof(RC_QUIT)-1)
 
#define RC_QUIT_SIZE   "$4\r\n"
 
#define RC_QUIT_SIZE_LEN   (sizeof(RC_QUIT_SIZE)-1)
 
#define RC_PING   "PING\r\n"
 
#define RC_PING_LEN   (sizeof(RC_PING)-1)
 
#define RC_PING_SIZE   "$4\r\n"
 
#define RC_PING_SIZE_LEN   (sizeof(RC_PING_SIZE)-1)
 
#define RC_INFO   "INFO\r\n"
 
#define RC_INFO_LEN   (sizeof(RC_INFO)-1)
 
#define RC_INFO_SIZE   "$4\r\n"
 
#define RC_INFO_SIZE_LEN   (sizeof(RC_INFO_SIZE)-1)
 
#define RS_STORED   "+OK"
 
#define RS_STORED_LEN   (sizeof(RS_STORED)-1)
 
#define RS_NOT_STORED   "$-1"
 
#define RS_NOT_STORED_LEN   (sizeof(RS_NOT_STORED)-1)
 
#define RS_DELETED   ":1"
 
#define RS_DELETED_LEN   (sizeof(RS_DELETED)-1)
 
#define RS_NOT_FOUND_GET   "$-1"
 
#define RS_NOT_FOUND_GET_LEN   (sizeof(RS_NOT_FOUND_GET)-1)
 
#define RS_NOT_FOUND_DEL   ":0"
 
#define RS_NOT_FOUND_DEL_LEN   (sizeof(RS_NOT_FOUND_DEL)-1)
 
#define RS_TYPE_STRING   "$"
 
#define RS_TYPE_STRING_LEN   (sizeof(RS_TYPE_STRING)-1)
 
#define RS_END   "\r\n"
 
#define RS_END_LEN   (sizeof(RS_END)-1)
 
#define RV_FIELD   "redis_version:"
 
#define STAT_process_id   "process_id:"
 
#define STAT_process_id_LEN   (sizeof(STAT_process_id)-1)
 
#define STAT_uptime_in_seconds   "uptime_in_seconds:"
 
#define STAT_uptime_in_seconds_LEN   (sizeof(STAT_uptime_in_seconds)-1)
 
#define STAT_arch_bits   "arch_bits:"
 
#define STAT_arch_bits_LEN   (sizeof(STAT_arch_bits)-1)
 
#define STAT_connected_clients   "connected_clients:"
 
#define STAT_connected_clients_LEN   (sizeof(STAT_connected_clients)-1)
 
#define STAT_blocked_clients   "blocked_clients:"
 
#define STAT_blocked_clients_LEN   (sizeof(STAT_blocked_clients)-1)
 
#define STAT_maxmemory   "maxmemory:"
 
#define STAT_maxmemory_LEN   (sizeof(STAT_maxmemory)-1)
 
#define STAT_used_memory   "used_memory:"
 
#define STAT_used_memory_LEN   (sizeof(STAT_used_memory)-1)
 
#define STAT_total_system_memory   "total_system_memory:"
 
#define STAT_total_system_memory_LEN   (sizeof(STAT_total_system_memory)-1)
 
#define STAT_total_connections_received   "total_connections_received:"
 
#define STAT_total_connections_received_LEN   (sizeof(STAT_total_connections_received)-1)
 
#define STAT_total_commands_processed   "total_commands_processed:"
 
#define STAT_total_commands_processed_LEN   (sizeof(STAT_total_commands_processed)-1)
 
#define STAT_rejected_connections   "rejected_connections:"
 
#define STAT_rejected_connections_LEN   (sizeof(STAT_rejected_connections)-1)
 
#define STAT_total_net_input_bytes   "total_net_input_bytes:"
 
#define STAT_total_net_input_bytes_LEN   (sizeof(STAT_total_net_input_bytes)-1)
 
#define STAT_total_net_output_bytes   "total_net_output_bytes:"
 
#define STAT_total_net_output_bytes_LEN   (sizeof(STAT_total_net_output_bytes)-1)
 
#define STAT_keyspace_hits   "keyspace_hits:"
 
#define STAT_keyspace_hits_LEN   (sizeof(STAT_keyspace_hits)-1)
 
#define STAT_keyspace_misses   "keyspace_misses:"
 
#define STAT_keyspace_misses_LEN   (sizeof(STAT_keyspace_misses)-1)
 
#define STAT_connected_slaves   "connected_slaves:"
 
#define STAT_connected_slaves_LEN   (sizeof(STAT_connected_slaves)-1)
 
#define STAT_used_cpu_sys   "used_cpu_sys:"
 
#define STAT_used_cpu_sys_LEN   (sizeof(STAT_used_cpu_sys)-1)
 
#define STAT_used_cpu_user   "used_cpu_user:"
 
#define STAT_used_cpu_user_LEN   (sizeof(STAT_used_cpu_user)-1)
 
#define STAT_cluster_enabled   "cluster_enabled:"
 
#define STAT_cluster_enabled_LEN   (sizeof(STAT_cluster_enabled)-1)
 
#define rc_do_stat(name, type)
 

Functions

static apr_status_t make_server_dead (apr_redis_t *rc, apr_redis_server_t *rs)
 
static apr_status_t make_server_live (apr_redis_t *rc, apr_redis_server_t *rs)
 
 APU_DECLARE (apr_status_t)
 
 apr_redis_find_server_hash (apr_redis_t *rc, const apr_uint32_t hash)
 
 apr_redis_find_server_hash_default (void *baton, apr_redis_t *rc, const apr_uint32_t hash)
 
 APU_DECLARE (apr_redis_server_t *)
 
static apr_status_t rs_find_conn (apr_redis_server_t *rs, apr_redis_conn_t **conn)
 
static apr_status_t rs_bad_conn (apr_redis_server_t *rs, apr_redis_conn_t *conn)
 
static apr_status_t rs_release_conn (apr_redis_server_t *rs, apr_redis_conn_t *conn)
 
static apr_status_t conn_connect (apr_redis_conn_t *conn)
 
static apr_status_t rc_conn_construct (void **conn_, void *params, apr_pool_t *pool)
 
 APU_DECLARE (apr_uint32_t)
 
static apr_status_t get_server_line (apr_redis_conn_t *conn)
 
static apr_status_t grab_bulk_resp (apr_redis_server_t *rs, apr_redis_t *rc, apr_redis_conn_t *conn, apr_pool_t *p, char **baton, apr_size_t *new_length)
 
 apr_redis_delete (apr_redis_t *rc, const char *key, apr_uint32_t timeout)
 
 apr_redis_ping (apr_redis_server_t *rs)
 
 apr_redis_info (apr_redis_server_t *rs, apr_pool_t *p, char **baton)
 
 apr_redis_version (apr_redis_server_t *rs, apr_pool_t *p, char **baton)
 
static apr_status_t plus_minus (apr_redis_t *rc, int incr, const char *key, apr_int32_t inc, apr_uint32_t *new_value)
 
 apr_redis_incr (apr_redis_t *rc, const char *key, apr_int32_t inc, apr_uint32_t *new_value)
 
 apr_redis_decr (apr_redis_t *rc, const char *key, apr_int32_t inc, apr_uint32_t *new_value)
 
 apr_redis_multgetp (apr_redis_t *rc, apr_pool_t *temp_pool, apr_pool_t *data_pool, apr_hash_t *values)
 
static apr_uint32_t stat_read_uint32 (char *buf)
 
static apr_uint64_t stat_read_uint64 (char *buf)
 
static void update_stats (char *info, apr_redis_stats_t *stats)
 
 apr_redis_stats (apr_redis_server_t *rs, apr_pool_t *p, apr_redis_stats_t **stats)
 

Variables

static const apr_uint32_t crc32tab [256]
 

Macro Definition Documentation

◆ BUFFER_SIZE

#define BUFFER_SIZE   512

Definition at line 23 of file apr_redis.c.

◆ LILBUFF_SIZE

#define LILBUFF_SIZE   64

Definition at line 24 of file apr_redis.c.

◆ RC_DEL

#define RC_DEL   "DEL\r\n"

Definition at line 75 of file apr_redis.c.

◆ RC_DEL_LEN

#define RC_DEL_LEN   (sizeof(RC_DEL)-1)

Definition at line 76 of file apr_redis.c.

◆ RC_DEL_SIZE

#define RC_DEL_SIZE   "$3\r\n"

Definition at line 78 of file apr_redis.c.

◆ RC_DEL_SIZE_LEN

#define RC_DEL_SIZE_LEN   (sizeof(RC_DEL_SIZE)-1)

Definition at line 79 of file apr_redis.c.

◆ rc_do_stat

#define rc_do_stat (   name,
  type 
)
Value:
if ((ptr = strstr(info , STAT_ ## name )) != NULL ) { \
char *str = ptr + (STAT_ ## name ## _LEN ); \
}
char * strstr(char *s1, char *s2)
apr_pool_t apr_memcache_stats_t ** stats
apr_size_t size
int type
return NULL
Definition mod_so.c:359
char * name
#define str
INT info

Definition at line 1456 of file apr_redis.c.

◆ RC_EOL

#define RC_EOL   "\r\n"

Definition at line 39 of file apr_redis.c.

◆ RC_EOL_LEN

#define RC_EOL_LEN   (sizeof(RC_EOL)-1)

Definition at line 40 of file apr_redis.c.

◆ RC_GET

#define RC_GET   "GET\r\n"

Definition at line 57 of file apr_redis.c.

◆ RC_GET_LEN

#define RC_GET_LEN   (sizeof(RC_GET)-1)

Definition at line 58 of file apr_redis.c.

◆ RC_GET_SIZE

#define RC_GET_SIZE   "$3\r\n"

Definition at line 60 of file apr_redis.c.

◆ RC_GET_SIZE_LEN

#define RC_GET_SIZE_LEN   (sizeof(RC_GET_SIZE)-1)

Definition at line 61 of file apr_redis.c.

◆ RC_INFO

#define RC_INFO   "INFO\r\n"

Definition at line 93 of file apr_redis.c.

◆ RC_INFO_LEN

#define RC_INFO_LEN   (sizeof(RC_INFO)-1)

Definition at line 94 of file apr_redis.c.

◆ RC_INFO_SIZE

#define RC_INFO_SIZE   "$4\r\n"

Definition at line 96 of file apr_redis.c.

◆ RC_INFO_SIZE_LEN

#define RC_INFO_SIZE_LEN   (sizeof(RC_INFO_SIZE)-1)

Definition at line 97 of file apr_redis.c.

◆ RC_PING

#define RC_PING   "PING\r\n"

Definition at line 87 of file apr_redis.c.

◆ RC_PING_LEN

#define RC_PING_LEN   (sizeof(RC_PING)-1)

Definition at line 88 of file apr_redis.c.

◆ RC_PING_SIZE

#define RC_PING_SIZE   "$4\r\n"

Definition at line 90 of file apr_redis.c.

◆ RC_PING_SIZE_LEN

#define RC_PING_SIZE_LEN   (sizeof(RC_PING_SIZE)-1)

Definition at line 91 of file apr_redis.c.

◆ RC_QUIT

#define RC_QUIT   "QUIT\r\n"

Definition at line 81 of file apr_redis.c.

◆ RC_QUIT_LEN

#define RC_QUIT_LEN   (sizeof(RC_QUIT)-1)

Definition at line 82 of file apr_redis.c.

◆ RC_QUIT_SIZE

#define RC_QUIT_SIZE   "$4\r\n"

Definition at line 84 of file apr_redis.c.

◆ RC_QUIT_SIZE_LEN

#define RC_QUIT_SIZE_LEN   (sizeof(RC_QUIT_SIZE)-1)

Definition at line 85 of file apr_redis.c.

◆ RC_RESP_1

#define RC_RESP_1   "*1\r\n"

Definition at line 45 of file apr_redis.c.

◆ RC_RESP_1_LEN

#define RC_RESP_1_LEN   (sizeof(RC_RESP_1)-1)

Definition at line 46 of file apr_redis.c.

◆ RC_RESP_2

#define RC_RESP_2   "*2\r\n"

Definition at line 48 of file apr_redis.c.

◆ RC_RESP_2_LEN

#define RC_RESP_2_LEN   (sizeof(RC_RESP_2)-1)

Definition at line 49 of file apr_redis.c.

◆ RC_RESP_3

#define RC_RESP_3   "*3\r\n"

Definition at line 51 of file apr_redis.c.

◆ RC_RESP_3_LEN

#define RC_RESP_3_LEN   (sizeof(RC_RESP_3)-1)

Definition at line 52 of file apr_redis.c.

◆ RC_RESP_4

#define RC_RESP_4   "*4\r\n"

Definition at line 54 of file apr_redis.c.

◆ RC_RESP_4_LEN

#define RC_RESP_4_LEN   (sizeof(RC_RESP_4)-1)

Definition at line 55 of file apr_redis.c.

◆ RC_SET

#define RC_SET   "SET\r\n"

Definition at line 63 of file apr_redis.c.

◆ RC_SET_LEN

#define RC_SET_LEN   (sizeof(RC_SET)-1)

Definition at line 64 of file apr_redis.c.

◆ RC_SET_SIZE

#define RC_SET_SIZE   "$3\r\n"

Definition at line 66 of file apr_redis.c.

◆ RC_SET_SIZE_LEN

#define RC_SET_SIZE_LEN   (sizeof(RC_SET_SIZE)-1)

Definition at line 67 of file apr_redis.c.

◆ RC_SETEX

#define RC_SETEX   "SETEX\r\n"

Definition at line 69 of file apr_redis.c.

◆ RC_SETEX_LEN

#define RC_SETEX_LEN   (sizeof(RC_SETEX)-1)

Definition at line 70 of file apr_redis.c.

◆ RC_SETEX_SIZE

#define RC_SETEX_SIZE   "$5\r\n"

Definition at line 72 of file apr_redis.c.

◆ RC_SETEX_SIZE_LEN

#define RC_SETEX_SIZE_LEN   (sizeof(RC_SETEX_SIZE)-1)

Definition at line 73 of file apr_redis.c.

◆ RC_WS

#define RC_WS   " "

Definition at line 42 of file apr_redis.c.

◆ RC_WS_LEN

#define RC_WS_LEN   (sizeof(RC_WS)-1)

Definition at line 43 of file apr_redis.c.

◆ RS_DELETED

#define RS_DELETED   ":1"

Definition at line 107 of file apr_redis.c.

◆ RS_DELETED_LEN

#define RS_DELETED_LEN   (sizeof(RS_DELETED)-1)

Definition at line 108 of file apr_redis.c.

◆ RS_END

#define RS_END   "\r\n"

Definition at line 119 of file apr_redis.c.

◆ RS_END_LEN

#define RS_END_LEN   (sizeof(RS_END)-1)

Definition at line 120 of file apr_redis.c.

◆ RS_NOT_FOUND_DEL

#define RS_NOT_FOUND_DEL   ":0"

Definition at line 113 of file apr_redis.c.

◆ RS_NOT_FOUND_DEL_LEN

#define RS_NOT_FOUND_DEL_LEN   (sizeof(RS_NOT_FOUND_DEL)-1)

Definition at line 114 of file apr_redis.c.

◆ RS_NOT_FOUND_GET

#define RS_NOT_FOUND_GET   "$-1"

Definition at line 110 of file apr_redis.c.

◆ RS_NOT_FOUND_GET_LEN

#define RS_NOT_FOUND_GET_LEN   (sizeof(RS_NOT_FOUND_GET)-1)

Definition at line 111 of file apr_redis.c.

◆ RS_NOT_STORED

#define RS_NOT_STORED   "$-1"

Definition at line 104 of file apr_redis.c.

◆ RS_NOT_STORED_LEN

#define RS_NOT_STORED_LEN   (sizeof(RS_NOT_STORED)-1)

Definition at line 105 of file apr_redis.c.

◆ RS_STORED

#define RS_STORED   "+OK"

Definition at line 101 of file apr_redis.c.

◆ RS_STORED_LEN

#define RS_STORED_LEN   (sizeof(RS_STORED)-1)

Definition at line 102 of file apr_redis.c.

◆ RS_TYPE_STRING

#define RS_TYPE_STRING   "$"

Definition at line 116 of file apr_redis.c.

◆ RS_TYPE_STRING_LEN

#define RS_TYPE_STRING_LEN   (sizeof(RS_TYPE_STRING)-1)

Definition at line 117 of file apr_redis.c.

◆ RV_FIELD

#define RV_FIELD   "redis_version:"

Definition at line 1187 of file apr_redis.c.

◆ STAT_arch_bits

#define STAT_arch_bits   "arch_bits:"

Definition at line 1395 of file apr_redis.c.

◆ STAT_arch_bits_LEN

#define STAT_arch_bits_LEN   (sizeof(STAT_arch_bits)-1)

Definition at line 1396 of file apr_redis.c.

◆ STAT_blocked_clients

#define STAT_blocked_clients   "blocked_clients:"

Definition at line 1401 of file apr_redis.c.

◆ STAT_blocked_clients_LEN

#define STAT_blocked_clients_LEN   (sizeof(STAT_blocked_clients)-1)

Definition at line 1402 of file apr_redis.c.

◆ STAT_cluster_enabled

#define STAT_cluster_enabled   "cluster_enabled:"

Definition at line 1443 of file apr_redis.c.

◆ STAT_cluster_enabled_LEN

#define STAT_cluster_enabled_LEN   (sizeof(STAT_cluster_enabled)-1)

Definition at line 1444 of file apr_redis.c.

◆ STAT_connected_clients

#define STAT_connected_clients   "connected_clients:"

Definition at line 1398 of file apr_redis.c.

◆ STAT_connected_clients_LEN

#define STAT_connected_clients_LEN   (sizeof(STAT_connected_clients)-1)

Definition at line 1399 of file apr_redis.c.

◆ STAT_connected_slaves

#define STAT_connected_slaves   "connected_slaves:"

Definition at line 1434 of file apr_redis.c.

◆ STAT_connected_slaves_LEN

#define STAT_connected_slaves_LEN   (sizeof(STAT_connected_slaves)-1)

Definition at line 1435 of file apr_redis.c.

◆ STAT_keyspace_hits

#define STAT_keyspace_hits   "keyspace_hits:"

Definition at line 1428 of file apr_redis.c.

◆ STAT_keyspace_hits_LEN

#define STAT_keyspace_hits_LEN   (sizeof(STAT_keyspace_hits)-1)

Definition at line 1429 of file apr_redis.c.

◆ STAT_keyspace_misses

#define STAT_keyspace_misses   "keyspace_misses:"

Definition at line 1431 of file apr_redis.c.

◆ STAT_keyspace_misses_LEN

#define STAT_keyspace_misses_LEN   (sizeof(STAT_keyspace_misses)-1)

Definition at line 1432 of file apr_redis.c.

◆ STAT_maxmemory

#define STAT_maxmemory   "maxmemory:"

Definition at line 1404 of file apr_redis.c.

◆ STAT_maxmemory_LEN

#define STAT_maxmemory_LEN   (sizeof(STAT_maxmemory)-1)

Definition at line 1405 of file apr_redis.c.

◆ STAT_process_id

#define STAT_process_id   "process_id:"

Define all of the strings for stats

Definition at line 1389 of file apr_redis.c.

◆ STAT_process_id_LEN

#define STAT_process_id_LEN   (sizeof(STAT_process_id)-1)

Definition at line 1390 of file apr_redis.c.

◆ STAT_rejected_connections

#define STAT_rejected_connections   "rejected_connections:"

Definition at line 1419 of file apr_redis.c.

◆ STAT_rejected_connections_LEN

#define STAT_rejected_connections_LEN   (sizeof(STAT_rejected_connections)-1)

Definition at line 1420 of file apr_redis.c.

◆ STAT_total_commands_processed

#define STAT_total_commands_processed   "total_commands_processed:"

Definition at line 1416 of file apr_redis.c.

◆ STAT_total_commands_processed_LEN

#define STAT_total_commands_processed_LEN   (sizeof(STAT_total_commands_processed)-1)

Definition at line 1417 of file apr_redis.c.

◆ STAT_total_connections_received

#define STAT_total_connections_received   "total_connections_received:"

Definition at line 1413 of file apr_redis.c.

◆ STAT_total_connections_received_LEN

#define STAT_total_connections_received_LEN   (sizeof(STAT_total_connections_received)-1)

Definition at line 1414 of file apr_redis.c.

◆ STAT_total_net_input_bytes

#define STAT_total_net_input_bytes   "total_net_input_bytes:"

Definition at line 1422 of file apr_redis.c.

◆ STAT_total_net_input_bytes_LEN

#define STAT_total_net_input_bytes_LEN   (sizeof(STAT_total_net_input_bytes)-1)

Definition at line 1423 of file apr_redis.c.

◆ STAT_total_net_output_bytes

#define STAT_total_net_output_bytes   "total_net_output_bytes:"

Definition at line 1425 of file apr_redis.c.

◆ STAT_total_net_output_bytes_LEN

#define STAT_total_net_output_bytes_LEN   (sizeof(STAT_total_net_output_bytes)-1)

Definition at line 1426 of file apr_redis.c.

◆ STAT_total_system_memory

#define STAT_total_system_memory   "total_system_memory:"

Definition at line 1410 of file apr_redis.c.

◆ STAT_total_system_memory_LEN

#define STAT_total_system_memory_LEN   (sizeof(STAT_total_system_memory)-1)

Definition at line 1411 of file apr_redis.c.

◆ STAT_uptime_in_seconds

#define STAT_uptime_in_seconds   "uptime_in_seconds:"

Definition at line 1392 of file apr_redis.c.

◆ STAT_uptime_in_seconds_LEN

#define STAT_uptime_in_seconds_LEN   (sizeof(STAT_uptime_in_seconds)-1)

Definition at line 1393 of file apr_redis.c.

◆ STAT_used_cpu_sys

#define STAT_used_cpu_sys   "used_cpu_sys:"

Definition at line 1437 of file apr_redis.c.

◆ STAT_used_cpu_sys_LEN

#define STAT_used_cpu_sys_LEN   (sizeof(STAT_used_cpu_sys)-1)

Definition at line 1438 of file apr_redis.c.

◆ STAT_used_cpu_user

#define STAT_used_cpu_user   "used_cpu_user:"

Definition at line 1440 of file apr_redis.c.

◆ STAT_used_cpu_user_LEN

#define STAT_used_cpu_user_LEN   (sizeof(STAT_used_cpu_user)-1)

Definition at line 1441 of file apr_redis.c.

◆ STAT_used_memory

#define STAT_used_memory   "used_memory:"

Definition at line 1407 of file apr_redis.c.

◆ STAT_used_memory_LEN

#define STAT_used_memory_LEN   (sizeof(STAT_used_memory)-1)

Definition at line 1408 of file apr_redis.c.

Function Documentation

◆ apr_redis_decr()

apr_redis_decr ( apr_redis_t rc,
const char key,
apr_int32_t  inc,
apr_uint32_t new_value 
)

Definition at line 1371 of file apr_redis.c.

◆ apr_redis_delete()

apr_redis_delete ( apr_redis_t rc,
const char key,
apr_uint32_t  timeout 
)

Definition at line 1005 of file apr_redis.c.

◆ apr_redis_find_server_hash()

apr_redis_find_server_hash ( apr_redis_t rc,
const apr_uint32_t  hash 
)

Definition at line 158 of file apr_redis.c.

◆ apr_redis_find_server_hash_default()

apr_redis_find_server_hash_default ( void *  baton,
apr_redis_t rc,
const apr_uint32_t  hash 
)

Definition at line 169 of file apr_redis.c.

◆ apr_redis_incr()

apr_redis_incr ( apr_redis_t rc,
const char key,
apr_int32_t  inc,
apr_uint32_t new_value 
)

Definition at line 1365 of file apr_redis.c.

◆ apr_redis_info()

apr_redis_info ( apr_redis_server_t rs,
apr_pool_t p,
char **  baton 
)

Definition at line 1134 of file apr_redis.c.

◆ apr_redis_multgetp()

apr_redis_multgetp ( apr_redis_t rc,
apr_pool_t temp_pool,
apr_pool_t data_pool,
apr_hash_t values 
)

Definition at line 1377 of file apr_redis.c.

◆ apr_redis_ping()

apr_redis_ping ( apr_redis_server_t rs)

Definition at line 1087 of file apr_redis.c.

◆ apr_redis_stats()

apr_redis_stats ( apr_redis_server_t rs,
apr_pool_t p,
apr_redis_stats_t **  stats 
)

Definition at line 1488 of file apr_redis.c.

◆ apr_redis_version()

apr_redis_version ( apr_redis_server_t rs,
apr_pool_t p,
char **  baton 
)

Definition at line 1189 of file apr_redis.c.

◆ APU_DECLARE()

APU_DECLARE ( apr_redis_server_t )

Definition at line 219 of file apr_redis.c.

◆ conn_connect()

static apr_status_t conn_connect ( apr_redis_conn_t conn)
static

Definition at line 303 of file apr_redis.c.

◆ get_server_line()

static apr_status_t get_server_line ( apr_redis_conn_t conn)
static

Definition at line 615 of file apr_redis.c.

◆ grab_bulk_resp()

static apr_status_t grab_bulk_resp ( apr_redis_server_t rs,
apr_redis_t rc,
apr_redis_conn_t conn,
apr_pool_t p,
char **  baton,
apr_size_t new_length 
)
static

Definition at line 856 of file apr_redis.c.

◆ make_server_dead()

static apr_status_t make_server_dead ( apr_redis_t rc,
apr_redis_server_t rs 
)
static

Definition at line 122 of file apr_redis.c.

◆ make_server_live()

static apr_status_t make_server_live ( apr_redis_t rc,
apr_redis_server_t rs 
)
static

Definition at line 136 of file apr_redis.c.

◆ plus_minus()

static apr_status_t plus_minus ( apr_redis_t rc,
int  incr,
const char key,
apr_int32_t  inc,
apr_uint32_t new_value 
)
static

Definition at line 1233 of file apr_redis.c.

◆ rc_conn_construct()

static apr_status_t rc_conn_construct ( void **  conn_,
void *  params,
apr_pool_t pool 
)
static

Definition at line 339 of file apr_redis.c.

◆ rs_bad_conn()

static apr_status_t rs_bad_conn ( apr_redis_server_t rs,
apr_redis_conn_t conn 
)
static

Definition at line 264 of file apr_redis.c.

◆ rs_find_conn()

static apr_status_t rs_find_conn ( apr_redis_server_t rs,
apr_redis_conn_t **  conn 
)
static

Definition at line 236 of file apr_redis.c.

◆ rs_release_conn()

static apr_status_t rs_release_conn ( apr_redis_server_t rs,
apr_redis_conn_t conn 
)
static

Definition at line 274 of file apr_redis.c.

◆ stat_read_uint32()

static apr_uint32_t stat_read_uint32 ( char buf)
static

Definition at line 1446 of file apr_redis.c.

◆ stat_read_uint64()

static apr_uint64_t stat_read_uint64 ( char buf)
static

Definition at line 1451 of file apr_redis.c.

◆ update_stats()

static void update_stats ( char info,
apr_redis_stats_t stats 
)
static

Definition at line 1462 of file apr_redis.c.

Variable Documentation

◆ crc32tab

const apr_uint32_t crc32tab[256]
static

Definition at line 512 of file apr_redis.c.