将读取配置单独抽出形成parameter API;支持Redis多机备份和故障切换。
This commit is contained in:
5
cache/test/cache_evbase_test.cpp
vendored
5
cache/test/cache_evbase_test.cpp
vendored
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user