将读取配置单独抽出形成parameter API;支持Redis多机备份和故障切换。

This commit is contained in:
zhangchengwei
2018-11-07 15:05:55 +08:00
committed by zhengchao
parent 1fbaee37a5
commit f1822e04c5
12 changed files with 320 additions and 168 deletions

View File

@@ -191,6 +191,7 @@ int main(int argc, char **argv)
struct future_pdata *pdata;
struct cache_evbase_ctx *ctx;
void *runtime_log;
struct tango_cache_parameter *parameter;
if(argc != 2 && argc!=3)
{
@@ -209,7 +210,9 @@ int main(int argc, char **argv)
}
cache_evbase_global_init();
instance_asyn = cache_evbase_instance_new("./pangu_tg_cahce.conf", "TANGO_CACHE", runtime_log);
parameter = cache_evbase_parameter_new("./pangu_tg_cahce.conf", "TANGO_CACHE", runtime_log);
assert(parameter != NULL);
instance_asyn = cache_evbase_instance_new(parameter, runtime_log);
assert(instance_asyn!=NULL);
pdata = (struct future_pdata *)malloc(sizeof(struct future_pdata));