Download the PHP package kotalor/swoole-zookeeper without Composer
On this page you can find all versions of the php package kotalor/swoole-zookeeper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download kotalor/swoole-zookeeper
More information about kotalor/swoole-zookeeper
Files in kotalor/swoole-zookeeper
Download kotalor/swoole-zookeeper
More information about kotalor/swoole-zookeeper
Files in kotalor/swoole-zookeeper
Vendor kotalor
Package swoole-zookeeper
Short Description Pure PHP Zookeeper client based on Swoole coroutine, compatible with PHP Zookeeper extension API
License MIT
Package swoole-zookeeper
Short Description Pure PHP Zookeeper client based on Swoole coroutine, compatible with PHP Zookeeper extension API
License MIT
Please rate this library. Is it a good library?
Informations about the package swoole-zookeeper
Swoole Zookeeper Client
基于 Swoole 协程的纯 PHP Zookeeper 客户端实现,API 与 PHP Zookeeper 扩展完全兼容。
特性
- ✅ 基于 Swoole 协程,完全非阻塞
- ✅ API 与 PHP Zookeeper 扩展兼容
- ✅ 支持 Watcher 机制(数据变更、节点变更、子节点变更)
- ✅ 支持多服务器自动切换
- ✅ 支持会话管理和自动心跳
- ✅ 支持 ACL 权限控制
- ✅ 支持认证(digest/auth)
环境要求
- PHP >= 8.0
- Swoole >= 4.5
安装
快速开始
使用 Watcher
API 参考
构造函数
$host: 服务器地址,格式:host1:port1,host2:port2$watcher_cb: 默认 watcher 回调函数$recv_timeout: 接收超时时间(毫秒)
连接管理
节点操作
ACL 操作
常量
权限常量
Zookeeper::PERM_READ- 读权限Zookeeper::PERM_WRITE- 写权限Zookeeper::PERM_CREATE- 创建子节点权限Zookeeper::PERM_DELETE- 删除子节点权限Zookeeper::PERM_ADMIN- 管理权限Zookeeper::PERM_ALL- 所有权限
创建模式
Zookeeper::EPHEMERAL- 临时节点Zookeeper::SEQUENCE- 顺序节点
状态常量
Zookeeper::CONNECTING_STATE- 正在连接Zookeeper::CONNECTED_STATE- 已连接Zookeeper::EXPIRED_SESSION_STATE- 会话过期Zookeeper::AUTH_FAILED_STATE- 认证失败Zookeeper::NOTCONNECTED_STATE- 未连接
事件类型
Zookeeper::CREATED_EVENT- 节点创建Zookeeper::DELETED_EVENT- 节点删除Zookeeper::CHANGED_EVENT- 数据变更Zookeeper::CHILD_EVENT- 子节点变更Zookeeper::SESSION_EVENT- 会话事件
辅助方法
异常处理
完整示例
分布式锁
服务注册与发现
配置中心
许可证
MIT License
All versions of swoole-zookeeper with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.0
ext-swoole Version >=5.1
ext-swoole Version >=5.1
The package kotalor/swoole-zookeeper contains the following files
Loading the files please wait ...