making parse redis connstr externally available

This commit is contained in:
Zakir Durumeric 2013-10-09 17:07:52 -04:00
parent 76f848bf79
commit 3eb7630f28
2 changed files with 14 additions and 12 deletions

View File

@ -25,18 +25,7 @@
static redisContext *rctx;
#define T_TCP 0
#define T_LOCAL 1
typedef struct redisconf {
int type;
char *path;
char *server;
uint16_t port;
char *list_name;
} redisconf_t;
static redisconf_t *redis_parse_connstr(char *connstr)
redisconf_t *redis_parse_connstr(char *connstr)
{
redisconf_t *retv = malloc(sizeof(redisconf_t));
if (strcmp("tcp://", connstr) == 6) {

View File

@ -5,6 +5,19 @@
#ifndef REDIS_ZHELPERS_H
#define REDIS_ZHELPERS_H
#define T_TCP 0
#define T_LOCAL 1
typedef struct redisconf {
int type;
char *path;
char *server;
uint16_t port;
char *list_name;
} redisconf_t;
redisconf_t *redis_parse_connstr(char *connstr);
int redis_init(char*);
int redis_close(void);