1. 首页
  2. 考试认证
  3. 其它
  4. aioetcd 基于协程的etcd客户端

aioetcd 基于协程的etcd客户端

上传者: 2024-10-14 21:28:24上传 ZIP文件 23.88KB 热度 14次

aioetcd 基于协程的 etcd 客户端异步版本。快速开始:

  1. 安装 etcd 和 etcdctl(参考 .travis.yml 中的 install 部分)。

  2. 创建虚拟环境:virtualenv --python=python3.4 aioetcd

  3. 克隆项目:git clone https://github.com/lisael/aioetcd.git

  4. 进入项目目录:cd aioetcd

  5. 运行测试:make vtest(该命令会在默认端口 4001 和 7001 启动并停止 etcd 实例)。

  6. 后台运行 etcd:etcd &

  7. 使用 etcdctl 设置值:etcdctl set hop 42

  8. 安装依赖:pip install .

  9. 运行示例客户端:python3.4 example/simple_client.py

  10. 在另一个终端中多次运行:etcdctl set hello 0

下载地址
用户评论