-
Notifications
You must be signed in to change notification settings - Fork 534
QConf PHP Doc
Build php extension
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-libqconf-dir=/usr/local/qconf/include --enable-static LDFLAGS=/usr/local/qconf/lib/libqconf.a
make
make install
getConf(key, idc, get_flag)
Description
get configure value
Parameters
path - key of configuration.
idc - Optional,from which idc to get the value,get from local idc if omit
get_flag - Optional,if set get_flag be 0, QConf will wait some time if the configuration is not in share memory yet, which may happen when key not exist or get key the first time. If 1, QConf return immediately return NULL, default get_flag is 0;
Return Value
value of the configuation, NULL if failed
Example
$value = Qconf::getConf("/demo/conf");
getBatchKeys(path, idc, get_flag);
Description
get all children nodes'key
Parameters
path - key of configuration.
idc - Optional,from which idc to get the value,get from local idc if omit
get_flag - Optional,if set get_flag be 0, QConf will wait some time if the configuration is not in share memory yet, which may happen when key not exist or get key the first time. If 1, QConf return immediately return NULL, default get_flag is 0;
Return Value
array of the children keys, NULL if failed
Example
$children_keys = Qconf::getBatchKeys("/demo/conf");
getBatchConf(path, idc, get_flag);
Description
get all children nodes' key and value
Parameters
path - key of configuration.
idc - Optional, from which idc to get the children configurations,get from local idc if omit
get_flag - Optional,if set get_flag be 0, QConf will wait some time if the configuration is not in share memory yet, which may happen when key not exist or get key the first time. If 1, QConf return immediately return NULL, default get_flag is 0;
Return Value
array of the children confs, NULL if failed
Example
$children_conf = Qconf::getBatchConf("demo/conf");
getAllHost(path, idc, get_flag);
Description
get all available services under given path
Parameters
path - key of configuration.
idc - Optional, from which idc to get the services,get from local idc if omit
get_flag - Optional,if set get_flag be 0, QConf will wait some time if the configuration is not in share memory yet, which may happen when key not exist or get key the first time. If 1, QConf return immediately return NULL, default get_flag is 0;
Return Value
array of the all available services, NULL if failed
Example
$hosts = Qconf::getAllHost("demo/hosts");
getHost(path, idc, get_flag);
Description
get one available service
Parameters
path - key of configuration.
idc - Optional,from which idc to get the host,get from local idc if omit
get_flag - Optional,if set get_flag be 0, QConf will wait some time if the configuration is not in share memory yet, which may happen when key not exist or get key the first time. If 1, QConf return immediately return NULL, default get_flag is 0;
Return Value
available host, NULL if failed
Example
$host = Qconf::getHost("demo/hosts");
- QConf Wiki
- FAQ
- Nginx 配置文件 脚本更新说明
- QConf 保证数据的正确性方法
- QConf 使用场景
- QConf 反馈服务器简单示例
- QConf 架构
- QConf 灰度发布功能说明
- QConf 简易部署和使用
- QConf monitor简易部署使用
- QConf Document
- QConf C\C++ Doc
- QConf Go Doc
- QConf Java Doc
- QConf LuaJit Doc
- QConf Node Doc
- QConf Perl Doc
- QConf PHP Doc
- QConf Python Doc
- QConf 管理端
- QConf 管理界面使用
- QConf 管理端接口(C )
- QConf 管理端接口(PHP)