Rpc library for Severalnines ClusterControl

v0.0.9 2016-05-20 10:29 UTC

This package is not auto-updated.

Last update: 2024-04-24 22:08:05 UTC


README

Build Status Dependency Status codecov.io

Usage example

Installation

$ composer require severalnines/rpcphp

test.php

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$rpc = \Severalnines\Rpc::init(
    array(
        0 => 'wZPkJaOccOEYCVxr',
        1 => 'cRiuu4YfhET4SLuo'
    ),
    '127.0.0.1'
);

$hostsResponse = $rpc
    ->cluster(1)
    ->stat()
    ->getHosts();

if (!$hostsResponse->ok()) {
    die($hostsResponse->getError());
}

var_dump($hostsResponse->getData());