QConf Perl Doc - Qihoo360/QConf GitHub Wiki
QConf version 1.0.1
The README is used to introduce the module and provide instructions on how to install the module, any machine dependencies it may have (for example C compilers and installed libraries) and any other information that should be provided before the module is installed.
A README file is required for CPAN modules since CPAN extracts the README file from a module distribution so that people browsing the archive can use it get an idea of the modules uses. It is usually a good idea to provide version information here so that people can decide whether fixes for the module are worth downloading.
INSTALLATION
To install this module type the following:
perl Makefile.PL make make install perl ./test.pl
DEPENDENCIES
This module requires these other modules and libraries:
blah blah blah
COPYRIGHT AND LICENCE
Put the correct copyright and licence information here.
Copyright (C) 2015 by root
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.22.0 or, at your option, any later version of Perl 5 you may have available.
========================== 在c++版的QConf客户端基础上包装的perl版客户端 2015-7-30 by [email protected]
安装说明
- 按照QConf的说明对QConf进行编译安装,编译好的libqconf.so复制到/lib64/
- 部署好zookeeper集群或单节点测试环境
- 按QConf的文档说明配置好QConf对zookeeper的连接设置
- 启动QConf agent
- 执行命令:
cd QConf
perl Makefile.PL
make
make install
perl test.pl
使用方式
api参考QConf/QConf.xs 示例参考QConf/test.pl 错误码请参考qconf_errno.h 各个api函数的最后一个参数async(取值true/false),表示是否异步调用,与c++api的同步和异步函数对应。同步和异步的概念请参考QConf的相关文档或如下:
- 松仔 10:45:18 : 步和异步两种不同的api的区别是什么呢
- 王康 10:47:44 : 其实就是driver发现共享内存中没数据的时候的是尝试等待(最多0.5秒,分100次等),还是直接返回