Evgeny Zinoviev 673603ddb2 1.1.4
2021-03-02 21:31:29 +03:00
2021-03-01 02:04:21 +03:00
2021-02-26 03:40:02 +03:00
2021-03-02 21:31:29 +03:00
2021-02-26 03:40:02 +03:00
2021-02-26 18:13:46 +03:00

php-jobd-client

This is a simple PHP client for jobd. It can send requests and read responses to/from jobd and jobd-master instances.

Installation

composer require ch1p/jobd-client

Usage

The API is compact and simple, just read the code of Client.php.

Here's a small example.

try {
    $jobd = new jobd\Client(jobd\Client::MASTER_PORT, '127.0.0.1');
} catch (Exception $e) {
    die("Failed to connect.\n");
}

try {
    // poke master to send poll requests to workers
    $response = $jobd->poke(['target_name', 'another_name']);
    
    // get status from master
    $status = $jobd->status()->getData();
} catch (Exception $e) {
    die('jobd error: '.$e->getMessage()."\n");
}

$jobd->close();

License

BSD-2c

Description
No description provided
Readme BSD-2-Clause 116 KiB
Languages
PHP 100%