forked from phpredis/phpredis
-
Notifications
You must be signed in to change notification settings - Fork 2
/
redis_array.h
62 lines (50 loc) · 1.65 KB
/
redis_array.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef REDIS_ARRAY_H
#define REDIS_ARRAY_H
#ifdef PHP_WIN32
#include "win32/php_stdint.h"
#else
#include <stdint.h>
#endif
#include "common.h"
void redis_destructor_redis_array(zend_rsrc_list_entry * rsrc TSRMLS_DC);
PHP_METHOD(RedisArray, __construct);
PHP_METHOD(RedisArray, __call);
PHP_METHOD(RedisArray, _hosts);
PHP_METHOD(RedisArray, _target);
PHP_METHOD(RedisArray, _instance);
PHP_METHOD(RedisArray, _function);
PHP_METHOD(RedisArray, _distributor);
PHP_METHOD(RedisArray, _rehash);
PHP_METHOD(RedisArray, select);
PHP_METHOD(RedisArray, info);
PHP_METHOD(RedisArray, ping);
PHP_METHOD(RedisArray, flushdb);
PHP_METHOD(RedisArray, flushall);
PHP_METHOD(RedisArray, mget);
PHP_METHOD(RedisArray, mset);
PHP_METHOD(RedisArray, del);
PHP_METHOD(RedisArray, keys);
PHP_METHOD(RedisArray, getOption);
PHP_METHOD(RedisArray, setOption);
PHP_METHOD(RedisArray, save);
PHP_METHOD(RedisArray, bgsave);
PHP_METHOD(RedisArray, multi);
PHP_METHOD(RedisArray, exec);
PHP_METHOD(RedisArray, discard);
PHP_METHOD(RedisArray, unwatch);
typedef struct RedisArray_ {
int count;
char **hosts; /* array of host:port strings */
zval **redis; /* array of Redis instances */
zval *z_multi_exec; /* Redis instance to be used in multi-exec */
zend_bool index; /* use per-node index */
zend_bool auto_rehash; /* migrate keys on read operations */
zend_bool pconnect; /* should we use pconnect */
zval *z_fun; /* key extractor, callable */
zval *z_dist; /* key distributor, callable */
zval *z_pure_cmds; /* hash table */
double connect_timeout; /* socket connect timeout */
struct RedisArray_ *prev;
} RedisArray;
uint32_t rcrc32(const char *s, size_t sz);
#endif