k8s/ws-swoole
Composer 安装命令:
composer require k8s/ws-swoole
包简介
Swoole based websocket adapter for k8s/client
README 文档
README
This library provides a Swoole based websocket adapter for the k8s/client library.
General Use with the K8s library / Configuration Options
- Install the library:
composer require k8s/ws-swoole
Note: If you don't need to change any TLS settings, this is all that is needed most likely.
- If you need to configure any options, then you can use the below method to set those and use the websocket with them:
use K8s\Client\K8s; use K8s\Client\Options; use K8s\WsSwoole\CoroutineAdapter; $options = [ # May need to toggle SSL verification settings if using a self-signed cert, like for Minikube 'ssl_allow_self_signed' => true, 'ssl_verify_peer' => false, 'verify_peer' => false, 'verify_peer_name' => false, # To use certificate based auth, you may need to pass in the cert locations. 'ssl_cert_file' => '<home-dir>/.minikube/profiles/minikube/client.crt', 'ssl_key_file' => '/<home-dir>/.minikube/profiles/minikube/client.key', ]; $websocket = new CoroutineAdapter($options); # You can then pass the new websocket adapter in the options to be used $options = new Options('k8s.endpoint.local'); $options->setWebsocketClient($websocket); # Construct K8s to use the new websocket in the options $k8s = new K8s($options);
k8s/ws-swoole 适用场景与选型建议
k8s/ws-swoole 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 21 次下载、GitHub Stars 达 1, 最近一次更新时间为 2021 年 02 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 k8s/ws-swoole 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 k8s/ws-swoole 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2021-02-28