应用及安装文章:
http://www.xiaobo.li/adf/516.html
安装完成后,通过以下方式调用:
以此配置为例:
<!-- 服务监听IP,不指定默认本机接口 -->
<add key="ServiceMonitorIp" value="127.0.0.1"/>
<!-- 服务监控端口 -->
<add key="ServiceMonitorPort" value="200"/>
主机地址: http://127.0.0.1:200
注册一个主机到组:
HTTP POST: http://127.0.0.1:200?action=register
POST DATA:
{
"group":"group name", //register group name
"host":"ip",
"port":0
"custom attr1":"" //custom attribute 1
"custom attr2":"" //custom attribute 2
...
"custom attrN":"" //custom attribute N
}
获取一组注册主机:
HTTP GET: http://127.0.0.1:200?action=get&group={group name}