zingle/zi-agent
最新稳定版本:v2.0.0
Composer 安装命令:
composer require zingle/zi-agent
包简介
Zingle infrastructure agent
README 文档
README
Installation
composer require zingle/zi-agent
Usage
use Zingle\Infrastructure\Agent; use Zingle\Infrastructure\Connection; $key = new \phpseclib\Crypt\RSA("-----BEGIN RSA PRIVATE KEY-----\nmTJJCjZ..."); $agent = new Agent("foo-user", $key); $connection = new Connection("example.com", $agent); $result = $connection->execute("my-command"); if ($result->getExit() !== 0) { echo $result->getOutput(); echo "failed\n"; } // if running multiple commands, explicitly open and close the connection $connection->open(); // ... $result = $connection->execute("..."); // ... $result = $connection->execute("..."); $connection->close();
统计信息
- 总下载量: 19.15k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-11-16