tyldar / rancher-api

该软件包已被废弃且不再维护。未建议替代软件包。
该软件包最新版本(dev-master)的许可证信息不可用。

dev-master 2020-04-28 15:44 UTC

This package is auto-updated.

Last update: 2023-11-28 23:56:35 UTC


README

PHP类库集合,用于与Rancher(容器管理系统)API交互。

安装

RancherAPI使用compose简化安装过程。

通过composer安装

composer require tyldar/rancher-api

使用方法

RancherAPI使用极其直观。

简介

<?php
require 'vendor/autoload.php';
use Tyldar\Rancher\Rancher;
try
{
    $rancher = new Rancher("RANCHERHOSTURL", "RANCHERACCESSKEY", "RANCHERSECRETKEY", "PROJECT");
    echo json_encode($rancher->containers()->getAll());
}
catch(Exception $e)
{
    var_dump($e->getResponse()->getBody()->getContents());
}
?>