iqual / rancher-api

关于该包最新版本(dev-8.x-1.x)没有提供许可证信息。

iqual 版本的 Tyldar/rancher-api

dev-8.x-1.x 2020-10-23 09:27 UTC

This package is auto-updated.

Last update: 2024-09-11 11:47:56 UTC


README

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

安装

RancherAPI使用composer简化安装过程。

通过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());
}
?>